summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2005-08-02 20:12:05 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2005-08-02 20:12:05 +0000
commit33bace404a240c1335ab1f6e95bd6616e22c0ecd (patch)
tree004ab1587e14d3df272c6944ce325d3584b95aa5
parentd30622846e00f908cb5d4beac7de4e5e78dcd630 (diff)
downloadclasspath-33bace404a240c1335ab1f6e95bd6616e22c0ecd.tar.gz
2005-08-02 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of HEAD --> generics-branch for 2005/06/05 - 2005/07/31. See patch on classpath-patches@gnu.org for a full ChangeLog.
-rw-r--r--COPYING4
-rw-r--r--ChangeLog4628
-rw-r--r--INSTALL6
-rw-r--r--LICENSE4
-rw-r--r--NEWS110
-rw-r--r--compat/java.net/PlainSocketImpl.java4
-rw-r--r--configure.ac16
-rwxr-xr-xdepcomp4
-rw-r--r--doc/hacking.texinfo12
-rw-r--r--doc/texinfo.tex4
-rw-r--r--doc/vmintegration.texinfo955
-rw-r--r--doc/www.gnu.org/announce/20050630.wml329
-rw-r--r--doc/www.gnu.org/announce/20050715.wml132
-rw-r--r--doc/www.gnu.org/cp-tools/texidoclet.html6
-rw-r--r--doc/www.gnu.org/docs/Makefile2
-rw-r--r--doc/www.gnu.org/downloads/downloads.wml20
-rw-r--r--doc/www.gnu.org/events/events.wml45
-rw-r--r--doc/www.gnu.org/faq/faq.wml23
-rw-r--r--doc/www.gnu.org/home.wml2
-rw-r--r--doc/www.gnu.org/include/macros.wml4
-rw-r--r--doc/www.gnu.org/newsitems.txt10
-rw-r--r--doc/www.gnu.org/savannah.css2
-rw-r--r--doc/www.gnu.org/stories.wml9
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/README4
-rw-r--r--examples/gnu/classpath/examples/CORBA/NamingService/Demo.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java4
-rw-r--r--examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java4
-rw-r--r--examples/gnu/classpath/examples/awt/Demo.java6
-rw-r--r--examples/gnu/classpath/examples/html/Demo.java4
-rw-r--r--examples/gnu/classpath/examples/swing/Demo.java116
-rw-r--r--examples/gnu/classpath/examples/swing/GNULookAndFeel.java23
-rw-r--r--gnu/CORBA/Asynchron.java4
-rw-r--r--gnu/CORBA/BigDecimalHelper.java4
-rw-r--r--gnu/CORBA/ByteArrayComparator.java4
-rw-r--r--gnu/CORBA/CDR/BigEndianInputStream.java4
-rw-r--r--gnu/CORBA/CDR/BigEndianOutputStream.java4
-rw-r--r--gnu/CORBA/CDR/LittleEndianInputStream.java4
-rw-r--r--gnu/CORBA/CDR/LittleEndianOutputStream.java4
-rw-r--r--gnu/CORBA/CDR/Vio.java638
-rw-r--r--gnu/CORBA/CDR/abstractDataInputStream.java4
-rw-r--r--gnu/CORBA/CDR/abstractDataOutputStream.java4
-rw-r--r--gnu/CORBA/CDR/aligningInputStream.java4
-rw-r--r--gnu/CORBA/CDR/aligningOutputStream.java4
-rw-r--r--gnu/CORBA/CDR/cdrBufInput.java4
-rw-r--r--gnu/CORBA/CDR/cdrBufOutput.java4
-rw-r--r--gnu/CORBA/CDR/cdrInput.java469
-rw-r--r--gnu/CORBA/CDR/cdrOutput.java54
-rw-r--r--gnu/CORBA/CDR/encapsulatedOutput.java4
-rw-r--r--gnu/CORBA/Connected_objects.java67
-rw-r--r--gnu/CORBA/DefinitionKindHolder.java4
-rw-r--r--gnu/CORBA/DuplicateNameHolder.java106
-rw-r--r--gnu/CORBA/DynAn/NameValuePairHolder.java4
-rw-r--r--gnu/CORBA/EmptyExceptionHolder.java132
-rw-r--r--gnu/CORBA/ExceptionCreator.java4
-rw-r--r--gnu/CORBA/ForwardRequestHelper.java160
-rw-r--r--gnu/CORBA/Functional_ORB.java311
-rw-r--r--gnu/CORBA/GIOP/CancelHeader.java4
-rw-r--r--gnu/CORBA/GIOP/CharSets_OSF.java4
-rw-r--r--gnu/CORBA/GIOP/CloseMessage.java102
-rw-r--r--gnu/CORBA/GIOP/ErrorMessage.java4
-rw-r--r--gnu/CORBA/GIOP/MessageHeader.java4
-rw-r--r--gnu/CORBA/GIOP/ReplyHeader.java4
-rw-r--r--gnu/CORBA/GIOP/RequestHeader.java4
-rw-r--r--gnu/CORBA/GIOP/ServiceContext.java4
-rw-r--r--gnu/CORBA/GIOP/cxCodeSet.java4
-rw-r--r--gnu/CORBA/GIOP/v1_0/CancelHeader.java4
-rw-r--r--gnu/CORBA/GIOP/v1_0/ReplyHeader.java4
-rw-r--r--gnu/CORBA/GIOP/v1_0/RequestHeader.java4
-rw-r--r--gnu/CORBA/GIOP/v1_2/ReplyHeader.java4
-rw-r--r--gnu/CORBA/GIOP/v1_2/RequestHeader.java4
-rw-r--r--gnu/CORBA/IOR.java33
-rw-r--r--gnu/CORBA/IOR_Delegate.java142
-rw-r--r--gnu/CORBA/IOR_contructed_object.java15
-rw-r--r--gnu/CORBA/NamingService/Binding_iterator_impl.java4
-rw-r--r--gnu/CORBA/NamingService/Ext.java4
-rw-r--r--gnu/CORBA/NamingService/NameValidator.java4
-rw-r--r--gnu/CORBA/NamingService/NamingMap.java4
-rw-r--r--gnu/CORBA/NamingService/NamingServiceTransient.java21
-rw-r--r--gnu/CORBA/NamingService/TransientContext.java4
-rw-r--r--gnu/CORBA/NamingService/cmpNameComponent.java4
-rw-r--r--gnu/CORBA/NamingService/snConverter.java4
-rw-r--r--gnu/CORBA/ObjectCreator.java88
-rw-r--r--gnu/CORBA/OctetHolder.java4
-rw-r--r--gnu/CORBA/Poa/ForwardRequestHolder.java107
-rw-r--r--gnu/CORBA/Poa/ForwardedServant.java207
-rw-r--r--gnu/CORBA/Poa/InvalidPolicyHolder.java106
-rw-r--r--gnu/CORBA/Poa/LocalDelegate.java362
-rw-r--r--gnu/CORBA/Poa/LocalRequest.java426
-rw-r--r--gnu/CORBA/Poa/LocalServerRequest.java199
-rw-r--r--gnu/CORBA/Poa/ORB_1_4.java136
-rw-r--r--gnu/CORBA/Poa/activeObjectMap.java394
-rw-r--r--gnu/CORBA/Poa/dynImpHandler.java85
-rw-r--r--gnu/CORBA/Poa/gnuAdapterActivator.java81
-rw-r--r--gnu/CORBA/Poa/gnuForwardRequest.java90
-rw-r--r--gnu/CORBA/Poa/gnuIdAssignmentPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuIdUniquenessPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuImplicitActivationPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuLifespanPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuPOA.java1615
-rw-r--r--gnu/CORBA/Poa/gnuPOAManager.java225
-rw-r--r--gnu/CORBA/Poa/gnuPoaCurrent.java179
-rw-r--r--gnu/CORBA/Poa/gnuRequestProcessingPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuServantObject.java594
-rw-r--r--gnu/CORBA/Poa/gnuServantRetentionPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuThreadPolicy.java80
-rw-r--r--gnu/CORBA/Poa/policySets.java128
-rw-r--r--gnu/CORBA/Poa/servantDelegate.java235
-rw-r--r--gnu/CORBA/Poa/vPolicy.java (renamed from gnu/CORBA/CDR/uncObjectInputStream.java)38
-rw-r--r--gnu/CORBA/Restricted_ORB.java64
-rw-r--r--gnu/CORBA/ServiceDetailHolder.java4
-rw-r--r--gnu/CORBA/ServiceRequestAdapter.java41
-rw-r--r--gnu/CORBA/SetOverrideTypeHolder.java4
-rw-r--r--gnu/CORBA/Simple_delegate.java37
-rw-r--r--gnu/CORBA/SocketRepository.java93
-rw-r--r--gnu/CORBA/TypeCodeHelper.java4
-rw-r--r--gnu/CORBA/Unexpected.java4
-rw-r--r--gnu/CORBA/Version.java4
-rw-r--r--gnu/CORBA/WCharHolder.java4
-rw-r--r--gnu/CORBA/WStringHolder.java4
-rw-r--r--gnu/CORBA/_PolicyImplBase.java231
-rw-r--r--gnu/CORBA/aliasTypeCode.java4
-rw-r--r--gnu/CORBA/binaryReply.java4
-rw-r--r--gnu/CORBA/bufferedResponseHandler.java4
-rw-r--r--gnu/CORBA/cdrEncapsCodec.java356
-rw-r--r--gnu/CORBA/corbaArrayList.java4
-rw-r--r--gnu/CORBA/fixedTypeCode.java4
-rw-r--r--gnu/CORBA/generalTypeCode.java6
-rw-r--r--gnu/CORBA/gnuAny.java20
-rw-r--r--gnu/CORBA/gnuCodecFactory.java95
-rw-r--r--gnu/CORBA/gnuContext.java4
-rw-r--r--gnu/CORBA/gnuContextList.java4
-rw-r--r--gnu/CORBA/gnuEnvironment.java4
-rw-r--r--gnu/CORBA/gnuExceptionList.java4
-rw-r--r--gnu/CORBA/gnuNVList.java4
-rw-r--r--gnu/CORBA/gnuNamedValue.java4
-rw-r--r--gnu/CORBA/gnuRequest.java140
-rw-r--r--gnu/CORBA/holderFactory.java5
-rw-r--r--gnu/CORBA/primitiveArrayTypeCode.java4
-rw-r--r--gnu/CORBA/primitiveTypeCode.java4
-rw-r--r--gnu/CORBA/recordTypeCode.java4
-rw-r--r--gnu/CORBA/recursiveTypeCode.java4
-rw-r--r--gnu/CORBA/streamReadyHolder.java4
-rw-r--r--gnu/CORBA/streamRequest.java4
-rw-r--r--gnu/CORBA/stringTypeCode.java4
-rw-r--r--gnu/CORBA/stubFinder.java4
-rw-r--r--gnu/CORBA/typeNamer.java4
-rw-r--r--gnu/CORBA/universalHolder.java4
-rw-r--r--gnu/classpath/Configuration.java.in31
-rw-r--r--gnu/classpath/ObjectPool.java250
-rw-r--r--gnu/classpath/RawData.java4
-rw-r--r--gnu/classpath/RawData32.java4
-rw-r--r--gnu/classpath/RawData64.java4
-rw-r--r--gnu/classpath/ServiceFactory.java4
-rw-r--r--gnu/classpath/ServiceProviderLoadingAction.java4
-rw-r--r--gnu/classpath/SystemProperties.java10
-rw-r--r--gnu/classpath/debug/Component.java159
-rw-r--r--gnu/classpath/debug/PreciseFilter.java105
-rw-r--r--gnu/classpath/debug/SystemLogger.java71
-rw-r--r--gnu/classpath/jdwp/exception/InvalidClassException.java63
-rw-r--r--gnu/classpath/jdwp/exception/InvalidCountException.java61
-rw-r--r--gnu/classpath/jdwp/exception/InvalidEventTypeException.java63
-rw-r--r--gnu/classpath/jdwp/exception/InvalidObjectException.java63
-rw-r--r--gnu/classpath/jdwp/exception/InvalidStringException.java68
-rw-r--r--gnu/classpath/jdwp/exception/InvalidThreadException.java (renamed from gnu/java/awt/EmbeddedWindowSupport.java)46
-rw-r--r--gnu/classpath/jdwp/exception/InvalidThreadGroupException.java63
-rw-r--r--gnu/classpath/jdwp/exception/JdwpException.java86
-rw-r--r--gnu/classpath/jdwp/exception/JdwpInternalErrorException.java57
-rw-r--r--gnu/classpath/jdwp/exception/NotImplementedException.java58
-rw-r--r--gnu/classpath/jdwp/exception/VmDeadException.java55
-rw-r--r--gnu/classpath/jdwp/id/ArrayId.java (renamed from gnu/javax/swing/plaf/gtk/GtkCheckBoxUI.java)51
-rw-r--r--gnu/classpath/jdwp/id/ArrayReferenceTypeId.java59
-rw-r--r--gnu/classpath/jdwp/id/ClassLoaderId.java64
-rw-r--r--gnu/classpath/jdwp/id/ClassObjectId.java64
-rw-r--r--gnu/classpath/jdwp/id/ClassReferenceTypeId.java59
-rw-r--r--gnu/classpath/jdwp/id/InterfaceReferenceTypeId.java (renamed from gnu/javax/swing/plaf/gtk/GtkRadioButtonUI.java)48
-rw-r--r--gnu/classpath/jdwp/id/JdwpId.java127
-rw-r--r--gnu/classpath/jdwp/id/JdwpIdFactory.java165
-rw-r--r--gnu/classpath/jdwp/id/ObjectId.java (renamed from gnu/java/awt/peer/gtk/GtkTextComponentPeer.java)88
-rw-r--r--gnu/classpath/jdwp/id/ReferenceTypeId.java81
-rw-r--r--gnu/classpath/jdwp/id/StringId.java64
-rw-r--r--gnu/classpath/jdwp/id/ThreadGroupId.java64
-rw-r--r--gnu/classpath/jdwp/id/ThreadId.java64
-rw-r--r--gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java178
-rw-r--r--gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java108
-rw-r--r--gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java100
-rw-r--r--gnu/classpath/jdwp/processor/CommandSet.java68
-rw-r--r--gnu/classpath/jdwp/processor/FieldCommandSet.java66
-rw-r--r--gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java67
-rw-r--r--gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java266
-rw-r--r--gnu/classpath/jdwp/processor/PacketProcessor.java217
-rw-r--r--gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java339
-rw-r--r--gnu/classpath/jdwp/processor/StringReferenceCommandSet.java98
-rw-r--r--gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java178
-rw-r--r--gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java474
-rw-r--r--gnu/classpath/jdwp/transport/ITransport.java84
-rw-r--r--gnu/classpath/jdwp/transport/JdwpCommandPacket.java149
-rw-r--r--gnu/classpath/jdwp/transport/JdwpConnection.java298
-rw-r--r--gnu/classpath/jdwp/transport/JdwpPacket.java278
-rw-r--r--gnu/classpath/jdwp/transport/JdwpReplyPacket.java137
-rw-r--r--gnu/classpath/jdwp/transport/SocketTransport.java171
-rw-r--r--gnu/classpath/jdwp/transport/TransportException.java75
-rw-r--r--gnu/classpath/jdwp/transport/TransportFactory.java115
-rw-r--r--gnu/classpath/jdwp/util/JdwpString.java95
-rw-r--r--gnu/classpath/jdwp/util/Signature.java149
-rw-r--r--gnu/classpath/jdwp/util/Value.java297
-rw-r--r--gnu/java/awt/AWTUtilities.java694
-rw-r--r--gnu/java/awt/BitMaskExtent.java4
-rw-r--r--gnu/java/awt/BitwiseXORComposite.java4
-rw-r--r--gnu/java/awt/Buffers.java4
-rw-r--r--gnu/java/awt/ClasspathToolkit.java14
-rw-r--r--gnu/java/awt/ComponentDataBlitOp.java4
-rw-r--r--gnu/java/awt/EmbeddedWindow.java14
-rw-r--r--gnu/java/awt/EventModifier.java4
-rw-r--r--gnu/java/awt/FocusManager.java52
-rw-r--r--gnu/java/awt/GradientPaintContext.java4
-rw-r--r--gnu/java/awt/color/CieXyzConverter.java4
-rw-r--r--gnu/java/awt/color/ClutProfileConverter.java4
-rw-r--r--gnu/java/awt/color/ColorLookUpTable.java4
-rw-r--r--gnu/java/awt/color/ColorSpaceConverter.java4
-rw-r--r--gnu/java/awt/color/GrayProfileConverter.java4
-rw-r--r--gnu/java/awt/color/GrayScaleConverter.java4
-rw-r--r--gnu/java/awt/color/LinearRGBConverter.java4
-rw-r--r--gnu/java/awt/color/ProfileHeader.java4
-rw-r--r--gnu/java/awt/color/PyccConverter.java4
-rw-r--r--gnu/java/awt/color/RgbProfileConverter.java4
-rw-r--r--gnu/java/awt/color/SrgbConverter.java4
-rw-r--r--gnu/java/awt/color/TagEntry.java4
-rw-r--r--gnu/java/awt/color/ToneReproductionCurve.java4
-rw-r--r--gnu/java/awt/color/package.html4
-rw-r--r--gnu/java/awt/image/ImageDecoder.java4
-rw-r--r--gnu/java/awt/image/XBMDecoder.java4
-rw-r--r--gnu/java/awt/image/package.html4
-rw-r--r--gnu/java/awt/package.html4
-rw-r--r--gnu/java/awt/peer/ClasspathFontPeer.java4
-rw-r--r--gnu/java/awt/peer/ClasspathTextLayoutPeer.java4
-rw-r--r--gnu/java/awt/peer/EmbeddedWindowPeer.java4
-rw-r--r--gnu/java/awt/peer/GLightweightPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GThreadMutex.java4
-rw-r--r--gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkFontMetrics.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkFontPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkGlyphVector.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphics.java18
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphics2D.java27
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkPixbufDecoder.java18
-rw-r--r--gnu/java/awt/peer/gtk/GdkRobotPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkTextLayout.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkButtonPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkCanvasPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkCheckboxPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkChoicePeer.java8
-rw-r--r--gnu/java/awt/peer/gtk/GtkClipboard.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkComponentPeer.java58
-rw-r--r--gnu/java/awt/peer/gtk/GtkContainerPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkDialogPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkFileDialogPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkFontPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkFramePeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkGenericPeer.java9
-rw-r--r--gnu/java/awt/peer/gtk/GtkImage.java48
-rw-r--r--gnu/java/awt/peer/gtk/GtkImageConsumer.java10
-rw-r--r--gnu/java/awt/peer/gtk/GtkLabelPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkListPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuBarPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuItemPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkPanelPeer.java6
-rw-r--r--gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkScrollPanePeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkScrollbarPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkTextAreaPeer.java42
-rw-r--r--gnu/java/awt/peer/gtk/GtkTextFieldPeer.java42
-rw-r--r--gnu/java/awt/peer/gtk/GtkToolkit.java6
-rw-r--r--gnu/java/awt/peer/gtk/GtkVolatileImage.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkWindowPeer.java6
-rw-r--r--gnu/java/awt/peer/gtk/package.html4
-rw-r--r--gnu/java/awt/peer/package.html4
-rw-r--r--gnu/java/beans/BeanInfoEmbryo.java4
-rw-r--r--gnu/java/beans/DummyAppletContext.java4
-rw-r--r--gnu/java/beans/DummyAppletStub.java4
-rw-r--r--gnu/java/beans/ExplicitBeanInfo.java4
-rw-r--r--gnu/java/beans/IntrospectionIncubator.java4
-rw-r--r--gnu/java/beans/decoder/AbstractContext.java4
-rw-r--r--gnu/java/beans/decoder/AbstractCreatableObjectContext.java4
-rw-r--r--gnu/java/beans/decoder/AbstractElementHandler.java4
-rw-r--r--gnu/java/beans/decoder/AbstractObjectContext.java4
-rw-r--r--gnu/java/beans/decoder/ArrayContext.java4
-rw-r--r--gnu/java/beans/decoder/ArrayHandler.java4
-rw-r--r--gnu/java/beans/decoder/AssemblyException.java4
-rw-r--r--gnu/java/beans/decoder/BooleanHandler.java4
-rw-r--r--gnu/java/beans/decoder/ByteHandler.java4
-rw-r--r--gnu/java/beans/decoder/CharHandler.java4
-rw-r--r--gnu/java/beans/decoder/ClassHandler.java4
-rw-r--r--gnu/java/beans/decoder/ConstructorContext.java4
-rw-r--r--gnu/java/beans/decoder/Context.java4
-rw-r--r--gnu/java/beans/decoder/DecoderContext.java4
-rw-r--r--gnu/java/beans/decoder/DefaultExceptionListener.java4
-rw-r--r--gnu/java/beans/decoder/DoubleHandler.java4
-rw-r--r--gnu/java/beans/decoder/DummyContext.java4
-rw-r--r--gnu/java/beans/decoder/DummyHandler.java4
-rw-r--r--gnu/java/beans/decoder/ElementHandler.java4
-rw-r--r--gnu/java/beans/decoder/FloatHandler.java4
-rw-r--r--gnu/java/beans/decoder/GrowableArrayContext.java4
-rw-r--r--gnu/java/beans/decoder/IndexContext.java4
-rw-r--r--gnu/java/beans/decoder/IntHandler.java4
-rw-r--r--gnu/java/beans/decoder/JavaHandler.java4
-rw-r--r--gnu/java/beans/decoder/LongHandler.java4
-rw-r--r--gnu/java/beans/decoder/MethodContext.java4
-rw-r--r--gnu/java/beans/decoder/MethodFinder.java4
-rw-r--r--gnu/java/beans/decoder/NullHandler.java4
-rw-r--r--gnu/java/beans/decoder/ObjectContext.java4
-rw-r--r--gnu/java/beans/decoder/ObjectHandler.java4
-rw-r--r--gnu/java/beans/decoder/PersistenceParser.java4
-rw-r--r--gnu/java/beans/decoder/PropertyContext.java4
-rw-r--r--gnu/java/beans/decoder/ShortHandler.java4
-rw-r--r--gnu/java/beans/decoder/SimpleHandler.java4
-rw-r--r--gnu/java/beans/decoder/StaticMethodContext.java4
-rw-r--r--gnu/java/beans/decoder/StringHandler.java4
-rw-r--r--gnu/java/beans/decoder/VoidHandler.java4
-rw-r--r--gnu/java/beans/decoder/package.html4
-rw-r--r--gnu/java/beans/editors/ColorEditor.java4
-rw-r--r--gnu/java/beans/editors/FontEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeBooleanEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeByteEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeDoubleEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeFloatEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeIntEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeLongEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeShortEditor.java4
-rw-r--r--gnu/java/beans/editors/StringEditor.java4
-rw-r--r--gnu/java/beans/editors/package.html4
-rw-r--r--gnu/java/beans/package.html4
-rw-r--r--gnu/java/io/ASN1ParsingException.java4
-rw-r--r--gnu/java/io/Base64InputStream.java4
-rw-r--r--gnu/java/io/ClassLoaderObjectInputStream.java4
-rw-r--r--gnu/java/io/NullOutputStream.java4
-rw-r--r--gnu/java/io/ObjectIdentityWrapper.java4
-rw-r--r--gnu/java/io/PlatformHelper.java4
-rw-r--r--gnu/java/io/package.html4
-rw-r--r--gnu/java/lang/ArrayHelper.java4
-rw-r--r--gnu/java/lang/CharData.java4
-rw-r--r--gnu/java/lang/ClassHelper.java4
-rw-r--r--gnu/java/lang/MainThread.java4
-rw-r--r--gnu/java/lang/package.html4
-rw-r--r--gnu/java/lang/reflect/TypeSignature.java4
-rw-r--r--gnu/java/lang/reflect/package.html4
-rw-r--r--gnu/java/locale/LocaleHelper.java29
-rw-r--r--gnu/java/locale/package.html4
-rw-r--r--gnu/java/math/MPN.java4
-rw-r--r--gnu/java/math/package.html4
-rw-r--r--gnu/java/net/BASE64.java4
-rw-r--r--gnu/java/net/CRLFInputStream.java4
-rw-r--r--gnu/java/net/CRLFOutputStream.java4
-rw-r--r--gnu/java/net/EmptyX509TrustManager.java4
-rw-r--r--gnu/java/net/GetLocalHostAction.java4
-rw-r--r--gnu/java/net/HeaderFieldHelper.java4
-rw-r--r--gnu/java/net/LineInputStream.java4
-rw-r--r--gnu/java/net/PlainDatagramSocketImpl.java4
-rw-r--r--gnu/java/net/PlainSocketImpl.java4
-rw-r--r--gnu/java/net/URLParseError.java4
-rw-r--r--gnu/java/net/package.html4
-rw-r--r--gnu/java/net/protocol/file/Connection.java4
-rw-r--r--gnu/java/net/protocol/file/Handler.java4
-rw-r--r--gnu/java/net/protocol/file/package.html4
-rw-r--r--gnu/java/net/protocol/ftp/ActiveModeDTP.java4
-rw-r--r--gnu/java/net/protocol/ftp/BlockInputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/BlockOutputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/CompressedInputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/CompressedOutputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/DTP.java4
-rw-r--r--gnu/java/net/protocol/ftp/DTPInputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/DTPOutputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/FTPConnection.java4
-rw-r--r--gnu/java/net/protocol/ftp/FTPException.java4
-rw-r--r--gnu/java/net/protocol/ftp/FTPResponse.java4
-rw-r--r--gnu/java/net/protocol/ftp/FTPURLConnection.java4
-rw-r--r--gnu/java/net/protocol/ftp/Handler.java4
-rw-r--r--gnu/java/net/protocol/ftp/PassiveModeDTP.java4
-rw-r--r--gnu/java/net/protocol/ftp/StreamInputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/StreamOutputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/package.html4
-rw-r--r--gnu/java/net/protocol/http/Authenticator.java4
-rw-r--r--gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java4
-rw-r--r--gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java4
-rw-r--r--gnu/java/net/protocol/http/ChunkedInputStream.java4
-rw-r--r--gnu/java/net/protocol/http/Cookie.java4
-rw-r--r--gnu/java/net/protocol/http/CookieManager.java4
-rw-r--r--gnu/java/net/protocol/http/Credentials.java4
-rw-r--r--gnu/java/net/protocol/http/HTTPConnection.java12
-rw-r--r--gnu/java/net/protocol/http/HTTPDateFormat.java4
-rw-r--r--gnu/java/net/protocol/http/HTTPURLConnection.java23
-rw-r--r--gnu/java/net/protocol/http/Handler.java4
-rw-r--r--gnu/java/net/protocol/http/Headers.java4
-rw-r--r--gnu/java/net/protocol/http/Request.java4
-rw-r--r--gnu/java/net/protocol/http/RequestBodyWriter.java4
-rw-r--r--gnu/java/net/protocol/http/Response.java4
-rw-r--r--gnu/java/net/protocol/http/ResponseBodyReader.java4
-rw-r--r--gnu/java/net/protocol/http/ResponseHeaderHandler.java4
-rw-r--r--gnu/java/net/protocol/http/SimpleCookieManager.java4
-rw-r--r--gnu/java/net/protocol/http/event/ConnectionEvent.java4
-rw-r--r--gnu/java/net/protocol/http/event/ConnectionListener.java4
-rw-r--r--gnu/java/net/protocol/http/event/RequestEvent.java4
-rw-r--r--gnu/java/net/protocol/http/event/RequestListener.java4
-rw-r--r--gnu/java/net/protocol/http/event/package.html4
-rw-r--r--gnu/java/net/protocol/http/package.html4
-rw-r--r--gnu/java/net/protocol/https/Handler.java4
-rw-r--r--gnu/java/net/protocol/jar/Connection.java4
-rw-r--r--gnu/java/net/protocol/jar/Handler.java14
-rw-r--r--gnu/java/net/protocol/jar/package.html4
-rw-r--r--gnu/java/nio/ChannelInputStream.java4
-rw-r--r--gnu/java/nio/ChannelOutputStream.java4
-rw-r--r--gnu/java/nio/ChannelReader.java4
-rw-r--r--gnu/java/nio/DatagramChannelImpl.java9
-rw-r--r--gnu/java/nio/DatagramChannelSelectionKey.java10
-rw-r--r--gnu/java/nio/FileLockImpl.java4
-rw-r--r--gnu/java/nio/InputStreamChannel.java4
-rw-r--r--gnu/java/nio/NIOConstants.java4
-rw-r--r--gnu/java/nio/NIODatagramSocket.java4
-rw-r--r--gnu/java/nio/NIOServerSocket.java4
-rw-r--r--gnu/java/nio/NIOSocket.java4
-rw-r--r--gnu/java/nio/OutputStreamChannel.java4
-rw-r--r--gnu/java/nio/PipeImpl.java4
-rw-r--r--gnu/java/nio/SelectionKeyImpl.java4
-rw-r--r--gnu/java/nio/SelectorImpl.java4
-rw-r--r--gnu/java/nio/SelectorProviderImpl.java4
-rw-r--r--gnu/java/nio/ServerSocketChannelImpl.java9
-rw-r--r--gnu/java/nio/ServerSocketChannelSelectionKey.java8
-rw-r--r--gnu/java/nio/SocketChannelImpl.java9
-rw-r--r--gnu/java/nio/SocketChannelSelectionKey.java8
-rw-r--r--gnu/java/nio/channels/FileChannelImpl.java98
-rw-r--r--gnu/java/nio/channels/package.html4
-rw-r--r--gnu/java/nio/charset/ByteCharset.java4
-rw-r--r--gnu/java/nio/charset/Cp424.java4
-rw-r--r--gnu/java/nio/charset/Cp437.java4
-rw-r--r--gnu/java/nio/charset/Cp737.java4
-rw-r--r--gnu/java/nio/charset/Cp775.java4
-rw-r--r--gnu/java/nio/charset/Cp850.java4
-rw-r--r--gnu/java/nio/charset/Cp852.java4
-rw-r--r--gnu/java/nio/charset/Cp855.java4
-rw-r--r--gnu/java/nio/charset/Cp857.java4
-rw-r--r--gnu/java/nio/charset/Cp860.java4
-rw-r--r--gnu/java/nio/charset/Cp861.java4
-rw-r--r--gnu/java/nio/charset/Cp862.java4
-rw-r--r--gnu/java/nio/charset/Cp863.java4
-rw-r--r--gnu/java/nio/charset/Cp864.java4
-rw-r--r--gnu/java/nio/charset/Cp865.java4
-rw-r--r--gnu/java/nio/charset/Cp866.java4
-rw-r--r--gnu/java/nio/charset/Cp869.java4
-rw-r--r--gnu/java/nio/charset/Cp874.java4
-rw-r--r--gnu/java/nio/charset/EncodingHelper.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_1.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_13.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_15.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_2.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_3.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_4.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_5.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_6.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_7.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_8.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_9.java4
-rw-r--r--gnu/java/nio/charset/KOI_8.java4
-rw-r--r--gnu/java/nio/charset/MS874.java4
-rw-r--r--gnu/java/nio/charset/MacCentralEurope.java4
-rw-r--r--gnu/java/nio/charset/MacCroatian.java4
-rw-r--r--gnu/java/nio/charset/MacCyrillic.java4
-rw-r--r--gnu/java/nio/charset/MacDingbat.java4
-rw-r--r--gnu/java/nio/charset/MacGreek.java4
-rw-r--r--gnu/java/nio/charset/MacIceland.java4
-rw-r--r--gnu/java/nio/charset/MacRoman.java4
-rw-r--r--gnu/java/nio/charset/MacRomania.java4
-rw-r--r--gnu/java/nio/charset/MacSymbol.java4
-rw-r--r--gnu/java/nio/charset/MacThai.java4
-rw-r--r--gnu/java/nio/charset/MacTurkish.java4
-rw-r--r--gnu/java/nio/charset/Provider.java4
-rw-r--r--gnu/java/nio/charset/US_ASCII.java4
-rw-r--r--gnu/java/nio/charset/UTF_16.java4
-rw-r--r--gnu/java/nio/charset/UTF_16BE.java4
-rw-r--r--gnu/java/nio/charset/UTF_16Decoder.java4
-rw-r--r--gnu/java/nio/charset/UTF_16Encoder.java4
-rw-r--r--gnu/java/nio/charset/UTF_16LE.java4
-rw-r--r--gnu/java/nio/charset/UTF_8.java4
-rw-r--r--gnu/java/nio/charset/UnicodeLittle.java4
-rw-r--r--gnu/java/nio/charset/Windows1250.java6
-rw-r--r--gnu/java/nio/charset/Windows1251.java6
-rw-r--r--gnu/java/nio/charset/Windows1252.java6
-rw-r--r--gnu/java/nio/charset/Windows1253.java6
-rw-r--r--gnu/java/nio/charset/Windows1254.java6
-rw-r--r--gnu/java/nio/charset/Windows1255.java6
-rw-r--r--gnu/java/nio/charset/Windows1256.java6
-rw-r--r--gnu/java/nio/charset/Windows1257.java6
-rw-r--r--gnu/java/nio/charset/Windows1258.java6
-rw-r--r--gnu/java/nio/charset/iconv/IconvCharset.java4
-rw-r--r--gnu/java/nio/charset/iconv/IconvDecoder.java4
-rw-r--r--gnu/java/nio/charset/iconv/IconvEncoder.java4
-rw-r--r--gnu/java/nio/charset/iconv/IconvMetaData.java4
-rw-r--r--gnu/java/nio/charset/iconv/IconvProvider.java4
-rw-r--r--gnu/java/nio/charset/package.html4
-rw-r--r--gnu/java/nio/package.html4
-rw-r--r--gnu/java/rmi/RMIMarshalledObjectInputStream.java4
-rw-r--r--gnu/java/rmi/RMIMarshalledObjectOutputStream.java4
-rw-r--r--gnu/java/rmi/dgc/DGCImpl.java4
-rw-r--r--gnu/java/rmi/dgc/DGCImpl_Skel.java4
-rw-r--r--gnu/java/rmi/dgc/DGCImpl_Stub.java4
-rw-r--r--gnu/java/rmi/dgc/package.html4
-rw-r--r--gnu/java/rmi/package.html4
-rw-r--r--gnu/java/rmi/registry/RegistryImpl.java4
-rw-r--r--gnu/java/rmi/registry/RegistryImpl_Skel.java4
-rw-r--r--gnu/java/rmi/registry/RegistryImpl_Stub.java4
-rw-r--r--gnu/java/rmi/registry/package.html4
-rw-r--r--gnu/java/rmi/server/ConnectionRunnerPool.java4
-rw-r--r--gnu/java/rmi/server/ProtocolConstants.java4
-rw-r--r--gnu/java/rmi/server/RMIDefaultSocketFactory.java4
-rw-r--r--gnu/java/rmi/server/RMIHashes.java4
-rw-r--r--gnu/java/rmi/server/RMIIncomingThread.java4
-rw-r--r--gnu/java/rmi/server/RMIObjectInputStream.java4
-rw-r--r--gnu/java/rmi/server/RMIObjectOutputStream.java4
-rw-r--r--gnu/java/rmi/server/RMIVoidValue.java4
-rw-r--r--gnu/java/rmi/server/UnicastConnection.java4
-rw-r--r--gnu/java/rmi/server/UnicastConnectionManager.java4
-rw-r--r--gnu/java/rmi/server/UnicastRef.java4
-rw-r--r--gnu/java/rmi/server/UnicastRemoteCall.java4
-rw-r--r--gnu/java/rmi/server/UnicastRemoteStub.java4
-rw-r--r--gnu/java/rmi/server/UnicastServer.java4
-rw-r--r--gnu/java/rmi/server/UnicastServerRef.java4
-rw-r--r--gnu/java/rmi/server/package.html4
-rw-r--r--gnu/java/security/Engine.java4
-rw-r--r--gnu/java/security/OID.java8
-rw-r--r--gnu/java/security/PolicyFile.java4
-rw-r--r--gnu/java/security/action/GetPropertyAction.java4
-rw-r--r--gnu/java/security/action/GetSecurityPropertyAction.java4
-rw-r--r--gnu/java/security/action/SetAccessibleAction.java4
-rw-r--r--gnu/java/security/action/package.html4
-rw-r--r--gnu/java/security/ber/BER.java4
-rw-r--r--gnu/java/security/ber/BEREncodingException.java4
-rw-r--r--gnu/java/security/ber/BERReader.java4
-rw-r--r--gnu/java/security/ber/BERValue.java4
-rw-r--r--gnu/java/security/ber/package.html4
-rw-r--r--gnu/java/security/der/BitString.java4
-rw-r--r--gnu/java/security/der/DER.java4
-rw-r--r--gnu/java/security/der/DEREncodingException.java4
-rw-r--r--gnu/java/security/der/DERReader.java4
-rw-r--r--gnu/java/security/der/DERValue.java4
-rw-r--r--gnu/java/security/der/DERWriter.java4
-rw-r--r--gnu/java/security/der/package.html4
-rw-r--r--gnu/java/security/package.html4
-rw-r--r--gnu/java/security/pkcs/PKCS7SignedData.java4
-rw-r--r--gnu/java/security/pkcs/SignerInfo.java4
-rw-r--r--gnu/java/security/pkcs/package.html4
-rw-r--r--gnu/java/security/provider/CollectionCertStoreImpl.java4
-rw-r--r--gnu/java/security/provider/DSAKeyFactory.java4
-rw-r--r--gnu/java/security/provider/DSAKeyPairGenerator.java4
-rw-r--r--gnu/java/security/provider/DSAParameterGenerator.java4
-rw-r--r--gnu/java/security/provider/DSAParameters.java4
-rw-r--r--gnu/java/security/provider/DSASignature.java4
-rw-r--r--gnu/java/security/provider/DefaultPolicy.java4
-rw-r--r--gnu/java/security/provider/EncodedKeyFactory.java4
-rw-r--r--gnu/java/security/provider/Gnu.java4
-rw-r--r--gnu/java/security/provider/GnuDHPublicKey.java4
-rw-r--r--gnu/java/security/provider/GnuDSAPrivateKey.java4
-rw-r--r--gnu/java/security/provider/GnuDSAPublicKey.java4
-rw-r--r--gnu/java/security/provider/GnuRSAPrivateKey.java4
-rw-r--r--gnu/java/security/provider/GnuRSAPublicKey.java4
-rw-r--r--gnu/java/security/provider/MD2withRSA.java4
-rw-r--r--gnu/java/security/provider/MD4withRSA.java4
-rw-r--r--gnu/java/security/provider/MD5.java4
-rw-r--r--gnu/java/security/provider/MD5withRSA.java4
-rw-r--r--gnu/java/security/provider/PKIXCertPathValidatorImpl.java8
-rw-r--r--gnu/java/security/provider/RSA.java4
-rw-r--r--gnu/java/security/provider/RSAKeyFactory.java4
-rw-r--r--gnu/java/security/provider/SHA.java4
-rw-r--r--gnu/java/security/provider/SHA1PRNG.java4
-rw-r--r--gnu/java/security/provider/SHA1withRSA.java4
-rw-r--r--gnu/java/security/provider/X509CertificateFactory.java4
-rw-r--r--gnu/java/security/provider/package.html4
-rw-r--r--gnu/java/security/util/Prime.java4
-rw-r--r--gnu/java/security/util/package.html4
-rw-r--r--gnu/java/security/x509/GnuPKIExtension.java4
-rw-r--r--gnu/java/security/x509/PolicyNodeImpl.java4
-rw-r--r--gnu/java/security/x509/Util.java4
-rw-r--r--gnu/java/security/x509/X500DistinguishedName.java4
-rw-r--r--gnu/java/security/x509/X509CRL.java4
-rw-r--r--gnu/java/security/x509/X509CRLEntry.java4
-rw-r--r--gnu/java/security/x509/X509CRLSelectorImpl.java4
-rw-r--r--gnu/java/security/x509/X509CertPath.java4
-rw-r--r--gnu/java/security/x509/X509CertSelectorImpl.java4
-rw-r--r--gnu/java/security/x509/X509Certificate.java98
-rw-r--r--gnu/java/security/x509/ext/AuthorityKeyIdentifier.java4
-rw-r--r--gnu/java/security/x509/ext/BasicConstraints.java4
-rw-r--r--gnu/java/security/x509/ext/CRLNumber.java4
-rw-r--r--gnu/java/security/x509/ext/CertificatePolicies.java4
-rw-r--r--gnu/java/security/x509/ext/ExtendedKeyUsage.java4
-rw-r--r--gnu/java/security/x509/ext/Extension.java4
-rw-r--r--gnu/java/security/x509/ext/GeneralNames.java4
-rw-r--r--gnu/java/security/x509/ext/IssuerAlternativeNames.java4
-rw-r--r--gnu/java/security/x509/ext/KeyUsage.java4
-rw-r--r--gnu/java/security/x509/ext/PolicyConstraint.java4
-rw-r--r--gnu/java/security/x509/ext/PolicyMappings.java4
-rw-r--r--gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java4
-rw-r--r--gnu/java/security/x509/ext/ReasonCode.java4
-rw-r--r--gnu/java/security/x509/ext/SubjectAlternativeNames.java4
-rw-r--r--gnu/java/security/x509/ext/SubjectKeyIdentifier.java4
-rw-r--r--gnu/java/security/x509/ext/package.html4
-rw-r--r--gnu/java/security/x509/package.html4
-rw-r--r--gnu/java/text/AttributedFormatBuffer.java4
-rw-r--r--gnu/java/text/BaseBreakIterator.java4
-rw-r--r--gnu/java/text/CharacterBreakIterator.java4
-rw-r--r--gnu/java/text/FormatBuffer.java4
-rw-r--r--gnu/java/text/FormatCharacterIterator.java13
-rw-r--r--gnu/java/text/LineBreakIterator.java4
-rw-r--r--gnu/java/text/SentenceBreakIterator.java4
-rw-r--r--gnu/java/text/StringFormatBuffer.java4
-rw-r--r--gnu/java/text/WordBreakIterator.java4
-rw-r--r--gnu/java/text/package.html4
-rw-r--r--gnu/java/util/DoubleEnumeration.java4
-rw-r--r--gnu/java/util/EmptyEnumeration.java4
-rw-r--r--gnu/java/util/package.html4
-rw-r--r--gnu/java/util/prefs/FileBasedFactory.java4
-rw-r--r--gnu/java/util/prefs/MemoryBasedFactory.java4
-rw-r--r--gnu/java/util/prefs/MemoryBasedPreferences.java4
-rw-r--r--gnu/java/util/prefs/NodeReader.java4
-rw-r--r--gnu/java/util/prefs/NodeWriter.java4
-rw-r--r--gnu/java/util/prefs/package.html4
-rw-r--r--gnu/javax/rmi/CORBA/DelegateFactory.java4
-rw-r--r--gnu/javax/rmi/CORBA/GetDelegateInstanceException.java4
-rw-r--r--gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java4
-rw-r--r--gnu/javax/rmi/CORBA/StubDelegateImpl.java4
-rw-r--r--gnu/javax/rmi/CORBA/UtilDelegateImpl.java4
-rw-r--r--gnu/javax/rmi/CORBA/ValueHandlerImpl.java4
-rw-r--r--gnu/javax/rmi/PortableServer.java4
-rw-r--r--gnu/javax/swing/plaf/gtk/GtkBorders.java83
-rw-r--r--gnu/javax/swing/plaf/gtk/GtkIconFactory.java99
-rw-r--r--gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java241
-rw-r--r--gnu/javax/swing/plaf/gtk/GtkSliderUI.java230
-rw-r--r--gnu/javax/swing/plaf/gtk/README37
-rw-r--r--gnu/javax/swing/plaf/gtk/SliderTest.java82
-rw-r--r--gnu/javax/swing/text/html/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/HTML_401F.java4
-rw-r--r--gnu/javax/swing/text/html/parser/gnuDTD.java4
-rw-r--r--gnu/javax/swing/text/html/parser/htmlAttributeSet.java4
-rw-r--r--gnu/javax/swing/text/html/parser/htmlValidator.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/TableRowContentModel.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/list.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/noTagModel.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/node.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/models/transformer.java4
-rw-r--r--gnu/javax/swing/text/html/parser/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/support/Parser.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Buffer.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Constants.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Location.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/ParseException.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Queue.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Token.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/node.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/pattern.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/support/parameterDefaulter.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/textPreProcessor.java4
-rw-r--r--gnu/regexp/CharIndexed.java4
-rw-r--r--gnu/regexp/CharIndexedCharArray.java4
-rw-r--r--gnu/regexp/CharIndexedInputStream.java4
-rw-r--r--gnu/regexp/CharIndexedString.java4
-rw-r--r--gnu/regexp/CharIndexedStringBuffer.java4
-rw-r--r--gnu/regexp/RE.java40
-rw-r--r--gnu/regexp/REException.java4
-rw-r--r--gnu/regexp/REFilterInputStream.java4
-rw-r--r--gnu/regexp/REMatch.java4
-rw-r--r--gnu/regexp/REMatchEnumeration.java4
-rw-r--r--gnu/regexp/RESyntax.java12
-rw-r--r--gnu/regexp/REToken.java4
-rw-r--r--gnu/regexp/RETokenAny.java4
-rw-r--r--gnu/regexp/RETokenBackRef.java4
-rw-r--r--gnu/regexp/RETokenChar.java4
-rw-r--r--gnu/regexp/RETokenEnd.java4
-rw-r--r--gnu/regexp/RETokenEndSub.java4
-rw-r--r--gnu/regexp/RETokenLookAhead.java4
-rw-r--r--gnu/regexp/RETokenOneOf.java4
-rw-r--r--gnu/regexp/RETokenPOSIX.java4
-rw-r--r--gnu/regexp/RETokenRange.java4
-rw-r--r--gnu/regexp/RETokenRepeated.java17
-rw-r--r--gnu/regexp/RETokenStart.java4
-rw-r--r--gnu/regexp/RETokenWordBoundary.java4
-rw-r--r--gnu/regexp/UncheckedRE.java4
-rw-r--r--gnu/test/Fail.java4
-rw-r--r--gnu/test/Pass.java4
-rw-r--r--gnu/test/Result.java4
-rw-r--r--gnu/test/Test.java4
-rw-r--r--gnu/test/Unresolved.java4
-rw-r--r--gnu/test/Unsupported.java4
-rw-r--r--gnu/test/Untested.java4
-rw-r--r--gnu/test/XFail.java4
-rw-r--r--gnu/test/XPass.java4
-rw-r--r--gnu/xml/aelfred2/ContentHandler2.java4
-rw-r--r--gnu/xml/aelfred2/JAXPFactory.java4
-rw-r--r--gnu/xml/aelfred2/SAXDriver.java4
-rw-r--r--gnu/xml/aelfred2/XmlParser.java8
-rw-r--r--gnu/xml/aelfred2/XmlReader.java4
-rw-r--r--gnu/xml/dom/Consumer.java4
-rw-r--r--gnu/xml/dom/DTDAttributeTypeInfo.java4
-rw-r--r--gnu/xml/dom/DTDElementTypeInfo.java4
-rw-r--r--gnu/xml/dom/DomAttr.java4
-rw-r--r--gnu/xml/dom/DomCDATASection.java4
-rw-r--r--gnu/xml/dom/DomCharacterData.java4
-rw-r--r--gnu/xml/dom/DomComment.java4
-rw-r--r--gnu/xml/dom/DomDOMException.java4
-rw-r--r--gnu/xml/dom/DomDoctype.java4
-rw-r--r--gnu/xml/dom/DomDocument.java121
-rw-r--r--gnu/xml/dom/DomDocumentBuilder.java4
-rw-r--r--gnu/xml/dom/DomDocumentBuilderFactory.java4
-rw-r--r--gnu/xml/dom/DomDocumentConfiguration.java4
-rw-r--r--gnu/xml/dom/DomDocumentFragment.java4
-rw-r--r--gnu/xml/dom/DomElement.java4
-rw-r--r--gnu/xml/dom/DomEntity.java4
-rw-r--r--gnu/xml/dom/DomEntityReference.java4
-rw-r--r--gnu/xml/dom/DomEvent.java4
-rw-r--r--gnu/xml/dom/DomExtern.java4
-rw-r--r--gnu/xml/dom/DomImpl.java4
-rw-r--r--gnu/xml/dom/DomIterator.java4
-rw-r--r--gnu/xml/dom/DomNSResolverContext.java4
-rw-r--r--gnu/xml/dom/DomNamedNodeMap.java8
-rw-r--r--gnu/xml/dom/DomNode.java6
-rw-r--r--gnu/xml/dom/DomNodeIterator.java4
-rw-r--r--gnu/xml/dom/DomNotation.java4
-rw-r--r--gnu/xml/dom/DomNsNode.java6
-rw-r--r--gnu/xml/dom/DomProcessingInstruction.java4
-rw-r--r--gnu/xml/dom/DomText.java4
-rw-r--r--gnu/xml/dom/DomXPathExpression.java4
-rw-r--r--gnu/xml/dom/DomXPathNSResolver.java4
-rw-r--r--gnu/xml/dom/DomXPathResult.java4
-rw-r--r--gnu/xml/dom/ImplementationList.java4
-rw-r--r--gnu/xml/dom/ImplementationSource.java4
-rw-r--r--gnu/xml/dom/JAXPFactory.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLAnchorElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLAppletElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLAreaElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLBRElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLBaseElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLBaseFontElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLBodyElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLButtonElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLCollection.java15
-rw-r--r--gnu/xml/dom/html2/DomHTMLDListElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLDirectoryElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLDivElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLDocument.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLElement.java26
-rw-r--r--gnu/xml/dom/html2/DomHTMLFieldSetElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLFontElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLFormElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLFrameElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLFrameSetElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLHRElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLHeadElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLHeadingElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLHtmlElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLIFrameElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLImageElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLImpl.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLInputElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLIsIndexElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLLIElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLLabelElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLLegendElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLLinkElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLMapElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLMenuElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLMetaElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLModElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLOListElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLObjectElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLOptGroupElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLOptionElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLParagraphElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLParamElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLParser.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLPreElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLQuoteElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLScriptElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLSelectElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLStyleElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableCaptionElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableCellElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableColElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableElement.java25
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableRowElement.java8
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableSectionElement.java11
-rw-r--r--gnu/xml/dom/html2/DomHTMLTextAreaElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTitleElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLUListElement.java4
-rw-r--r--gnu/xml/dom/ls/DomLSException.java4
-rw-r--r--gnu/xml/dom/ls/DomLSInput.java4
-rw-r--r--gnu/xml/dom/ls/DomLSOutput.java4
-rw-r--r--gnu/xml/dom/ls/DomLSParser.java4
-rw-r--r--gnu/xml/dom/ls/DomLSSerializer.java4
-rw-r--r--gnu/xml/dom/ls/FilteredSAXEventSink.java4
-rw-r--r--gnu/xml/dom/ls/ReaderInputStream.java4
-rw-r--r--gnu/xml/dom/ls/SAXEventSink.java4
-rw-r--r--gnu/xml/dom/ls/WriterOutputStream.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeAttr.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeCDATASection.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeCharacterData.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeComment.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDOMException.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDOMStringList.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocument.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentFragment.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentType.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeElement.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeEntity.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeEntityReference.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNode.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNodeList.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNotation.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeText.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeTypeInfo.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathExpression.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathNodeList.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathResult.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeLocator.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeSAXParser.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeXMLReader.java4
-rw-r--r--gnu/xml/libxmlj/sax/Namespaces.java4
-rw-r--r--gnu/xml/libxmlj/sax/StringArrayAttributes.java4
-rw-r--r--gnu/xml/libxmlj/sax/XMLName.java4
-rw-r--r--gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java4
-rwxr-xr-xgnu/xml/libxmlj/transform/GnomeTransformer.java4
-rwxr-xr-xgnu/xml/libxmlj/transform/GnomeTransformerFactory.java4
-rw-r--r--gnu/xml/libxmlj/transform/URIResolverEntityResolver.java4
-rw-r--r--gnu/xml/libxmlj/util/EmptyNodeList.java4
-rw-r--r--gnu/xml/libxmlj/util/NamedInputStream.java4
-rw-r--r--gnu/xml/libxmlj/util/StandaloneDocumentType.java4
-rw-r--r--gnu/xml/libxmlj/util/StandaloneLocator.java4
-rw-r--r--gnu/xml/libxmlj/util/XMLJ.java4
-rw-r--r--gnu/xml/pipeline/CallFilter.java4
-rw-r--r--gnu/xml/pipeline/DomConsumer.java4
-rw-r--r--gnu/xml/pipeline/EventConsumer.java4
-rw-r--r--gnu/xml/pipeline/EventFilter.java4
-rw-r--r--gnu/xml/pipeline/LinkFilter.java4
-rw-r--r--gnu/xml/pipeline/NSFilter.java4
-rw-r--r--gnu/xml/pipeline/PipelineFactory.java4
-rw-r--r--gnu/xml/pipeline/TeeConsumer.java4
-rw-r--r--gnu/xml/pipeline/TextConsumer.java4
-rw-r--r--gnu/xml/pipeline/ValidationConsumer.java4
-rw-r--r--gnu/xml/pipeline/WellFormednessFilter.java4
-rw-r--r--gnu/xml/pipeline/XIncludeFilter.java4
-rw-r--r--gnu/xml/pipeline/XsltFilter.java4
-rw-r--r--gnu/xml/transform/AbstractNumberNode.java17
-rw-r--r--gnu/xml/transform/ApplyImportsNode.java25
-rw-r--r--gnu/xml/transform/ApplyTemplatesNode.java82
-rw-r--r--gnu/xml/transform/AttributeNode.java40
-rw-r--r--gnu/xml/transform/AttributeSet.java4
-rw-r--r--gnu/xml/transform/Bindings.java153
-rw-r--r--gnu/xml/transform/CallTemplateNode.java65
-rw-r--r--gnu/xml/transform/ChooseNode.java23
-rw-r--r--gnu/xml/transform/CommentNode.java23
-rw-r--r--gnu/xml/transform/CopyNode.java22
-rw-r--r--gnu/xml/transform/CopyOfNode.java31
-rw-r--r--gnu/xml/transform/CurrentFunction.java10
-rw-r--r--gnu/xml/transform/DOMSourceLocator.java4
-rw-r--r--gnu/xml/transform/DocumentFunction.java17
-rw-r--r--gnu/xml/transform/ElementAvailableFunction.java18
-rw-r--r--gnu/xml/transform/ElementNode.java41
-rw-r--r--gnu/xml/transform/ErrorListenerErrorHandler.java4
-rw-r--r--gnu/xml/transform/ForEachNode.java44
-rw-r--r--gnu/xml/transform/FormatNumberFunction.java18
-rw-r--r--gnu/xml/transform/FunctionAvailableFunction.java18
-rw-r--r--gnu/xml/transform/GenerateIdFunction.java18
-rw-r--r--gnu/xml/transform/IfNode.java31
-rw-r--r--gnu/xml/transform/Key.java4
-rw-r--r--gnu/xml/transform/KeyFunction.java16
-rw-r--r--gnu/xml/transform/LiteralNode.java30
-rw-r--r--gnu/xml/transform/MessageNode.java22
-rw-r--r--gnu/xml/transform/NodeNumberNode.java47
-rw-r--r--gnu/xml/transform/NumberNode.java29
-rw-r--r--gnu/xml/transform/OtherwiseNode.java23
-rw-r--r--gnu/xml/transform/ParameterNode.java106
-rw-r--r--gnu/xml/transform/ProcessingInstructionNode.java23
-rw-r--r--gnu/xml/transform/SAXSerializer.java4
-rw-r--r--gnu/xml/transform/SortKey.java29
-rw-r--r--gnu/xml/transform/StreamSerializer.java197
-rw-r--r--gnu/xml/transform/Stylesheet.java344
-rw-r--r--gnu/xml/transform/SystemPropertyFunction.java17
-rw-r--r--gnu/xml/transform/Template.java6
-rw-r--r--gnu/xml/transform/TemplateNode.java29
-rw-r--r--gnu/xml/transform/TemplatesImpl.java4
-rw-r--r--gnu/xml/transform/TextNode.java23
-rw-r--r--gnu/xml/transform/TransformerFactoryImpl.java4
-rw-r--r--gnu/xml/transform/TransformerImpl.java209
-rw-r--r--gnu/xml/transform/TransformerOutputProperties.java4
-rw-r--r--gnu/xml/transform/URIResolverEntityResolver.java4
-rw-r--r--gnu/xml/transform/UnparsedEntityUriFunction.java18
-rw-r--r--gnu/xml/transform/ValueOfNode.java61
-rw-r--r--gnu/xml/transform/WhenNode.java31
-rw-r--r--gnu/xml/transform/WithParam.java23
-rw-r--r--gnu/xml/transform/XSLComparator.java4
-rw-r--r--gnu/xml/transform/XSLURIResolver.java4
-rw-r--r--gnu/xml/util/DoParse.java4
-rw-r--r--gnu/xml/util/DomParser.java4
-rw-r--r--gnu/xml/util/Resolver.java4
-rw-r--r--gnu/xml/util/SAXNullTransformerFactory.java4
-rw-r--r--gnu/xml/util/XCat.java4
-rw-r--r--gnu/xml/util/XHTMLWriter.java4
-rw-r--r--gnu/xml/util/XMLWriter.java4
-rw-r--r--gnu/xml/xpath/AndExpr.java10
-rw-r--r--gnu/xml/xpath/ArithmeticExpr.java10
-rw-r--r--gnu/xml/xpath/BooleanFunction.java10
-rw-r--r--gnu/xml/xpath/CeilingFunction.java10
-rw-r--r--gnu/xml/xpath/ConcatFunction.java17
-rw-r--r--gnu/xml/xpath/Constant.java10
-rw-r--r--gnu/xml/xpath/ContainsFunction.java10
-rw-r--r--gnu/xml/xpath/CountFunction.java10
-rw-r--r--gnu/xml/xpath/DocumentOrderComparator.java4
-rw-r--r--gnu/xml/xpath/EqualityExpr.java16
-rw-r--r--gnu/xml/xpath/Expr.java6
-rw-r--r--gnu/xml/xpath/FalseFunction.java10
-rw-r--r--gnu/xml/xpath/FloorFunction.java10
-rw-r--r--gnu/xml/xpath/Function.java4
-rw-r--r--gnu/xml/xpath/FunctionCall.java17
-rw-r--r--gnu/xml/xpath/IdFunction.java10
-rw-r--r--gnu/xml/xpath/LangFunction.java10
-rw-r--r--gnu/xml/xpath/LastFunction.java10
-rw-r--r--gnu/xml/xpath/LocalNameFunction.java10
-rw-r--r--gnu/xml/xpath/NameFunction.java10
-rw-r--r--gnu/xml/xpath/NameTest.java19
-rw-r--r--gnu/xml/xpath/NamespaceTest.java16
-rw-r--r--gnu/xml/xpath/NamespaceUriFunction.java10
-rw-r--r--gnu/xml/xpath/NegativeExpr.java10
-rw-r--r--gnu/xml/xpath/NodeTypeTest.java10
-rw-r--r--gnu/xml/xpath/NormalizeSpaceFunction.java10
-rw-r--r--gnu/xml/xpath/NotFunction.java10
-rw-r--r--gnu/xml/xpath/NumberFunction.java10
-rw-r--r--gnu/xml/xpath/OrExpr.java10
-rw-r--r--gnu/xml/xpath/ParenthesizedExpr.java10
-rw-r--r--gnu/xml/xpath/Path.java4
-rw-r--r--gnu/xml/xpath/Pattern.java6
-rw-r--r--gnu/xml/xpath/PositionFunction.java10
-rw-r--r--gnu/xml/xpath/Predicate.java10
-rw-r--r--gnu/xml/xpath/RelationalExpr.java10
-rw-r--r--gnu/xml/xpath/Root.java10
-rw-r--r--gnu/xml/xpath/RoundFunction.java10
-rw-r--r--gnu/xml/xpath/Selector.java27
-rw-r--r--gnu/xml/xpath/StartsWithFunction.java10
-rw-r--r--gnu/xml/xpath/Steps.java17
-rw-r--r--gnu/xml/xpath/StringFunction.java10
-rw-r--r--gnu/xml/xpath/StringLengthFunction.java10
-rw-r--r--gnu/xml/xpath/SubstringAfterFunction.java10
-rw-r--r--gnu/xml/xpath/SubstringBeforeFunction.java10
-rw-r--r--gnu/xml/xpath/SubstringFunction.java11
-rw-r--r--gnu/xml/xpath/SumFunction.java10
-rw-r--r--gnu/xml/xpath/Test.java7
-rw-r--r--gnu/xml/xpath/TranslateFunction.java11
-rw-r--r--gnu/xml/xpath/TrueFunction.java10
-rw-r--r--gnu/xml/xpath/UnionExpr.java10
-rw-r--r--gnu/xml/xpath/VariableReference.java26
-rw-r--r--gnu/xml/xpath/XPathFactoryImpl.java4
-rw-r--r--gnu/xml/xpath/XPathImpl.java4
-rw-r--r--gnu/xml/xpath/XPathParser.java217
-rw-r--r--gnu/xml/xpath/XPathParser.y76
-rw-r--r--gnu/xml/xpath/XPathTokenizer.java4
-rw-r--r--include/.cvsignore1
-rw-r--r--include/Makefile.am1
-rw-r--r--include/gnu_java_awt_peer_gtk_GdkGraphics.h1
-rw-r--r--include/gnu_java_awt_peer_gtk_GdkGraphics2D.h3
-rw-r--r--include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h3
-rw-r--r--include/gnu_java_awt_peer_gtk_GtkChoicePeer.h1
-rw-r--r--include/gnu_java_awt_peer_gtk_GtkComponentPeer.h1
-rw-r--r--include/gnu_java_awt_peer_gtk_GtkImage.h44
-rw-r--r--include/gnu_java_awt_peer_gtk_GtkPanelPeer.h1
-rw-r--r--include/gnu_java_awt_peer_gtk_GtkTextAreaPeer.h9
-rw-r--r--include/gnu_java_awt_peer_gtk_GtkTextComponentPeer.h27
-rw-r--r--include/gnu_java_awt_peer_gtk_GtkTextFieldPeer.h9
-rw-r--r--include/gnu_java_awt_peer_gtk_GtkWindowPeer.h1
-rw-r--r--include/gnu_java_nio_channels_FileChannelImpl.h1
-rw-r--r--include/java_nio_VMDirectByteBuffer.h3
-rw-r--r--include/jni.h4
-rw-r--r--include/jni_md-x86-linux-gnu.h4
-rw-r--r--java/applet/Applet.java5
-rw-r--r--java/applet/AppletContext.java4
-rw-r--r--java/applet/AppletStub.java4
-rw-r--r--java/applet/AudioClip.java4
-rw-r--r--java/applet/package.html4
-rw-r--r--java/awt/AWTError.java4
-rw-r--r--java/awt/AWTEvent.java16
-rw-r--r--java/awt/AWTEventMulticaster.java4
-rw-r--r--java/awt/AWTException.java4
-rw-r--r--java/awt/AWTKeyStroke.java5
-rw-r--r--java/awt/AWTPermission.java4
-rw-r--r--java/awt/ActiveEvent.java4
-rw-r--r--java/awt/Adjustable.java4
-rw-r--r--java/awt/AlphaComposite.java4
-rw-r--r--java/awt/AttributeValue.java4
-rw-r--r--java/awt/BasicStroke.java4
-rw-r--r--java/awt/BorderLayout.java14
-rw-r--r--java/awt/BufferCapabilities.java8
-rw-r--r--java/awt/Button.java4
-rw-r--r--java/awt/Canvas.java4
-rw-r--r--java/awt/CardLayout.java4
-rw-r--r--java/awt/Checkbox.java4
-rw-r--r--java/awt/CheckboxGroup.java4
-rw-r--r--java/awt/CheckboxMenuItem.java4
-rw-r--r--java/awt/Choice.java4
-rw-r--r--java/awt/Color.java4
-rw-r--r--java/awt/ColorPaintContext.java8
-rw-r--r--java/awt/Component.java98
-rw-r--r--java/awt/ComponentOrientation.java4
-rw-r--r--java/awt/Composite.java4
-rw-r--r--java/awt/CompositeContext.java4
-rw-r--r--java/awt/Container.java280
-rw-r--r--java/awt/ContainerOrderFocusTraversalPolicy.java4
-rw-r--r--java/awt/Cursor.java4
-rw-r--r--java/awt/DefaultFocusTraversalPolicy.java4
-rw-r--r--java/awt/DefaultKeyboardFocusManager.java24
-rw-r--r--java/awt/Dialog.java4
-rw-r--r--java/awt/Dimension.java4
-rw-r--r--java/awt/DisplayMode.java4
-rw-r--r--java/awt/Event.java4
-rw-r--r--java/awt/EventDispatchThread.java4
-rw-r--r--java/awt/EventQueue.java5
-rw-r--r--java/awt/FileDialog.java4
-rw-r--r--java/awt/FlowLayout.java4
-rw-r--r--java/awt/FocusTraversalPolicy.java4
-rw-r--r--java/awt/Font.java89
-rw-r--r--java/awt/FontFormatException.java4
-rw-r--r--java/awt/FontMetrics.java4
-rw-r--r--java/awt/Frame.java4
-rw-r--r--java/awt/GradientPaint.java4
-rw-r--r--java/awt/Graphics.java4
-rw-r--r--java/awt/Graphics2D.java4
-rw-r--r--java/awt/GraphicsConfigTemplate.java4
-rw-r--r--java/awt/GraphicsConfiguration.java4
-rw-r--r--java/awt/GraphicsDevice.java10
-rw-r--r--java/awt/GraphicsEnvironment.java4
-rw-r--r--java/awt/GridBagConstraints.java4
-rw-r--r--java/awt/GridBagLayout.java10
-rw-r--r--java/awt/GridBagLayoutInfo.java4
-rw-r--r--java/awt/GridLayout.java4
-rw-r--r--java/awt/HeadlessException.java4
-rw-r--r--java/awt/IllegalComponentStateException.java4
-rw-r--r--java/awt/Image.java8
-rw-r--r--java/awt/ImageCapabilities.java4
-rw-r--r--java/awt/Insets.java4
-rw-r--r--java/awt/ItemSelectable.java4
-rw-r--r--java/awt/JobAttributes.java4
-rw-r--r--java/awt/KeyEventDispatcher.java4
-rw-r--r--java/awt/KeyEventPostProcessor.java4
-rw-r--r--java/awt/KeyboardFocusManager.java56
-rw-r--r--java/awt/Label.java4
-rw-r--r--java/awt/LayoutManager.java4
-rw-r--r--java/awt/LayoutManager2.java4
-rw-r--r--java/awt/List.java5
-rw-r--r--java/awt/MediaTracker.java88
-rw-r--r--java/awt/Menu.java4
-rw-r--r--java/awt/MenuBar.java4
-rw-r--r--java/awt/MenuComponent.java4
-rw-r--r--java/awt/MenuContainer.java4
-rw-r--r--java/awt/MenuItem.java19
-rw-r--r--java/awt/MenuShortcut.java4
-rw-r--r--java/awt/PageAttributes.java4
-rw-r--r--java/awt/Paint.java4
-rw-r--r--java/awt/PaintContext.java4
-rw-r--r--java/awt/Panel.java4
-rw-r--r--java/awt/Point.java4
-rw-r--r--java/awt/Polygon.java4
-rw-r--r--java/awt/PopupMenu.java4
-rw-r--r--java/awt/PrintGraphics.java4
-rw-r--r--java/awt/PrintJob.java6
-rw-r--r--java/awt/Rectangle.java4
-rw-r--r--java/awt/RenderingHints.java24
-rw-r--r--java/awt/Robot.java15
-rw-r--r--java/awt/ScrollPane.java4
-rw-r--r--java/awt/ScrollPaneAdjustable.java4
-rw-r--r--java/awt/Scrollbar.java4
-rw-r--r--java/awt/Shape.java4
-rw-r--r--java/awt/Stroke.java4
-rw-r--r--java/awt/SystemColor.java4
-rw-r--r--java/awt/TextArea.java4
-rw-r--r--java/awt/TextComponent.java4
-rw-r--r--java/awt/TextField.java4
-rw-r--r--java/awt/TexturePaint.java4
-rw-r--r--java/awt/Toolkit.java4
-rw-r--r--java/awt/Transparency.java4
-rw-r--r--java/awt/Window.java4
-rw-r--r--java/awt/color/CMMException.java4
-rw-r--r--java/awt/color/ColorSpace.java4
-rw-r--r--java/awt/color/ICC_ColorSpace.java4
-rw-r--r--java/awt/color/ICC_Profile.java4
-rw-r--r--java/awt/color/ICC_ProfileGray.java4
-rw-r--r--java/awt/color/ICC_ProfileRGB.java4
-rw-r--r--java/awt/color/ProfileDataException.java4
-rw-r--r--java/awt/color/package.html4
-rw-r--r--java/awt/datatransfer/Clipboard.java4
-rw-r--r--java/awt/datatransfer/ClipboardOwner.java4
-rw-r--r--java/awt/datatransfer/DataFlavor.java4
-rw-r--r--java/awt/datatransfer/FlavorMap.java4
-rw-r--r--java/awt/datatransfer/FlavorTable.java4
-rw-r--r--java/awt/datatransfer/MimeTypeParseException.java4
-rw-r--r--java/awt/datatransfer/StringSelection.java4
-rw-r--r--java/awt/datatransfer/SystemFlavorMap.java4
-rw-r--r--java/awt/datatransfer/Transferable.java4
-rw-r--r--java/awt/datatransfer/UnsupportedFlavorException.java4
-rw-r--r--java/awt/datatransfer/package.html4
-rw-r--r--java/awt/dnd/Autoscroll.java4
-rw-r--r--java/awt/dnd/DnDConstants.java4
-rw-r--r--java/awt/dnd/DnDEventMulticaster.java4
-rw-r--r--java/awt/dnd/DragGestureEvent.java4
-rw-r--r--java/awt/dnd/DragGestureListener.java4
-rw-r--r--java/awt/dnd/DragGestureRecognizer.java4
-rw-r--r--java/awt/dnd/DragSource.java4
-rw-r--r--java/awt/dnd/DragSourceAdapter.java4
-rw-r--r--java/awt/dnd/DragSourceContext.java4
-rw-r--r--java/awt/dnd/DragSourceDragEvent.java4
-rw-r--r--java/awt/dnd/DragSourceDropEvent.java4
-rw-r--r--java/awt/dnd/DragSourceEvent.java4
-rw-r--r--java/awt/dnd/DragSourceListener.java4
-rw-r--r--java/awt/dnd/DragSourceMotionListener.java4
-rw-r--r--java/awt/dnd/DropTarget.java4
-rw-r--r--java/awt/dnd/DropTargetAdapter.java4
-rw-r--r--java/awt/dnd/DropTargetContext.java4
-rw-r--r--java/awt/dnd/DropTargetDragEvent.java4
-rw-r--r--java/awt/dnd/DropTargetDropEvent.java4
-rw-r--r--java/awt/dnd/DropTargetEvent.java4
-rw-r--r--java/awt/dnd/DropTargetListener.java4
-rw-r--r--java/awt/dnd/InvalidDnDOperationException.java4
-rw-r--r--java/awt/dnd/MouseDragGestureRecognizer.java4
-rw-r--r--java/awt/dnd/package.html4
-rw-r--r--java/awt/dnd/peer/DragSourceContextPeer.java4
-rw-r--r--java/awt/dnd/peer/DropTargetContextPeer.java4
-rw-r--r--java/awt/dnd/peer/DropTargetPeer.java4
-rw-r--r--java/awt/dnd/peer/package.html4
-rw-r--r--java/awt/event/AWTEventListener.java5
-rw-r--r--java/awt/event/AWTEventListenerProxy.java5
-rw-r--r--java/awt/event/ActionEvent.java4
-rw-r--r--java/awt/event/ActionListener.java4
-rw-r--r--java/awt/event/AdjustmentEvent.java4
-rw-r--r--java/awt/event/AdjustmentListener.java4
-rw-r--r--java/awt/event/ComponentAdapter.java4
-rw-r--r--java/awt/event/ComponentEvent.java4
-rw-r--r--java/awt/event/ComponentListener.java4
-rw-r--r--java/awt/event/ContainerAdapter.java4
-rw-r--r--java/awt/event/ContainerEvent.java4
-rw-r--r--java/awt/event/ContainerListener.java4
-rw-r--r--java/awt/event/FocusAdapter.java4
-rw-r--r--java/awt/event/FocusEvent.java4
-rw-r--r--java/awt/event/FocusListener.java4
-rw-r--r--java/awt/event/HierarchyBoundsAdapter.java4
-rw-r--r--java/awt/event/HierarchyBoundsListener.java4
-rw-r--r--java/awt/event/HierarchyEvent.java4
-rw-r--r--java/awt/event/HierarchyListener.java4
-rw-r--r--java/awt/event/InputEvent.java4
-rw-r--r--java/awt/event/InputMethodEvent.java4
-rw-r--r--java/awt/event/InputMethodListener.java5
-rw-r--r--java/awt/event/InvocationEvent.java4
-rw-r--r--java/awt/event/ItemEvent.java4
-rw-r--r--java/awt/event/ItemListener.java5
-rw-r--r--java/awt/event/KeyAdapter.java4
-rw-r--r--java/awt/event/KeyEvent.java4
-rw-r--r--java/awt/event/KeyListener.java4
-rw-r--r--java/awt/event/MouseAdapter.java4
-rw-r--r--java/awt/event/MouseEvent.java4
-rw-r--r--java/awt/event/MouseListener.java4
-rw-r--r--java/awt/event/MouseMotionAdapter.java4
-rw-r--r--java/awt/event/MouseMotionListener.java4
-rw-r--r--java/awt/event/MouseWheelEvent.java14
-rw-r--r--java/awt/event/MouseWheelListener.java4
-rw-r--r--java/awt/event/PaintEvent.java4
-rw-r--r--java/awt/event/TextEvent.java5
-rw-r--r--java/awt/event/TextListener.java4
-rw-r--r--java/awt/event/WindowAdapter.java4
-rw-r--r--java/awt/event/WindowEvent.java5
-rw-r--r--java/awt/event/WindowFocusListener.java4
-rw-r--r--java/awt/event/WindowListener.java6
-rw-r--r--java/awt/event/WindowStateListener.java4
-rw-r--r--java/awt/event/package.html4
-rw-r--r--java/awt/font/FontRenderContext.java4
-rw-r--r--java/awt/font/GlyphJustificationInfo.java4
-rw-r--r--java/awt/font/GlyphMetrics.java4
-rw-r--r--java/awt/font/GlyphVector.java4
-rw-r--r--java/awt/font/GraphicAttribute.java4
-rw-r--r--java/awt/font/ImageGraphicAttribute.java4
-rw-r--r--java/awt/font/LineBreakMeasurer.java4
-rw-r--r--java/awt/font/LineMetrics.java4
-rw-r--r--java/awt/font/MultipleMaster.java4
-rw-r--r--java/awt/font/NumericShaper.java4
-rw-r--r--java/awt/font/OpenType.java4
-rw-r--r--java/awt/font/ShapeGraphicAttribute.java4
-rw-r--r--java/awt/font/TextAttribute.java4
-rw-r--r--java/awt/font/TextHitInfo.java4
-rw-r--r--java/awt/font/TextLayout.java4
-rw-r--r--java/awt/font/TextMeasurer.java4
-rw-r--r--java/awt/font/TransformAttribute.java4
-rw-r--r--java/awt/font/package.html4
-rw-r--r--java/awt/geom/AffineTransform.java4
-rw-r--r--java/awt/geom/Arc2D.java4
-rw-r--r--java/awt/geom/Area.java4
-rw-r--r--java/awt/geom/CubicCurve2D.java4
-rw-r--r--java/awt/geom/Dimension2D.java4
-rw-r--r--java/awt/geom/Ellipse2D.java4
-rw-r--r--java/awt/geom/FlatteningPathIterator.java4
-rw-r--r--java/awt/geom/GeneralPath.java4
-rw-r--r--java/awt/geom/IllegalPathStateException.java4
-rw-r--r--java/awt/geom/Line2D.java4
-rw-r--r--java/awt/geom/NoninvertibleTransformException.java4
-rw-r--r--java/awt/geom/PathIterator.java4
-rw-r--r--java/awt/geom/Point2D.java4
-rw-r--r--java/awt/geom/QuadCurve2D.java4
-rw-r--r--java/awt/geom/Rectangle2D.java4
-rw-r--r--java/awt/geom/RectangularShape.java4
-rw-r--r--java/awt/geom/RoundRectangle2D.java4
-rw-r--r--java/awt/geom/package.html4
-rw-r--r--java/awt/im/InputContext.java4
-rw-r--r--java/awt/im/InputMethodHighlight.java4
-rw-r--r--java/awt/im/InputMethodRequests.java4
-rw-r--r--java/awt/im/InputSubset.java4
-rw-r--r--java/awt/im/package.html4
-rw-r--r--java/awt/im/spi/InputMethod.java4
-rw-r--r--java/awt/im/spi/InputMethodContext.java4
-rw-r--r--java/awt/im/spi/InputMethodDescriptor.java4
-rw-r--r--java/awt/im/spi/package.html4
-rw-r--r--java/awt/image/AffineTransformOp.java4
-rw-r--r--java/awt/image/AreaAveragingScaleFilter.java4
-rw-r--r--java/awt/image/BandCombineOp.java4
-rw-r--r--java/awt/image/BandedSampleModel.java57
-rw-r--r--java/awt/image/BufferStrategy.java4
-rw-r--r--java/awt/image/BufferedImage.java4
-rw-r--r--java/awt/image/BufferedImageFilter.java4
-rw-r--r--java/awt/image/BufferedImageOp.java4
-rw-r--r--java/awt/image/ByteLookupTable.java4
-rw-r--r--java/awt/image/ColorConvertOp.java4
-rw-r--r--java/awt/image/ColorModel.java4
-rw-r--r--java/awt/image/ComponentColorModel.java4
-rw-r--r--java/awt/image/ComponentSampleModel.java4
-rw-r--r--java/awt/image/ConvolveOp.java8
-rw-r--r--java/awt/image/CropImageFilter.java4
-rw-r--r--java/awt/image/DataBuffer.java20
-rw-r--r--java/awt/image/DataBufferByte.java7
-rw-r--r--java/awt/image/DataBufferDouble.java13
-rw-r--r--java/awt/image/DataBufferFloat.java13
-rw-r--r--java/awt/image/DataBufferInt.java9
-rw-r--r--java/awt/image/DataBufferShort.java9
-rw-r--r--java/awt/image/DataBufferUShort.java9
-rw-r--r--java/awt/image/DirectColorModel.java4
-rw-r--r--java/awt/image/FilteredImageSource.java4
-rw-r--r--java/awt/image/ImageConsumer.java4
-rw-r--r--java/awt/image/ImageFilter.java4
-rw-r--r--java/awt/image/ImageObserver.java4
-rw-r--r--java/awt/image/ImageProducer.java4
-rw-r--r--java/awt/image/ImagingOpException.java4
-rw-r--r--java/awt/image/IndexColorModel.java4
-rw-r--r--java/awt/image/Kernel.java4
-rw-r--r--java/awt/image/LookupOp.java4
-rw-r--r--java/awt/image/LookupTable.java4
-rw-r--r--java/awt/image/MemoryImageSource.java4
-rw-r--r--java/awt/image/MultiPixelPackedSampleModel.java4
-rw-r--r--java/awt/image/PackedColorModel.java4
-rw-r--r--java/awt/image/PixelGrabber.java4
-rw-r--r--java/awt/image/PixelInterleavedSampleModel.java4
-rw-r--r--java/awt/image/RGBImageFilter.java24
-rw-r--r--java/awt/image/Raster.java4
-rw-r--r--java/awt/image/RasterFormatException.java4
-rw-r--r--java/awt/image/RasterOp.java4
-rw-r--r--java/awt/image/RenderedImage.java4
-rw-r--r--java/awt/image/ReplicateScaleFilter.java4
-rw-r--r--java/awt/image/RescaleOp.java4
-rw-r--r--java/awt/image/SampleModel.java12
-rw-r--r--java/awt/image/ShortLookupTable.java4
-rw-r--r--java/awt/image/SinglePixelPackedSampleModel.java4
-rw-r--r--java/awt/image/TileObserver.java4
-rw-r--r--java/awt/image/VolatileImage.java4
-rw-r--r--java/awt/image/WritableRaster.java4
-rw-r--r--java/awt/image/WritableRenderedImage.java4
-rw-r--r--java/awt/image/package.html4
-rw-r--r--java/awt/image/renderable/ContextualRenderedImageFactory.java4
-rw-r--r--java/awt/image/renderable/ParameterBlock.java4
-rw-r--r--java/awt/image/renderable/RenderContext.java4
-rw-r--r--java/awt/image/renderable/RenderableImage.java4
-rw-r--r--java/awt/image/renderable/RenderableImageOp.java4
-rw-r--r--java/awt/image/renderable/RenderableImageProducer.java4
-rw-r--r--java/awt/image/renderable/RenderedImageFactory.java4
-rw-r--r--java/awt/image/renderable/package.html4
-rw-r--r--java/awt/package.html4
-rw-r--r--java/awt/peer/ButtonPeer.java4
-rw-r--r--java/awt/peer/CanvasPeer.java4
-rw-r--r--java/awt/peer/CheckboxMenuItemPeer.java4
-rw-r--r--java/awt/peer/CheckboxPeer.java4
-rw-r--r--java/awt/peer/ChoicePeer.java4
-rw-r--r--java/awt/peer/ComponentPeer.java4
-rw-r--r--java/awt/peer/ContainerPeer.java4
-rw-r--r--java/awt/peer/DialogPeer.java4
-rw-r--r--java/awt/peer/FileDialogPeer.java4
-rw-r--r--java/awt/peer/FontPeer.java4
-rw-r--r--java/awt/peer/FramePeer.java4
-rw-r--r--java/awt/peer/LabelPeer.java4
-rw-r--r--java/awt/peer/LightweightPeer.java4
-rw-r--r--java/awt/peer/ListPeer.java4
-rw-r--r--java/awt/peer/MenuBarPeer.java4
-rw-r--r--java/awt/peer/MenuComponentPeer.java4
-rw-r--r--java/awt/peer/MenuItemPeer.java4
-rw-r--r--java/awt/peer/MenuPeer.java4
-rw-r--r--java/awt/peer/PanelPeer.java4
-rw-r--r--java/awt/peer/PopupMenuPeer.java4
-rw-r--r--java/awt/peer/RobotPeer.java4
-rw-r--r--java/awt/peer/ScrollPanePeer.java4
-rw-r--r--java/awt/peer/ScrollbarPeer.java4
-rw-r--r--java/awt/peer/TextAreaPeer.java4
-rw-r--r--java/awt/peer/TextComponentPeer.java4
-rw-r--r--java/awt/peer/TextFieldPeer.java4
-rw-r--r--java/awt/peer/WindowPeer.java4
-rw-r--r--java/awt/peer/package.html4
-rw-r--r--java/awt/print/Book.java4
-rw-r--r--java/awt/print/PageFormat.java4
-rw-r--r--java/awt/print/Pageable.java4
-rw-r--r--java/awt/print/Paper.java4
-rw-r--r--java/awt/print/Printable.java4
-rw-r--r--java/awt/print/PrinterAbortException.java4
-rw-r--r--java/awt/print/PrinterException.java4
-rw-r--r--java/awt/print/PrinterGraphics.java4
-rw-r--r--java/awt/print/PrinterIOException.java4
-rw-r--r--java/awt/print/PrinterJob.java4
-rw-r--r--java/awt/print/package.html4
-rw-r--r--java/beans/AppletInitializer.java4
-rw-r--r--java/beans/BeanDescriptor.java4
-rw-r--r--java/beans/BeanInfo.java4
-rw-r--r--java/beans/Beans.java4
-rw-r--r--java/beans/Customizer.java4
-rw-r--r--java/beans/DesignMode.java4
-rw-r--r--java/beans/EventHandler.java4
-rw-r--r--java/beans/EventSetDescriptor.java4
-rw-r--r--java/beans/ExceptionListener.java4
-rw-r--r--java/beans/Expression.java4
-rw-r--r--java/beans/FeatureDescriptor.java4
-rw-r--r--java/beans/IndexedPropertyDescriptor.java4
-rw-r--r--java/beans/IntrospectionException.java4
-rw-r--r--java/beans/Introspector.java4
-rw-r--r--java/beans/MethodDescriptor.java4
-rw-r--r--java/beans/ParameterDescriptor.java4
-rw-r--r--java/beans/PropertyChangeEvent.java4
-rw-r--r--java/beans/PropertyChangeListener.java4
-rw-r--r--java/beans/PropertyChangeListenerProxy.java4
-rw-r--r--java/beans/PropertyChangeSupport.java4
-rw-r--r--java/beans/PropertyDescriptor.java4
-rw-r--r--java/beans/PropertyEditor.java4
-rw-r--r--java/beans/PropertyEditorManager.java4
-rw-r--r--java/beans/PropertyEditorSupport.java4
-rw-r--r--java/beans/PropertyVetoException.java4
-rw-r--r--java/beans/SimpleBeanInfo.java4
-rw-r--r--java/beans/Statement.java4
-rw-r--r--java/beans/VetoableChangeListener.java4
-rw-r--r--java/beans/VetoableChangeListenerProxy.java4
-rw-r--r--java/beans/VetoableChangeSupport.java4
-rw-r--r--java/beans/Visibility.java4
-rw-r--r--java/beans/XMLDecoder.java4
-rw-r--r--java/beans/beancontext/BeanContext.java4
-rw-r--r--java/beans/beancontext/BeanContextChild.java4
-rw-r--r--java/beans/beancontext/BeanContextChildComponentProxy.java4
-rw-r--r--java/beans/beancontext/BeanContextChildSupport.java4
-rw-r--r--java/beans/beancontext/BeanContextContainerProxy.java4
-rw-r--r--java/beans/beancontext/BeanContextEvent.java4
-rw-r--r--java/beans/beancontext/BeanContextMembershipEvent.java4
-rw-r--r--java/beans/beancontext/BeanContextMembershipListener.java4
-rw-r--r--java/beans/beancontext/BeanContextProxy.java4
-rw-r--r--java/beans/beancontext/BeanContextServiceAvailableEvent.java4
-rw-r--r--java/beans/beancontext/BeanContextServiceProvider.java4
-rw-r--r--java/beans/beancontext/BeanContextServiceProviderBeanInfo.java4
-rw-r--r--java/beans/beancontext/BeanContextServiceRevokedEvent.java4
-rw-r--r--java/beans/beancontext/BeanContextServiceRevokedListener.java4
-rw-r--r--java/beans/beancontext/BeanContextServices.java4
-rw-r--r--java/beans/beancontext/BeanContextServicesListener.java4
-rw-r--r--java/beans/beancontext/BeanContextServicesSupport.java4
-rw-r--r--java/beans/beancontext/BeanContextSupport.java4
-rw-r--r--java/beans/beancontext/package.html4
-rw-r--r--java/beans/package.html4
-rw-r--r--java/io/BufferedInputStream.java4
-rw-r--r--java/io/BufferedOutputStream.java4
-rw-r--r--java/io/BufferedReader.java4
-rw-r--r--java/io/BufferedWriter.java4
-rw-r--r--java/io/ByteArrayInputStream.java4
-rw-r--r--java/io/ByteArrayOutputStream.java4
-rw-r--r--java/io/CharArrayReader.java4
-rw-r--r--java/io/CharArrayWriter.java4
-rw-r--r--java/io/CharConversionException.java4
-rw-r--r--java/io/Closeable.java4
-rw-r--r--java/io/DataInput.java4
-rw-r--r--java/io/DataInputStream.java8
-rw-r--r--java/io/DataOutput.java10
-rw-r--r--java/io/DataOutputStream.java4
-rw-r--r--java/io/DeleteFileHelper.java4
-rw-r--r--java/io/EOFException.java4
-rw-r--r--java/io/Externalizable.java4
-rw-r--r--java/io/File.java4
-rw-r--r--java/io/FileDescriptor.java4
-rw-r--r--java/io/FileFilter.java4
-rw-r--r--java/io/FileInputStream.java4
-rw-r--r--java/io/FileNotFoundException.java4
-rw-r--r--java/io/FileOutputStream.java4
-rw-r--r--java/io/FilePermission.java4
-rw-r--r--java/io/FileReader.java4
-rw-r--r--java/io/FileWriter.java4
-rw-r--r--java/io/FilenameFilter.java4
-rw-r--r--java/io/FilterInputStream.java4
-rw-r--r--java/io/FilterOutputStream.java4
-rw-r--r--java/io/FilterReader.java4
-rw-r--r--java/io/FilterWriter.java4
-rw-r--r--java/io/Flushable.java4
-rw-r--r--java/io/IOException.java4
-rw-r--r--java/io/InputStream.java4
-rw-r--r--java/io/InputStreamReader.java4
-rw-r--r--java/io/InterruptedIOException.java4
-rw-r--r--java/io/InvalidClassException.java4
-rw-r--r--java/io/InvalidObjectException.java4
-rw-r--r--java/io/LineNumberInputStream.java8
-rw-r--r--java/io/LineNumberReader.java4
-rw-r--r--java/io/NotActiveException.java4
-rw-r--r--java/io/NotSerializableException.java4
-rw-r--r--java/io/ObjectInput.java4
-rw-r--r--java/io/ObjectInputStream.java10
-rw-r--r--java/io/ObjectInputValidation.java4
-rw-r--r--java/io/ObjectOutput.java4
-rw-r--r--java/io/ObjectOutputStream.java24
-rw-r--r--java/io/ObjectStreamClass.java59
-rw-r--r--java/io/ObjectStreamConstants.java4
-rw-r--r--java/io/ObjectStreamException.java4
-rw-r--r--java/io/ObjectStreamField.java4
-rw-r--r--java/io/OptionalDataException.java4
-rw-r--r--java/io/OutputStream.java4
-rw-r--r--java/io/OutputStreamWriter.java4
-rw-r--r--java/io/PipedInputStream.java4
-rw-r--r--java/io/PipedOutputStream.java4
-rw-r--r--java/io/PipedReader.java4
-rw-r--r--java/io/PipedWriter.java4
-rw-r--r--java/io/PrintStream.java4
-rw-r--r--java/io/PrintWriter.java4
-rw-r--r--java/io/PushbackInputStream.java4
-rw-r--r--java/io/PushbackReader.java4
-rw-r--r--java/io/RandomAccessFile.java4
-rw-r--r--java/io/Reader.java4
-rw-r--r--java/io/SequenceInputStream.java4
-rw-r--r--java/io/Serializable.java4
-rw-r--r--java/io/SerializablePermission.java4
-rw-r--r--java/io/StreamCorruptedException.java4
-rw-r--r--java/io/StreamTokenizer.java4
-rw-r--r--java/io/StringBufferInputStream.java4
-rw-r--r--java/io/StringReader.java4
-rw-r--r--java/io/StringWriter.java4
-rw-r--r--java/io/SyncFailedException.java4
-rw-r--r--java/io/UTFDataFormatException.java4
-rw-r--r--java/io/UnsupportedEncodingException.java4
-rw-r--r--java/io/WriteAbortedException.java4
-rw-r--r--java/io/Writer.java4
-rw-r--r--java/io/package.html4
-rw-r--r--java/lang/AbstractMethodError.java4
-rw-r--r--java/lang/Appendable.java4
-rw-r--r--java/lang/ArithmeticException.java4
-rw-r--r--java/lang/ArrayIndexOutOfBoundsException.java4
-rw-r--r--java/lang/ArrayStoreException.java4
-rw-r--r--java/lang/AssertionError.java4
-rw-r--r--java/lang/Boolean.java4
-rw-r--r--java/lang/Byte.java4
-rw-r--r--java/lang/CharSequence.java4
-rw-r--r--java/lang/Character.java4
-rw-r--r--java/lang/Class.java24
-rw-r--r--java/lang/ClassCastException.java4
-rw-r--r--java/lang/ClassCircularityError.java4
-rw-r--r--java/lang/ClassFormatError.java4
-rw-r--r--java/lang/ClassLoader.java21
-rw-r--r--java/lang/ClassNotFoundException.java4
-rw-r--r--java/lang/CloneNotSupportedException.java4
-rw-r--r--java/lang/Cloneable.java4
-rw-r--r--java/lang/Comparable.java4
-rw-r--r--java/lang/Compiler.java4
-rw-r--r--java/lang/Double.java4
-rw-r--r--java/lang/Error.java4
-rw-r--r--java/lang/Exception.java4
-rw-r--r--java/lang/ExceptionInInitializerError.java4
-rw-r--r--java/lang/Float.java4
-rw-r--r--java/lang/IllegalAccessError.java4
-rw-r--r--java/lang/IllegalAccessException.java8
-rw-r--r--java/lang/IllegalArgumentException.java4
-rw-r--r--java/lang/IllegalMonitorStateException.java4
-rw-r--r--java/lang/IllegalStateException.java4
-rw-r--r--java/lang/IllegalThreadStateException.java4
-rw-r--r--java/lang/IncompatibleClassChangeError.java4
-rw-r--r--java/lang/IndexOutOfBoundsException.java4
-rw-r--r--java/lang/InheritableThreadLocal.java4
-rw-r--r--java/lang/InstantiationError.java4
-rw-r--r--java/lang/InstantiationException.java4
-rw-r--r--java/lang/Integer.java7
-rw-r--r--java/lang/InternalError.java4
-rw-r--r--java/lang/InterruptedException.java4
-rw-r--r--java/lang/LinkageError.java4
-rw-r--r--java/lang/Long.java4
-rw-r--r--java/lang/Math.java4
-rw-r--r--java/lang/NegativeArraySizeException.java4
-rw-r--r--java/lang/NoClassDefFoundError.java4
-rw-r--r--java/lang/NoSuchFieldError.java4
-rw-r--r--java/lang/NoSuchFieldException.java4
-rw-r--r--java/lang/NoSuchMethodError.java4
-rw-r--r--java/lang/NoSuchMethodException.java4
-rw-r--r--java/lang/NullPointerException.java4
-rw-r--r--java/lang/Number.java4
-rw-r--r--java/lang/NumberFormatException.java4
-rw-r--r--java/lang/Object.java4
-rw-r--r--java/lang/OutOfMemoryError.java4
-rw-r--r--java/lang/Package.java4
-rw-r--r--java/lang/Process.java4
-rw-r--r--java/lang/Readable.java4
-rw-r--r--java/lang/Runnable.java4
-rw-r--r--java/lang/Runtime.java4
-rw-r--r--java/lang/RuntimeException.java4
-rw-r--r--java/lang/RuntimePermission.java4
-rw-r--r--java/lang/SecurityException.java4
-rw-r--r--java/lang/SecurityManager.java4
-rw-r--r--java/lang/Short.java4
-rw-r--r--java/lang/StackOverflowError.java4
-rw-r--r--java/lang/StackTraceElement.java4
-rw-r--r--java/lang/StrictMath.java4
-rw-r--r--java/lang/String.java35
-rw-r--r--java/lang/StringBuffer.java4
-rw-r--r--java/lang/StringBuilder.java4
-rw-r--r--java/lang/StringIndexOutOfBoundsException.java4
-rw-r--r--java/lang/System.java4
-rw-r--r--java/lang/Thread.java4
-rw-r--r--java/lang/ThreadDeath.java4
-rw-r--r--java/lang/ThreadGroup.java4
-rw-r--r--java/lang/ThreadLocal.java4
-rw-r--r--java/lang/Throwable.java4
-rw-r--r--java/lang/TypeNotPresentException.java4
-rw-r--r--java/lang/UnknownError.java4
-rw-r--r--java/lang/UnsatisfiedLinkError.java4
-rw-r--r--java/lang/UnsupportedClassVersionError.java4
-rw-r--r--java/lang/UnsupportedOperationException.java4
-rw-r--r--java/lang/VerifyError.java4
-rw-r--r--java/lang/VirtualMachineError.java4
-rw-r--r--java/lang/Void.java4
-rw-r--r--java/lang/annotation/AnnotationFormatError.java4
-rw-r--r--java/lang/annotation/AnnotationTypeMismatchException.java4
-rw-r--r--java/lang/annotation/package.html4
-rw-r--r--java/lang/package.html4
-rw-r--r--java/lang/ref/PhantomReference.java4
-rw-r--r--java/lang/ref/Reference.java4
-rw-r--r--java/lang/ref/ReferenceQueue.java4
-rw-r--r--java/lang/ref/SoftReference.java4
-rw-r--r--java/lang/ref/WeakReference.java4
-rw-r--r--java/lang/ref/package.html4
-rw-r--r--java/lang/reflect/AccessibleObject.java4
-rw-r--r--java/lang/reflect/Array.java4
-rw-r--r--java/lang/reflect/GenericArrayType.java4
-rw-r--r--java/lang/reflect/GenericSignatureFormatError.java4
-rw-r--r--java/lang/reflect/InvocationHandler.java4
-rw-r--r--java/lang/reflect/InvocationTargetException.java4
-rw-r--r--java/lang/reflect/Member.java4
-rw-r--r--java/lang/reflect/Modifier.java4
-rw-r--r--java/lang/reflect/ParameterizedType.java4
-rw-r--r--java/lang/reflect/Proxy.java89
-rw-r--r--java/lang/reflect/ReflectPermission.java4
-rw-r--r--java/lang/reflect/Type.java4
-rw-r--r--java/lang/reflect/UndeclaredThrowableException.java4
-rw-r--r--java/lang/reflect/WildcardType.java4
-rw-r--r--java/lang/reflect/package.html4
-rw-r--r--java/math/BigDecimal.java4
-rw-r--r--java/math/BigInteger.java4
-rw-r--r--java/math/package.html4
-rw-r--r--java/net/Authenticator.java4
-rw-r--r--java/net/BindException.java4
-rw-r--r--java/net/ConnectException.java4
-rw-r--r--java/net/ContentHandler.java4
-rw-r--r--java/net/ContentHandlerFactory.java4
-rw-r--r--java/net/DatagramPacket.java4
-rw-r--r--java/net/DatagramSocket.java8
-rw-r--r--java/net/DatagramSocketImpl.java4
-rw-r--r--java/net/DatagramSocketImplFactory.java4
-rw-r--r--java/net/FileNameMap.java4
-rw-r--r--java/net/HttpURLConnection.java4
-rw-r--r--java/net/Inet4Address.java8
-rw-r--r--java/net/Inet6Address.java4
-rw-r--r--java/net/InetAddress.java4
-rw-r--r--java/net/InetSocketAddress.java4
-rw-r--r--java/net/JarURLConnection.java4
-rw-r--r--java/net/MalformedURLException.java4
-rw-r--r--java/net/MimeTypeMapper.java4
-rw-r--r--java/net/MulticastSocket.java4
-rw-r--r--java/net/NetPermission.java4
-rw-r--r--java/net/NetworkInterface.java4
-rw-r--r--java/net/NoRouteToHostException.java4
-rw-r--r--java/net/PasswordAuthentication.java4
-rw-r--r--java/net/PortUnreachableException.java4
-rw-r--r--java/net/ProtocolException.java4
-rw-r--r--java/net/ServerSocket.java4
-rw-r--r--java/net/Socket.java4
-rw-r--r--java/net/SocketAddress.java4
-rw-r--r--java/net/SocketException.java4
-rw-r--r--java/net/SocketImpl.java4
-rw-r--r--java/net/SocketImplFactory.java4
-rw-r--r--java/net/SocketOptions.java4
-rw-r--r--java/net/SocketPermission.java4
-rw-r--r--java/net/SocketTimeoutException.java4
-rw-r--r--java/net/URI.java4
-rw-r--r--java/net/URISyntaxException.java4
-rw-r--r--java/net/URL.java4
-rw-r--r--java/net/URLClassLoader.java57
-rw-r--r--java/net/URLConnection.java4
-rw-r--r--java/net/URLDecoder.java4
-rw-r--r--java/net/URLEncoder.java4
-rw-r--r--java/net/URLStreamHandler.java4
-rw-r--r--java/net/URLStreamHandlerFactory.java4
-rw-r--r--java/net/UnknownHostException.java4
-rw-r--r--java/net/UnknownServiceException.java4
-rw-r--r--java/net/package.html4
-rw-r--r--java/nio/Buffer.java4
-rw-r--r--java/nio/BufferOverflowException.java4
-rw-r--r--java/nio/BufferUnderflowException.java4
-rw-r--r--java/nio/ByteBuffer.java4
-rw-r--r--java/nio/ByteBufferHelper.java4
-rw-r--r--java/nio/ByteBufferImpl.java4
-rw-r--r--java/nio/ByteOrder.java4
-rw-r--r--java/nio/CharBuffer.java4
-rw-r--r--java/nio/CharBufferImpl.java4
-rw-r--r--java/nio/CharViewBufferImpl.java4
-rw-r--r--java/nio/DirectByteBufferImpl.java90
-rw-r--r--java/nio/DoubleBuffer.java4
-rw-r--r--java/nio/DoubleBufferImpl.java4
-rw-r--r--java/nio/DoubleViewBufferImpl.java4
-rw-r--r--java/nio/FloatBuffer.java4
-rw-r--r--java/nio/FloatBufferImpl.java4
-rw-r--r--java/nio/FloatViewBufferImpl.java4
-rw-r--r--java/nio/IntBuffer.java4
-rw-r--r--java/nio/IntBufferImpl.java4
-rw-r--r--java/nio/IntViewBufferImpl.java4
-rw-r--r--java/nio/InvalidMarkException.java4
-rw-r--r--java/nio/LongBuffer.java4
-rw-r--r--java/nio/LongBufferImpl.java4
-rw-r--r--java/nio/LongViewBufferImpl.java4
-rw-r--r--java/nio/MappedByteBuffer.java4
-rw-r--r--java/nio/MappedByteBufferImpl.java4
-rw-r--r--java/nio/ReadOnlyBufferException.java4
-rw-r--r--java/nio/ShortBuffer.java4
-rw-r--r--java/nio/ShortBufferImpl.java4
-rw-r--r--java/nio/ShortViewBufferImpl.java4
-rw-r--r--java/nio/channels/AlreadyConnectedException.java4
-rw-r--r--java/nio/channels/AsynchronousCloseException.java4
-rw-r--r--java/nio/channels/ByteChannel.java4
-rw-r--r--java/nio/channels/CancelledKeyException.java4
-rw-r--r--java/nio/channels/Channel.java4
-rw-r--r--java/nio/channels/Channels.java4
-rw-r--r--java/nio/channels/ClosedByInterruptException.java4
-rw-r--r--java/nio/channels/ClosedChannelException.java4
-rw-r--r--java/nio/channels/ClosedSelectorException.java4
-rw-r--r--java/nio/channels/ConnectionPendingException.java4
-rw-r--r--java/nio/channels/DatagramChannel.java4
-rw-r--r--java/nio/channels/FileChannel.java4
-rw-r--r--java/nio/channels/FileLock.java4
-rw-r--r--java/nio/channels/FileLockInterruptionException.java4
-rw-r--r--java/nio/channels/GatheringByteChannel.java4
-rw-r--r--java/nio/channels/IllegalBlockingModeException.java4
-rw-r--r--java/nio/channels/IllegalSelectorException.java4
-rw-r--r--java/nio/channels/InterruptibleChannel.java4
-rw-r--r--java/nio/channels/NoConnectionPendingException.java4
-rw-r--r--java/nio/channels/NonReadableChannelException.java4
-rw-r--r--java/nio/channels/NonWritableChannelException.java4
-rw-r--r--java/nio/channels/NotYetBoundException.java4
-rw-r--r--java/nio/channels/NotYetConnectedException.java4
-rw-r--r--java/nio/channels/OverlappingFileLockException.java4
-rw-r--r--java/nio/channels/Pipe.java4
-rw-r--r--java/nio/channels/ReadableByteChannel.java4
-rw-r--r--java/nio/channels/ScatteringByteChannel.java4
-rw-r--r--java/nio/channels/SelectableChannel.java4
-rw-r--r--java/nio/channels/SelectionKey.java4
-rw-r--r--java/nio/channels/Selector.java4
-rw-r--r--java/nio/channels/ServerSocketChannel.java4
-rw-r--r--java/nio/channels/SocketChannel.java4
-rw-r--r--java/nio/channels/UnresolvedAddressException.java4
-rw-r--r--java/nio/channels/UnsupportedAddressTypeException.java4
-rw-r--r--java/nio/channels/WritableByteChannel.java4
-rw-r--r--java/nio/channels/package.html4
-rw-r--r--java/nio/channels/spi/AbstractInterruptibleChannel.java4
-rw-r--r--java/nio/channels/spi/AbstractSelectableChannel.java4
-rw-r--r--java/nio/channels/spi/AbstractSelectionKey.java4
-rw-r--r--java/nio/channels/spi/AbstractSelector.java4
-rw-r--r--java/nio/channels/spi/SelectorProvider.java4
-rw-r--r--java/nio/channels/spi/package.html4
-rw-r--r--java/nio/charset/CharacterCodingException.java4
-rw-r--r--java/nio/charset/Charset.java4
-rw-r--r--java/nio/charset/CharsetDecoder.java4
-rw-r--r--java/nio/charset/CharsetEncoder.java4
-rw-r--r--java/nio/charset/CoderMalfunctionError.java4
-rw-r--r--java/nio/charset/CoderResult.java4
-rw-r--r--java/nio/charset/CodingErrorAction.java4
-rw-r--r--java/nio/charset/IllegalCharsetNameException.java4
-rw-r--r--java/nio/charset/MalformedInputException.java4
-rw-r--r--java/nio/charset/UnmappableCharacterException.java4
-rw-r--r--java/nio/charset/UnsupportedCharsetException.java4
-rw-r--r--java/nio/charset/package.html4
-rw-r--r--java/nio/charset/spi/CharsetProvider.java4
-rw-r--r--java/nio/charset/spi/package.html4
-rw-r--r--java/nio/package.html4
-rw-r--r--java/rmi/AccessException.java4
-rw-r--r--java/rmi/AlreadyBoundException.java4
-rw-r--r--java/rmi/ConnectException.java4
-rw-r--r--java/rmi/ConnectIOException.java4
-rw-r--r--java/rmi/MarshalException.java4
-rw-r--r--java/rmi/MarshalledObject.java4
-rw-r--r--java/rmi/Naming.java4
-rw-r--r--java/rmi/NoSuchObjectException.java4
-rw-r--r--java/rmi/NotBoundException.java4
-rw-r--r--java/rmi/RMISecurityException.java4
-rw-r--r--java/rmi/RMISecurityManager.java4
-rw-r--r--java/rmi/Remote.java4
-rw-r--r--java/rmi/RemoteException.java4
-rw-r--r--java/rmi/ServerError.java4
-rw-r--r--java/rmi/ServerException.java4
-rw-r--r--java/rmi/ServerRuntimeException.java4
-rw-r--r--java/rmi/StubNotFoundException.java4
-rw-r--r--java/rmi/UnexpectedException.java4
-rw-r--r--java/rmi/UnknownHostException.java4
-rw-r--r--java/rmi/UnmarshalException.java4
-rw-r--r--java/rmi/activation/Activatable.java4
-rw-r--r--java/rmi/activation/ActivateFailedException.java4
-rw-r--r--java/rmi/activation/ActivationDesc.java4
-rw-r--r--java/rmi/activation/ActivationException.java4
-rw-r--r--java/rmi/activation/ActivationGroup.java4
-rw-r--r--java/rmi/activation/ActivationGroupDesc.java4
-rw-r--r--java/rmi/activation/ActivationGroupID.java4
-rw-r--r--java/rmi/activation/ActivationID.java4
-rw-r--r--java/rmi/activation/ActivationInstantiator.java4
-rw-r--r--java/rmi/activation/ActivationMonitor.java4
-rw-r--r--java/rmi/activation/ActivationSystem.java4
-rw-r--r--java/rmi/activation/Activator.java4
-rw-r--r--java/rmi/activation/UnknownGroupException.java4
-rw-r--r--java/rmi/activation/UnknownObjectException.java4
-rw-r--r--java/rmi/activation/package.html4
-rw-r--r--java/rmi/dgc/DGC.java4
-rw-r--r--java/rmi/dgc/Lease.java4
-rw-r--r--java/rmi/dgc/VMID.java4
-rw-r--r--java/rmi/dgc/package.html4
-rw-r--r--java/rmi/package.html4
-rw-r--r--java/rmi/registry/LocateRegistry.java4
-rw-r--r--java/rmi/registry/Registry.java4
-rw-r--r--java/rmi/registry/RegistryHandler.java4
-rw-r--r--java/rmi/registry/package.html4
-rw-r--r--java/rmi/server/ExportException.java4
-rw-r--r--java/rmi/server/LoaderHandler.java4
-rw-r--r--java/rmi/server/LogStream.java4
-rw-r--r--java/rmi/server/ObjID.java4
-rw-r--r--java/rmi/server/Operation.java4
-rw-r--r--java/rmi/server/RMIClassLoader.java10
-rw-r--r--java/rmi/server/RMIClassLoaderSpi.java4
-rw-r--r--java/rmi/server/RMIClientSocketFactory.java4
-rw-r--r--java/rmi/server/RMIFailureHandler.java4
-rw-r--r--java/rmi/server/RMIServerSocketFactory.java4
-rw-r--r--java/rmi/server/RMISocketFactory.java4
-rw-r--r--java/rmi/server/RemoteCall.java4
-rw-r--r--java/rmi/server/RemoteObject.java4
-rw-r--r--java/rmi/server/RemoteRef.java4
-rw-r--r--java/rmi/server/RemoteServer.java4
-rw-r--r--java/rmi/server/RemoteStub.java4
-rw-r--r--java/rmi/server/ServerCloneException.java4
-rw-r--r--java/rmi/server/ServerNotActiveException.java4
-rw-r--r--java/rmi/server/ServerRef.java4
-rw-r--r--java/rmi/server/Skeleton.java4
-rw-r--r--java/rmi/server/SkeletonMismatchException.java4
-rw-r--r--java/rmi/server/SkeletonNotFoundException.java4
-rw-r--r--java/rmi/server/SocketSecurityException.java4
-rw-r--r--java/rmi/server/UID.java4
-rw-r--r--java/rmi/server/UnicastRemoteObject.java4
-rw-r--r--java/rmi/server/Unreferenced.java4
-rw-r--r--java/rmi/server/package.html4
-rw-r--r--java/security/AccessControlContext.java4
-rw-r--r--java/security/AccessControlException.java4
-rw-r--r--java/security/AccessController.java4
-rw-r--r--java/security/AlgorithmParameterGenerator.java4
-rw-r--r--java/security/AlgorithmParameterGeneratorSpi.java4
-rw-r--r--java/security/AlgorithmParameters.java4
-rw-r--r--java/security/AlgorithmParametersSpi.java4
-rw-r--r--java/security/AllPermission.java4
-rw-r--r--java/security/BasicPermission.java4
-rw-r--r--java/security/Certificate.java4
-rw-r--r--java/security/CodeSource.java4
-rw-r--r--java/security/DigestException.java4
-rw-r--r--java/security/DigestInputStream.java4
-rw-r--r--java/security/DigestOutputStream.java4
-rw-r--r--java/security/DomainCombiner.java4
-rw-r--r--java/security/DummyKeyPairGenerator.java4
-rw-r--r--java/security/DummyMessageDigest.java4
-rw-r--r--java/security/DummySignature.java4
-rw-r--r--java/security/GeneralSecurityException.java4
-rw-r--r--java/security/Guard.java4
-rw-r--r--java/security/GuardedObject.java4
-rw-r--r--java/security/Identity.java4
-rw-r--r--java/security/IdentityScope.java4
-rw-r--r--java/security/IntersectingDomainCombiner.java4
-rw-r--r--java/security/InvalidAlgorithmParameterException.java4
-rw-r--r--java/security/InvalidKeyException.java4
-rw-r--r--java/security/InvalidParameterException.java4
-rw-r--r--java/security/Key.java4
-rw-r--r--java/security/KeyException.java4
-rw-r--r--java/security/KeyFactory.java4
-rw-r--r--java/security/KeyFactorySpi.java4
-rw-r--r--java/security/KeyManagementException.java4
-rw-r--r--java/security/KeyPair.java4
-rw-r--r--java/security/KeyPairGenerator.java4
-rw-r--r--java/security/KeyPairGeneratorSpi.java4
-rw-r--r--java/security/KeyStore.java4
-rw-r--r--java/security/KeyStoreException.java4
-rw-r--r--java/security/KeyStoreSpi.java4
-rw-r--r--java/security/MessageDigest.java4
-rw-r--r--java/security/MessageDigestSpi.java4
-rw-r--r--java/security/NoSuchAlgorithmException.java4
-rw-r--r--java/security/NoSuchProviderException.java4
-rw-r--r--java/security/Permission.java4
-rw-r--r--java/security/PermissionCollection.java4
-rw-r--r--java/security/Permissions.java4
-rw-r--r--java/security/Policy.java4
-rw-r--r--java/security/Principal.java4
-rw-r--r--java/security/PrivateKey.java4
-rw-r--r--java/security/PrivilegedAction.java4
-rw-r--r--java/security/PrivilegedActionException.java4
-rw-r--r--java/security/PrivilegedExceptionAction.java4
-rw-r--r--java/security/ProtectionDomain.java4
-rw-r--r--java/security/Provider.java4
-rw-r--r--java/security/ProviderException.java4
-rw-r--r--java/security/PublicKey.java4
-rw-r--r--java/security/SecureClassLoader.java4
-rw-r--r--java/security/SecureRandom.java4
-rw-r--r--java/security/SecureRandomSpi.java4
-rw-r--r--java/security/Security.java4
-rw-r--r--java/security/SecurityPermission.java4
-rw-r--r--java/security/Signature.java4
-rw-r--r--java/security/SignatureException.java4
-rw-r--r--java/security/SignatureSpi.java4
-rw-r--r--java/security/SignedObject.java4
-rw-r--r--java/security/Signer.java4
-rw-r--r--java/security/UnrecoverableKeyException.java4
-rw-r--r--java/security/UnresolvedPermission.java4
-rw-r--r--java/security/acl/Acl.java4
-rw-r--r--java/security/acl/AclEntry.java4
-rw-r--r--java/security/acl/AclNotFoundException.java4
-rw-r--r--java/security/acl/Group.java4
-rw-r--r--java/security/acl/LastOwnerException.java4
-rw-r--r--java/security/acl/NotOwnerException.java4
-rw-r--r--java/security/acl/Owner.java4
-rw-r--r--java/security/acl/Permission.java4
-rw-r--r--java/security/acl/package.html4
-rw-r--r--java/security/cert/CRL.java4
-rw-r--r--java/security/cert/CRLException.java4
-rw-r--r--java/security/cert/CRLSelector.java4
-rw-r--r--java/security/cert/CertPath.java4
-rw-r--r--java/security/cert/CertPathBuilder.java4
-rw-r--r--java/security/cert/CertPathBuilderException.java4
-rw-r--r--java/security/cert/CertPathBuilderResult.java4
-rw-r--r--java/security/cert/CertPathBuilderSpi.java4
-rw-r--r--java/security/cert/CertPathParameters.java4
-rw-r--r--java/security/cert/CertPathValidator.java4
-rw-r--r--java/security/cert/CertPathValidatorException.java4
-rw-r--r--java/security/cert/CertPathValidatorResult.java4
-rw-r--r--java/security/cert/CertPathValidatorSpi.java4
-rw-r--r--java/security/cert/CertSelector.java4
-rw-r--r--java/security/cert/CertStore.java4
-rw-r--r--java/security/cert/CertStoreException.java4
-rw-r--r--java/security/cert/CertStoreParameters.java4
-rw-r--r--java/security/cert/CertStoreSpi.java4
-rw-r--r--java/security/cert/Certificate.java4
-rw-r--r--java/security/cert/CertificateEncodingException.java4
-rw-r--r--java/security/cert/CertificateException.java4
-rw-r--r--java/security/cert/CertificateExpiredException.java4
-rw-r--r--java/security/cert/CertificateFactory.java4
-rw-r--r--java/security/cert/CertificateFactorySpi.java4
-rw-r--r--java/security/cert/CertificateNotYetValidException.java4
-rw-r--r--java/security/cert/CertificateParsingException.java4
-rw-r--r--java/security/cert/CollectionCertStoreParameters.java4
-rw-r--r--java/security/cert/LDAPCertStoreParameters.java4
-rw-r--r--java/security/cert/PKIXBuilderParameters.java4
-rw-r--r--java/security/cert/PKIXCertPathBuilderResult.java4
-rw-r--r--java/security/cert/PKIXCertPathChecker.java4
-rw-r--r--java/security/cert/PKIXCertPathValidatorResult.java4
-rw-r--r--java/security/cert/PKIXParameters.java4
-rw-r--r--java/security/cert/PolicyNode.java4
-rw-r--r--java/security/cert/PolicyQualifierInfo.java4
-rw-r--r--java/security/cert/TrustAnchor.java4
-rw-r--r--java/security/cert/X509CRL.java4
-rw-r--r--java/security/cert/X509CRLEntry.java4
-rw-r--r--java/security/cert/X509CRLSelector.java4
-rw-r--r--java/security/cert/X509CertSelector.java8
-rw-r--r--java/security/cert/X509Certificate.java4
-rw-r--r--java/security/cert/X509Extension.java4
-rw-r--r--java/security/cert/package.html4
-rw-r--r--java/security/interfaces/DSAKey.java4
-rw-r--r--java/security/interfaces/DSAKeyPairGenerator.java4
-rw-r--r--java/security/interfaces/DSAParams.java4
-rw-r--r--java/security/interfaces/DSAPrivateKey.java4
-rw-r--r--java/security/interfaces/DSAPublicKey.java4
-rw-r--r--java/security/interfaces/RSAKey.java4
-rw-r--r--java/security/interfaces/RSAMultiPrimePrivateCrtKey.java4
-rw-r--r--java/security/interfaces/RSAPrivateCrtKey.java4
-rw-r--r--java/security/interfaces/RSAPrivateKey.java4
-rw-r--r--java/security/interfaces/RSAPublicKey.java4
-rw-r--r--java/security/interfaces/package.html4
-rw-r--r--java/security/package.html4
-rw-r--r--java/security/spec/AlgorithmParameterSpec.java4
-rw-r--r--java/security/spec/DSAParameterSpec.java4
-rw-r--r--java/security/spec/DSAPrivateKeySpec.java4
-rw-r--r--java/security/spec/DSAPublicKeySpec.java4
-rw-r--r--java/security/spec/EncodedKeySpec.java4
-rw-r--r--java/security/spec/InvalidKeySpecException.java4
-rw-r--r--java/security/spec/InvalidParameterSpecException.java4
-rw-r--r--java/security/spec/KeySpec.java4
-rw-r--r--java/security/spec/PKCS8EncodedKeySpec.java4
-rw-r--r--java/security/spec/PSSParameterSpec.java4
-rw-r--r--java/security/spec/RSAKeyGenParameterSpec.java4
-rw-r--r--java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java4
-rw-r--r--java/security/spec/RSAOtherPrimeInfo.java4
-rw-r--r--java/security/spec/RSAPrivateCrtKeySpec.java4
-rw-r--r--java/security/spec/RSAPrivateKeySpec.java4
-rw-r--r--java/security/spec/RSAPublicKeySpec.java4
-rw-r--r--java/security/spec/X509EncodedKeySpec.java4
-rw-r--r--java/security/spec/package.html4
-rw-r--r--java/sql/Array.java4
-rw-r--r--java/sql/BatchUpdateException.java4
-rw-r--r--java/sql/Blob.java4
-rw-r--r--java/sql/CallableStatement.java4
-rw-r--r--java/sql/Clob.java4
-rw-r--r--java/sql/Connection.java4
-rw-r--r--java/sql/DataTruncation.java4
-rw-r--r--java/sql/DatabaseMetaData.java4
-rw-r--r--java/sql/Date.java4
-rw-r--r--java/sql/Driver.java4
-rw-r--r--java/sql/DriverManager.java4
-rw-r--r--java/sql/DriverPropertyInfo.java4
-rw-r--r--java/sql/ParameterMetaData.java4
-rw-r--r--java/sql/PreparedStatement.java4
-rw-r--r--java/sql/Ref.java4
-rw-r--r--java/sql/ResultSet.java4
-rw-r--r--java/sql/ResultSetMetaData.java4
-rw-r--r--java/sql/SQLData.java4
-rw-r--r--java/sql/SQLException.java4
-rw-r--r--java/sql/SQLInput.java4
-rw-r--r--java/sql/SQLOutput.java4
-rw-r--r--java/sql/SQLPermission.java4
-rw-r--r--java/sql/SQLWarning.java4
-rw-r--r--java/sql/Savepoint.java4
-rw-r--r--java/sql/Statement.java4
-rw-r--r--java/sql/Struct.java4
-rw-r--r--java/sql/Time.java4
-rw-r--r--java/sql/Timestamp.java4
-rw-r--r--java/sql/Types.java4
-rw-r--r--java/sql/package.html4
-rw-r--r--java/text/Annotation.java4
-rw-r--r--java/text/AttributedCharacterIterator.java62
-rw-r--r--java/text/AttributedString.java691
-rw-r--r--java/text/AttributedStringIterator.java507
-rw-r--r--java/text/BreakIterator.java35
-rw-r--r--java/text/CharacterIterator.java22
-rw-r--r--java/text/ChoiceFormat.java23
-rw-r--r--java/text/CollationElementIterator.java24
-rw-r--r--java/text/CollationKey.java10
-rw-r--r--java/text/Collator.java22
-rw-r--r--java/text/DateFormat.java56
-rw-r--r--java/text/DateFormatSymbols.java51
-rw-r--r--java/text/DecimalFormat.java71
-rw-r--r--java/text/DecimalFormatSymbols.java19
-rw-r--r--java/text/FieldPosition.java4
-rw-r--r--java/text/Format.java4
-rw-r--r--java/text/MessageFormat.java27
-rw-r--r--java/text/NumberFormat.java54
-rw-r--r--java/text/ParseException.java6
-rw-r--r--java/text/ParsePosition.java4
-rw-r--r--java/text/RuleBasedCollator.java4
-rw-r--r--java/text/SimpleDateFormat.java30
-rw-r--r--java/text/StringCharacterIterator.java6
-rw-r--r--java/text/package.html4
-rw-r--r--java/util/AbstractCollection.java4
-rw-r--r--java/util/AbstractList.java4
-rw-r--r--java/util/AbstractMap.java4
-rw-r--r--java/util/AbstractSequentialList.java4
-rw-r--r--java/util/AbstractSet.java4
-rw-r--r--java/util/ArrayList.java4
-rw-r--r--java/util/Arrays.java4
-rw-r--r--java/util/BitSet.java24
-rw-r--r--java/util/Calendar.java5
-rw-r--r--java/util/Collection.java4
-rw-r--r--java/util/Collections.java14
-rw-r--r--java/util/Comparator.java4
-rw-r--r--java/util/ConcurrentModificationException.java4
-rw-r--r--java/util/Currency.java4
-rw-r--r--java/util/Date.java12
-rw-r--r--java/util/Dictionary.java4
-rw-r--r--java/util/EmptyStackException.java4
-rw-r--r--java/util/Enumeration.java4
-rw-r--r--java/util/EventListener.java4
-rw-r--r--java/util/EventListenerProxy.java4
-rw-r--r--java/util/EventObject.java4
-rw-r--r--java/util/GregorianCalendar.java4
-rw-r--r--java/util/HashMap.java4
-rw-r--r--java/util/HashSet.java4
-rw-r--r--java/util/Hashtable.java6
-rw-r--r--java/util/IdentityHashMap.java4
-rw-r--r--java/util/Iterator.java4
-rw-r--r--java/util/LinkedHashMap.java4
-rw-r--r--java/util/LinkedHashSet.java4
-rw-r--r--java/util/LinkedList.java6
-rw-r--r--java/util/List.java4
-rw-r--r--java/util/ListIterator.java4
-rw-r--r--java/util/ListResourceBundle.java4
-rw-r--r--java/util/Locale.java4
-rw-r--r--java/util/Map.java4
-rw-r--r--java/util/MissingResourceException.java4
-rw-r--r--java/util/NoSuchElementException.java4
-rw-r--r--java/util/Observable.java4
-rw-r--r--java/util/Observer.java4
-rw-r--r--java/util/Properties.java39
-rw-r--r--java/util/PropertyPermission.java4
-rw-r--r--java/util/PropertyPermissionCollection.java4
-rw-r--r--java/util/PropertyResourceBundle.java6
-rw-r--r--java/util/Random.java4
-rw-r--r--java/util/RandomAccess.java4
-rw-r--r--java/util/ResourceBundle.java6
-rw-r--r--java/util/Set.java4
-rw-r--r--java/util/SimpleTimeZone.java25
-rw-r--r--java/util/SortedMap.java4
-rw-r--r--java/util/SortedSet.java4
-rw-r--r--java/util/Stack.java4
-rw-r--r--java/util/StringTokenizer.java4
-rw-r--r--java/util/TimeZone.java4
-rw-r--r--java/util/Timer.java4
-rw-r--r--java/util/TimerTask.java4
-rw-r--r--java/util/TooManyListenersException.java4
-rw-r--r--java/util/TreeMap.java6
-rw-r--r--java/util/TreeSet.java4
-rw-r--r--java/util/Vector.java4
-rw-r--r--java/util/WeakHashMap.java4
-rw-r--r--java/util/jar/Attributes.java4
-rw-r--r--java/util/jar/JarEntry.java4
-rw-r--r--java/util/jar/JarException.java4
-rw-r--r--java/util/jar/JarFile.java7
-rw-r--r--java/util/jar/JarInputStream.java4
-rw-r--r--java/util/jar/JarOutputStream.java4
-rw-r--r--java/util/jar/Manifest.java4
-rw-r--r--java/util/jar/package.html4
-rw-r--r--java/util/logging/ConsoleHandler.java4
-rw-r--r--java/util/logging/ErrorManager.java4
-rw-r--r--java/util/logging/FileHandler.java190
-rw-r--r--java/util/logging/Filter.java4
-rw-r--r--java/util/logging/Formatter.java4
-rw-r--r--java/util/logging/Handler.java4
-rw-r--r--java/util/logging/Level.java4
-rw-r--r--java/util/logging/LogManager.java20
-rw-r--r--java/util/logging/LogRecord.java4
-rw-r--r--java/util/logging/Logger.java52
-rw-r--r--java/util/logging/LoggingPermission.java4
-rw-r--r--java/util/logging/MemoryHandler.java4
-rw-r--r--java/util/logging/SimpleFormatter.java4
-rw-r--r--java/util/logging/SocketHandler.java4
-rw-r--r--java/util/logging/StreamHandler.java4
-rw-r--r--java/util/logging/XMLFormatter.java4
-rw-r--r--java/util/logging/package.html4
-rw-r--r--java/util/package.html4
-rw-r--r--java/util/prefs/AbstractPreferences.java4
-rw-r--r--java/util/prefs/BackingStoreException.java4
-rw-r--r--java/util/prefs/InvalidPreferencesFormatException.java4
-rw-r--r--java/util/prefs/NodeChangeEvent.java4
-rw-r--r--java/util/prefs/NodeChangeListener.java4
-rw-r--r--java/util/prefs/PreferenceChangeEvent.java4
-rw-r--r--java/util/prefs/PreferenceChangeListener.java4
-rw-r--r--java/util/prefs/Preferences.java4
-rw-r--r--java/util/prefs/PreferencesFactory.java4
-rw-r--r--java/util/prefs/package.html4
-rw-r--r--java/util/regex/Matcher.java4
-rw-r--r--java/util/regex/Pattern.java7
-rw-r--r--java/util/regex/PatternSyntaxException.java4
-rw-r--r--java/util/regex/package.html4
-rw-r--r--java/util/zip/Adler32.java4
-rw-r--r--java/util/zip/CRC32.java4
-rw-r--r--java/util/zip/CheckedInputStream.java4
-rw-r--r--java/util/zip/CheckedOutputStream.java4
-rw-r--r--java/util/zip/Checksum.java4
-rw-r--r--java/util/zip/DataFormatException.java4
-rw-r--r--java/util/zip/Deflater.java4
-rw-r--r--java/util/zip/DeflaterConstants.java4
-rw-r--r--java/util/zip/DeflaterEngine.java4
-rw-r--r--java/util/zip/DeflaterHuffman.java4
-rw-r--r--java/util/zip/DeflaterOutputStream.java4
-rw-r--r--java/util/zip/DeflaterPending.java4
-rw-r--r--java/util/zip/GZIPInputStream.java4
-rw-r--r--java/util/zip/GZIPOutputStream.java4
-rw-r--r--java/util/zip/Inflater.java12
-rw-r--r--java/util/zip/InflaterDynHeader.java4
-rw-r--r--java/util/zip/InflaterHuffmanTree.java4
-rw-r--r--java/util/zip/InflaterInputStream.java4
-rw-r--r--java/util/zip/OutputWindow.java4
-rw-r--r--java/util/zip/PendingBuffer.java4
-rw-r--r--java/util/zip/StreamManipulator.java4
-rw-r--r--java/util/zip/ZipConstants.java4
-rw-r--r--java/util/zip/ZipEntry.java4
-rw-r--r--java/util/zip/ZipException.java4
-rw-r--r--java/util/zip/ZipFile.java4
-rw-r--r--java/util/zip/ZipInputStream.java4
-rw-r--r--java/util/zip/ZipOutputStream.java4
-rw-r--r--java/util/zip/package.html4
-rw-r--r--javax/accessibility/Accessible.java4
-rw-r--r--javax/accessibility/AccessibleAction.java4
-rw-r--r--javax/accessibility/AccessibleBundle.java4
-rw-r--r--javax/accessibility/AccessibleComponent.java6
-rw-r--r--javax/accessibility/AccessibleContext.java4
-rw-r--r--javax/accessibility/AccessibleEditableText.java4
-rw-r--r--javax/accessibility/AccessibleExtendedComponent.java4
-rw-r--r--javax/accessibility/AccessibleExtendedTable.java4
-rw-r--r--javax/accessibility/AccessibleHyperlink.java4
-rw-r--r--javax/accessibility/AccessibleHypertext.java4
-rw-r--r--javax/accessibility/AccessibleIcon.java4
-rw-r--r--javax/accessibility/AccessibleKeyBinding.java4
-rw-r--r--javax/accessibility/AccessibleRelation.java8
-rw-r--r--javax/accessibility/AccessibleRelationSet.java11
-rw-r--r--javax/accessibility/AccessibleResourceBundle.java7
-rw-r--r--javax/accessibility/AccessibleRole.java8
-rw-r--r--javax/accessibility/AccessibleSelection.java4
-rw-r--r--javax/accessibility/AccessibleState.java9
-rw-r--r--javax/accessibility/AccessibleStateSet.java7
-rw-r--r--javax/accessibility/AccessibleTable.java4
-rw-r--r--javax/accessibility/AccessibleTableModelChange.java4
-rw-r--r--javax/accessibility/AccessibleText.java10
-rw-r--r--javax/accessibility/AccessibleValue.java4
-rw-r--r--javax/accessibility/package.html4
-rw-r--r--javax/crypto/BadPaddingException.java4
-rw-r--r--javax/crypto/Cipher.java4
-rw-r--r--javax/crypto/CipherInputStream.java4
-rw-r--r--javax/crypto/CipherOutputStream.java4
-rw-r--r--javax/crypto/CipherSpi.java4
-rw-r--r--javax/crypto/EncryptedPrivateKeyInfo.java4
-rw-r--r--javax/crypto/ExemptionMechanism.java4
-rw-r--r--javax/crypto/ExemptionMechanismException.java4
-rw-r--r--javax/crypto/ExemptionMechanismSpi.java4
-rw-r--r--javax/crypto/IllegalBlockSizeException.java4
-rw-r--r--javax/crypto/KeyAgreement.java4
-rw-r--r--javax/crypto/KeyAgreementSpi.java4
-rw-r--r--javax/crypto/KeyGenerator.java4
-rw-r--r--javax/crypto/KeyGeneratorSpi.java4
-rw-r--r--javax/crypto/Mac.java4
-rw-r--r--javax/crypto/MacSpi.java4
-rw-r--r--javax/crypto/NoSuchPaddingException.java4
-rw-r--r--javax/crypto/NullCipher.java4
-rw-r--r--javax/crypto/NullCipherImpl.java4
-rw-r--r--javax/crypto/SealedObject.java4
-rw-r--r--javax/crypto/SecretKey.java4
-rw-r--r--javax/crypto/SecretKeyFactory.java4
-rw-r--r--javax/crypto/SecretKeyFactorySpi.java4
-rw-r--r--javax/crypto/ShortBufferException.java4
-rw-r--r--javax/crypto/interfaces/DHKey.java4
-rw-r--r--javax/crypto/interfaces/DHPrivateKey.java4
-rw-r--r--javax/crypto/interfaces/DHPublicKey.java4
-rw-r--r--javax/crypto/interfaces/PBEKey.java4
-rw-r--r--javax/crypto/interfaces/package.html4
-rw-r--r--javax/crypto/package.html4
-rw-r--r--javax/crypto/spec/DESKeySpec.java4
-rw-r--r--javax/crypto/spec/DESedeKeySpec.java4
-rw-r--r--javax/crypto/spec/DHGenParameterSpec.java4
-rw-r--r--javax/crypto/spec/DHParameterSpec.java4
-rw-r--r--javax/crypto/spec/DHPrivateKeySpec.java4
-rw-r--r--javax/crypto/spec/DHPublicKeySpec.java4
-rw-r--r--javax/crypto/spec/IvParameterSpec.java4
-rw-r--r--javax/crypto/spec/PBEKeySpec.java4
-rw-r--r--javax/crypto/spec/PBEParameterSpec.java4
-rw-r--r--javax/crypto/spec/RC2ParameterSpec.java4
-rw-r--r--javax/crypto/spec/RC5ParameterSpec.java4
-rw-r--r--javax/crypto/spec/SecretKeySpec.java4
-rw-r--r--javax/crypto/spec/package.html4
-rw-r--r--javax/imageio/IIOException.java4
-rw-r--r--javax/imageio/IIOImage.java4
-rw-r--r--javax/imageio/IIOParam.java4
-rw-r--r--javax/imageio/IIOParamController.java4
-rw-r--r--javax/imageio/ImageIO.java4
-rw-r--r--javax/imageio/ImageReadParam.java4
-rw-r--r--javax/imageio/ImageReader.java4
-rw-r--r--javax/imageio/ImageTranscoder.java4
-rw-r--r--javax/imageio/ImageTypeSpecifier.java4
-rw-r--r--javax/imageio/ImageWriteParam.java4
-rw-r--r--javax/imageio/ImageWriter.java4
-rw-r--r--javax/imageio/event/IIOReadProgressListener.java4
-rw-r--r--javax/imageio/event/IIOReadUpdateListener.java4
-rw-r--r--javax/imageio/event/IIOReadWarningListener.java4
-rw-r--r--javax/imageio/event/IIOWriteProgressListener.java4
-rw-r--r--javax/imageio/event/IIOWriteWarningListener.java4
-rw-r--r--javax/imageio/event/package.html4
-rw-r--r--javax/imageio/metadata/IIOAttr.java4
-rw-r--r--javax/imageio/metadata/IIOInvalidTreeException.java4
-rw-r--r--javax/imageio/metadata/IIOMetadata.java4
-rw-r--r--javax/imageio/metadata/IIOMetadataController.java4
-rw-r--r--javax/imageio/metadata/IIOMetadataFormat.java4
-rw-r--r--javax/imageio/metadata/IIOMetadataFormatImpl.java4
-rw-r--r--javax/imageio/metadata/IIOMetadataNode.java4
-rw-r--r--javax/imageio/metadata/IIONamedNodeMap.java4
-rw-r--r--javax/imageio/metadata/IIONodeList.java4
-rw-r--r--javax/imageio/metadata/package.html4
-rw-r--r--javax/imageio/package.html4
-rw-r--r--javax/imageio/spi/IIORegistry.java4
-rw-r--r--javax/imageio/spi/IIOServiceProvider.java4
-rw-r--r--javax/imageio/spi/ImageInputStreamSpi.java4
-rw-r--r--javax/imageio/spi/ImageOutputStreamSpi.java4
-rw-r--r--javax/imageio/spi/ImageReaderSpi.java4
-rw-r--r--javax/imageio/spi/ImageReaderWriterSpi.java4
-rw-r--r--javax/imageio/spi/ImageTranscoderSpi.java4
-rw-r--r--javax/imageio/spi/ImageWriterSpi.java4
-rw-r--r--javax/imageio/spi/RegisterableService.java4
-rw-r--r--javax/imageio/spi/ServiceRegistry.java4
-rw-r--r--javax/imageio/spi/package.html4
-rw-r--r--javax/imageio/stream/FileCacheImageInputStream.java4
-rw-r--r--javax/imageio/stream/FileCacheImageOutputStream.java4
-rw-r--r--javax/imageio/stream/FileImageInputStream.java4
-rw-r--r--javax/imageio/stream/FileImageOutputStream.java4
-rw-r--r--javax/imageio/stream/IIOByteBuffer.java4
-rw-r--r--javax/imageio/stream/ImageInputStream.java5
-rw-r--r--javax/imageio/stream/ImageInputStreamImpl.java4
-rw-r--r--javax/imageio/stream/ImageOutputStream.java4
-rw-r--r--javax/imageio/stream/ImageOutputStreamImpl.java4
-rw-r--r--javax/imageio/stream/MemoryCacheImageInputStream.java4
-rw-r--r--javax/imageio/stream/MemoryCacheImageOutputStream.java4
-rw-r--r--javax/imageio/stream/package.html4
-rw-r--r--javax/naming/AuthenticationException.java4
-rw-r--r--javax/naming/AuthenticationNotSupportedException.java4
-rw-r--r--javax/naming/BinaryRefAddr.java4
-rw-r--r--javax/naming/Binding.java4
-rw-r--r--javax/naming/CannotProceedException.java4
-rw-r--r--javax/naming/CommunicationException.java4
-rw-r--r--javax/naming/CompositeName.java4
-rw-r--r--javax/naming/CompoundName.java4
-rw-r--r--javax/naming/ConfigurationException.java4
-rw-r--r--javax/naming/Context.java4
-rw-r--r--javax/naming/ContextNotEmptyException.java4
-rw-r--r--javax/naming/InitialContext.java4
-rw-r--r--javax/naming/InsufficientResourcesException.java4
-rw-r--r--javax/naming/InterruptedNamingException.java4
-rw-r--r--javax/naming/InvalidNameException.java4
-rw-r--r--javax/naming/LimitExceededException.java4
-rw-r--r--javax/naming/LinkException.java4
-rw-r--r--javax/naming/LinkLoopException.java4
-rw-r--r--javax/naming/LinkRef.java4
-rw-r--r--javax/naming/MalformedLinkException.java4
-rw-r--r--javax/naming/Name.java4
-rw-r--r--javax/naming/NameAlreadyBoundException.java4
-rw-r--r--javax/naming/NameClassPair.java4
-rw-r--r--javax/naming/NameNotFoundException.java4
-rw-r--r--javax/naming/NameParser.java4
-rw-r--r--javax/naming/NamingEnumeration.java4
-rw-r--r--javax/naming/NamingException.java4
-rw-r--r--javax/naming/NamingSecurityException.java4
-rw-r--r--javax/naming/NoInitialContextException.java4
-rw-r--r--javax/naming/NoPermissionException.java4
-rw-r--r--javax/naming/NotContextException.java4
-rw-r--r--javax/naming/OperationNotSupportedException.java4
-rw-r--r--javax/naming/PartialResultException.java4
-rw-r--r--javax/naming/RefAddr.java4
-rw-r--r--javax/naming/Reference.java4
-rw-r--r--javax/naming/Referenceable.java4
-rw-r--r--javax/naming/ReferralException.java4
-rw-r--r--javax/naming/ServiceUnavailableException.java4
-rw-r--r--javax/naming/SizeLimitExceededException.java4
-rw-r--r--javax/naming/StringRefAddr.java4
-rw-r--r--javax/naming/TimeLimitExceededException.java4
-rw-r--r--javax/naming/directory/Attribute.java4
-rw-r--r--javax/naming/directory/AttributeInUseException.java4
-rw-r--r--javax/naming/directory/AttributeModificationException.java4
-rw-r--r--javax/naming/directory/Attributes.java4
-rw-r--r--javax/naming/directory/BasicAttribute.java4
-rw-r--r--javax/naming/directory/BasicAttributes.java4
-rw-r--r--javax/naming/directory/DirContext.java4
-rw-r--r--javax/naming/directory/InitialDirContext.java4
-rw-r--r--javax/naming/directory/InvalidAttributeIdentifierException.java4
-rw-r--r--javax/naming/directory/InvalidAttributeValueException.java4
-rw-r--r--javax/naming/directory/InvalidAttributesException.java4
-rw-r--r--javax/naming/directory/InvalidSearchControlsException.java4
-rw-r--r--javax/naming/directory/InvalidSearchFilterException.java4
-rw-r--r--javax/naming/directory/ModificationItem.java4
-rw-r--r--javax/naming/directory/NoSuchAttributeException.java4
-rw-r--r--javax/naming/directory/SchemaViolationException.java4
-rw-r--r--javax/naming/directory/SearchControls.java4
-rw-r--r--javax/naming/directory/SearchResult.java4
-rw-r--r--javax/naming/directory/package.html4
-rw-r--r--javax/naming/event/EventContext.java4
-rw-r--r--javax/naming/event/EventDirContext.java4
-rw-r--r--javax/naming/event/NamespaceChangeListener.java4
-rw-r--r--javax/naming/event/NamingEvent.java4
-rw-r--r--javax/naming/event/NamingExceptionEvent.java4
-rw-r--r--javax/naming/event/NamingListener.java4
-rw-r--r--javax/naming/event/ObjectChangeListener.java4
-rw-r--r--javax/naming/event/package.html4
-rw-r--r--javax/naming/ldap/Control.java4
-rw-r--r--javax/naming/ldap/ControlFactory.java4
-rw-r--r--javax/naming/ldap/ExtendedRequest.java4
-rw-r--r--javax/naming/ldap/ExtendedResponse.java4
-rw-r--r--javax/naming/ldap/HasControls.java4
-rw-r--r--javax/naming/ldap/InitialLdapContext.java4
-rw-r--r--javax/naming/ldap/LdapContext.java4
-rw-r--r--javax/naming/ldap/LdapReferralException.java4
-rw-r--r--javax/naming/ldap/UnsolicitedNotification.java4
-rw-r--r--javax/naming/ldap/UnsolicitedNotificationEvent.java4
-rw-r--r--javax/naming/ldap/UnsolicitedNotificationListener.java4
-rw-r--r--javax/naming/ldap/package.html4
-rw-r--r--javax/naming/package.html4
-rw-r--r--javax/naming/spi/DirObjectFactory.java4
-rw-r--r--javax/naming/spi/DirStateFactory.java4
-rw-r--r--javax/naming/spi/DirectoryManager.java4
-rw-r--r--javax/naming/spi/InitialContextFactory.java4
-rw-r--r--javax/naming/spi/InitialContextFactoryBuilder.java4
-rw-r--r--javax/naming/spi/NamingManager.java4
-rw-r--r--javax/naming/spi/ObjectFactory.java4
-rw-r--r--javax/naming/spi/ObjectFactoryBuilder.java4
-rw-r--r--javax/naming/spi/ResolveResult.java4
-rw-r--r--javax/naming/spi/Resolver.java4
-rw-r--r--javax/naming/spi/StateFactory.java4
-rw-r--r--javax/naming/spi/package.html4
-rw-r--r--javax/net/ServerSocketFactory.java4
-rw-r--r--javax/net/SocketFactory.java4
-rw-r--r--javax/net/VanillaServerSocketFactory.java4
-rw-r--r--javax/net/VanillaSocketFactory.java4
-rw-r--r--javax/net/package.html4
-rw-r--r--javax/net/ssl/HandshakeCompletedEvent.java4
-rw-r--r--javax/net/ssl/HandshakeCompletedListener.java4
-rw-r--r--javax/net/ssl/HostnameVerifier.java4
-rw-r--r--javax/net/ssl/HttpsURLConnection.java4
-rw-r--r--javax/net/ssl/KeyManager.java4
-rw-r--r--javax/net/ssl/KeyManagerFactory.java4
-rw-r--r--javax/net/ssl/KeyManagerFactorySpi.java4
-rw-r--r--javax/net/ssl/ManagerFactoryParameters.java4
-rw-r--r--javax/net/ssl/SSLContext.java4
-rw-r--r--javax/net/ssl/SSLContextSpi.java4
-rw-r--r--javax/net/ssl/SSLException.java4
-rw-r--r--javax/net/ssl/SSLHandshakeException.java4
-rw-r--r--javax/net/ssl/SSLKeyException.java4
-rw-r--r--javax/net/ssl/SSLPeerUnverifiedException.java4
-rw-r--r--javax/net/ssl/SSLPermission.java4
-rw-r--r--javax/net/ssl/SSLProtocolException.java4
-rw-r--r--javax/net/ssl/SSLServerSocket.java4
-rw-r--r--javax/net/ssl/SSLServerSocketFactory.java4
-rw-r--r--javax/net/ssl/SSLSession.java4
-rw-r--r--javax/net/ssl/SSLSessionBindingEvent.java4
-rw-r--r--javax/net/ssl/SSLSessionBindingListener.java4
-rw-r--r--javax/net/ssl/SSLSessionContext.java4
-rw-r--r--javax/net/ssl/SSLSocket.java4
-rw-r--r--javax/net/ssl/SSLSocketFactory.java4
-rw-r--r--javax/net/ssl/TrivialHostnameVerifier.java4
-rw-r--r--javax/net/ssl/TrustManager.java4
-rw-r--r--javax/net/ssl/TrustManagerFactory.java4
-rw-r--r--javax/net/ssl/TrustManagerFactorySpi.java4
-rw-r--r--javax/net/ssl/X509KeyManager.java4
-rw-r--r--javax/net/ssl/X509TrustManager.java4
-rw-r--r--javax/net/ssl/package.html4
-rw-r--r--javax/print/AttributeException.java4
-rw-r--r--javax/print/CancelablePrintJob.java4
-rw-r--r--javax/print/Doc.java4
-rw-r--r--javax/print/DocFlavor.java4
-rw-r--r--javax/print/DocPrintJob.java4
-rw-r--r--javax/print/FlavorException.java4
-rw-r--r--javax/print/MultiDoc.java4
-rw-r--r--javax/print/MultiDocPrintJob.java4
-rw-r--r--javax/print/MultiDocPrintService.java4
-rw-r--r--javax/print/PrintException.java4
-rw-r--r--javax/print/PrintService.java4
-rw-r--r--javax/print/PrintServiceLookup.java4
-rw-r--r--javax/print/ServiceUIFactory.java4
-rw-r--r--javax/print/StreamPrintService.java4
-rw-r--r--javax/print/URIException.java4
-rw-r--r--javax/print/attribute/Attribute.java4
-rw-r--r--javax/print/attribute/AttributeSet.java4
-rw-r--r--javax/print/attribute/AttributeSetUtilities.java4
-rw-r--r--javax/print/attribute/DateTimeSyntax.java4
-rw-r--r--javax/print/attribute/DocAttribute.java4
-rw-r--r--javax/print/attribute/DocAttributeSet.java4
-rw-r--r--javax/print/attribute/EnumSyntax.java4
-rw-r--r--javax/print/attribute/HashAttributeSet.java4
-rw-r--r--javax/print/attribute/HashDocAttributeSet.java4
-rw-r--r--javax/print/attribute/HashPrintJobAttributeSet.java4
-rw-r--r--javax/print/attribute/HashPrintRequestAttributeSet.java4
-rw-r--r--javax/print/attribute/HashPrintServiceAttributeSet.java4
-rw-r--r--javax/print/attribute/IntegerSyntax.java4
-rw-r--r--javax/print/attribute/PrintJobAttribute.java4
-rw-r--r--javax/print/attribute/PrintJobAttributeSet.java4
-rw-r--r--javax/print/attribute/PrintRequestAttribute.java4
-rw-r--r--javax/print/attribute/PrintRequestAttributeSet.java4
-rw-r--r--javax/print/attribute/PrintServiceAttribute.java4
-rw-r--r--javax/print/attribute/PrintServiceAttributeSet.java4
-rw-r--r--javax/print/attribute/ResolutionSyntax.java4
-rw-r--r--javax/print/attribute/SetOfIntegerSyntax.java4
-rw-r--r--javax/print/attribute/Size2DSyntax.java4
-rw-r--r--javax/print/attribute/SupportedValuesAttribute.java4
-rw-r--r--javax/print/attribute/TextSyntax.java4
-rw-r--r--javax/print/attribute/URISyntax.java4
-rw-r--r--javax/print/attribute/UnmodifiableSetException.java4
-rw-r--r--javax/print/attribute/package.html4
-rw-r--r--javax/print/attribute/standard/Chromaticity.java4
-rw-r--r--javax/print/attribute/standard/ColorSupported.java4
-rw-r--r--javax/print/attribute/standard/Compression.java4
-rw-r--r--javax/print/attribute/standard/Copies.java4
-rw-r--r--javax/print/attribute/standard/CopiesSupported.java4
-rw-r--r--javax/print/attribute/standard/DateTimeAtCompleted.java4
-rw-r--r--javax/print/attribute/standard/DateTimeAtCreation.java4
-rw-r--r--javax/print/attribute/standard/DateTimeAtProcessing.java4
-rw-r--r--javax/print/attribute/standard/Destination.java4
-rw-r--r--javax/print/attribute/standard/DocumentName.java4
-rw-r--r--javax/print/attribute/standard/Fidelity.java4
-rw-r--r--javax/print/attribute/standard/Finishings.java4
-rw-r--r--javax/print/attribute/standard/JobHoldUntil.java4
-rw-r--r--javax/print/attribute/standard/JobImpressions.java4
-rw-r--r--javax/print/attribute/standard/JobImpressionsCompleted.java4
-rw-r--r--javax/print/attribute/standard/JobImpressionsSupported.java4
-rw-r--r--javax/print/attribute/standard/JobKOctets.java4
-rw-r--r--javax/print/attribute/standard/JobKOctetsProcessed.java4
-rw-r--r--javax/print/attribute/standard/JobKOctetsSupported.java4
-rw-r--r--javax/print/attribute/standard/JobMediaSheets.java4
-rw-r--r--javax/print/attribute/standard/JobMediaSheetsCompleted.java4
-rw-r--r--javax/print/attribute/standard/JobMediaSheetsSupported.java4
-rw-r--r--javax/print/attribute/standard/JobMessageFromOperator.java4
-rw-r--r--javax/print/attribute/standard/JobName.java4
-rw-r--r--javax/print/attribute/standard/JobOriginatingUserName.java4
-rw-r--r--javax/print/attribute/standard/JobPriority.java4
-rw-r--r--javax/print/attribute/standard/JobPrioritySupported.java4
-rw-r--r--javax/print/attribute/standard/JobSheets.java4
-rw-r--r--javax/print/attribute/standard/JobState.java4
-rw-r--r--javax/print/attribute/standard/JobStateReason.java4
-rw-r--r--javax/print/attribute/standard/JobStateReasons.java4
-rw-r--r--javax/print/attribute/standard/Media.java4
-rw-r--r--javax/print/attribute/standard/MediaPrintableArea.java4
-rw-r--r--javax/print/attribute/standard/MediaSize.java4
-rw-r--r--javax/print/attribute/standard/MediaSizeName.java4
-rw-r--r--javax/print/attribute/standard/MultipleDocumentHandling.java4
-rw-r--r--javax/print/attribute/standard/NumberOfDocuments.java4
-rw-r--r--javax/print/attribute/standard/NumberOfInterveningJobs.java4
-rw-r--r--javax/print/attribute/standard/NumberUp.java4
-rw-r--r--javax/print/attribute/standard/NumberUpSupported.java4
-rw-r--r--javax/print/attribute/standard/OrientationRequested.java4
-rw-r--r--javax/print/attribute/standard/OutputDeviceAssigned.java4
-rw-r--r--javax/print/attribute/standard/PDLOverrideSupported.java4
-rw-r--r--javax/print/attribute/standard/PageRanges.java4
-rw-r--r--javax/print/attribute/standard/PagesPerMinute.java4
-rw-r--r--javax/print/attribute/standard/PagesPerMinuteColor.java4
-rw-r--r--javax/print/attribute/standard/PresentationDirection.java4
-rw-r--r--javax/print/attribute/standard/PrintQuality.java4
-rw-r--r--javax/print/attribute/standard/PrinterInfo.java4
-rw-r--r--javax/print/attribute/standard/PrinterIsAcceptingJobs.java4
-rw-r--r--javax/print/attribute/standard/PrinterLocation.java4
-rw-r--r--javax/print/attribute/standard/PrinterMakeAndModel.java4
-rw-r--r--javax/print/attribute/standard/PrinterMessageFromOperator.java4
-rw-r--r--javax/print/attribute/standard/PrinterMoreInfo.java4
-rw-r--r--javax/print/attribute/standard/PrinterMoreInfoManufacturer.java4
-rw-r--r--javax/print/attribute/standard/PrinterName.java4
-rw-r--r--javax/print/attribute/standard/PrinterResolution.java4
-rw-r--r--javax/print/attribute/standard/PrinterState.java4
-rw-r--r--javax/print/attribute/standard/PrinterStateReason.java4
-rw-r--r--javax/print/attribute/standard/PrinterStateReasons.java4
-rw-r--r--javax/print/attribute/standard/PrinterURI.java4
-rw-r--r--javax/print/attribute/standard/QueuedJobCount.java4
-rw-r--r--javax/print/attribute/standard/ReferenceUriSchemesSupported.java4
-rw-r--r--javax/print/attribute/standard/RequestingUserName.java4
-rw-r--r--javax/print/attribute/standard/Severity.java4
-rw-r--r--javax/print/attribute/standard/SheetCollate.java4
-rw-r--r--javax/print/attribute/standard/Sides.java4
-rw-r--r--javax/print/attribute/standard/package.html4
-rw-r--r--javax/print/event/PrintEvent.java4
-rw-r--r--javax/print/event/PrintJobAdapter.java4
-rw-r--r--javax/print/event/PrintJobAttributeEvent.java4
-rw-r--r--javax/print/event/PrintJobAttributeListener.java4
-rw-r--r--javax/print/event/PrintJobEvent.java4
-rw-r--r--javax/print/event/PrintJobListener.java4
-rw-r--r--javax/print/event/PrintServiceAttributeEvent.java4
-rw-r--r--javax/print/event/PrintServiceAttributeListener.java4
-rw-r--r--javax/print/event/package.html4
-rw-r--r--javax/print/package.html4
-rw-r--r--javax/rmi/CORBA/ClassDesc.java4
-rw-r--r--javax/rmi/CORBA/PortableRemoteObjectDelegate.java4
-rw-r--r--javax/rmi/CORBA/Stub.java4
-rw-r--r--javax/rmi/CORBA/StubDelegate.java4
-rw-r--r--javax/rmi/CORBA/Tie.java4
-rw-r--r--javax/rmi/CORBA/Util.java4
-rw-r--r--javax/rmi/CORBA/UtilDelegate.java4
-rw-r--r--javax/rmi/CORBA/ValueHandler.java4
-rw-r--r--javax/rmi/CORBA/package.html4
-rw-r--r--javax/rmi/PortableRemoteObject.java4
-rw-r--r--javax/rmi/package.html4
-rw-r--r--javax/security/auth/AuthPermission.java4
-rw-r--r--javax/security/auth/DestroyFailedException.java4
-rw-r--r--javax/security/auth/Destroyable.java4
-rw-r--r--javax/security/auth/Policy.java4
-rw-r--r--javax/security/auth/PrivateCredentialPermission.java4
-rw-r--r--javax/security/auth/RefreshFailedException.java4
-rw-r--r--javax/security/auth/Refreshable.java4
-rw-r--r--javax/security/auth/Subject.java4
-rw-r--r--javax/security/auth/SubjectDomainCombiner.java4
-rw-r--r--javax/security/auth/callback/Callback.java4
-rw-r--r--javax/security/auth/callback/CallbackHandler.java4
-rw-r--r--javax/security/auth/callback/ChoiceCallback.java4
-rw-r--r--javax/security/auth/callback/ConfirmationCallback.java4
-rw-r--r--javax/security/auth/callback/LanguageCallback.java4
-rw-r--r--javax/security/auth/callback/NameCallback.java4
-rw-r--r--javax/security/auth/callback/PasswordCallback.java4
-rw-r--r--javax/security/auth/callback/TextInputCallback.java4
-rw-r--r--javax/security/auth/callback/TextOutputCallback.java4
-rw-r--r--javax/security/auth/callback/UnsupportedCallbackException.java4
-rw-r--r--javax/security/auth/callback/package.html4
-rw-r--r--javax/security/auth/login/AccountExpiredException.java4
-rw-r--r--javax/security/auth/login/AppConfigurationEntry.java4
-rw-r--r--javax/security/auth/login/Configuration.java4
-rw-r--r--javax/security/auth/login/CredentialExpiredException.java4
-rw-r--r--javax/security/auth/login/FailedLoginException.java4
-rw-r--r--javax/security/auth/login/LoginContext.java4
-rw-r--r--javax/security/auth/login/LoginException.java4
-rw-r--r--javax/security/auth/login/NullConfiguration.java4
-rw-r--r--javax/security/auth/login/package.html4
-rw-r--r--javax/security/auth/package.html4
-rw-r--r--javax/security/auth/spi/LoginModule.java4
-rw-r--r--javax/security/auth/spi/package.html4
-rw-r--r--javax/security/auth/x500/X500Principal.java8
-rw-r--r--javax/security/auth/x500/X500PrivateCredential.java4
-rw-r--r--javax/security/auth/x500/package.html4
-rw-r--r--javax/security/cert/Certificate.java4
-rw-r--r--javax/security/cert/CertificateEncodingException.java4
-rw-r--r--javax/security/cert/CertificateException.java4
-rw-r--r--javax/security/cert/CertificateExpiredException.java4
-rw-r--r--javax/security/cert/CertificateNotYetValidException.java4
-rw-r--r--javax/security/cert/CertificateParsingException.java4
-rw-r--r--javax/security/cert/X509CertBridge.java4
-rw-r--r--javax/security/cert/X509Certificate.java4
-rw-r--r--javax/security/cert/package.html4
-rw-r--r--javax/security/package.html4
-rw-r--r--javax/security/sasl/AuthenticationException.java4
-rw-r--r--javax/security/sasl/AuthorizeCallback.java4
-rw-r--r--javax/security/sasl/RealmCallback.java4
-rw-r--r--javax/security/sasl/RealmChoiceCallback.java4
-rw-r--r--javax/security/sasl/Sasl.java8
-rw-r--r--javax/security/sasl/SaslClient.java4
-rw-r--r--javax/security/sasl/SaslClientFactory.java4
-rw-r--r--javax/security/sasl/SaslException.java4
-rw-r--r--javax/security/sasl/SaslServer.java4
-rw-r--r--javax/security/sasl/SaslServerFactory.java4
-rw-r--r--javax/security/sasl/package.html4
-rw-r--r--javax/sql/ConnectionEvent.java4
-rw-r--r--javax/sql/ConnectionEventListener.java4
-rw-r--r--javax/sql/ConnectionPoolDataSource.java4
-rw-r--r--javax/sql/DataSource.java4
-rw-r--r--javax/sql/PooledConnection.java4
-rw-r--r--javax/sql/RowSet.java4
-rw-r--r--javax/sql/RowSetEvent.java4
-rw-r--r--javax/sql/RowSetInternal.java4
-rw-r--r--javax/sql/RowSetListener.java4
-rw-r--r--javax/sql/RowSetMetaData.java4
-rw-r--r--javax/sql/RowSetReader.java4
-rw-r--r--javax/sql/RowSetWriter.java4
-rw-r--r--javax/sql/XAConnection.java4
-rw-r--r--javax/sql/XADataSource.java4
-rw-r--r--javax/sql/package.html4
-rw-r--r--javax/swing/AbstractAction.java64
-rw-r--r--javax/swing/AbstractButton.java329
-rw-r--r--javax/swing/AbstractCellEditor.java17
-rw-r--r--javax/swing/AbstractListModel.java17
-rw-r--r--javax/swing/AbstractSpinnerModel.java11
-rw-r--r--javax/swing/Action.java197
-rw-r--r--javax/swing/ActionMap.java12
-rw-r--r--javax/swing/BorderFactory.java257
-rw-r--r--javax/swing/BoundedRangeModel.java63
-rw-r--r--javax/swing/Box.java17
-rw-r--r--javax/swing/BoxLayout.java592
-rw-r--r--javax/swing/ButtonGroup.java42
-rw-r--r--javax/swing/ButtonModel.java7
-rw-r--r--javax/swing/CellEditor.java11
-rw-r--r--javax/swing/CellRendererPane.java23
-rw-r--r--javax/swing/ComboBoxEditor.java7
-rw-r--r--javax/swing/ComboBoxModel.java9
-rw-r--r--javax/swing/ComponentInputMap.java13
-rw-r--r--javax/swing/DebugGraphics.java58
-rw-r--r--javax/swing/DefaultBoundedRangeModel.java91
-rw-r--r--javax/swing/DefaultButtonModel.java175
-rw-r--r--javax/swing/DefaultCellEditor.java438
-rw-r--r--javax/swing/DefaultComboBoxModel.java13
-rw-r--r--javax/swing/DefaultDesktopManager.java204
-rw-r--r--javax/swing/DefaultFocusManager.java193
-rw-r--r--javax/swing/DefaultListCellRenderer.java28
-rw-r--r--javax/swing/DefaultListModel.java78
-rw-r--r--javax/swing/DefaultListSelectionModel.java170
-rw-r--r--javax/swing/DefaultSingleSelectionModel.java7
-rw-r--r--javax/swing/DesktopManager.java4
-rw-r--r--javax/swing/FocusManager.java54
-rw-r--r--javax/swing/GrayFilter.java29
-rw-r--r--javax/swing/Icon.java31
-rw-r--r--javax/swing/ImageIcon.java25
-rw-r--r--javax/swing/InputMap.java16
-rw-r--r--javax/swing/InputVerifier.java11
-rw-r--r--javax/swing/InternalFrameFocusTraversalPolicy.java11
-rw-r--r--javax/swing/JApplet.java56
-rw-r--r--javax/swing/JButton.java62
-rw-r--r--javax/swing/JCheckBox.java19
-rw-r--r--javax/swing/JCheckBoxMenuItem.java33
-rw-r--r--javax/swing/JColorChooser.java70
-rw-r--r--javax/swing/JComboBox.java240
-rw-r--r--javax/swing/JComponent.java313
-rw-r--r--javax/swing/JDesktopPane.java31
-rw-r--r--javax/swing/JDialog.java75
-rw-r--r--javax/swing/JEditorPane.java10
-rw-r--r--javax/swing/JFileChooser.java10
-rw-r--r--javax/swing/JFormattedTextField.java57
-rw-r--r--javax/swing/JFrame.java84
-rw-r--r--javax/swing/JInternalFrame.java71
-rw-r--r--javax/swing/JLabel.java271
-rw-r--r--javax/swing/JLayeredPane.java70
-rw-r--r--javax/swing/JList.java6
-rw-r--r--javax/swing/JMenu.java83
-rw-r--r--javax/swing/JMenuBar.java6
-rw-r--r--javax/swing/JMenuItem.java18
-rw-r--r--javax/swing/JOptionPane.java64
-rw-r--r--javax/swing/JPanel.java4
-rw-r--r--javax/swing/JPasswordField.java4
-rw-r--r--javax/swing/JPopupMenu.java10
-rw-r--r--javax/swing/JProgressBar.java20
-rw-r--r--javax/swing/JRadioButton.java6
-rw-r--r--javax/swing/JRadioButtonMenuItem.java4
-rw-r--r--javax/swing/JRootPane.java4
-rw-r--r--javax/swing/JScrollBar.java6
-rw-r--r--javax/swing/JScrollPane.java56
-rw-r--r--javax/swing/JSeparator.java6
-rw-r--r--javax/swing/JSlider.java70
-rw-r--r--javax/swing/JSpinner.java185
-rw-r--r--javax/swing/JSplitPane.java6
-rw-r--r--javax/swing/JTabbedPane.java6
-rw-r--r--javax/swing/JTable.java258
-rw-r--r--javax/swing/JTextArea.java44
-rw-r--r--javax/swing/JTextField.java6
-rw-r--r--javax/swing/JTextPane.java595
-rw-r--r--javax/swing/JToggleButton.java51
-rw-r--r--javax/swing/JToolBar.java4
-rw-r--r--javax/swing/JToolTip.java4
-rw-r--r--javax/swing/JTree.java3446
-rw-r--r--javax/swing/JViewport.java49
-rw-r--r--javax/swing/JWindow.java52
-rw-r--r--javax/swing/KeyStroke.java4
-rw-r--r--javax/swing/LayoutFocusTraversalPolicy.java4
-rw-r--r--javax/swing/ListCellRenderer.java7
-rw-r--r--javax/swing/ListModel.java7
-rw-r--r--javax/swing/ListSelectionModel.java8
-rw-r--r--javax/swing/LookAndFeel.java41
-rw-r--r--javax/swing/MenuElement.java11
-rw-r--r--javax/swing/MenuSelectionManager.java21
-rw-r--r--javax/swing/MutableComboBoxModel.java11
-rw-r--r--javax/swing/OverlayLayout.java4
-rw-r--r--javax/swing/Popup.java4
-rw-r--r--javax/swing/PopupFactory.java4
-rw-r--r--javax/swing/ProgressMonitor.java4
-rw-r--r--javax/swing/ProgressMonitorInputStream.java4
-rw-r--r--javax/swing/Renderer.java15
-rw-r--r--javax/swing/RepaintManager.java13
-rw-r--r--javax/swing/RootPaneContainer.java12
-rw-r--r--javax/swing/ScrollPaneConstants.java11
-rw-r--r--javax/swing/ScrollPaneLayout.java4
-rw-r--r--javax/swing/Scrollable.java10
-rw-r--r--javax/swing/SingleSelectionModel.java12
-rw-r--r--javax/swing/SizeRequirements.java5
-rw-r--r--javax/swing/SizeSequence.java4
-rw-r--r--javax/swing/SortingFocusTraversalPolicy.java14
-rw-r--r--javax/swing/SpinnerDateModel.java4
-rw-r--r--javax/swing/SpinnerListModel.java6
-rw-r--r--javax/swing/SpinnerModel.java6
-rw-r--r--javax/swing/SpinnerNumberModel.java4
-rw-r--r--javax/swing/Spring.java10
-rw-r--r--javax/swing/SpringLayout.java14
-rw-r--r--javax/swing/SwingConstants.java7
-rw-r--r--javax/swing/SwingUtilities.java12
-rw-r--r--javax/swing/Timer.java4
-rw-r--r--javax/swing/ToolTipManager.java8
-rw-r--r--javax/swing/TransferHandler.java4
-rw-r--r--javax/swing/UIDefaults.java54
-rw-r--r--javax/swing/UIManager.java4
-rw-r--r--javax/swing/UnsupportedLookAndFeelException.java4
-rw-r--r--javax/swing/ViewportLayout.java4
-rw-r--r--javax/swing/WindowConstants.java11
-rw-r--r--javax/swing/border/AbstractBorder.java6
-rw-r--r--javax/swing/border/BevelBorder.java8
-rw-r--r--javax/swing/border/Border.java4
-rw-r--r--javax/swing/border/CompoundBorder.java4
-rw-r--r--javax/swing/border/EmptyBorder.java4
-rw-r--r--javax/swing/border/EtchedBorder.java6
-rw-r--r--javax/swing/border/LineBorder.java6
-rw-r--r--javax/swing/border/MatteBorder.java4
-rw-r--r--javax/swing/border/SoftBevelBorder.java8
-rw-r--r--javax/swing/border/TitledBorder.java10
-rw-r--r--javax/swing/border/package.html7
-rw-r--r--javax/swing/colorchooser/AbstractColorChooserPanel.java4
-rw-r--r--javax/swing/colorchooser/ColorChooserComponentFactory.java4
-rw-r--r--javax/swing/colorchooser/ColorSelectionModel.java4
-rw-r--r--javax/swing/colorchooser/DefaultColorSelectionModel.java4
-rw-r--r--javax/swing/colorchooser/DefaultHSBChooserPanel.java4
-rw-r--r--javax/swing/colorchooser/DefaultPreviewPanel.java4
-rw-r--r--javax/swing/colorchooser/DefaultRGBChooserPanel.java4
-rw-r--r--javax/swing/colorchooser/DefaultSwatchChooserPanel.java4
-rw-r--r--javax/swing/colorchooser/package.html9
-rw-r--r--javax/swing/event/AncestorEvent.java4
-rw-r--r--javax/swing/event/AncestorListener.java4
-rw-r--r--javax/swing/event/CaretEvent.java4
-rw-r--r--javax/swing/event/CaretListener.java4
-rw-r--r--javax/swing/event/CellEditorListener.java4
-rw-r--r--javax/swing/event/ChangeEvent.java4
-rw-r--r--javax/swing/event/ChangeListener.java4
-rw-r--r--javax/swing/event/DocumentEvent.java4
-rw-r--r--javax/swing/event/DocumentListener.java4
-rw-r--r--javax/swing/event/EventListenerList.java8
-rw-r--r--javax/swing/event/HyperlinkEvent.java4
-rw-r--r--javax/swing/event/HyperlinkListener.java4
-rw-r--r--javax/swing/event/InternalFrameAdapter.java4
-rw-r--r--javax/swing/event/InternalFrameEvent.java4
-rw-r--r--javax/swing/event/InternalFrameListener.java4
-rw-r--r--javax/swing/event/ListDataEvent.java4
-rw-r--r--javax/swing/event/ListDataListener.java4
-rw-r--r--javax/swing/event/ListSelectionEvent.java4
-rw-r--r--javax/swing/event/ListSelectionListener.java4
-rw-r--r--javax/swing/event/MenuDragMouseEvent.java4
-rw-r--r--javax/swing/event/MenuDragMouseListener.java4
-rw-r--r--javax/swing/event/MenuEvent.java4
-rw-r--r--javax/swing/event/MenuKeyEvent.java6
-rw-r--r--javax/swing/event/MenuKeyListener.java4
-rw-r--r--javax/swing/event/MenuListener.java4
-rw-r--r--javax/swing/event/MouseInputAdapter.java4
-rw-r--r--javax/swing/event/MouseInputListener.java4
-rw-r--r--javax/swing/event/PopupMenuEvent.java4
-rw-r--r--javax/swing/event/PopupMenuListener.java4
-rw-r--r--javax/swing/event/SwingPropertyChangeSupport.java4
-rw-r--r--javax/swing/event/TableColumnModelEvent.java4
-rw-r--r--javax/swing/event/TableColumnModelListener.java4
-rw-r--r--javax/swing/event/TableModelEvent.java116
-rw-r--r--javax/swing/event/TableModelListener.java4
-rw-r--r--javax/swing/event/TreeExpansionEvent.java4
-rw-r--r--javax/swing/event/TreeExpansionListener.java4
-rw-r--r--javax/swing/event/TreeModelEvent.java4
-rw-r--r--javax/swing/event/TreeModelListener.java4
-rw-r--r--javax/swing/event/TreeSelectionEvent.java287
-rw-r--r--javax/swing/event/TreeSelectionListener.java4
-rw-r--r--javax/swing/event/TreeWillExpandListener.java4
-rw-r--r--javax/swing/event/UndoableEditEvent.java4
-rw-r--r--javax/swing/event/UndoableEditListener.java4
-rw-r--r--javax/swing/event/package.html9
-rw-r--r--javax/swing/filechooser/FileFilter.java4
-rw-r--r--javax/swing/filechooser/FileSystemView.java6
-rw-r--r--javax/swing/filechooser/FileView.java4
-rw-r--r--javax/swing/filechooser/UnixFileSystemView.java4
-rw-r--r--javax/swing/filechooser/package.html9
-rw-r--r--javax/swing/package.html9
-rw-r--r--javax/swing/plaf/ActionMapUIResource.java4
-rw-r--r--javax/swing/plaf/BorderUIResource.java8
-rw-r--r--javax/swing/plaf/ButtonUI.java4
-rw-r--r--javax/swing/plaf/ColorChooserUI.java4
-rw-r--r--javax/swing/plaf/ColorUIResource.java19
-rw-r--r--javax/swing/plaf/ComboBoxUI.java4
-rw-r--r--javax/swing/plaf/ComponentInputMapUIResource.java4
-rw-r--r--javax/swing/plaf/ComponentUI.java4
-rw-r--r--javax/swing/plaf/DesktopIconUI.java4
-rw-r--r--javax/swing/plaf/DesktopPaneUI.java4
-rw-r--r--javax/swing/plaf/DimensionUIResource.java4
-rw-r--r--javax/swing/plaf/FileChooserUI.java8
-rw-r--r--javax/swing/plaf/FontUIResource.java4
-rw-r--r--javax/swing/plaf/IconUIResource.java4
-rw-r--r--javax/swing/plaf/InputMapUIResource.java4
-rw-r--r--javax/swing/plaf/InsetsUIResource.java4
-rw-r--r--javax/swing/plaf/InternalFrameUI.java4
-rw-r--r--javax/swing/plaf/LabelUI.java4
-rw-r--r--javax/swing/plaf/ListUI.java8
-rw-r--r--javax/swing/plaf/MenuBarUI.java4
-rw-r--r--javax/swing/plaf/MenuItemUI.java4
-rw-r--r--javax/swing/plaf/OptionPaneUI.java4
-rw-r--r--javax/swing/plaf/PanelUI.java4
-rw-r--r--javax/swing/plaf/PopupMenuUI.java4
-rw-r--r--javax/swing/plaf/ProgressBarUI.java4
-rw-r--r--javax/swing/plaf/RootPaneUI.java4
-rw-r--r--javax/swing/plaf/ScrollBarUI.java4
-rw-r--r--javax/swing/plaf/ScrollPaneUI.java4
-rw-r--r--javax/swing/plaf/SeparatorUI.java4
-rw-r--r--javax/swing/plaf/SliderUI.java4
-rw-r--r--javax/swing/plaf/SpinnerUI.java4
-rw-r--r--javax/swing/plaf/SplitPaneUI.java4
-rw-r--r--javax/swing/plaf/TabbedPaneUI.java4
-rw-r--r--javax/swing/plaf/TableHeaderUI.java4
-rw-r--r--javax/swing/plaf/TableUI.java4
-rw-r--r--javax/swing/plaf/TextUI.java19
-rw-r--r--javax/swing/plaf/ToolBarUI.java4
-rw-r--r--javax/swing/plaf/ToolTipUI.java4
-rw-r--r--javax/swing/plaf/TreeUI.java4
-rw-r--r--javax/swing/plaf/UIResource.java8
-rw-r--r--javax/swing/plaf/ViewportUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicArrowButton.java4
-rw-r--r--javax/swing/plaf/basic/BasicBorders.java47
-rw-r--r--javax/swing/plaf/basic/BasicButtonListener.java7
-rw-r--r--javax/swing/plaf/basic/BasicButtonUI.java24
-rw-r--r--javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicCheckBoxUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicColorChooserUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicComboBoxEditor.java17
-rw-r--r--javax/swing/plaf/basic/BasicComboBoxRenderer.java4
-rw-r--r--javax/swing/plaf/basic/BasicComboBoxUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicComboPopup.java4
-rw-r--r--javax/swing/plaf/basic/BasicDesktopIconUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicDesktopPaneUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicDirectoryModel.java4
-rw-r--r--javax/swing/plaf/basic/BasicEditorPaneUI.java43
-rw-r--r--javax/swing/plaf/basic/BasicFileChooserUI.java69
-rw-r--r--javax/swing/plaf/basic/BasicFormattedTextFieldUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicGraphicsUtils.java10
-rw-r--r--javax/swing/plaf/basic/BasicIconFactory.java219
-rw-r--r--javax/swing/plaf/basic/BasicInternalFrameTitlePane.java222
-rw-r--r--javax/swing/plaf/basic/BasicInternalFrameUI.java90
-rw-r--r--javax/swing/plaf/basic/BasicLabelUI.java10
-rw-r--r--javax/swing/plaf/basic/BasicListUI.java206
-rw-r--r--javax/swing/plaf/basic/BasicLookAndFeel.java142
-rw-r--r--javax/swing/plaf/basic/BasicMenuBarUI.java7
-rw-r--r--javax/swing/plaf/basic/BasicMenuItemUI.java28
-rw-r--r--javax/swing/plaf/basic/BasicMenuUI.java46
-rw-r--r--javax/swing/plaf/basic/BasicOptionPaneUI.java21
-rw-r--r--javax/swing/plaf/basic/BasicPanelUI.java37
-rw-r--r--javax/swing/plaf/basic/BasicPasswordFieldUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicPopupMenuUI.java14
-rw-r--r--javax/swing/plaf/basic/BasicProgressBarUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicRadioButtonUI.java109
-rw-r--r--javax/swing/plaf/basic/BasicRootPaneUI.java5
-rw-r--r--javax/swing/plaf/basic/BasicScrollBarUI.java12
-rw-r--r--javax/swing/plaf/basic/BasicScrollPaneUI.java12
-rw-r--r--javax/swing/plaf/basic/BasicSeparatorUI.java6
-rw-r--r--javax/swing/plaf/basic/BasicSliderUI.java274
-rw-r--r--javax/swing/plaf/basic/BasicSpinnerUI.java9
-rw-r--r--javax/swing/plaf/basic/BasicSplitPaneDivider.java6
-rw-r--r--javax/swing/plaf/basic/BasicSplitPaneUI.java19
-rw-r--r--javax/swing/plaf/basic/BasicTabbedPaneUI.java18
-rw-r--r--javax/swing/plaf/basic/BasicTableHeaderUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicTableUI.java488
-rw-r--r--javax/swing/plaf/basic/BasicTextAreaUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicTextFieldUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicTextPaneUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicTextUI.java425
-rw-r--r--javax/swing/plaf/basic/BasicToggleButtonUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicToolBarSeparatorUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicToolBarUI.java17
-rw-r--r--javax/swing/plaf/basic/BasicToolTipUI.java6
-rw-r--r--javax/swing/plaf/basic/BasicTreeUI.java2955
-rw-r--r--javax/swing/plaf/basic/BasicViewportUI.java4
-rw-r--r--javax/swing/plaf/basic/ComboPopup.java4
-rw-r--r--javax/swing/plaf/basic/DefaultMenuLayout.java4
-rw-r--r--javax/swing/plaf/basic/package.html8
-rw-r--r--javax/swing/plaf/metal/DefaultMetalTheme.java86
-rw-r--r--javax/swing/plaf/metal/MetalBorders.java177
-rw-r--r--javax/swing/plaf/metal/MetalButtonUI.java54
-rw-r--r--javax/swing/plaf/metal/MetalCheckBoxIcon.java136
-rw-r--r--javax/swing/plaf/metal/MetalCheckBoxUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalComboBoxIcon.java100
-rw-r--r--javax/swing/plaf/metal/MetalComboBoxUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalDesktopIconUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalIconFactory.java786
-rw-r--r--javax/swing/plaf/metal/MetalInternalFrameUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalLabelUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalLookAndFeel.java377
-rw-r--r--javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalProgressBarUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalRadioButtonUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalRootPaneUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalScrollBarUI.java29
-rw-r--r--javax/swing/plaf/metal/MetalScrollPaneUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalSeparatorUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalSliderUI.java267
-rw-r--r--javax/swing/plaf/metal/MetalSplitPaneDivider.java84
-rw-r--r--javax/swing/plaf/metal/MetalSplitPaneUI.java24
-rw-r--r--javax/swing/plaf/metal/MetalTabbedPaneUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalTextFieldUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalTheme.java327
-rw-r--r--javax/swing/plaf/metal/MetalToggleButtonUI.java55
-rw-r--r--javax/swing/plaf/metal/MetalToolBarUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalToolTipUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalTreeUI.java26
-rw-r--r--javax/swing/plaf/metal/MetalUtils.java87
-rw-r--r--javax/swing/plaf/metal/package.html8
-rw-r--r--javax/swing/plaf/package.html9
-rw-r--r--javax/swing/table/AbstractTableModel.java196
-rw-r--r--javax/swing/table/DefaultTableCellRenderer.java4
-rw-r--r--javax/swing/table/DefaultTableColumnModel.java49
-rw-r--r--javax/swing/table/DefaultTableModel.java56
-rw-r--r--javax/swing/table/JTableHeader.java43
-rw-r--r--javax/swing/table/TableCellEditor.java4
-rw-r--r--javax/swing/table/TableCellRenderer.java4
-rw-r--r--javax/swing/table/TableColumn.java113
-rw-r--r--javax/swing/table/TableColumnModel.java53
-rw-r--r--javax/swing/table/TableModel.java8
-rw-r--r--javax/swing/table/package.html9
-rw-r--r--javax/swing/text/AbstractDocument.java40
-rw-r--r--javax/swing/text/AttributeSet.java4
-rw-r--r--javax/swing/text/BadLocationException.java4
-rw-r--r--javax/swing/text/BoxView.java87
-rw-r--r--javax/swing/text/Caret.java4
-rw-r--r--javax/swing/text/ChangedCharSetException.java4
-rw-r--r--javax/swing/text/ComponentView.java4
-rw-r--r--javax/swing/text/CompositeView.java84
-rw-r--r--javax/swing/text/DateFormatter.java85
-rw-r--r--javax/swing/text/DefaultCaret.java4
-rw-r--r--javax/swing/text/DefaultEditorKit.java28
-rw-r--r--javax/swing/text/DefaultFormatter.java429
-rw-r--r--javax/swing/text/DefaultHighlighter.java4
-rw-r--r--javax/swing/text/DefaultStyledDocument.java311
-rw-r--r--javax/swing/text/Document.java4
-rw-r--r--javax/swing/text/DocumentFilter.java4
-rw-r--r--javax/swing/text/EditorKit.java4
-rw-r--r--javax/swing/text/Element.java4
-rw-r--r--javax/swing/text/FieldView.java4
-rw-r--r--javax/swing/text/FlowView.java56
-rw-r--r--javax/swing/text/GapContent.java155
-rw-r--r--javax/swing/text/GlyphView.java111
-rw-r--r--javax/swing/text/Highlighter.java4
-rw-r--r--javax/swing/text/IconView.java110
-rw-r--r--javax/swing/text/InternationalFormatter.java354
-rw-r--r--javax/swing/text/JTextComponent.java107
-rw-r--r--javax/swing/text/Keymap.java4
-rw-r--r--javax/swing/text/LabelView.java54
-rw-r--r--javax/swing/text/LayeredHighlighter.java4
-rw-r--r--javax/swing/text/MutableAttributeSet.java4
-rw-r--r--javax/swing/text/NavigationFilter.java4
-rw-r--r--javax/swing/text/ParagraphView.java56
-rw-r--r--javax/swing/text/PasswordView.java4
-rw-r--r--javax/swing/text/PlainDocument.java20
-rw-r--r--javax/swing/text/PlainView.java4
-rw-r--r--javax/swing/text/Position.java4
-rw-r--r--javax/swing/text/Segment.java4
-rw-r--r--javax/swing/text/SimpleAttributeSet.java4
-rw-r--r--javax/swing/text/StringContent.java4
-rw-r--r--javax/swing/text/Style.java4
-rw-r--r--javax/swing/text/StyleConstants.java4
-rw-r--r--javax/swing/text/StyleContext.java35
-rw-r--r--javax/swing/text/StyledDocument.java4
-rw-r--r--javax/swing/text/StyledEditorKit.java570
-rw-r--r--javax/swing/text/TabExpander.java4
-rw-r--r--javax/swing/text/TabSet.java4
-rw-r--r--javax/swing/text/TabStop.java4
-rw-r--r--javax/swing/text/TabableView.java4
-rw-r--r--javax/swing/text/TextAction.java4
-rw-r--r--javax/swing/text/Utilities.java4
-rw-r--r--javax/swing/text/View.java59
-rw-r--r--javax/swing/text/ViewFactory.java4
-rw-r--r--javax/swing/text/html/HTML.java19
-rw-r--r--javax/swing/text/html/HTMLDocument.java4
-rw-r--r--javax/swing/text/html/HTMLEditorKit.java91
-rw-r--r--javax/swing/text/html/HTMLFrameHyperlinkEvent.java4
-rw-r--r--javax/swing/text/html/package.html4
-rw-r--r--javax/swing/text/html/parser/AttributeList.java4
-rw-r--r--javax/swing/text/html/parser/ContentModel.java4
-rw-r--r--javax/swing/text/html/parser/DTD.java11
-rw-r--r--javax/swing/text/html/parser/DTDConstants.java10
-rw-r--r--javax/swing/text/html/parser/DocumentParser.java16
-rw-r--r--javax/swing/text/html/parser/Element.java6
-rw-r--r--javax/swing/text/html/parser/Entity.java4
-rw-r--r--javax/swing/text/html/parser/Parser.java16
-rw-r--r--javax/swing/text/html/parser/ParserDelegator.java12
-rw-r--r--javax/swing/text/html/parser/TagElement.java4
-rw-r--r--javax/swing/text/html/parser/package.html4
-rw-r--r--javax/swing/text/package.html4
-rw-r--r--javax/swing/text/rtf/ControlWordToken.java4
-rw-r--r--javax/swing/text/rtf/RTFEditorKit.java4
-rw-r--r--javax/swing/text/rtf/RTFParseException.java4
-rw-r--r--javax/swing/text/rtf/RTFParser.java4
-rw-r--r--javax/swing/text/rtf/RTFScanner.java4
-rw-r--r--javax/swing/text/rtf/TextToken.java4
-rw-r--r--javax/swing/text/rtf/Token.java4
-rw-r--r--javax/swing/tree/AbstractLayoutCache.java36
-rw-r--r--javax/swing/tree/DefaultMutableTreeNode.java176
-rw-r--r--javax/swing/tree/DefaultTreeCellEditor.java4
-rw-r--r--javax/swing/tree/DefaultTreeCellRenderer.java401
-rw-r--r--javax/swing/tree/DefaultTreeModel.java796
-rw-r--r--javax/swing/tree/DefaultTreeSelectionModel.java1290
-rw-r--r--javax/swing/tree/ExpandVetoException.java4
-rw-r--r--javax/swing/tree/FixedHeightLayoutCache.java124
-rw-r--r--javax/swing/tree/MutableTreeNode.java12
-rw-r--r--javax/swing/tree/RowMapper.java4
-rw-r--r--javax/swing/tree/TreeCellEditor.java4
-rw-r--r--javax/swing/tree/TreeCellRenderer.java4
-rw-r--r--javax/swing/tree/TreeModel.java4
-rw-r--r--javax/swing/tree/TreeNode.java4
-rw-r--r--javax/swing/tree/TreePath.java224
-rw-r--r--javax/swing/tree/TreeSelectionModel.java4
-rw-r--r--javax/swing/tree/VariableHeightLayoutCache.java12
-rw-r--r--javax/swing/tree/package.html9
-rw-r--r--javax/swing/undo/AbstractUndoableEdit.java4
-rw-r--r--javax/swing/undo/CannotRedoException.java4
-rw-r--r--javax/swing/undo/CannotUndoException.java4
-rw-r--r--javax/swing/undo/CompoundEdit.java4
-rw-r--r--javax/swing/undo/StateEdit.java4
-rw-r--r--javax/swing/undo/StateEditable.java4
-rw-r--r--javax/swing/undo/UndoManager.java8
-rw-r--r--javax/swing/undo/UndoableEdit.java4
-rw-r--r--javax/swing/undo/UndoableEditSupport.java10
-rw-r--r--javax/swing/undo/package.html8
-rw-r--r--javax/transaction/HeuristicCommitException.java4
-rw-r--r--javax/transaction/HeuristicMixedException.java4
-rw-r--r--javax/transaction/HeuristicRollbackException.java4
-rw-r--r--javax/transaction/InvalidTransactionException.java4
-rw-r--r--javax/transaction/NotSupportedException.java4
-rw-r--r--javax/transaction/RollbackException.java4
-rw-r--r--javax/transaction/Status.java4
-rw-r--r--javax/transaction/Synchronization.java4
-rw-r--r--javax/transaction/SystemException.java4
-rw-r--r--javax/transaction/Transaction.java4
-rw-r--r--javax/transaction/TransactionManager.java4
-rw-r--r--javax/transaction/TransactionRequiredException.java4
-rw-r--r--javax/transaction/TransactionRolledbackException.java4
-rw-r--r--javax/transaction/UserTransaction.java4
-rw-r--r--javax/transaction/package.html4
-rw-r--r--javax/transaction/xa/XAException.java4
-rw-r--r--javax/transaction/xa/XAResource.java4
-rw-r--r--javax/transaction/xa/Xid.java4
-rw-r--r--javax/transaction/xa/package.html4
-rw-r--r--javax/xml/XMLConstants.java4
-rw-r--r--javax/xml/datatype/DatatypeConfigurationException.java4
-rw-r--r--javax/xml/datatype/DatatypeConstants.java4
-rw-r--r--javax/xml/datatype/DatatypeFactory.java4
-rw-r--r--javax/xml/datatype/Duration.java4
-rw-r--r--javax/xml/datatype/XMLGregorianCalendar.java4
-rw-r--r--javax/xml/namespace/NamespaceContext.java4
-rw-r--r--javax/xml/namespace/QName.java87
-rw-r--r--javax/xml/parsers/DocumentBuilder.java4
-rw-r--r--javax/xml/parsers/DocumentBuilderFactory.java4
-rw-r--r--javax/xml/parsers/FactoryConfigurationError.java4
-rw-r--r--javax/xml/parsers/ParserConfigurationException.java4
-rw-r--r--javax/xml/parsers/SAXParser.java4
-rw-r--r--javax/xml/parsers/SAXParserFactory.java4
-rw-r--r--javax/xml/transform/ErrorListener.java4
-rw-r--r--javax/xml/transform/OutputKeys.java4
-rw-r--r--javax/xml/transform/Result.java4
-rw-r--r--javax/xml/transform/Source.java4
-rw-r--r--javax/xml/transform/SourceLocator.java4
-rw-r--r--javax/xml/transform/Templates.java4
-rw-r--r--javax/xml/transform/Transformer.java4
-rw-r--r--javax/xml/transform/TransformerConfigurationException.java4
-rw-r--r--javax/xml/transform/TransformerException.java4
-rw-r--r--javax/xml/transform/TransformerFactory.java4
-rw-r--r--javax/xml/transform/TransformerFactoryConfigurationError.java4
-rw-r--r--javax/xml/transform/URIResolver.java4
-rw-r--r--javax/xml/transform/dom/DOMLocator.java4
-rw-r--r--javax/xml/transform/dom/DOMResult.java4
-rw-r--r--javax/xml/transform/dom/DOMSource.java4
-rw-r--r--javax/xml/transform/sax/SAXResult.java4
-rw-r--r--javax/xml/transform/sax/SAXSource.java4
-rw-r--r--javax/xml/transform/sax/SAXTransformerFactory.java4
-rw-r--r--javax/xml/transform/sax/TemplatesHandler.java4
-rw-r--r--javax/xml/transform/sax/TransformerHandler.java4
-rw-r--r--javax/xml/transform/stream/StreamResult.java4
-rw-r--r--javax/xml/transform/stream/StreamSource.java4
-rw-r--r--javax/xml/validation/Schema.java4
-rw-r--r--javax/xml/validation/SchemaFactory.java4
-rw-r--r--javax/xml/validation/TypeInfoProvider.java4
-rw-r--r--javax/xml/validation/Validator.java4
-rw-r--r--javax/xml/validation/ValidatorHandler.java4
-rw-r--r--javax/xml/xpath/XPath.java4
-rw-r--r--javax/xml/xpath/XPathConstants.java4
-rw-r--r--javax/xml/xpath/XPathException.java4
-rw-r--r--javax/xml/xpath/XPathExpression.java4
-rw-r--r--javax/xml/xpath/XPathExpressionException.java4
-rw-r--r--javax/xml/xpath/XPathFactory.java4
-rw-r--r--javax/xml/xpath/XPathFactoryConfigurationException.java4
-rw-r--r--javax/xml/xpath/XPathFunction.java4
-rw-r--r--javax/xml/xpath/XPathFunctionException.java4
-rw-r--r--javax/xml/xpath/XPathFunctionResolver.java4
-rw-r--r--javax/xml/xpath/XPathVariableResolver.java4
-rw-r--r--lib/Makefile.am37
-rw-r--r--lib/Makefile.gcj32
-rwxr-xr-xlib/gen-classlist.sh.in57
-rw-r--r--lib/libgcj.omit7
-rwxr-xr-xlib/mkcollections.pl.in3
-rwxr-xr-xlib/split-for-gcj.sh28
-rw-r--r--lib/standard.omit2
-rw-r--r--m4/acinclude.m424
-rwxr-xr-xmissing4
-rw-r--r--native/fdlibm/Makefile.am1
-rw-r--r--native/fdlibm/s_finite.c31
-rw-r--r--native/jni/classpath/classpath_jawt.h64
-rw-r--r--native/jni/classpath/jcl.c48
-rw-r--r--native/jni/classpath/jcl.h7
-rw-r--r--native/jni/classpath/jnilink.c4
-rw-r--r--native/jni/classpath/jnilink.h4
-rw-r--r--native/jni/classpath/native_state.c56
-rw-r--r--native/jni/classpath/native_state.h20
-rw-r--r--native/jni/classpath/primlib.c4
-rw-r--r--native/jni/classpath/primlib.h4
-rw-r--r--native/jni/gtk-peer/Makefile.am7
-rw-r--r--native/jni/gtk-peer/gdkfont.h32
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.c4
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c41
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c322
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c742
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c21
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c133
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkRobotPeer.c21
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c15
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c141
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c14
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer.c12
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c16
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c97
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c91
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c93
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c915
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c16
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c1176
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c107
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c39
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkGenericPeer.c23
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c103
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c44
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c220
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c24
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c4
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c73
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c31
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c60
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c14
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c36
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollbarPeer.c (renamed from native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c)66
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c330
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c498
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c260
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c272
-rw-r--r--native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c1555
-rw-r--r--native/jni/gtk-peer/gthread-jni.c54
-rw-r--r--native/jni/gtk-peer/gthread-jni.h8
-rw-r--r--native/jni/gtk-peer/gtkcairopeer.h5
-rw-r--r--native/jni/gtk-peer/gtkpeer.h460
-rw-r--r--native/jni/java-io/java_io_VMFile.c4
-rw-r--r--native/jni/java-io/java_io_VMObjectInputStream.c4
-rw-r--r--native/jni/java-io/java_io_VMObjectStreamClass.c4
-rw-r--r--native/jni/java-io/javaio.c4
-rw-r--r--native/jni/java-io/javaio.h4
-rw-r--r--native/jni/java-lang/java_lang_Math.c4
-rw-r--r--native/jni/java-lang/java_lang_VMDouble.c4
-rw-r--r--native/jni/java-lang/java_lang_VMFloat.c4
-rw-r--r--native/jni/java-lang/java_lang_VMProcess.c4
-rw-r--r--native/jni/java-lang/java_lang_VMSystem.c4
-rw-r--r--native/jni/java-lang/java_lang_reflect_Array.c4
-rw-r--r--native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c76
-rw-r--r--native/jni/java-net/gnu_java_net_PlainSocketImpl.c4
-rw-r--r--native/jni/java-net/java_net_VMInetAddress.c4
-rw-r--r--native/jni/java-net/java_net_VMNetworkInterface.c4
-rw-r--r--native/jni/java-net/javanet.c168
-rw-r--r--native/jni/java-net/javanet.h4
-rw-r--r--native/jni/java-nio/gnu_java_nio_VMPipe.c4
-rw-r--r--native/jni/java-nio/gnu_java_nio_VMSelector.c4
-rw-r--r--native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c328
-rw-r--r--native/jni/java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c4
-rw-r--r--native/jni/java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c4
-rw-r--r--native/jni/java-nio/java_nio.c4
-rw-r--r--native/jni/java-nio/java_nio_MappedByteBufferImpl.c216
-rw-r--r--native/jni/java-nio/java_nio_VMDirectByteBuffer.c22
-rw-r--r--native/jni/java-util/java_util_VMTimeZone.c4
-rw-r--r--native/jni/xmlj/xmlj_dom.c4
-rw-r--r--native/jni/xmlj/xmlj_dom.h4
-rw-r--r--native/jni/xmlj/xmlj_error.c4
-rw-r--r--native/jni/xmlj/xmlj_error.h4
-rw-r--r--native/jni/xmlj/xmlj_io.c4
-rw-r--r--native/jni/xmlj/xmlj_io.h4
-rw-r--r--native/jni/xmlj/xmlj_node.c4
-rw-r--r--native/jni/xmlj/xmlj_node.h4
-rw-r--r--native/jni/xmlj/xmlj_sax.c4
-rw-r--r--native/jni/xmlj/xmlj_sax.h4
-rw-r--r--native/jni/xmlj/xmlj_transform.c4
-rw-r--r--native/jni/xmlj/xmlj_util.c4
-rw-r--r--native/jni/xmlj/xmlj_util.h4
-rw-r--r--native/jni/xmlj/xmlj_xpath.c4
-rw-r--r--native/target/Linux/target_native.h4
-rw-r--r--native/target/Linux/target_native_file.h4
-rw-r--r--native/target/Linux/target_native_io.h4
-rw-r--r--native/target/Linux/target_native_math_float.h4
-rw-r--r--native/target/Linux/target_native_math_int.h4
-rw-r--r--native/target/Linux/target_native_misc.h4
-rw-r--r--native/target/Linux/target_native_network.h4
-rw-r--r--native/target/generic/target_generic.h4
-rw-r--r--native/target/generic/target_generic_file.h4
-rw-r--r--native/target/generic/target_generic_io.h4
-rw-r--r--native/target/generic/target_generic_math_float.h4
-rw-r--r--native/target/generic/target_generic_math_int.h4
-rw-r--r--native/target/generic/target_generic_misc.h4
-rw-r--r--native/target/generic/target_generic_network.h27
-rw-r--r--native/testsuite/guile-jvm.c2
-rwxr-xr-xnative/vmi/vmi.c4
-rwxr-xr-xnative/vmi/vmi.h4
-rw-r--r--org/ietf/jgss/ChannelBinding.java4
-rw-r--r--org/ietf/jgss/GSSContext.java4
-rw-r--r--org/ietf/jgss/GSSCredential.java4
-rw-r--r--org/ietf/jgss/GSSException.java4
-rw-r--r--org/ietf/jgss/GSSManager.java4
-rw-r--r--org/ietf/jgss/GSSName.java4
-rw-r--r--org/ietf/jgss/MessageProp.java4
-rw-r--r--org/ietf/jgss/Oid.java4
-rw-r--r--org/omg/CORBA/ARG_IN.java4
-rw-r--r--org/omg/CORBA/ARG_INOUT.java4
-rw-r--r--org/omg/CORBA/ARG_OUT.java4
-rw-r--r--org/omg/CORBA/Any.java4
-rw-r--r--org/omg/CORBA/AnyHolder.java4
-rw-r--r--org/omg/CORBA/AnySeqHelper.java4
-rw-r--r--org/omg/CORBA/AnySeqHolder.java4
-rw-r--r--org/omg/CORBA/BAD_CONTEXT.java4
-rw-r--r--org/omg/CORBA/BAD_INV_ORDER.java4
-rwxr-xr-xorg/omg/CORBA/BAD_OPERATION.java4
-rw-r--r--org/omg/CORBA/BAD_PARAM.java4
-rw-r--r--org/omg/CORBA/BAD_POLICY.java4
-rw-r--r--org/omg/CORBA/BAD_POLICY_TYPE.java4
-rw-r--r--org/omg/CORBA/BAD_POLICY_VALUE.java4
-rw-r--r--org/omg/CORBA/BAD_TYPECODE.java4
-rw-r--r--org/omg/CORBA/BooleanHolder.java4
-rw-r--r--org/omg/CORBA/BooleanSeqHelper.java4
-rw-r--r--org/omg/CORBA/BooleanSeqHolder.java4
-rw-r--r--org/omg/CORBA/Bounds.java4
-rw-r--r--org/omg/CORBA/ByteHolder.java4
-rw-r--r--org/omg/CORBA/COMM_FAILURE.java4
-rw-r--r--org/omg/CORBA/CTX_RESTRICT_SCOPE.java4
-rw-r--r--org/omg/CORBA/CharHolder.java4
-rw-r--r--org/omg/CORBA/CharSeqHelper.java4
-rw-r--r--org/omg/CORBA/CharSeqHolder.java4
-rw-r--r--org/omg/CORBA/CompletionStatus.java4
-rw-r--r--org/omg/CORBA/CompletionStatusHelper.java36
-rw-r--r--org/omg/CORBA/Context.java4
-rw-r--r--org/omg/CORBA/ContextList.java4
-rw-r--r--org/omg/CORBA/Current.java14
-rw-r--r--org/omg/CORBA/CurrentHelper.java180
-rw-r--r--org/omg/CORBA/CurrentHolder.java103
-rw-r--r--org/omg/CORBA/CurrentOperations.java11
-rw-r--r--org/omg/CORBA/CustomMarshal.java68
-rw-r--r--org/omg/CORBA/CustomValue.java60
-rw-r--r--org/omg/CORBA/DATA_CONVERSION.java4
-rw-r--r--org/omg/CORBA/DataInputStream.java276
-rw-r--r--org/omg/CORBA/DataOutputStream.java281
-rw-r--r--org/omg/CORBA/DefinitionKind.java4
-rw-r--r--org/omg/CORBA/DefinitionKindHelper.java4
-rw-r--r--org/omg/CORBA/DomainManager.java4
-rw-r--r--org/omg/CORBA/DomainManagerOperations.java4
-rw-r--r--org/omg/CORBA/DoubleHolder.java4
-rw-r--r--org/omg/CORBA/DoubleSeqHelper.java4
-rw-r--r--org/omg/CORBA/DoubleSeqHolder.java4
-rw-r--r--org/omg/CORBA/DynAny.java4
-rw-r--r--org/omg/CORBA/DynAnyPackage/Invalid.java4
-rw-r--r--org/omg/CORBA/DynAnyPackage/InvalidSeq.java4
-rw-r--r--org/omg/CORBA/DynAnyPackage/InvalidValue.java4
-rw-r--r--org/omg/CORBA/DynAnyPackage/TypeMismatch.java4
-rw-r--r--org/omg/CORBA/DynAnyPackage/package.html4
-rw-r--r--org/omg/CORBA/DynArray.java4
-rw-r--r--org/omg/CORBA/DynEnum.java4
-rw-r--r--org/omg/CORBA/DynFixed.java4
-rw-r--r--org/omg/CORBA/DynSequence.java4
-rw-r--r--org/omg/CORBA/DynStruct.java4
-rw-r--r--org/omg/CORBA/DynUnion.java4
-rw-r--r--org/omg/CORBA/DynValue.java4
-rw-r--r--org/omg/CORBA/DynamicImplementation.java4
-rw-r--r--org/omg/CORBA/Environment.java4
-rw-r--r--org/omg/CORBA/ExceptionList.java4
-rw-r--r--org/omg/CORBA/FREE_MEM.java4
-rw-r--r--org/omg/CORBA/FieldNameHelper.java4
-rw-r--r--org/omg/CORBA/FixedHolder.java4
-rw-r--r--org/omg/CORBA/FloatHolder.java4
-rw-r--r--org/omg/CORBA/FloatSeqHelper.java4
-rw-r--r--org/omg/CORBA/FloatSeqHolder.java4
-rw-r--r--org/omg/CORBA/IDLEntity.java4
-rw-r--r--org/omg/CORBA/IDLType.java4
-rw-r--r--org/omg/CORBA/IDLTypeHelper.java139
-rw-r--r--org/omg/CORBA/IDLTypeOperations.java4
-rw-r--r--org/omg/CORBA/IMP_LIMIT.java4
-rw-r--r--org/omg/CORBA/INITIALIZE.java4
-rw-r--r--org/omg/CORBA/INTERNAL.java4
-rw-r--r--org/omg/CORBA/INTF_REPOS.java4
-rw-r--r--org/omg/CORBA/INVALID_TRANSACTION.java4
-rw-r--r--org/omg/CORBA/INV_FLAG.java4
-rw-r--r--org/omg/CORBA/INV_IDENT.java4
-rw-r--r--org/omg/CORBA/INV_OBJREF.java4
-rw-r--r--org/omg/CORBA/INV_POLICY.java4
-rw-r--r--org/omg/CORBA/IRObject.java4
-rw-r--r--org/omg/CORBA/IRObjectOperations.java4
-rw-r--r--org/omg/CORBA/IdentifierHelper.java4
-rw-r--r--org/omg/CORBA/IntHolder.java4
-rw-r--r--org/omg/CORBA/LocalObject.java235
-rw-r--r--org/omg/CORBA/LongHolder.java4
-rw-r--r--org/omg/CORBA/LongLongSeqHelper.java4
-rw-r--r--org/omg/CORBA/LongLongSeqHolder.java4
-rw-r--r--org/omg/CORBA/LongSeqHelper.java4
-rw-r--r--org/omg/CORBA/LongSeqHolder.java4
-rw-r--r--org/omg/CORBA/MARSHAL.java4
-rw-r--r--org/omg/CORBA/NO_IMPLEMENT.java4
-rw-r--r--org/omg/CORBA/NO_MEMORY.java4
-rw-r--r--org/omg/CORBA/NO_PERMISSION.java4
-rw-r--r--org/omg/CORBA/NO_RESOURCES.java4
-rw-r--r--org/omg/CORBA/NO_RESPONSE.java4
-rw-r--r--org/omg/CORBA/NVList.java4
-rw-r--r--org/omg/CORBA/NameValuePair.java4
-rw-r--r--org/omg/CORBA/NameValuePairHelper.java4
-rw-r--r--org/omg/CORBA/NamedValue.java4
-rw-r--r--org/omg/CORBA/OBJECT_NOT_EXIST.java4
-rw-r--r--org/omg/CORBA/OBJ_ADAPTER.java4
-rw-r--r--org/omg/CORBA/OMGVMCID.java4
-rw-r--r--org/omg/CORBA/ORB.java143
-rw-r--r--org/omg/CORBA/ORBPackage/InconsistentTypeCode.java4
-rw-r--r--org/omg/CORBA/ORBPackage/InvalidName.java4
-rw-r--r--org/omg/CORBA/ORBPackage/package.html4
-rw-r--r--org/omg/CORBA/Object.java4
-rw-r--r--org/omg/CORBA/ObjectHelper.java4
-rw-r--r--org/omg/CORBA/ObjectHolder.java4
-rw-r--r--org/omg/CORBA/OctetSeqHelper.java4
-rw-r--r--org/omg/CORBA/OctetSeqHolder.java4
-rw-r--r--org/omg/CORBA/PERSIST_STORE.java4
-rw-r--r--org/omg/CORBA/PRIVATE_MEMBER.java4
-rw-r--r--org/omg/CORBA/PUBLIC_MEMBER.java4
-rw-r--r--org/omg/CORBA/ParameterMode.java56
-rw-r--r--org/omg/CORBA/ParameterModeHelper.java4
-rw-r--r--org/omg/CORBA/ParameterModeHolder.java11
-rw-r--r--org/omg/CORBA/Policy.java4
-rw-r--r--org/omg/CORBA/PolicyError.java4
-rw-r--r--org/omg/CORBA/PolicyHelper.java164
-rw-r--r--org/omg/CORBA/PolicyHolder.java106
-rw-r--r--org/omg/CORBA/PolicyListHelper.java149
-rw-r--r--org/omg/CORBA/PolicyListHolder.java106
-rw-r--r--org/omg/CORBA/PolicyOperations.java4
-rw-r--r--org/omg/CORBA/PolicyTypeHelper.java122
-rw-r--r--org/omg/CORBA/Principal.java4
-rw-r--r--org/omg/CORBA/PrincipalHolder.java4
-rw-r--r--org/omg/CORBA/RepositoryIdHelper.java4
-rw-r--r--org/omg/CORBA/Request.java4
-rw-r--r--org/omg/CORBA/ServerRequest.java4
-rw-r--r--org/omg/CORBA/ServiceDetail.java4
-rw-r--r--org/omg/CORBA/ServiceDetailHelper.java4
-rw-r--r--org/omg/CORBA/ServiceInformation.java4
-rw-r--r--org/omg/CORBA/ServiceInformationHelper.java4
-rw-r--r--org/omg/CORBA/ServiceInformationHolder.java4
-rw-r--r--org/omg/CORBA/SetOverrideType.java4
-rw-r--r--org/omg/CORBA/SetOverrideTypeHelper.java4
-rw-r--r--org/omg/CORBA/ShortHolder.java4
-rw-r--r--org/omg/CORBA/ShortSeqHelper.java4
-rw-r--r--org/omg/CORBA/ShortSeqHolder.java4
-rw-r--r--org/omg/CORBA/StringHolder.java4
-rw-r--r--org/omg/CORBA/StringSeqHelper.java4
-rwxr-xr-xorg/omg/CORBA/StringSeqHolder.java4
-rw-r--r--org/omg/CORBA/StringValueHelper.java198
-rw-r--r--org/omg/CORBA/StructMember.java4
-rw-r--r--org/omg/CORBA/StructMemberHelper.java177
-rw-r--r--org/omg/CORBA/SystemException.java4
-rw-r--r--org/omg/CORBA/TCKind.java4
-rw-r--r--org/omg/CORBA/TRANSACTION_REQUIRED.java4
-rw-r--r--org/omg/CORBA/TRANSACTION_ROLLEDBACK.java4
-rw-r--r--org/omg/CORBA/TRANSIENT.java4
-rw-r--r--org/omg/CORBA/TypeCode.java4
-rw-r--r--org/omg/CORBA/TypeCodeHolder.java4
-rw-r--r--org/omg/CORBA/TypeCodePackage/BadKind.java4
-rw-r--r--org/omg/CORBA/TypeCodePackage/Bounds.java4
-rw-r--r--org/omg/CORBA/TypeCodePackage/package.html4
-rw-r--r--org/omg/CORBA/ULongLongSeqHelper.java4
-rw-r--r--org/omg/CORBA/ULongLongSeqHolder.java4
-rw-r--r--org/omg/CORBA/ULongSeqHelper.java4
-rw-r--r--org/omg/CORBA/ULongSeqHolder.java4
-rw-r--r--org/omg/CORBA/UNKNOWN.java4
-rw-r--r--org/omg/CORBA/UNSUPPORTED_POLICY.java4
-rw-r--r--org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java4
-rw-r--r--org/omg/CORBA/UShortSeqHelper.java4
-rw-r--r--org/omg/CORBA/UShortSeqHolder.java4
-rw-r--r--org/omg/CORBA/UnionMember.java4
-rw-r--r--org/omg/CORBA/UnionMemberHelper.java179
-rw-r--r--org/omg/CORBA/UnknownUserException.java4
-rw-r--r--org/omg/CORBA/UserException.java4
-rw-r--r--org/omg/CORBA/VM_ABSTRACT.java12
-rw-r--r--org/omg/CORBA/VM_CUSTOM.java14
-rw-r--r--org/omg/CORBA/VM_NONE.java12
-rw-r--r--org/omg/CORBA/VM_TRUNCATABLE.java14
-rw-r--r--org/omg/CORBA/ValueBaseHelper.java56
-rw-r--r--org/omg/CORBA/ValueBaseHolder.java4
-rw-r--r--org/omg/CORBA/ValueMember.java4
-rw-r--r--org/omg/CORBA/ValueMemberHelper.java207
-rw-r--r--org/omg/CORBA/VersionSpecHelper.java4
-rw-r--r--org/omg/CORBA/VisibilityHelper.java127
-rw-r--r--org/omg/CORBA/WCharSeqHelper.java4
-rw-r--r--org/omg/CORBA/WCharSeqHolder.java4
-rw-r--r--org/omg/CORBA/WStringSeqHelper.java4
-rwxr-xr-xorg/omg/CORBA/WStringSeqHolder.java4
-rw-r--r--org/omg/CORBA/WStringValueHelper.java198
-rw-r--r--org/omg/CORBA/WrongTransaction.java4
-rw-r--r--org/omg/CORBA/_IDLTypeStub.java197
-rw-r--r--org/omg/CORBA/_PolicyStub.java176
-rw-r--r--org/omg/CORBA/package.html10
-rw-r--r--org/omg/CORBA/portable/ApplicationException.java4
-rw-r--r--org/omg/CORBA/portable/BoxedValueHelper.java17
-rw-r--r--org/omg/CORBA/portable/CustomValue.java57
-rw-r--r--org/omg/CORBA/portable/Delegate.java4
-rw-r--r--org/omg/CORBA/portable/IDLEntity.java4
-rw-r--r--org/omg/CORBA/portable/IndirectionException.java4
-rw-r--r--org/omg/CORBA/portable/InputStream.java4
-rw-r--r--org/omg/CORBA/portable/InvokeHandler.java4
-rw-r--r--org/omg/CORBA/portable/ObjectImpl.java15
-rw-r--r--org/omg/CORBA/portable/OutputStream.java4
-rw-r--r--org/omg/CORBA/portable/RemarshalException.java4
-rw-r--r--org/omg/CORBA/portable/ResponseHandler.java4
-rw-r--r--org/omg/CORBA/portable/ServantObject.java4
-rw-r--r--org/omg/CORBA/portable/Streamable.java4
-rw-r--r--org/omg/CORBA/portable/StreamableValue.java57
-rw-r--r--org/omg/CORBA/portable/UnknownException.java4
-rw-r--r--org/omg/CORBA/portable/ValueBase.java12
-rw-r--r--org/omg/CORBA/portable/ValueFactory.java8
-rw-r--r--org/omg/CORBA/portable/package.html4
-rw-r--r--org/omg/CORBA_2_3/ORB.java4
-rw-r--r--org/omg/CORBA_2_3/package.html46
-rw-r--r--org/omg/CORBA_2_3/portable/Delegate.java4
-rw-r--r--org/omg/CORBA_2_3/portable/InputStream.java99
-rw-r--r--org/omg/CORBA_2_3/portable/ObjectImpl.java4
-rw-r--r--org/omg/CORBA_2_3/portable/OutputStream.java61
-rw-r--r--org/omg/CORBA_2_3/portable/package.html7
-rw-r--r--org/omg/CosNaming/Binding.java4
-rw-r--r--org/omg/CosNaming/BindingHelper.java4
-rw-r--r--org/omg/CosNaming/BindingHolder.java4
-rw-r--r--org/omg/CosNaming/BindingIterator.java15
-rw-r--r--org/omg/CosNaming/BindingIteratorHelper.java4
-rw-r--r--org/omg/CosNaming/BindingIteratorHolder.java4
-rw-r--r--org/omg/CosNaming/BindingIteratorOperations.java78
-rw-r--r--org/omg/CosNaming/BindingListHelper.java4
-rw-r--r--org/omg/CosNaming/BindingListHolder.java4
-rw-r--r--org/omg/CosNaming/BindingType.java4
-rw-r--r--org/omg/CosNaming/BindingTypeHelper.java4
-rw-r--r--org/omg/CosNaming/BindingTypeHolder.java4
-rw-r--r--org/omg/CosNaming/IstringHelper.java4
-rw-r--r--org/omg/CosNaming/NameComponent.java4
-rw-r--r--org/omg/CosNaming/NameComponentHelper.java4
-rw-r--r--org/omg/CosNaming/NameComponentHolder.java4
-rw-r--r--org/omg/CosNaming/NameHelper.java4
-rw-r--r--org/omg/CosNaming/NameHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContext.java28
-rw-r--r--org/omg/CosNaming/NamingContextExt.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtOperations.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java31
-rw-r--r--org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextExtPackage/package.html4
-rw-r--r--org/omg/CosNaming/NamingContextHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextOperations.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/AlreadyBound.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/CannotProceed.java19
-rw-r--r--org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/InvalidName.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotEmpty.java23
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotFound.java19
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotFoundReason.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java4
-rw-r--r--org/omg/CosNaming/NamingContextPackage/package.html4
-rw-r--r--org/omg/CosNaming/_BindingIteratorImplBase.java4
-rw-r--r--org/omg/CosNaming/_BindingIteratorStub.java6
-rw-r--r--org/omg/CosNaming/_NamingContextExtImplBase.java4
-rw-r--r--org/omg/CosNaming/_NamingContextExtStub.java4
-rw-r--r--org/omg/CosNaming/_NamingContextImplBase.java4
-rw-r--r--org/omg/CosNaming/_NamingContextStub.java6
-rw-r--r--org/omg/CosNaming/package.html4
-rw-r--r--org/omg/Dynamic/Parameter.java90
-rw-r--r--org/omg/DynamicAny/DynAny.java72
-rw-r--r--org/omg/DynamicAny/DynAnyOperations.java538
-rw-r--r--org/omg/DynamicAny/DynArray.java53
-rw-r--r--org/omg/DynamicAny/DynArrayOperations.java92
-rw-r--r--org/omg/DynamicAny/DynEnum.java56
-rw-r--r--org/omg/DynamicAny/DynEnumOperations.java80
-rw-r--r--org/omg/DynamicAny/DynFixed.java55
-rw-r--r--org/omg/DynamicAny/DynFixedOperations.java70
-rw-r--r--org/omg/DynamicAny/DynSequence.java54
-rw-r--r--org/omg/DynamicAny/DynSequenceOperations.java122
-rw-r--r--org/omg/DynamicAny/DynStruct.java54
-rw-r--r--org/omg/DynamicAny/DynStructOperations.java137
-rw-r--r--org/omg/DynamicAny/DynUnion.java54
-rw-r--r--org/omg/DynamicAny/DynUnionOperations.java139
-rw-r--r--org/omg/DynamicAny/NameDynAnyPair.java87
-rw-r--r--org/omg/DynamicAny/NameValuePair.java90
-rw-r--r--org/omg/IOP/CodeSets.java62
-rw-r--r--org/omg/IOP/Codec.java71
-rw-r--r--org/omg/IOP/CodecFactory.java67
-rw-r--r--org/omg/IOP/CodecFactoryHelper.java152
-rw-r--r--org/omg/IOP/CodecFactoryOperations.java (renamed from gnu/CORBA/CDR/uncObjectOutputStream.java)46
-rw-r--r--org/omg/IOP/CodecOperations.java126
-rw-r--r--org/omg/IOP/ComponentIdHelper.java122
-rw-r--r--org/omg/IOP/ENCODING_CDR_ENCAPS.java58
-rw-r--r--org/omg/IOP/Encoding.java98
-rw-r--r--org/omg/IOP/IOR.java112
-rw-r--r--org/omg/IOP/IORHelper.java163
-rw-r--r--org/omg/IOP/IORHolder.java103
-rw-r--r--org/omg/IOP/MultipleComponentProfileHelper.java144
-rw-r--r--org/omg/IOP/MultipleComponentProfileHolder.java105
-rw-r--r--org/omg/IOP/ProfileIdHelper.java123
-rw-r--r--org/omg/IOP/ServiceContext.java95
-rw-r--r--org/omg/IOP/ServiceContextHelper.java163
-rw-r--r--org/omg/IOP/ServiceContextHolder.java103
-rw-r--r--org/omg/IOP/ServiceContextListHelper.java142
-rw-r--r--org/omg/IOP/ServiceContextListHolder.java103
-rw-r--r--org/omg/IOP/ServiceIdHelper.java123
-rw-r--r--org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java59
-rw-r--r--org/omg/IOP/TAG_CODE_SETS.java69
-rw-r--r--org/omg/IOP/TAG_INTERNET_IOP.java55
-rw-r--r--org/omg/IOP/TAG_JAVA_CODEBASE.java59
-rw-r--r--org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java52
-rw-r--r--org/omg/IOP/TAG_ORB_TYPE.java67
-rw-r--r--org/omg/IOP/TAG_POLICIES.java54
-rw-r--r--org/omg/IOP/TaggedComponent.java93
-rw-r--r--org/omg/IOP/TaggedComponentHelper.java167
-rw-r--r--org/omg/IOP/TaggedComponentHolder.java103
-rw-r--r--org/omg/IOP/TaggedProfile.java110
-rw-r--r--org/omg/IOP/TaggedProfileHelper.java161
-rw-r--r--org/omg/IOP/TaggedProfileHolder.java103
-rw-r--r--org/omg/IOP/TransactionService.java56
-rw-r--r--org/omg/Messaging/SYNC_WITH_TRANSPORT.java4
-rw-r--r--org/omg/Messaging/SyncScopeHelper.java16
-rw-r--r--org/omg/Messaging/package.html4
-rw-r--r--org/omg/PortableInterceptor/LOCATION_FORWARD.java53
-rw-r--r--org/omg/PortableInterceptor/SUCCESSFUL.java53
-rw-r--r--org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java54
-rw-r--r--org/omg/PortableInterceptor/TRANSPORT_RETRY.java54
-rw-r--r--org/omg/PortableInterceptor/USER_EXCEPTION.java54
-rw-r--r--org/omg/PortableServer/AdapterActivator.java62
-rw-r--r--org/omg/PortableServer/AdapterActivatorOperations.java66
-rw-r--r--org/omg/PortableServer/Current.java63
-rw-r--r--org/omg/PortableServer/CurrentHelper.java142
-rw-r--r--org/omg/PortableServer/CurrentOperations.java81
-rw-r--r--org/omg/PortableServer/DynamicImplementation.java58
-rw-r--r--org/omg/PortableServer/ForwardRequest.java108
-rw-r--r--org/omg/PortableServer/ForwardRequestHelper.java159
-rw-r--r--org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java53
-rw-r--r--org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java53
-rw-r--r--org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java53
-rw-r--r--org/omg/PortableServer/IdAssignmentPolicy.java58
-rw-r--r--org/omg/PortableServer/IdAssignmentPolicyOperations.java55
-rw-r--r--org/omg/PortableServer/IdAssignmentPolicyValue.java153
-rw-r--r--org/omg/PortableServer/IdUniquenessPolicy.java57
-rw-r--r--org/omg/PortableServer/IdUniquenessPolicyOperations.java55
-rw-r--r--org/omg/PortableServer/IdUniquenessPolicyValue.java153
-rw-r--r--org/omg/PortableServer/ImplicitActivationPolicy.java57
-rw-r--r--org/omg/PortableServer/ImplicitActivationPolicyOperations.java55
-rw-r--r--org/omg/PortableServer/ImplicitActivationPolicyValue.java153
-rw-r--r--org/omg/PortableServer/LIFESPAN_POLICY_ID.java52
-rw-r--r--org/omg/PortableServer/LifespanPolicy.java58
-rw-r--r--org/omg/PortableServer/LifespanPolicyOperations.java55
-rw-r--r--org/omg/PortableServer/LifespanPolicyValue.java150
-rw-r--r--org/omg/PortableServer/POA.java66
-rw-r--r--org/omg/PortableServer/POAHelper.java147
-rw-r--r--org/omg/PortableServer/POAManager.java63
-rw-r--r--org/omg/PortableServer/POAManagerOperations.java141
-rw-r--r--org/omg/PortableServer/POAOperations.java525
-rw-r--r--org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java52
-rw-r--r--org/omg/PortableServer/RequestProcessingPolicy.java59
-rw-r--r--org/omg/PortableServer/RequestProcessingPolicyOperations.java55
-rw-r--r--org/omg/PortableServer/RequestProcessingPolicyValue.java176
-rw-r--r--org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java52
-rw-r--r--org/omg/PortableServer/Servant.java288
-rw-r--r--org/omg/PortableServer/ServantActivator.java59
-rw-r--r--org/omg/PortableServer/ServantActivatorHelper.java145
-rw-r--r--org/omg/PortableServer/ServantActivatorOperations.java94
-rw-r--r--org/omg/PortableServer/ServantActivatorPOA.java173
-rw-r--r--org/omg/PortableServer/ServantLocator.java59
-rw-r--r--org/omg/PortableServer/ServantLocatorHelper.java145
-rw-r--r--org/omg/PortableServer/ServantLocatorOperations.java96
-rw-r--r--org/omg/PortableServer/ServantLocatorPOA.java180
-rw-r--r--org/omg/PortableServer/ServantManager.java56
-rw-r--r--org/omg/PortableServer/ServantManagerOperations.java54
-rw-r--r--org/omg/PortableServer/ServantRetentionPolicy.java58
-rw-r--r--org/omg/PortableServer/ServantRetentionPolicyOperations.java55
-rw-r--r--org/omg/PortableServer/ServantRetentionPolicyValue.java150
-rw-r--r--org/omg/PortableServer/THREAD_POLICY_ID.java52
-rw-r--r--org/omg/PortableServer/ThreadPolicy.java57
-rw-r--r--org/omg/PortableServer/ThreadPolicyOperations.java55
-rw-r--r--org/omg/PortableServer/ThreadPolicyValue.java163
-rw-r--r--org/omg/PortableServer/_ServantActivatorStub.java131
-rw-r--r--org/omg/PortableServer/_ServantLocatorStub.java132
-rw-r--r--org/omg/PortableServer/package.html231
-rw-r--r--org/omg/SendingContext/RunTime.java60
-rw-r--r--org/omg/SendingContext/RunTimeOperations.java57
-rw-r--r--org/omg/SendingContext/package.html0
-rw-r--r--org/omg/stub/java/rmi/_Remote_Stub.java25
-rw-r--r--org/omg/stub/java/rmi/package.html4
-rw-r--r--resource/gnu/java/awt/peer/gtk/font.properties4
-rw-r--r--resource/java/security/classpath.security4
-rw-r--r--resource/org/ietf/jgss/MessagesBundle.properties2
-rw-r--r--scripts/checkstyle-header.regex4
-rw-r--r--scripts/classpath.spec.in4
-rwxr-xr-xscripts/generate-locale-list.sh6
-rwxr-xr-xscripts/unicode-blocks.pl4
-rwxr-xr-xscripts/unicode-muncher.pl8
-rw-r--r--test/gnu.java.lang.reflect/TypeSignatureTest.java2
-rw-r--r--test/java.io/BufferedByteOutputStreamTest.java2
-rw-r--r--test/java.io/BufferedCharWriterTest.java2
-rw-r--r--test/java.io/BufferedInputStreamTest.java2
-rw-r--r--test/java.io/BufferedReaderTest.java2
-rw-r--r--test/java.io/ByteArrayInputStreamTest.java2
-rw-r--r--test/java.io/CharArrayReaderTest.java2
-rw-r--r--test/java.io/DataInputOutputTest.java2
-rw-r--r--test/java.io/FileInputStreamTest.java2
-rw-r--r--test/java.io/FileOutputStreamTest.java2
-rw-r--r--test/java.io/FileReaderTest.java2
-rw-r--r--test/java.io/FileTest.java2
-rw-r--r--test/java.io/FileWriterTest.java2
-rw-r--r--test/java.io/LineNumberInputStreamTest.java2
-rw-r--r--test/java.io/LineNumberReaderTest.java2
-rw-r--r--test/java.io/ObjectInputStreamTest.java2
-rw-r--r--test/java.io/ObjectOutputStreamTest.java2
-rw-r--r--test/java.io/ObjectStreamClassTest.java2
-rw-r--r--test/java.io/PipedReaderWriterTest.java2
-rw-r--r--test/java.io/PipedStreamTest.java2
-rw-r--r--test/java.io/PrintStreamTest.java2
-rw-r--r--test/java.io/PrintWriterTest.java2
-rw-r--r--test/java.io/PushbackInputStreamTest.java2
-rw-r--r--test/java.io/PushbackReaderTest.java2
-rw-r--r--test/java.io/RandomAccessFileTest.java2
-rw-r--r--test/java.io/SequenceInputStreamTest.java2
-rw-r--r--test/java.io/StreamTokenizerTest.java2
-rw-r--r--test/java.io/StringBufferInputStreamTest.java2
-rw-r--r--test/java.io/StringWriterTest.java2
-rw-r--r--test/java.io/Test.java2
-rw-r--r--test/java.io/UTF8EncodingTest.java2
-rw-r--r--testsuite/javax.swing.text.html.parser/AllParserTests.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/HTML_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/AttributeList_test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/DTD_test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Element_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Entity_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_parsing.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_randomTable.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserEntityResolverTest.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserTest.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Parser_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TagElement_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TestCase.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Text.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Token_locations.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Buffer_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Constants_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/ReaderTokenizer_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/parameterDefaulter_Test.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/supplementaryNotifications.java4
-rw-r--r--testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/textPreProcessor_Test.java4
-rw-r--r--testsuite/scheme/test.scm2
-rw-r--r--vm/reference/gnu/classpath/VMStackWalker.java4
-rw-r--r--vm/reference/gnu/classpath/VMSystemProperties.java4
-rw-r--r--vm/reference/gnu/java/nio/VMPipe.java4
-rw-r--r--vm/reference/gnu/java/nio/VMSelector.java4
-rw-r--r--vm/reference/java/io/VMFile.java4
-rw-r--r--vm/reference/java/io/VMObjectInputStream.java4
-rw-r--r--vm/reference/java/io/VMObjectStreamClass.java4
-rw-r--r--vm/reference/java/lang/VMClass.java4
-rw-r--r--vm/reference/java/lang/VMClassLoader.java19
-rw-r--r--vm/reference/java/lang/VMCompiler.java4
-rw-r--r--vm/reference/java/lang/VMDouble.java4
-rw-r--r--vm/reference/java/lang/VMFloat.java4
-rw-r--r--vm/reference/java/lang/VMObject.java4
-rw-r--r--vm/reference/java/lang/VMProcess.java4
-rw-r--r--vm/reference/java/lang/VMRuntime.java4
-rw-r--r--vm/reference/java/lang/VMString.java4
-rw-r--r--vm/reference/java/lang/VMSystem.java4
-rw-r--r--vm/reference/java/lang/VMThread.java4
-rw-r--r--vm/reference/java/lang/VMThrowable.java4
-rw-r--r--vm/reference/java/lang/reflect/Constructor.java4
-rw-r--r--vm/reference/java/lang/reflect/Field.java4
-rw-r--r--vm/reference/java/lang/reflect/Method.java4
-rw-r--r--vm/reference/java/lang/reflect/VMProxy.java136
-rw-r--r--vm/reference/java/net/VMInetAddress.java4
-rw-r--r--vm/reference/java/net/VMNetworkInterface.java4
-rw-r--r--vm/reference/java/nio/VMDirectByteBuffer.java9
-rw-r--r--vm/reference/java/nio/channels/VMChannels.java4
-rw-r--r--vm/reference/java/security/VMAccessController.java4
-rw-r--r--vm/reference/java/util/VMTimeZone.java4
3701 files changed, 72341 insertions, 21440 deletions
diff --git a/COPYING b/COPYING
index eeb586b39..5bb0601da 100644
--- a/COPYING
+++ b/COPYING
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
diff --git a/ChangeLog b/ChangeLog
index a79e69f40..d97163920 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,4307 @@
+2005-07-31 Jan Roehrich <jan@roehrich.info>
+
+ * javax.swing.plaf.basic.BasicTreeUI: fixed indentation.
+
+2005-07-30 Casey Marshall <csm@gnu.org>
+
+ * native/jni/java-nio/java_nio_MappedByteBuffer.c
+ (Java_java_nio_MappedByteBufferImpl_isLoadedImpl): cast argument 3
+ to 'mincore' to 'void *' to avoid warnings on GNU.
+
+2005-07-30 Casey Marshall <csm@gnu.org>
+
+ * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
+ (Java_gnu_java_nio_channels_FileChannelImpl_mapImpl):
+ eliminate various compiler warnings; mark 'buffer' as 'volatile;'
+ throw an exception if we can't get a constructor method ID.
+ * native/jni/java-nio/java_nio_MappedByteBufferImpl.c:
+ include 'stdlib.h.'
+ (get_raw_values): eliminate compiler warnings.
+ (Java_java_nio_MappedByteBufferImpl_isLoadedImpl): likewise.
+ * native/jni/java-nio/java_nio_VMDirectByteBuffer.c
+ (Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2I_3BII):
+ eliminate compiler warning.
+
+2005-07-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/StyledEditorKit.java: Added the remaining API
+ comments.
+
+2005-07-29 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/MenuSelectionManager.java
+ (isComponentPartOfCurrentMenu): Fixed to prevent NPE.
+ * javax/swing/plaf/basic/BasicMenuUI.java
+ (popupVisible): Likewise.
+
+2005-07-29 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/awt/event/MouseWheelEvent.java: fixed typo in API docs.
+
+2005-07-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/DefaultStyledDocument.java: Added
+ comments all over.
+ * javax/swing/text/StyledEditorKit: Likewise.
+
+2005-07-29 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/JTextField.java
+ (insertString): Added in check for null to resolve a NPE.
+ * javax/swing/text/GapContent.java
+ (getOffset): Added in check for mark = gapStart because
+ if mark = gapStart = 0, then a negative is returned. This was
+ not right.
+
+2005-07-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicEditorPaneUI.java: Added API
+ comments all over.
+ * javax/swing/plaf/basic/BasicTextUI.java: Likewise.
+
+2005-07-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/DefaultStyledDocument.java
+ (split): Moved throw statement into proper else clause.
+ * javax/swing/text/StyledEditorKit.java
+ (StyledViewFactory.create): Return the actual view instead of null.
+
+2005-07-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JTextPane.java: Added API comments all over.
+
+2005-07-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JTextPane.java
+ (constructor()): Implemented this constructor. Initialize the
+ EditorKit and set the Document to null.
+ (constructor(StyledDocument)): Implemented this constructor.
+ Initialize the EditorKit and Document.
+ (getUIClassID): Inlined the constant String.
+ (setDocument): Implemented this method.
+ (getStyledDocument): Likewise.
+ (setStyledDocument): Likewise.
+ (replaceSelection): Likewise.
+ (insertComponent): Clarified the TODO comment.
+ (insertIcon): Clarified the TODO comment.
+ (addStyle): Implemented this method.
+ (removeStyle): Likewise.
+ (getStyle): Likewise.
+ (getLogicalStyle): Likewise.
+ (setLogicalStyle): Likewise.
+ (getCharacterAttributes): Likewise.
+ (setCharacterAttributes): Likewise.
+ (getParagraphAttributes): Likewise.
+ (getInputAttributes): Likewise.
+ (getStyledEditorKit): Likewise.
+ (createDefaultEditorKit): Likewise.
+ (setEditorKit): Likewise.
+ * javax/swing/plaf/basic/BasicEditorPaneUI.java
+ (getEditorKit): Implemented this method.
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (RootView.getViewFactory): Ask the installed EditorKit for its
+ ViewFactory.
+ (RootView.setView): Set this as the parent of the installed real
+ root view.
+ (RootView.modelToView): Don't cast to PlainView here. Use View
+ instead.
+ (setView): Don't set the parent here. This is handled inside the
+ root view.
+
+2005-07-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/AbstractDocument.java
+ (createPosition): Delegate this call to the actual Content.
+ (LeafElement.constructor): Manage the start and end marks via
+ Position objects.
+ (LeafElement.getEndOffset): Use Position instead of static mark.
+ (LeafElement.getStartOffset): Use Position instead of static mark.
+ * javax/swing/text/DefaultStyledDocument.java
+ (ElementBuffer.change): New method. Performs structural changes
+ in the element tree that are necessary in order to change
+ text attributes.
+ (ElementBuffer.changeUpdate): New method. This is the method for
+ change().
+ (ElementBuffer.split): New package-private method. Splits an
+ element into two elements.
+ (setCharacterAttributes): Implemented this method. This sets
+ character attributes on a piece of content.
+ * javax/swing/text/GapContent.java
+ (GapContentPosition): New inner class. Implements the Position
+ interface for GapContent.
+ (constructor): Initialize the list that stores the Position objects.
+ (createPosition): Reimplemented. Now uses the GapContentPosition
+ class.
+ (shiftEnd): Update the stored positions.
+ (shiftGap): Update the stored positions.
+ * javax/swing/text/LabelView.java: New class.
+ * javax/swing/text/PlainDocument.java
+ (removeUpdate): Don't update the element positions, this should
+ now be handled by the Positions.
+
+2005-07-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/BoxView.java: New class.
+ * javax/swing/text/CompositeView.java: New class.
+ * javax/swing/text/FlowView.java: New class.
+ * javax/swing/text/GlyphView.java: New class.
+ * javax/swing/text/IconView.java: New class.
+ * javax/swing/text/ParagraphView.java: New class.
+ * javax/swing/text/StyledEditorKit.java
+ (UnderLineAction.constructor): Added TODO comment.
+ (UnderLineAction.actionPerformed): Implemented this method. This
+ toggles the underline attribute to a piece of content.
+ (ItalicAction.constructor): Added TODO comment.
+ (ItalicAction.actionPerformed): Implemented this method. This
+ toggles the italic attribute to a piece of content.
+ (BoldAction.constructor): Added TODO comment.
+ (BoldAction.actionPerformed): Implemented this method. This
+ toggles the bold attribute to a piece of content.
+ (AlignmentAction.constructor): Implemented this constructor.
+ (AlignmentAction.actionPerformed): Implemented this method. This
+ sets the alignment attribute for a piece of content.
+ (ForegroundAction.constructor): Implemented this constructor.
+ (ForegroundAction.actionPerformed): Implemented this method. This
+ sets the foreground attribute for a piece of content.
+ (FontSizeAction.constructor): Implemented this constructor.
+ (FontSizeAction.actionPerformed): Implemented this method. This
+ sets the font size attribute for a piece of content.
+ (FontFamilyAction.constructor): Implemented this constructor.
+ (FontFamilyAction.actionPerformed): Implemented this method. This
+ sets the font family attribute for a piece of content.
+ (StyledTextAction.constructor): Removed TODO comment.
+ (StyledTextAction.getEditor): Implemented this method.
+ (StyledTextAction.getStyledDocument): Implemented this method.
+ (StyledTextAction.getStyledEditorKit): Implemented this method.
+ (StyledTextAction.setCharacterAttributes): Implemented this method.
+ (StyledTextAction.setParagraphAttributes): Implemented this method.
+ (StyledViewFactory.constructor): Removed. This is not necessary here.
+ (StyledViewFactory.create): Implemented this method.
+ (AttributeTracker): Removed this inner class.
+ (CaretTracker): New inner class.
+ (CaretTracker.caretUpdate): Implemented this method. This meeps
+ track of the caret in a text component and updates some fields
+ of the StyledEditorKit.
+ (constructor): Implemented this constructor.
+ The inputAttributes are initialized here.
+ (clone): Implemented this method.
+ (getActions): Implemented this method.
+ (getInputAttributes): Implemented this method.
+ (getCharacterAttributeRun): Implemented this method.
+ (createDefaultDocument): Implemented this method.
+ (install): Implemented this method.
+ (deinstall): Implemented this method.
+ (getViewFactory): Implemented this method.
+ (createInputAttributes): Implemented this method.
+ * javax/swing/text/View.java
+ (modelToView(int, Shape, Position.Bias)): Added new abstract method.
+ (modelToView(int, Position.Bias, int, Position.Bias, Shape):
+ New method.
+
+2005-07-28 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JViewport.java:
+ (scrollRectToVisible): Consider the x and y position of the viewport
+ itself when scrolling down. This fixes an off-by-1-pixel problem.
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (KeyHandler.keyPressed): Implemented PAGEUP, SHIFT-PAGEUP, PAGEDOWN,
+ and SHIFT-PAGEDOWN key actions.
+
+2005-07-28 Lillian Angel <langel@redhat.com>
+
+ * java/awt/GridBagLayout.java
+ (distributeSizeAndWeight): added in check, because OutOfBounds exception
+ was being raised.
+ * javax/swing/JTable.java
+ (setRowHeight): Added in, but not implemented.
+ * javax/swing/plaf/basic/BasicComboBoxEditor.java
+ (setItem): added in check, because NullPointerException was being
+ raised.
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getPathBounds): Took out unneeded call.
+ (uninstallListeners): added in check, because NPE was being raised.
+ (installUI): took out unneeded call.
+ (paint): Likewise.
+ (getPreferredSize): Should not assume root is an instance of Default
+ MutableTreeNode. Changed to use TreeNode instead.
+ (getCellBounds): Should never return null
+ (getCellLocation): Took out unneeded call.
+
+2005-07-28 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (KeyHandler.keyPressed): Replaced calls to KeyEvent.isShiftDown() and
+ isControlDown() with comparisons of KeyEvent.getModifiers() and
+ InputEvent.SHIFT_MASK and CTRL_MASK.
+ (MouseInputHandler.mouseClicked): Reordered SHIFT and CTRL modifier
+ actions to correspond to JDK. Note the JDK simply ignores other
+ modifiers so isShiftDown() and isControlDown() are okay for mouse
+ input.
+
+2005-07-27 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/DynamicAny/DynUnion.java,
+ org/omg/DynamicAny/DynUnionOperations.java,
+ org/omg/DynamicAny/NameDynAnyPair.java,
+ org/omg/DynamicAny/NameValuePair.java,
+ org/omg/DynamicAny/DynAny.java,
+ org/omg/DynamicAny/DynAnyOperations.java,
+ org/omg/DynamicAny/DynArray.java,
+ org/omg/DynamicAny/DynArrayOperations.java,
+ org/omg/DynamicAny/DynEnum.java,
+ org/omg/DynamicAny/DynEnumOperations.java,
+ org/omg/DynamicAny/DynFixed.java,
+ org/omg/DynamicAny/DynFixedOperations.java,
+ org/omg/DynamicAny/DynSequence.java,
+ org/omg/DynamicAny/DynSequenceOperations.java,
+ org/omg/DynamicAny/DynStructOperations.java,
+ org/omg/DynamicAny/DynStruct.java: New files.
+
+2005-07-28 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JViewport.java:
+ (scrollRectToVisible): New method, overrides JComponent method as
+ intended.
+
+2005-07-28 Christian Thalinger <twisti@complang.tuwien.ac.at>
+
+ * native/jni/java-nio/java_nio_MappedByteBufferImpl.c
+ (get_raw_values): Add env to getObjectClass call for 64-bit case.
+
+2005-07-28 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/text/AttributedStringIterator.java: reformatted.
+
+2005-07-27 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (KeyHandler.keyPressed): Ensure the new lead selection index is visible
+ after making a change.
+ (MouseInputHandler.mouseClicked): Likewise.
+
+2005-07-27 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/util/PacketProcessor.java: Implement
+ PrivilegedAction to allow privilaged operations.
+
+2005-07-27 Mark Wielaard <mark@klomp.org>
+
+ * doc/www.gnu.org/events/events.wml: Add old and upcomming events.
+
+2005-07-27 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/util/Value.java: Class to read/write JDWP
+ untagged values and tagged values.
+ * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java:
+ use new api for Values and IVirtualMachine and fix message in
+ exception.
+ * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java:
+ use new api for Values and fix message in exception.
+
+2005-07-27 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/POAHelper.java (type, insert, extract,
+ id, read, write): New methods.
+
+2005-07-27 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/text/AttributedString.java: added/edited API docs.
+
+2005-07-27 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/text/AttributedString.java: reformatted.
+
+2005-07-27 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JTextPane.java:
+ Reformatted file to match our coding style.
+
+2005-07-27 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JTextPane.java
+ (getCharacterAttributes): Return SimpleAttributeSet.EMPTY instead
+ of null.
+
+2005-07-27 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicPanelUI.java
+ (installDefaults): Install background color on JPanel.
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): Added background color for Panel.
+
+2005-07-27 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/text/AttributedCharacterIterator.java: API doc fixes.
+
+2005-07-27 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/text/html/parser/DocumentParser.java: reverted API fix.
+
+2005-07-27 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/DefaultBoundedRangeModel.java:
+ Fixed / added API comments for class description.
+ * javax/swing/DefaultButtonModel.java: Likewise.
+ * javax/swing/DefaultCellEditor.java: Likewise.
+ * javax/swing/DefaultComboBoxModel.java: Likewise.
+ * javax/swing/DefaultDesktopManager.java: Likewise.
+ * javax/swing/DefaultButtonModel.java: Likewise.
+ * javax/swing/DefaultFocusManager.java: Likewise.
+ * javax/swing/DefaultListCellRenderer.java: Likewise.
+ * javax/swing/DefaultListModel.java: Likewise.
+ * javax/swing/DefaultListSelectionModel.java: Likewise.
+ * javax/swing/DefaultSingleSelectionModel.java: Likewise.
+ * javax/swing/FocusManager.java: Likewise.
+ * javax/swing/GrayFilter.java: Likewise.
+ * javax/swing/ImageIcon.java: Likewise.
+ * javax/swing/InputMap.java: Likewise.
+ * javax/swing/InputVerifier.java: Likewise.
+ * javax/swing/InternalFrameFocusTraversalPolicy.java: Likewise.
+ * javax/swing/JApplet.java: Likewise.
+ * javax/swing/JCheckBox.java: Likewise.
+ * javax/swing/JCheckBoxMenuItem.java: Likewise.
+ * javax/swing/JColorChooser.java: Likewise.
+ * javax/swing/JComboBox.java: Likewise.
+ * javax/swing/JComponent.java: Likewise.
+
+2005-07-27 Roman Kennke <roman@kennke.org>
+
+ * java/util/Properties.java
+ (getPropertyInternal): Removed.
+ (getProperty(String)): Search for property here instead of
+ getProperty(String, String).
+ (getProperty(String,String)): Call getProperty(String).
+
+2005-07-27 Roman Kennke <roman@kennke.org>
+
+ * java/awt/MenuItem.java
+ (AccessibleAWTMenuItem.setCurrentAccessibleValue): Removed
+ duplicate code. Added this to make setEnabled unambiguous for
+ javac 1.3 compiler.
+
+2005-07-27 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/text/html/parser/DocumentParser.java: API doc fixes,
+ * javax/swing/text/html/parser/DTD.java: likewise,
+ * javax/swing/text/html/parser/DTDConstants.java: likewise,
+ * javax/swing/text/html/parser/Element.java: likewise,
+ * javax/swing/text/html/parser/Parser.java: likewise,
+ * javax/swing/text/html/parser/ParserDelegator.java: likewise.
+
+2005-07-27 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): added menu-related defaults.
+
+2005-07-26 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java:
+ Implemented the ArrayReference CommandSet.
+
+2005-07-26 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java:
+ Implemented the ThreadGroupReference CommandSet.
+
+2005-07-26 Tom Tromey <tromey@redhat.com>
+
+ PR classpath/22989:
+ * java/net/Inet4Address.java (isMCNodeLocal): Use super call.
+ (isMCOrgLocal): Likewise.
+
+2005-07-26 Tom Tromey <tromey@redhat.com>
+
+ * gnu/java/security/provider/PKIXCertPathValidatorImpl.java
+ (engineValidate): Fix sense of test. PR classpath/22991.
+
+2005-07-26 Tom Tromey <tromey@redhat.com>
+
+ PR classpath/22992:
+ * javax/security/sasl/Sasl.java (getSaslClientFactories): Fix
+ sense of test.
+ (getSaslServerFactories): Likewise.
+
+2005-07-26 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkComponentPeer.java (repaintTimer): Make
+ daemon thread.
+
+ * gnu/java/awt/peer/gtk/GdkGraphics.java,
+ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c: Add
+ static initializer.
+ (initStaticState): New method.
+ Add new global graphics reference state table and macros.
+ * include/gnu_java_awt_peer_gtk_GdkGraphics.h: Regenerate.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: Use new
+ NSA_GET_G_PTR macro to retreive graphics objects.
+ * native/jni/gtk-peer/gtkpeer.h: Add new graphics state table and
+ macros.
+
+2005-07-26 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (KeyHandler.keyPressed): Replaced calls to KeyEvent.isShiftDown() and
+ isControlDown() with mask comparisons of KeyEvent.getModifiers() and
+ InputEvent.SHIFT_MASK and CTRL_MASK. This makes it easier to ignore
+ invalid modifiers.
+
+2005-07-26 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (KeyHandler.keyPressed): Implemented CTRL-SPACE key action.
+
+2005-07-26 Tom Tromey <tromey@redhat.com>
+
+ * java/security/cert/X509CertSelector.java (match): Convert sigId
+ to String before comparison. PR classpath/22987.
+
+2005-07-26 Tom Tromey <tromey@redhat.com>
+
+ * gnu/java/security/OID.java: Typo fix.
+
+2005-07-26 Tom Tromey <tromey@redhat.com>
+
+ * javax/security/auth/x500/X500Principal.java (getName): Don't
+ compare oid to String. PR classpath/22988.
+
+2005-07-26 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkComponentPeer.java (repaint): Reuse
+ repaint timer across repaint calls.
+
+2005-07-26 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/AbstractAction.java
+ Fixed / Added API doc comments for the class description.
+ * javax/swing/AbstractButton.java: Likewise.
+ * javax/swing/AbstractCellEditor.java: Likewise.
+ * javax/swing/AbstractListModel.java: Likewise.
+ * javax/swing/AbstractSpinnerModel.java: Likewise.
+ * javax/swing/ActionMap.java: Likewise.
+ * javax/swing/BorderFactory.java: Likewise.
+ * javax/swing/Box.java: Likewise.
+ * javax/swing/BoxLayout.java: Likewise.
+ * javax/swing/ButtonGroup.java: Likewise.
+ * javax/swing/CellRendererPane.java: Likewise.
+ * javax/swing/ComponentInputMap.java: Likewise.
+ * javax/swing/DebugGraphics.java: Likewise.
+
+2005-07-26 Mark Wielaard <mark@klomp.org>
+
+ * java/text/DateFormat.java (equals): Reimplement.
+
+2005-07-26 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicButtonUI.java
+ (paint): Only call paintFocus if the button is actually focused.
+ (paintFocus): The default implementation in the BasicLookAndFeel
+ does nothing. I removed the code here.
+
+2005-07-26 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): Added new borders for MenuBar and MenuItem.
+
+2005-07-26 Roman Kennke <roman@kennke.org>
+
+ * java/util/Properties.java
+ (getPropertyInternal): New method. Avoids infinite recursion if
+ getProperty() methods are overridden in subclasses.
+ (getProperty(String)): Use getPropertyInternal to avoid recursion.
+ (getProperty(String,String)): Likewise.
+
+2005-07-26 Mark Wielaard <mark@klomp.org>
+
+ * javax/swing/plaf/basic/BasicScrollPaneUI.java
+ (getPreferredSize): Removed.
+ * javax/swing/plaf/basic/BasicTabbedPaneUI.java
+ (getPreferredSize): Removed.
+ * javax/swing/plaf/basic/BasicToolBarUI.java
+ (getPreferredSize): Removed.
+
+2005-07-26 Roman Kennke <roman@kennke.org>
+
+ * gnu/java/awt/AWTUtilities.java:
+ Fixed formatting of this file.
+
+2005-07-26 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalBorders.java:
+ (MenuBarBorder): new inner class.
+
+2005-07-26 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalBorders.java:
+ (MenuItemBorder): new inner class.
+
+2005-07-26 Mark Wielaard <mark@klomp.org>
+
+ * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
+ (Java_gnu_java_nio_channels_FileChannelImpl_init): Mark clazz as
+ unused. Remove unused variables constructor and obj.
+ (Java_gnu_java_nio_channels_FileChannelImpl_implCloseChannel): Retry
+ when interrupted.
+ (Java_gnu_java_nio_channels_FileChannelImpl_available): Likewise.
+
+2005-07-26 Mark Wielaard <mark@klomp.org>
+
+ * gnu/java/nio/channels/FileChannelImpl.java (lockCheck): New method.
+ (tryLock): Use lockCheck().
+ (lock): Likewise.
+
+2005-07-26 Christian Thalinger <twisti@complang.tuwien.ac.at>
+
+ * native/target/generic/target_generic_network.h
+ (TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT): Added
+ missing sys/time.h include.
+
+2005-07-26 Mark Wielaard <mark@klomp.org>
+
+ * gnu/java/nio/channels/FileChannelImpl.java (description):
+ New final field.
+ (FileChannelImpl): Set description.
+ (init): Likewise.
+ (toString): New method.
+ All methods add parameters when throwing IllegalArgumentException.
+ * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
+ (open): Add filename to FileNotFoundException.
+
+2005-07-26 Jeroen Frijters <jeroen@frijters.net>
+
+ * NEWS: Added comment about new VMProxy class.
+ * gnu/classpath/Configuration.java.in
+ (HAVE_NATIVE_GET_PROXY_CLASS): Removed.
+ (HAVE_NATIVE_GET_PROXY_DATA): Removed.
+ (HAVE_NATIVE_GENERATE_PROXY_CLASS): Removed.
+ * java/lang/reflect/Proxy.java
+ (getProxyClass): Changed to call VMProxy.
+ (getProxyClass0): Removed.
+ (getProxyData0): Removed.
+ (generateProxyClass0): Removed.
+ (ProxyData): Removed private modifier.
+ (POOL): Removed (was unused).
+ (INVOKESTATIC): Removed (was unused).
+ * vm/reference/java/lang/reflect/VMProxy.java: New file.
+
+2005-07-26 Jeroen Frijters <jeroen@frijters.net>
+
+ * NEWS: Added comment about new VM hook in VMClassLoader.
+
+2005-07-26 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/text/DateFormatter.java: API doc fixes,
+ * javax/swing/text/InternationalFormatter.java: likewise,
+ * javax/swing/text/JTextComponent.java: likewise.
+
+2005-07-26 Mark Wielaard <mark@klomp.org>
+
+ * examples/Makefile.am (clean-local): Use rm -rf.
+
+2005-07-26 Jeroen Frijters <jeroen@frijters.net>
+
+ * vm/reference/java/lang/VMClassLoader.java
+ (USE_VM_CACHE): Removed final modifier.
+
+2005-07-25 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkComponentPeer.java (repaint): Implement
+ timed repaint.
+ (updateCursorImmediately): Implement.
+ (RepaintTimerTask): New class.
+ * gnu/java/awt/peer/gtk/GtkImageConsumer.java (imageComplete):
+ Don't remove consumer if source is a MemoryImageSource.
+
+2005-07-25 Archie Cobbs <archie@dellroad.org>
+
+ * native/jni/classpath/native_state.c: add assertion for object type
+
+2005-07-25 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (KeyHandler.advanceSingleSelection): New method. Helper method for
+ ENTER, SHIFT-ENTER, TAB, and SHIFT-TAB key events.
+ (KeyHandler.advanceMultipleSelection): Likewise, used when the table
+ has multiple selections at the time that ENTER or TAB was pressed.
+ (KeyHandler.keyPressed): Implemented TAB, SHIFT-TAB, and SHIFT-ENTER
+ and merged these with existing code for ENTER event, because of the
+ similarites.
+
+2005-07-25 Tom Tromey <tromey@redhat.com>
+
+ * java/text/CollationKey.java (equals): Use Arrays.equals.
+ PR classpath/22986.
+
+2005-07-25 Tom Tromey <tromey@redhat.com>
+
+ * java/util/Properties.java (load): Handle case where backslash
+ appears at EOF when reading the key. PR classpath/22994.
+
+2005-07-25 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (paint): moved code to paintNode
+ (getCellBounds): width increased, slightly short before
+ (paintNode): changed to paint node depending if icons exist
+
+2005-07-25 Guilhem Lavaux <guilhem@kaffe.org>
+
+ * native/jni/classpath/jcl.c,
+ native/jni/classpath/jcl.h
+ (JCL_NewRawDataObject): New function.
+ (JCL_GetRawData): New function.
+
+2005-07-25 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * java/awt/Container.java:
+ (setFocusTraversalKeys): Instantiate focusTraversalKeys to an array of
+ size 4, not 3. This must have been a typo.
+
+2005-07-25 Jeroen Frijters <jeroen@frijters.net>
+
+ * java/rmi/server/RMIClassLoader.java
+ (loadClass(String, String)): Use Class.forName() instead of
+ directly calling ClassLoader.loadClass(), to handle array
+ types correctly.
+
+2005-07-25 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JTable.java:
+ (selectAll): Store the lead selection indices and restore them after
+ selecting all cells.
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (KeyHandler.keyPressed): Changed the criteria for "only one selection"
+ when the ENTER key is pressed to match the behavior of the JDK. Also
+ replaced direct code for CTRL-A with call to JTable.selectAll().
+
+2005-07-25 Jeroen Frijters <jeroen@frijters.net>
+
+ * java/lang/ClassLoader.java
+ (loadedClasses): Set based on VMClassLoader.VM_USE_CACHE.
+ (defineClass): Modified to respect VMClassLoader.VM_USE_CACHE.
+ * vm/reference/java/lang/VMClassLoader.java
+ (VM_USE_CACHE): New field.
+
+2005-07-25 Roman Kennke <roman@kennke.org>
+
+ * gnu/java/awt/AWTUtilities.java:
+ Added methods from SwingUtilities so that AWT does not have to
+ depend on Swing.
+ * java/awt/Component.java:
+ Reverted my DEFAULT_FONT patch from yesterday. This does not
+ seem to work with the Gtk peers.
+ * java/awt/Container.java
+ (addImpl): Call addNotify() on the added child. Invalidate not
+ only the container but also the added child. Repaint the container.
+ (remove): Repaint the container.
+ (invalidate): Also invalidate the LayoutManager.
+ (invalidateTree): Call super.invalidate to invalidate the container
+ itself. Also invalidate the LayoutManager.
+ (setFont): Only set the font if the specified argument actually
+ differs from the current font.
+ (preferredSize): Optimized this method so the LayoutManager is only
+ called if the layout is invalid. Otherwise we return the preferred
+ size that has been stored during last validation/layout.
+ (getAlignmentX): Despite common belief, this method does _not_
+ call the LayoutManagers getAlignmentX in the JDK. So we also don't.
+ (getAlignmentY): Despite common belief, this method does _not_
+ call the LayoutManagers getAlignmentX in the JDK. So we also don't.
+ (dispatchEventImpl): Let the dispatcher decide if it is enabled
+ for the incoming event type.
+ (eventTypeEnabled): Enables only container events for containers.
+ (addNotifyContainerChildren): Coalesced two if statements into one.
+ Enable events on the dispatcher for this container.
+ (LightweightDispatcher): Made this class reentrant. Handle
+ events enabling/disabling here.
+
+2005-07-25 Roman Kennke <roman@kennke.org>
+
+ * gnu/java/nio/channels/FileChannelImpl.java
+ (static initializer): Init out, err and in here.
+ * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
+ (Java_gnu_java_nio_channels_FileChannelImpl_init): Moved init code
+ for in, out and err to Java code.
+
+2005-07-25 Mark Wielaard <mark@klomp.org>
+
+ * doc/www.gnu.org/faq.wml: Expand contribution assign answer.
+
+2005-07-25 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/awt/image/ConvolveOp.java:
+ (getKernel): return a clone of the kernel.
+
+2005-07-25 Jeroen Frijters <jeroen@frijters.net>
+
+ * java/lang/ClassLoader.java
+ (findLoadedClass): Call VMClassLoader.findLoadedClass.
+ * vm/reference/java/lang/VMClassLoader.java
+ (findLoadedClass): New method.
+
+2005-07-23 Mark Wielaard <mark@klomp.org>
+
+ * lib/standard.omit: Don't omit gnu/javax/swing/plaf/gtk files.
+ * lib/Makefile.am (dist-hook): Don't remove standard.omit dirs.
+
+ * gnu/javax/swing/plaf/gtk/GtkBorders.java: Removed.
+ * gnu/javax/swing/plaf/gtk/GtkCheckBoxUI.java: Likewise.
+ * gnu/javax/swing/plaf/gtk/GtkIconFactory.java: Likewise.
+ * gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java: Likewise.
+ * gnu/javax/swing/plaf/gtk/GtkRadioButtonUI.java: Likewise.
+ * gnu/javax/swing/plaf/gtk/GtkSliderUI.java: Likewise.
+ * gnu/javax/swing/plaf/gtk/README: Likewise.
+ * gnu/javax/swing/plaf/gtk/SliderTest.java: Likewise.
+
+2003-07-23 Casey Marshall <csm@gnu.org>
+
+ * configure.ac (AC_CHECK_HEADERS): add 'sys/mman.h'.
+ (AC_CHECK_FUNCS): add mmap and related functions.
+ * include/java_nio_VMDirectByteBuffer.h: regenerated.
+ * java/nio/DirectByteBufferImpl.java (put): new method.
+ * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
+ (ALIGN_DOWN): new macro.
+ (ALIGN_UP): new macro.
+ (Java_gnu_java_nio_channels_FileChannelImpl_mapImpl): implemented.
+ * native/jni/java-nio/java_nio_MappedByteBufferImpl.c: updated
+ copyright years.
+ (ALIGN_DOWN): new macro.
+ (ALIGN_UP): new macro.
+ (get_pagesize): new function.
+ (get_raw_values): new function.
+ (Java_java_nio_MappedByteBufferImpl_unmapImpl): implemented.
+ (Java_java_nio_MappedByteBufferImpl_isLoadedImpl): implemented.
+ (Java_java_nio_MappedByteBufferImpl_loadImpl): implemented.
+ (Java_java_nio_MappedByteBufferImpl_forceImpl): implemented.
+ * native/jni/java-nio/java_nio_VMDirectByteBuffer.c
+ (Java_java_nio_VMDirectByteBuffer_put): renamed to
+ 'Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2IB.'
+ (Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_RawData_2I_3BII):
+ call 'ReleaseByteArrayElements' on the source byte array elements.
+ (Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2I_3BII):
+ new method.
+ * vm/reference/java/nio/VMDirectByteBuffer.java (put): new method.
+
+2005-07-23 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/BoundedRangeModel.java: added/updated API doc comments.
+
+2005-07-23 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/Icon.java: added API doc comments.
+
+2005-07-23 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/text/AttributedString.java: API doc fixes,
+ * java/text/ChoiceFormat.java: likewise,
+ * java/text/CollationElementIterator.java: likewise,
+ * java/text/CollationKey.java: likewise,
+ * java/text/Collator.java: likewise,
+ * java/text/DateFormat.java: likewise,
+ * java/text/DateFormatSymbols.java: likewise,
+ * java/text/DecimalFormatSymbols.java: likewise,
+ * java/text/MessageFormat.java: likewise,
+ * java/text/NumberFormat.java: likewise,
+ * java/text/ParseException.java: likewise,
+ * java/text/SimpleDateFormat.java: likewise,
+ * java/text/StringCharacterIterator.java: likewise.
+
+2005-07-23 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/ImageIcon.java: API doc fixes,
+ * javax/swing/JLayeredPane.java: likewise,
+ * javax/swing/JSplitPane.java: likewise,
+ * javax/swing/JTree.java: likewise,
+ * javax/swing/JViewport.java: likewise,
+ * javax/swing/RepaintManager.java: likewise,
+ * javax/swing/SizeRequirements.java: likewise,
+ * javax/swing/SortingFocusTraversalPolicy.java.
+
+2005-07-23 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/ServantLocatorOperations.java,
+ org/omg/PortableServer/ServantActivatorOperations.java:
+ Inherit from ServantManagerOperations.
+ * org/omg/PortableServer/CurrentOperations.java:
+ Inherit from org.omg.CORBA.CurrentOperations.
+ org/omg/PortableServer/ForwardRequestHelper.java: New file.
+
+2005-07-23 Sven de Marothy <sven@physto.se>
+
+ * java/awt/List.java (List): Initialize selected[] to an empty array.
+
+2005-07-23 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * NEWS: Added entry about POA.
+
+2005-07-22 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/RequestProcessingPolicyOperations.java,
+ org/omg/PortableServer/ServantRetentionPolicyOperations.java,
+ org/omg/PortableServer/ThreadPolicyOperations.java,
+ org/omg/PortableServer/IdAssignmentPolicyOperations.java,
+ org/omg/PortableServer/IdUniquenessPolicyOperations.java,
+ org/omg/PortableServer/ImplicitActivationPolicyOperations.java,
+ org/omg/PortableServer/LifespanPolicyOperations.java:
+ Inherit from PolicyOperations.
+
+2005-07-22 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (KeyHandler.keyPressed): If row selection is not allowed in the table,
+ then consider all rows of a particular column selected when you get an
+ ENTER key event. This matches JDK behaviour and fixes an out of
+ bounds error. Also, wrapped lines at 80 chars.
+
+2005-07-22 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (paint): Only highlight the border of a table cell if it is the most
+ recently updated cell.
+
+2005-07-22 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (paintCell): Fixed misnamed variable.
+
+2005-07-22 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * gnu/CORBA/Poa/gnuPOA.java,
+ gnu/CORBA/Poa/gnuPOAManager.java,
+ gnu/CORBA/Poa/activeObjectMap.java,
+ gnu/CORBA/Poa/gnuAdapterActivator.java,
+ gnu/CORBA/Poa/gnuServantObject.java,
+ gnu/CORBA/Poa/servantDelegate.java,
+ gnu/CORBA/Poa/ORB_1_4.java,
+ gnu/CORBA/Poa/policySets.java,
+ gnu/CORBA/Poa/gnuPoaCurrent.java,
+ gnu/CORBA/Poa/LocalDelegate.java,
+ gnu/CORBA/Poa/dynImpHandler.java,
+ gnu/CORBA/Poa/LocalServerRequest.java,
+ gnu/CORBA/Poa/LocalRequest.java,
+ gnu/CORBA/Poa/ForwardedServant.java,
+ gnu/CORBA/Poa/gnuIdAssignmentPolicy.java,
+ gnu/CORBA/Poa/gnuRequestProcessingPolicy.java,
+ gnu/CORBA/Poa/gnuThreadPolicy.java,
+ gnu/CORBA/Poa/gnuLifespanPolicy.java,
+ gnu/CORBA/Poa/gnuIdUniquenessPolicy.java,
+ gnu/CORBA/Poa/gnuServantRetentionPolicy.java,
+ gnu/CORBA/Poa/gnuImplicitActivationPolicy.java,
+ gnu/CORBA/Poa/gnuForwardRequest.java,
+ gnu/CORBA/ForwardRequestHelper.java,
+ gnu/CORBA/Poa/vPolicy.java,
+ gnu/CORBA/Poa/ForwardRequestHolder.java,
+ org/omg/PortableServer/POA.java,
+ org/omg/PortableServer/POAManagerOperations.java,
+ org/omg/PortableServer/POAOperations.java,
+ org/omg/PortableServer/Servant.java,
+ org/omg/PortableServer/DynamicImplementation.java,
+ org/omg/PortableServer/ServantActivator.java,
+ org/omg/PortableServer/ServantActivatorOperations.java,
+ org/omg/PortableServer/ServantLocator.java,
+ org/omg/PortableServer/ServantLocatorOperations.java,
+ org/omg/PortableServer/ServantManager.java,
+ org/omg/PortableServer/Current.java,
+ org/omg/PortableServer/CurrentHelper.java,
+ org/omg/PortableServer/CurrentOperations.java,
+ org/omg/PortableServer/_ServantLocatorStub.java,
+ org/omg/PortableServer/portable/Delegate.java,
+ org/omg/PortableServer/ServantActivatorHelper.java,
+ org/omg/PortableServer/_ServantActivatorStub.java,
+ org/omg/PortableServer/ServantLocatorHelper.java,
+ org/omg/PortableServer/ServantActivatorPOA.java,
+ org/omg/PortableServer/ServantLocatorPOA.java,
+ org/omg/PortableServer/AdapterActivatorOperations.java,
+ org/omg/PortableServer/AdapterActivator.java,
+ org/omg/PortableServer/POAHelper.java,
+ org/omg/PortableServer/ServantManagerOperations.java,
+ org/omg/PortableServer/POAManager.java,
+ org/omg/PortableServer/package.html: New files.
+ * org/omg/CORBA/ORB.java: Documented POA features.
+ gnu/CORBA/gnuRequest.java (_releaseReply, equals): Mind that
+ the delegate can be null.
+ * gnu/CORBA/IOR_Delegate.java,
+ gnu/CORBA/Functional_ORB.java,
+ org/omg/CORBA/portable/ObjectImpl.java,
+ gnu/CORBA/Connected_objects.java: Rewritten.
+ * gnu/CORBA/Simple_delegate.java (is_equivalent): This method
+ is rewritten.
+ * gnu/CORBA/ServiceRequestAdapter.java: Added return value support.
+
+2005-07-22 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (paintCell): Set hasFocused to true if the cell is the lead selection
+ index and if the list has focus.
+ * javax/swing/plaf/basic/BasicLookAndFeel.java:
+ (initComponentDefaults): Added List.focusCellHighlightBorder default.
+
+2005-07-22 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java:
+ Implemented the ArrayType CommandSet.
+
+2005-07-22 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): Added defaults for ToggleButton.
+
+2005-07-22 Roman Kennke <roman@kennke.org>
+
+ * java/awt/Component.java
+ (setForeground): Fire PropertyChangeEvent after the foreground
+ has actually changed, instead of before.
+ (setBackground): Fire PropertyChangeEvent after the foreground
+ has actually changed, instead of before. Avoid one comparison
+ at the beginning of method.
+ (getBackground): If background is null and parent is null, return
+ null, instead of SystemColor.window. This is what it's supposed
+ to do.
+ (getFont): Avoid NPE by creating a local reference. Return
+ static final DEFAULT_FONT instead of creating a new font every time
+ we and our parents have no font set.
+ (setFont): Made check for font equality more precise.
+ (paramString): Added parent in paramString.
+
+2005-07-22 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JToggleButton.java
+ (ToggleButtonModel.setPressed): Fixed order in which events
+ get fired.
+
+2005-07-22 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/DefaultButtonModel.java
+ (setPressed): Changed order in which the events get fired. The
+ ActionEvent must be fired before the ChangeEvent gets fired.
+
+2005-07-22 Roman Kennke <roman@kennke.org>
+
+ * java/awt/Component.java
+ (show): Instead of invalidating the component, only invalidate
+ the parent, if there is one. Also repaint this parent.
+ Also, avoid NPEs by creating local references.
+ (hide): Instead of invalidating the component, only invalidate
+ the parent, if there is one. Also repaint this parent.
+ Also, avoid NPEs by creating local references.
+
+2005-07-22 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/basic/BasicButtonUI.java: API doc fixes,
+ * javax/swing/plaf/basic/BasicRadioButtonUI.java: likewise,
+ * javax/swing/plaf/basic/BasicTreeUI.java: likewise.
+
+2005-07-22 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalCheckBoxIcon.java: API doc fixes,
+ * javax/swing/plaf/metal/MetalIconFactory.java: likewise.
+
+2005-07-22 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/text/html/HTMLEditorKit.java: API doc fixes.
+
+2005-07-22 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/tree/AbstractLayoutCache.java: API doc fixes,
+ * javax/swing/tree/DefaultTreeCellRenderer.java: likewise,
+ * javax/swing/tree/DefaultTreeModel.java: likewise,
+ * javax/swing/tree/FixedHeightLayoutCache: likewise.
+
+2005-07-22 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/metal/MetalToggleButtonUI.java
+ (constructor): Initialize colors.
+ (getFocusColor): Fetches the focus property from the UIDefaults.
+ (getSelectColor): Fetches the select property from the UIDefaults.
+ (getDisabledTextColor): Fetches the disabledText property from the
+ UIDefaults.
+
+2005-07-21 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (KeyHandler.updateSelection): Update the ListSelectionModels even if
+ rowSelectionAllowed or columnSelectionAllowed is false. This
+ complies with the JDK.
+ (KeyHandler.keyPressed): Implemented the ENTER key action.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/BorderUIResource.java: API doc fixes,
+ * javax/swing/plaf/FileChooserUI.java: likewise,
+ * javax/swing/plaf/TextUI.java: likewise,
+ * javax/swing/plaf/UIResource.java: likewise.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/event/EventListenerList.java: API doc fixes,
+ * javax/swing/event/MenuKeyEvent.java: likewise,
+ * javax/swing/event/TreeSelectionEvent.java: likewise.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/border/AbstractBorder.java: API doc fixes,
+ * javax/swing/border/BevelBorder.java: likewise,
+ * javax/swing/border/EtchedBorder.java: likewise,
+ * javax/swing/border/LineBorder.java: likewise,
+ * javax/swing/border/SoftBevelBorder.java: likewise,
+ * javax/swing/border/TitledBorder.java: likewise.
+
+2005-07-21 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/metal/MetalButtonUI.java
+ (constructor): Initialize colors.
+ (getFocusColor): Fetches the focus property from the UIDefaults.
+ (getSelectColor): Fetches the select property from the UIDefaults.
+ (getDisabledTextColor): Fetches the disabledText property from the
+ UIDefaults.
+
+2005-07-21 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/GapContent.java
+ (replace): New method. Replaces a chunk of the buffer with
+ another chunk.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/AbstractListModel.java: API doc fixes,
+ * javax/swing/BorderFactory.java: likewise,
+ * javax/swing/BoundedRangeModel.java: likewise,
+ * javax/swing/BoxLayout.java: likewise,
+ * javax/swing/CellRendererPane.java: likewise,
+ * javax/swing/ComponentInputMap.java: likewise,
+ * javax/swing/DefaultBoundedRangeModel.java: likewise,
+ * javax/swing/DefaultButtonModel.java: likewise,
+ * javax/swing/DefaultCellEditor.java: likewise,
+ * javax/swing/InputMap.java: likewise,
+ * javax/swing/JButton.java: likewise,
+ * javax/swing/JFrame.java: likewise,
+ * javax/swing/JLabel.java: likewise,
+ * javax/swing/JMenuBar.java: likewise,
+ * javax/swing/JPopupMenu.java: likewise,
+ * javax/swing/JScrollBar.java: likewise,
+ * javax/swing/JScrollPane.java: likewise,
+ * javax/swing/JSeparator.java: likewise,
+ * javax/swing/JSlider.java: likewise,
+ * javax/swing/JSpinner.java: likewise,
+ * javax/swing/JTextArea.java: likewise,
+ * javax/swing/JToggleButton.java: likewise,
+ * javax/swing/SpinnerListModel.java: likewise,
+ * javax/swing/Spring.java: likewise,
+ * javax/swing/SpringLayout.java: likewise.
+
+2005-07-21 Lillian Angel <langel@redhat.com>
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getPreferredSize): Changed to depend on visible nodes.
+ (mouseClicked): Fixed to keep track of last cell clicked, so expand/collapse
+ works properly by clicking 2 times on the same cell.
+
+2005-07-21 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JComponent.java
+ (putClientProperty): If value == null, remove the key from the
+ Hashtable, otherwise we would get an NPE here.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/basic/BasicSliderUI.java:
+ (thumbHeight): removed,
+ (thumbWidth): removed,
+ (tickHeight): removed,
+ (installDefaults): deleted initialisation of thumbHeight, thumbWidth
+ and thumbRect,
+ (getPreferredHorizontalSize): changed source of thumb height and width,
+ (getPreferredVerticalSize): likewise,
+ (getMinimumHorizontalSize): reimplemented,
+ (getMinimumVerticalSize): reimplemented,
+ (getMinimumSize): reimplemented,
+ (getMaximumSize): reimplemented,
+ (calculateThumbSize): use getThumbSize(),
+ (calculateThumbLocation): use trackRect not contentRect,
+ (calculateTrackBuffer): use half the thumbRect,
+ (getThumbSize): use constant size,
+ (calculateTrackRect): move track down to middle of contentRect,
+ (getTickLength): return constant,
+ (paintTrack): removed unused local variables,
+ (paintTicks): apply a translation to g temporarily before calling
+ methods to draw ticks, add 0.5 to solve rounding problem,
+ (paintMinorTickForHorizSlider): modified to account for translation
+ already applied to g,
+ (paintMajorTickForHorizSlider): likewise,
+ (paintMinorTickForVertSlider): likewise,
+ (paintMajorTickForVertSlider): likewise,
+ (xPositionForValue): subtract 1 from width,
+ (yPositionForValue): likewise,
+ *javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): add slider defaults,
+ *javax/swing/plaf/metal/MetalSliderUI.java: implemented missing
+ methods,
+ * examples/gnu/classpath/examples/swing/Demo.java
+ (mkSliders): added minor ticks and labels.
+
+2005-07-21 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/AbstractButton.java
+ (init): Only set icon if the supplied icon is not null. Otherwise
+ we would override icons that are possibly set by the UI.
+ * javax/swing/plaf/basic/BasicIconFactory.java
+ (CheckBoxIcon): An new Icon implementation used for CheckBoxes
+ in the Basic L&F.
+ (RadioButtonIcon): An new Icon implementation used for
+ RadioButtons in the Basic L&F.
+ (getCheckBoxIcon): Now returns a (cached) instance of CheckBoxIcon
+ instead of the (wrong) inner icon implementation.
+ (getRadioButtonIcon): Now returns a (cached) instance of
+ RadioButtonIcon instead of the (wrong) inner icon implementation.
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefaults): Registered new icons for CheckBox and
+ RadioButton, using a LazyValue entry.
+ * javax/swing/plaf/basic/BasicRadioButtonUI.java
+ Added API documentation all over.
+ (installUI): Removed this method.
+ (installDefaults): New method. Installs the default icons if there
+ is no other icon set.
+ (getPropertyPrefix): New method. Returns the prefix that is used
+ to look up UIDefault entries.
+ (getDefaultIcon): Use propertyPrefix instead of hardcoded property.
+ (paint): New method. Override paint for customized painting
+ of RadioButtons.
+ * javax/swing/plaf/metal/MetalCheckBoxIcon.java
+ (drawCheck): Respect the x and y parameter.
+ * javax/swing/plaf/metal/MetalIconFactory.java
+ (RadioButtonIcon): An Icon implementation for Metal RadioButtons.
+ (getRadioButtonIcon): New method. Returns a shared instance of
+ RadioButtonIcon.
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): Register new icons for CheckBox and
+ RadioButton using a LazyValue entry.
+
+2005-07-21 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JOptionPane.java
+ (createInternalFrame): Look for a JDesktopPane first, then
+ look for a JLayeredPane as fallback. Set this JOptionPane as
+ contentPane for the found JDesktopPane. Make the InternalFrame
+ visible and appropriatly sized here.
+ (showInternalConfirmDialog): ALL VARIANTS OF THIS METHOD:
+ Adjusted call to startModel to only take one parameter.
+ (showInternalInputDialog): ALL VARIANTS OF THIS METHOD:
+ Adjusted call to startModel to only take one parameter.
+ (showInternalMessageDialog): ALL VARIANTS OF THIS METHOD:
+ Adjusted call to startModel to only take one parameter.
+ (showInternalOptionDialog): ALL VARIANTS OF THIS METHOD:
+ Adjusted call to startModel to only take one parameter.
+ (startModal): Now only takes one parameter. This method does no
+ longer add the JOptionPane to the contentPane of the InternalFrame,
+ set the size and make the InternalFrame visible. This is done in
+ createInternalFrame.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/DefaultListSelectionModel.java: API doc fixes.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/AbstractButton.java: API doc fixes all over.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/UIDefaults.java
+ (getFont(Object, Locale)): matched argument name to API doc comment,
+ (getColor(Object, Locale)): likewise,
+ (getIcon(Object, Locale)): likewise,
+ (getBorder(Object, Locale)): likewise,
+ (getString(Object, Locale)): likewise,
+ (getInt(Object, Locale)): likewise,
+ (getBoolean(Object, Locale)): likewise,
+ (getInsets(Object, Locale)): likewise,
+ (getDimension(Object, Locale)): likewise.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JComponent.java: API doc fixes all over.
+
+2005-07-21 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/net/URLClassLoader.java: reordered some API doc comments to
+ suppress Eclipse warnings, and fixed API doc link.
+
+2005-07-20 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * java/awt/BorderLayout.java:
+ (layoutContainer): Removed addition of horizontal and vertical gaps
+ when there is no corresponding adjacent component.
+
+2005-07-20 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JTable:
+ (JTable): Set the lead selection index for each of the two lists
+ associated with this table to 0 (instead of -1). This complies with
+ JDK.
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (KeyHandler.keyPressed): Implemented the following key actions (with
+ CTRL/SHIFT handling when appropriate): UP/DOWN/LEFT/RIGHT, HOME/END,
+ CTRL-A, CTRL-\, CTRL-/.
+
+2005-07-20 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (KeyHandler.keyPressed): Restore the lead selection index after doing
+ a "select all" operation.
+
+2005-07-20 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (keyPressed): Implemented some more VK_XXX and VK_KP_XXX events.
+
+2005-07-20 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java:
+ Implemented the ClassObjectReference CommandSet.
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefaults): Added value for InternalFrame.icon.
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java
+ (installDefaults): Install icon from UIDefaults.
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicOptionPaneUI.java
+ (createSeparator): Return null here.
+ (installComponents): Don't add a separator in the OptionPane.
+
+2005-07-20 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (paint): Changed to paint children of root as roots if the
+ root is not visible, but the root path is expanded.
+ (getPathForRow): If the root is not visible, but expanded,
+ the first child should be considered row 0.
+ (getRowCount): Likewise.
+ (getPathBounds): Likewise.
+ (getCellLocation): If root is not visible, but expanded, the
+ level of each node is lowered by 1.
+ (paintRecursive): If root is not visible, but expanded, there should
+ be no indentation when the children are drawn. Also, there should be no
+ line drawn connecting the children. This makes it look like there are 2
+ independant trees (works same as JDK).
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java
+ (installUI): Moved titlePane.setOpaque() call into
+ BasicInternalFrameTitlePane's constructor.
+ * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+ (constructor): Moved titlePane.setOpaque() call from
+ BasicInternalFrameUI.installUI into this constructor.
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JOptionPane.java
+ (createInternalFrame): Look up the nearest JLayeredPane instead
+ of JDesktopPane. This is in contrast to the specs but what the JDK
+ does and what makes sense.
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/SwingUtilities.java:
+ Made class description more concise.
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JButton.java:
+ Made class description more concise.
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JButton.java
+ (AccessibleJButton): Added accessibility support for JButton.
+ (getAccessibleContext): Implemented to return an AccessibleJButton.
+ * javax/swing/JLabel.java
+ (AccessibleJLabel): Added accessibility support for JLabel.
+ (getAccessibleContext): Implemented to return an AccessibleJLabel.
+
+2005-07-20 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JSlider.java
+ (setMinimum): fire PropertyChangeEvent for new value,
+ (setMaximum): likewise,
+ (setSnapToTicks): fire PropertyChangeEvent, not ChangeEvent,
+ (setPaintTrack): fire PropertyChangeEvent for new value,
+ (setPaintLabels): initialise label table.
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JLayeredPane.java:
+ Fixed and extended API documentation / class description.
+
+2005-07-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/Action.java:
+ Fixes the class description to be more concise.
+
+2005-07-20 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/text/AttributedCharacterIterator.java: fixed minor API doc
+ problems and 80 column wrapping;
+ * java/text/BreakIterator.java
+ (getCharacterInstance(Locale)): matched argument name to API docs,
+ (getLineInstance(Locale)): likewise,
+ (getSentenceInstance(Locale)): likewise,
+ (getWordInstance(Locale)): likewise,
+ and fixed minor API doc problems all over;
+ * java/text/CharacterIterator.java: fixed minor API doc problems.
+
+2005-07-19 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/ForwardRequest.java: New file.
+
+2005-17-19 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/BasicTreeUI
+ (setModel): changed to call JTree's setModel
+ (setRootVisible): Likewise
+ (isRootVisible): Likewise
+ (getClosestPathForLocation): Implemented
+ (paint): took out translate, no need to.
+ (mouseClicked): clicking made smoother.
+
+2005-17-19 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/BasicTreeUI:
+ Moved several functions around for readability.
+ Some formatting in various places.
+ (paint): extended size of border drawn
+ (mouseClicked): checked if path was null
+ (getCellLocation): Now package-private.
+ (paintNode): Implemented, there is no need to paint the leaf and non
+ leaf separately. Works with custom icons.
+ (paintRecursive): Now package-private. Changed to paint with paintNode.
+ (paintControlIcons): Now package-private.
+ (hasControlIcons): Now package-private.
+
+2005-17-19 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JSlider.java
+ (createStandardLabels(int)): updated API docs,
+ (createStandardLabels(int, int)): throw IllegalArgumentException for
+ bad arguments.
+
+2005-17-18 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/BasicTreeUI
+ (getPathBounds): checked if path was null initially
+ (paint): no need to check for control icons
+ (paintLeaf): reseting of icon
+ (paintNonLeaf): resetting of icon
+ (paintControlIcons): cleaned up
+ (hasControlIcons): cleaned up
+ * javax/swing/tree/DefaultTreeCellRenderer
+ (getTreeCellRendererComponent): fixed to follow API
+
+2005-07-18 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JSlider.java:
+ (JSlider(int)): updated API docs,
+ (JSlider(int, int, int)): likewise,
+ (JSlider(BoundedRangeModel)): removed code that handles a null
+ argument, and updated API docs.
+
+2005-07-18 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JSlider.java: initialise snapToTicks to false.
+
+2005-07-18 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicMenuItemUI.java:
+ (paintMenuItem): Don't highlight background of a selected
+ JCheckboxMenuItem.
+ (paintText): Don't highlight text of a selected JCheckBoxMenuItem.
+
+2005-07-18 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JPopupMenu.java:
+ (insert): Resize the container to its preferred size when an item is
+ inserted.
+ (remove): Resize the container to its preferred size when an item is
+ removed.
+
+2005-07-18 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicMenuUI.java:
+ (getMaximumSize): Added check for this menu not being a top level menu.
+ If that's the case, return the maximum size as if it were a regular
+ JMenuItem.
+
+2005-07-18 Tom Tromey <tromey@redhat.com>
+
+ * lib/Makefile.gcj (%.stamp): Added -MP.
+
+2005-07-18 Tom Tromey <tromey@redhat.com>
+
+ * include/.cvsignore: Removed jni.h.
+
+2005-07-18 Tom Tromey <tromey@redhat.com>
+
+ * native/jni/classpath/classpath_jawt.h: Updated copyright
+ header.
+
+2005-07-18 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/imageio/stream/ImageInputStream.java: added import to fix
+ minor API doc problems.
+
+2005-07-18 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (paint): Only paint border if using MetalL&F
+ (mouseClicked): Check that control icons exist
+ (paintNonLeaf): Changed to paint icon depending on height
+ (hasControlIcons): Implemented to return true if control icons exist
+
+2005-07-18 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (paint): Implemented painting of border around selected path
+ (mouseClicked): Fixed clicking of icon
+
+2005-07-18 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefaults): changed Slider.thumbWidth.
+ * javax/swing/plaf/basic/BasicSliderUI.java
+ (paintThumb): fixed thumb painting.
+
+2005-07-17 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/ThreadPolicyValue.java,
+ org/omg/PortableServer/IdAssignmentPolicy.java,
+ org/omg/PortableServer/IdUniquenessPolicyOperations.java,
+ org/omg/PortableServer/IdAssignmentPolicyOperations.java,
+ org/omg/PortableServer/IdUniquenessPolicy.java,
+ org/omg/PortableServer/ImplicitActivationPolicyOperations.java,
+ org/omg/PortableServer/LifespanPolicyOperations.java,
+ org/omg/PortableServer/LifespanPolicy.java,
+ org/omg/PortableServer/ImplicitActivationPolicy.java,
+ org/omg/PortableServer/ServantRetentionPolicy.java,
+ org/omg/PortableServer/RequestProcessingPolicy.java,
+ org/omg/PortableServer/ServantRetentionPolicyOperations.java,
+ org/omg/PortableServer/ThreadPolicyOperations.java,
+ org/omg/PortableServer/RequestProcessingPolicyOperations.java,
+ org/omg/PortableServer/ThreadPolicy.java: New files.
+
+2005-07-15 Lillian Angel <langel@redhat.com>
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (mouseClicked): Implemented clicking on control icons.
+
+2005-07-15 Tom Tromey <tromey@redhat.com>
+
+ * native/jni/classpath/classpath_jawt.h: New file.
+
+2005-07-15 Tom Tromey <tromey@redhat.com>
+
+ * lib/libgcj.omit: Removed.
+
+2005-07-15 Lillian Angel <langel@redhat.com>
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (mouseClicked): changed to use getPathBounds.
+ (getPathBounds): Implemented
+
+2005-07-15 Lillian Angel <langel@redhat.com>
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (mouseClicked): check if user is clicking within the bounds of the cell.
+ (getCellLocation): Implemented to return the location of the cell.
+
+2005-07-15 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalComboBoxIcon.java: new file.
+
+2005-07-15 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/tree/TreePath.java: added API docs all over,
+ (TreePath(Object[])): throw IllegalArgumentException for null argument,
+ (TreePath(TreePath, Object)): throw NullPointerException for null Object,
+ (equals): test elements using equals(),
+ (writeObject): removed,
+ (readObject): removed,
+ (getPath): return a clone of the path,
+ (getPathComponent): throw IllegalArgumentException for invalid position,
+ (isDescendant): reimplemented.
+
+2005-07-15 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicOptionPaneUI.java
+ (ButtonAreaLayout): Made class static.
+ (ButtonAreaLayout.setSyncAllWidths): Removed revalidate(). Never
+ ever revalidate something within a LayoutManager!
+ (ButtonAreaLayout.setPadding): Likewise.
+ (ButtonAreaLayout.setCentersChildren): Likewise.
+ (ButtonAreaLayout.layoutContainer): Don't refer to enclosing
+ class's instance, this is not allowed in static inner classes.
+
+2005-07-15 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/metal/MetalCheckBoxIcon.java:
+ New class. An icon implementation for use in JCheckBoxes.
+ * javax/swing/plaf/metal/MetalBorders.java
+ Renamed MetalButtonBorder to ButtonBorder.
+
+2005-07-15 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTextUI.java:
+ (RootView.removeUpdate): Properly update the caret position after text
+ has been removed.
+
+2005-07-15 Mark Wielaard <mark@klomp.org>
+
+ * NEWS: Add 0.17 release date and new features.
+ * configure.ac: Set version to 0.17.
+
+2005-07-15 Robert Schuster <robertschuster@fsfe.org>
+
+ * javax/swing/AbstractButton.java:
+ (init): Do not change field text if argument text is null.
+
+2005-07-15 Mark Wielaard <mark@klomp.org>
+
+ * java/util/logging/Logger.java (getCallerStackFrame):
+ Make sure index < stackTrace.length and return null otherwise.
+ (log): Check for caller == null.
+
+2005-07-15 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/AbstractButton.java
+ (AbstractButton): Directly call init() and updateUI().
+ (AbstractButton(String, Icon)): Removed. This is not necessary
+ since we have init(String, Icon) for that purpose.
+ (getActionCommand): Reverted to previous behaviour: If
+ actionCommand is set, return this, otherwise return text, even
+ if text is null.
+ * javax/swing/JButton.java
+ (JButton(String, Icon)): Call super() and init(String, Icon)
+ instead of super(String, Icon).
+ * javax/swing/JMenuItem.java
+ (JMenuItem): Call super() instead of super(String, Icon).
+ (JMenuItem(Icon)): Call this(String, Icon) instead of
+ super(String, Icon).
+ (JMenuItem(String)): Call this(String, Icon) instead of
+ super(String, Icon).
+ (JMenuItem(Action)): Call super() instead of
+ super(String, Icon).
+ (JMenuItem(String, Icon)): Call super() and init(String, Icon)
+ instead of super(String, Icon).
+ (JMenuItem(String, int)): Call this(String, Icon) instead of
+ super(String, Icon).
+ * javax/swing/JToggleButton.java
+ (ToggleButtonModel.setPressed): Fire an ActionEvent if button
+ is released. According to my Mauve tests, it seems that this
+ is what the JDK does, so do we.
+ (ToggleButtonModel.setSelected): Removed.
+ (JToggleButton): Call super() and init(String, Icon) instead
+ of super(String, Icon).
+
+2005-07-15 Robert Schuster <robertschuster@fsfe.org>
+
+ * javax/swing/tree/DefaultMutableTreeNode.java:
+ (removeFromParent): Remove child node from parent now.
+ (preorderEnumeration): Implemented.
+ (postorderEnumeration): Implemented.
+ (depthFirstEnumeration): Implemented.
+ (breadthFirstEnumeration): Implemented.
+ (nextLeaf): Added TODO doc.
+ (previousLeaf): Added TODO doc.
+
+2005-07-15 Mark Wielaard <mark@klomp.org>
+
+ * lib/standard.omit: Only list gnu/javax/swing/plaf/gtk/.*java and
+ README explicitly, not the icons.
+ * examples/gnu/classpath/examples/swing/GNULookAndFeel.java
+ (getDefaults): Add Tree closed, leaf and open icons.
+
+2005-07-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
+
+ * doc/vmintegration.texinfo:
+ Updated 'Classpath Hooks' section.
+
+2005-07-15 Mark Wielaard <mark@klomp.org>
+
+ * hacking.texinfo: @setchapternewpage off.
+ * vmintegration.texinfo: Likewise.
+ * www.gnu.org/docs/Makefile: texi2info --ifinfo --ifhtml.
+
+2005-07-14 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkChoicePeer.java (choicePostItemEvent):
+ Rename to postChoiceItemEvent.
+ * gnu/java/awt/peer/gtk/GtkComponentPeer.java (realize): New method.
+ (setNativeEventMask): Likewise.
+ * gnu/java/awt/peer/gtk/GtkGenericPeer.java (printCurrentThread): New method.
+ * gnu/java/awt/peer/gtk/GtkWindowPeer.java (realize): New method.
+ * include/gnu_java_awt_peer_gtk_GtkComponentPeer.h: Regenerate.
+ * include/gnu_java_awt_peer_gtk_GtkWindowPeer.h: Likewise.
+ * native/jni/gtk-peer/gtkpeer.h: Move widget-specific macro,
+ variable and function declarations into the widget-specific file.
+ Add cp_gtk_ namespace prefix to external symbols.
+ (cp_gtk_graphics2d_init_jni): New function.
+ (cp_gtk_graphics_init_jni): Likewise.
+ (cp_gtk_button_init_jni): Likewise.
+ (cp_gtk_checkbox_init_jni): Likewise.
+ (cp_gtk_choice_init_jni): Likewise.
+ (cp_gtk_component_init_jni): Likewise.
+ (cp_gtk_list_init_jni): Likewise.
+ (cp_gtk_menuitem_init_jni): Likewise.
+ (cp_gtk_scrollbar_init_jni): Likewise.
+ (cp_gtk_textcomponent_init_jni): Likewise.
+ (cp_gtk_window_init_jni): Likewise.
+ (cp_gtk_component_connect_expose_signals): Likewise.
+ (cp_gtk_component_connect_focus_signals): Likewise.
+ (cp_gtk_component_connect_mouse_signals): Likewise.
+ (cp_gtk_component_connect_signals): Likewise.
+ (cp_gtk_textcomponent_connect_signals): Likewise.
+ (cp_gtk_print_current_thread): Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c: Remove
+ file. Move widget-specific functions into the widget-specific
+ files. Break main event handler into multiple widget-specific
+ callbacks.
+ * native/jni/gtk-peer/Makefile.am (libgtkpeer_la_SOURCES): Remove
+ gnu_java_awt_peer_gtk_GtkEvents.c.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c: Add
+ cp_gtk_ namespace prefix to external symbols. Add widget-specific
+ macros, variables and function declarations from
+ gnu_java_awt_peer_gtk_GtkEvents.c. Add widget-specific callbacks
+ to replace main event handling loop.
+ * native/jni/classpath/native_state.c: Likewise.
+ * native/jni/classpath/native_state.h: Likewise.
+ * native/jni/gtk-peer/gdkfont.h: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkRobotPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkGenericPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollbarPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c: Likewise.
+ * native/jni/gtk-peer/gthread-jni.c: Likewise.
+ * native/jni/gtk-peer/gthread-jni.h: Likewise.
+
+2005-07-14 Lillian Angel <langel@redhat.com>
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (paintControlIcons): Changed so root does not have control icon.
+
+2005-07-14 Lillian Angel <langel@redhat.com>
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (installUI): Expanded root initially
+ (paint): call function to paint controls
+ (paintRecursive): added to indentation when painting to increase space
+ (paintControlIcons): Implemented to recursively paint the control icons.
+ * javax/swing/tree/DefaultTreeCellRenderer.java
+ (getTreeCellRendererComponent): reset the font properly
+
+2005-07-14 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java:
+ Implemented VirtualMachine Command Set.
+
+2005-07-14 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/AbstractButton.java
+ (getActionCommand): If both the actionCommand and text fields
+ are null, then return "".
+
+2005-07-14 Guilhem Lavaux <guilhem@kaffe.org>
+
+ * java/util/logging/Logger.java
+ (resetLogger): Remove all handlers from the handler list.
+
+ * java/util/logging/LogManager.java
+ (reset): Call resetLogger() too.
+ (readConfiguration): Call reset().
+
+2005-07-14 Mark Wielaard <mark@klomp.org>
+
+ * examples/gnu/classpath/examples/awt/Demo.java
+ (TestWindow.parent): Make package private.
+ * gnu/java/net/protocol/http/HTTPURLConnection.java
+ (proxyHostname, proxyPort, agent, keepAlive, maxConnections):
+ Likewise.
+ * java/text/SimpleDateFormat.java (field, size): Likewise.
+ * java/util/jar/JarFile.java (readSignatures): Likewise.
+ * java/util/logging/FileHandler.java (written): Likewise.
+ * javax/swing/plaf/basic/BasicFileChooserUI.java: Make shared
+ fields package private.
+ (closeDialog): Make package private.
+ (filterEntries): Likewise.
+ * javax/swing/plaf/basic/BasicPopupMenuUI.java
+ (mouseInputListener): Likewise.
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getNextVisibleNode, getPreviousVisibleNode, selectPath): Likewise.
+ * javax/swing/text/JTextComponent.java (caret, editable): Likewise.
+
+2005-07-14 Robert Schuster <robertschuster@fsfe.org>
+
+ * javax/swing/AbstractButton.java: Minor doc fixes.
+ (getActionCommand): Access field directly.
+ (setActionCommand): Dito.
+ (fireActionPerformed): Copy ActionEvent instance instead
+ of reusing it.
+
+2005-07-13 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/BoundedRangeModel.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/ButtonModel.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/CellEditor.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/ComboBoxEditor.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/ComboBoxModel.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/Icon.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/JComboBox.java
+ (KeySelectionManager): Added/Fixed interface API documentation.
+ * javax/swing/ListCellRenderer.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/ListModel.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/ListSelectionModel.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/MenuElement.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/MutableComboBoxModel.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/Renderer.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/RootPaneContainer.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/ScrollPaneConstants.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/Scrollable.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/SingleSelectionModel.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/SpinnerModel.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/SwingConstants.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/UIDefaults.java
+ (ActiveValue): interface API documentation.
+ (LazyValue): interface API documentation.
+ * javax/swing/WindowConstants.java:
+ Added/Fixed interface API documentation.
+ * javax/swing/package.html: Fixed package description to be more
+ a little bit more concise.
+
+2005-07-13 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicLookAndFeel.java: Changed font to
+ match jdk.
+ * javax/swing/plaf/basic/BasicTreeUI.java: took out unneeded
+ import statement
+ * javax/swing/plaf/metal/MetalLookAndFeel.java: Changed
+ defaults to match jdk.
+
+2005-07-13 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicLookAndFeel.java: Changed rowHeight
+ to the right height. This should be fixed later to something more
+ reasonable, as opposed to a 'magic' number.
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (paintLeaf): added in code to paint icons properly
+ (paintNonLeaf): same as above
+ * javax/swing/plaf/metal/MetalLookAndFeel.java: Changed default
+ icons to MetalIconFactory icons
+ * javax/swing/tree/DefaultTreeCellRenderer.java
+ (getTreeCellRendererComponent): Changed to paint icons separately from
+ Cell.
+
+2005-07-13 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (KeyHandler.keyPressed): Implemented actions for the following key
+ presses: "ctrl \\", "END", "shift END", "HOME, "shift HOME", "ctrl /",
+ "ctrl A", "ctrl SPACE", "KP_UP", "KP_DOWN", "shift KP_UP",
+ "shift KP_DOWN".
+
+2005-07-13 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/DefaultButtonModel.java:
+ (changeState): Removed this helper method.
+ (setArmed): Replaced call to changeState by code specific to setArmed.
+ (setEnabled): Likewise, for setEnabled.
+ (setPressed): Likewise, for setPressed.
+ (setRollover): Likewise, for setRollover.
+ (setSelected): Likewise, for setSelected.
+ * javax/swing/JToggleButton.java:
+ (ToggleButtonModel.setPressed): Replaced call to super.setPressed with
+ Toggle-specific code.
+ (ToggleButtonModel.setSelected): New method. Fire an ActionEvent in
+ addition to calling super.setSelected.
+
+2005-07-13 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/accessibility/AccessibleComponent.java: minor API doc fixes,
+ * javax/accessibility/AccessibleRelation.java: likewise,
+ * javax/accessibility/AccessibleRelationSet.java: likewise,
+ * javax/accessibility/AccessibleResourceBundle.java: likewise,
+ * javax/accessibility/AccessibleRole.java: likewise,
+ * javax/accessibility/AccessibleState.java: likewise,
+ * javax/accessibility/AccessibleStateSet.java: likewise,
+ * javax/accessibility/AccessibleText.java: likewise.
+
+2005-07-13 Robert Schuster <robertschuster@fsfe.org>
+
+ * java/awt/AWTEvent.java:
+ (toString): Generalized string generation.
+
+2005-07-13 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/LookAndFeel.java: added API docs all over,
+ * javax/swing/plaf/metal/DefaultMetalTheme.java: likewise,
+ * javax/swing/plaf/metal/MetalLookAndFeel.java: likewise,
+ * javax/swing/plaf/metal/MetalTheme.java: likewise.
+
+2005-07-13 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/table/TableColumn.java: updated API docs,
+ * javax/swing/table/TableColumnModel.java: likewise.
+
+2005-07-13 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/util/zip/Inflater.java: minor API doc fixes.
+
+2005-07-13 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/tree/DefaultMutableTreeNode.java: minor API doc fixes,
+ * javax/swing/tree/DefaultTreeSelectionModel.java
+ (addSelectionPath): modified parameter name to match doc comment,
+ (addSelectionPaths): likewise,
+ (removeSelectionPath): likewise,
+ (removeSelectionPaths): likewise,
+ (isPathSelected): likewise,
+ plus other minor API doc fixes all over.
+ * javax/swing/tree/MutableTreeNode.java: minor API doc fixes.
+
+2005-07-13 Robert Schuster <robertschuster@fsfe.org>
+
+ * javax/swing/AbstractButton.java: Minimal documentation fixes.
+ (getActionCommand): Returns button's label when
+ actionCommand is null.
+ * javax/swing/JButton.java,
+ javax/swing/JToggleButton.java: Removed explicit call to
+ setActionCommand in constructors.
+
+2005-07-13 Robert Schuster <robertschuster@fsfe.org>
+
+ * javax/swing/JToggleButton.java:
+ (paramString): Returns value of same method in superclass now.
+ * javax/swing/JRadioButton.java:
+ (paramString): Dito.
+ * javax/swing/JButton.java:
+ (paramString): Returns value of same method in superclass now,
+ more verbose information added.
+ * javax/swing/JCheckBox.java:
+ (paramString): Dito.
+
+2005-07-12 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/FieldCommandSet.java:
+ Implemented the Field CommandSet.
+ * gnu/classpath/jdwp/processor/InterFaceTypeCommandSet.java:
+ Implemented the InterfaceType CommandSet.
+
+2005-07-12 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicMenuItemUI.java:
+ (paintMenuItem): Replaced incorrect hilighting criteria.
+ (paintText): Likewise.
+
+2005-07-12 Lillian Angel <langel@redhat.com>
+
+ * examples/gnu/classpath/examples/swing/Demo.java
+ (mkTree): no need to make root visible, it is by default
+ (mkTreeWorld): no need to make root visible, it is by default
+
+2005-07-12 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (paintLeaf): fixed size of selection background to depend on
+ if icon exists
+ (paintNonLeaf): fixed size of selection background to depend on
+ if icon exists
+
+2005-07-12 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/DefaultButtonModel.java:
+ (changeState): If the button is a JToggleButton fire action events
+ when it changes between (selected/unselected) not when it changes
+ from pressed to unpressed. Fire action events after firing
+ ItemStateChanged events.
+
+2005-07-12 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/PacketProcessor.java (run): Send
+ shutdown to Jdwp instead of JdwpConnection.
+
+2005-07-12 Lillian Angel <langel@redhat.com>
+ * javax/swing/JTree.java:
+ Formatting copyright
+ * javax/swing/tree/DefaultTreeCellRenderer.java:
+ Formatting copyright
+ * javax/swing/tree/DefaultTreeSelectionModel.java:
+ Formatting copyright
+
+2005-07-12 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/metal/MetalTreeUI.java
+ (createUI): Return a different instance of MetalTreeUI for each
+ JTree. The TreeUI is stateful, so a shared instance would not
+ work.
+
+2005-07-12 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ I accidentally introduced revalidate calls for repaint calls.
+ Reverted.
+
+2005-07-12 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ Fixed formatting of the copyright notice.
+
+2005-07-12 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java
+ (installDefaults): Create border based on defaults in current
+ LookAndFeel.
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefaults): Included border for InternalFrame as
+ LazyValue.
+
+2005-07-12 Lillian Angel <langel@redhat.com>
+ * javax/swing/plaf/basic/BasicLookAndFeel.java:
+ Took out icon defaults.
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (installUI): set root to visible
+ (getCellBounds): took out addition to width since there may not be
+ an icon.
+ * javax/swing/plaf/metal/MetalLookAndFeel.java:
+ Added in icon defaults
+ * lib/Makefile.am:
+ Fixed so icons are installed for the JTree
+
+2005-07-12 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java:
+ New file.
+
+2005-07-12 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+ Removed ad-hoc icons. Replaced them by
+ BasicIconFactory.createEmptyFrameIcon just like in the JDK.
+ (PropertyChangeHandler.propertyChange): Handle change events
+ for closable, iconifiable and maximizable here.
+ (createButtons): Recognize if the JInternalFrame is closable,
+ iconifiable or maximizable.
+
+2005-07-12 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefaults): Corrected color values for BasicL&F buttons.
+
+2005-07-12 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JMenu.java:
+ (isSelected): Call super.isSelected() instead of super.isArmed().
+ * javax/swing/plaf/basic/BasicMenuItemUI.java:
+ (paintMenuItem): Replaced incorrect selection criteria with call to
+ isSelected().
+ (paintText): Likewise.
+
+2005-07-12 Lillian Angel <langel@redhat.com>
+ * examples/gnu/classpath/examples/swing/Demo.java
+ (mkTreeWorld): Implemented
+ (mkTabbedPane): added in tab for TreeWorld
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ Changed default color of text non selection background.
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ Removed irrelevant comment
+ * javax/swing/tree/DefaultTreeCellRenderer.java
+ (getTreeCellRendererComponent): changed to use background's non
+ selection default color instead
+
+2005-07-12 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+ (TitlePaneLayout.layoutContainer): Do not change any state of
+ the components here (visible/enableActions). This is not the purpose of
+ a layout manager and can lead to loops. Also correct the layout
+ to be closer to the layout of the reference implementation.
+ (TitlePaneLayout.preferredLayoutSize): Return (22, 18)
+ here. That is what the JDK returns for the title bar.
+ (PaneButton): Don't set the border to null.
+ (createButtons): The buttons are opaque.
+ (createButtonIcons): Don't create icons in the Basic L&F.
+
+2005-07-12 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JApplet.java,
+ * javax/swing/JDialog.java,
+ * javax/swing/JFrame.java,
+ * javax/swing/JWindow.java:
+ (addImpl): Add to the frame itself if we are in the init
+ stage, otherwise add to the contentPane.
+
+2005-07-12 Mark Wielaard <mark@klomp.org>
+
+ * java/awt/MediaTracker.java (checkAll): Set and check status of
+ MediaEntry with checkImage() if prepareImage() returns false.
+ (statusAll): Likewise.
+ (checkID): Likewise.
+ (statusID): Likewise.
+
+2005-07-12 Mark Wielaard <mark@klomp.org>
+
+ * javax/swing/text/JTextComponent.java
+ (CaretBlinkTimer.actionPerformed): Check that caret != null.
+ (CaretBlinkTimer.update): Likewise.
+
+2005-07-12 Mark Wielaard <mark@klomp.org>
+
+ Reported by Simon Kitching <skitching@apache.org>
+ * java/lang/String.java (toCharArray): Return value.clone() when
+ count == value.length.
+
+2005-07-12 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * javax/swing/text/html/parser/ParserDelegator.java (gnuParser.getDTD):
+ Added comment about 'super'.
+
+2005-07-11 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c:
+ Replace occurrences of malloc with g_malloc and free with g_free.
+
+ * gnu/java/awt/peer/gtk/GtkChoicePeer.java (connectSignals): New method.
+ * include/gnu_java_awt_peer_gtk_GtkChoicePeer.h: Regenerate.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c: Move
+ gdk_threads_enter calls to start of method bodies. Move
+ gdk_threads_leave calls to end of method definitions bodies.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkRobotPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkGenericPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c: Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c: Likewise.
+
+2005-07-12 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * javax/swing/text/html/parser/ParserDelegator.java (gnuParser.getDTD):
+ Added explicit field reference.
+
+2005-07-11 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/lang/IllegalAccessException.java: fixed minor API doc errors,
+ * java/lang/String.java: likewise.
+
+2005-07-11 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/io/DataOutput.java: fixed minor API doc errors,
+ * java/io/LineNumberInputStream.java: likewise.
+
+2005-07-11 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalIconFactory.java
+ (HorizontalSliderThumbIcon): new inner class,
+ (VerticalSliderThumbIcon): new inner class,
+ (getHorizontalSliderThumbIcon): implemented,
+ (getVerticalSliderThumbIcon): implemented.
+
+2005-07-11 Sven de Marothy <sven@physto.se>
+
+ * gnu/java/awt/peer/gtk/GtkImage.java:
+ (setImage): Set error flag on bad width, height or pixels.
+ (checkImage): Return error flag.
+
+2005-07-11 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JInternalFrame.java
+ (addImpl): Add to the frame itself if we are in the init
+ stage, otherwise add to the contentPane.
+
+2005-07-11 Lillian Angel <langel@redhat.com>
+ * examples/gnu/classpath/examples/swing/Demo.java
+ (mkTree): fixed so the JTree appears properly.
+
+2005-07-11 Lillian Angel <langel@redhat.com>
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ Changed the default row height for the tree.
+
+2005-07-11 Roman Kennke <roman@kennke.org>
+
+ * examples/gnu/classpath/examples/swing/Demo.java
+ (mkDesktopWorld): Made InternalFrames visible.
+
+2005-07-11 Mark Wielaard <mark@klomp.org>
+
+ * javax/swing/JFileChooser.java (getSelectedFiles): Return an one
+ element array containing selectedFile if selectedFiles is null.
+
+2005-07-11 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getPreviousVisibleNode): Implemented
+ (selectPath): helper method, implemented.
+ (keyPressed): handles up/down/left/right keys
+ (mouseClicked): made more efficent and implemented double
+ clicking for folders.
+ * javax/swing/JTree.java
+ (clearSelection): Lead selection path is set to null when
+ nothing is currently selected.
+
+2005-07-11 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicMenuUI.java:
+ (MouseHandler.popupVisible): new method.
+ (MouseHandler.mouseEntered): Removed check for menu being armed to
+ comply with reference implementation. Calls popupVisible to check
+ for menus with their popup menu visible.
+
+2005-07-11 Mark Wielaard <mark@klomp.org>
+
+ * java/net/DatagramSocket.java (getImpl): Record cause of Exception.
+
+2005-07-11 Mark Wielaard <mark@klomp.org>
+
+ * native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c:
+ Whenever an ExceptionOccurred just return to throw it, don't mask.
+ * native/jni/java-net/javanet.c (_javanet_get_netaddr): Check for
+ NULL addr.
+ (_javanet_create): Explicitly close socket on failure.
+ (_javanet_close): Save error message and retry closing when
+ interrupted before throwing exception.
+ (_javanet_connect): Keep retrying connect after system call
+ interrupted. First construct exception before cleanup.
+ (_javanet_bind): Save error string for exception.
+ (_javanet_accept): Explicitly close socket on failure.
+ (_javanet_recvfrom): Throw SocketTimeoutException when timed out.
+ (_javanet_sendto): Send all data even when interrupted.
+ (_javanet_set_option): Don't ignore error when setting SO_TIMEOUT.
+ * native/target/generic/target_generic_network.h
+ (TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT): Use timeval for
+ setsockopt.
+ (TARGET_NATIVE_NETWORK_SOCKET_GET_OPTION_SO_TIMEOUT): Likewise for
+ getsockopt.
+
+2005-07-11 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicMenuUI.java:
+ (MouseInputHandler.mouseEntered): Added check: if a different menu in
+ the menubar was selected, we don't select this one unless the old one
+ had its popup menu showing. This complies with the reference
+ implementation.
+
+2005-07-11 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JMenu.java:
+ (setSelectedHelper): new method.
+ (setSelected): Code moved to setSelectedHelper. Calls
+ setSelectedHelper(selected,true,false) which doesn't expand the popup
+ menu and works whether the menu is enabled or not.
+ (menuSelectionChanged): Changed call to setSelected(changed) to
+ setSelectedHelper(changed,isEnabled(),true) which does expand the
+ popup menu, but only if the menu is enabled.
+
+2005-07-10 Mark Wielaard <mark@klomp.org>
+
+ * gnu/java/nio/channels/FileChannelImpl.java (force): New native
+ method.
+ (force(boolean)): Call new native force method.
+ * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
+ (Java_gnu_java_nio_channels_FileChannelImpl_read__):
+ Test for result != TARGET_NATIVE_OK as stop condition.
+ (Java_gnu_java_nio_channels_FileChannelImpl_read___3BII):
+ Check overflow and underflow. Only increase bytes_read when
+ we didn't get an error.
+ (Java_gnu_java_nio_channels_FileChannelImpl_write__I):
+ Return when we encounter an error.
+ (Java_gnu_java_nio_channels_FileChannelImpl_write___3BII):
+ Only increase bytes_written when we didn't get an error.
+ (Java_gnu_java_nio_channels_FileChannelImpl_force): New function.
+ * include/gnu_java_nio_channels_FileChannelImpl.h: Regenerated.
+
+2005-07-11 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getCellBounds): added width of icon, so selection fits over
+ the cell properly.
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ added in icons for the tree.
+ * lib/Makefile.am
+ added in handling for the icons being used.
+
+2005-07-10 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JInternalFrame.java
+ (pack): Set the JInternalFrame's own size here instead of
+ layouting its children (this is triggered by setSize anyway).
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java
+ (installDefaults): Set the correct border for InternalFrames.
+ Set InternalFrames to invisible by default.
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefaults): Set correct color values for
+ InternalFrames.
+
+2005-07-10 Casey Marshall <csm@gnu.org>
+
+ * configure.ac (AC_CHECK_HEADERS): add 'fcntl.h'.
+ (AC_CHECK_FUNCS): add 'fcntl'.
+ * native/jni/java-nio/gnu_java_nio_channels_FileChannel.c:
+ Include <fcntl.h> if HAVE_FCNTL_H.
+ (Java_gnu_java_nio_channels_FileChannelImpl_lock,
+ Java_gnu_java_nio_channels_FileChannelImpl_unlock): implemented
+ if HAVE_FCNTL.
+
+2005-07-10 Casey Marshall <csm@gnu.org>
+
+ * gnu/classpath/debug/Component.java: new file.
+ * gnu/classpath/debug/PreciseFilter.java: new file.
+ * gnu/classpath/debug/SystemLogger.java: new file.
+ * gnu/java/security/x509/X509Certificate.java
+ (DEBUG, debug, debug): removed.
+ (logger): new constant; use 'logger' with 'Component.X509'
+ for debug messages throughout.
+ (parse): always read the next DER value after reading the
+ version-specific values.
+
+2005-07-10 Dalibor Topic <robilad@kaffe.org>
+
+ * java/io/ObjectOutputStream.java: Updated copyright
+ information for 2005.
+
+2005-07-10 Dalibor Topic <robilad@kaffe.org>
+
+ * java/io/ObjectOutputStream.java
+ (getObjectField): Clarified error checking code, and
+ improved exception messages.
+
+2005-07-10 Dalibor Topic <robilad@kaffe.org>
+
+ * java/io/ObjectOutputStream.java (DEBUG): New constant.
+ (ObjectOutputStream, writeObject) Use internal debug switch.
+
+2005-07-10 Dalibor Topic <robilad@kaffe.org>
+
+ * java/io/ObjectInputStream.java (DEBUG):
+ New private static field.
+ (ObjectInputStream, resolveClass) Use DEBUG.
+
+2005-07-10 Dalibor Topic <robilad@kaffe.org>
+
+ * java/awt/GridBagLayout.java:
+ (addLayoutComponent) Improved error message.
+
+2005-07-10 Dalibor Topic <robilad@kaffe.org>
+
+ * gnu/java/text/FormatCharacterIterator.java:
+ Removed unnecessary import of gnu.classpath.Configuration.
+ (DEBUG) New private static field.
+ (debug, dumpTable) Use DEBUG.
+
+2005-07-09 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/transform/AbstractNumberNode.java,
+ gnu/xml/transform/ApplyImportsNode.java,
+ gnu/xml/transform/ApplyTemplatesNode.java,
+ gnu/xml/transform/AttributeNode.java,
+ gnu/xml/transform/Bindings.java,
+ gnu/xml/transform/CallTemplateNode.java,
+ gnu/xml/transform/CopyOfNode.java,
+ gnu/xml/transform/CurrentFunction.java,
+ gnu/xml/transform/DocumentFunction.java,
+ gnu/xml/transform/ElementAvailableFunction.java,
+ gnu/xml/transform/ElementNode.java,
+ gnu/xml/transform/ForEachNode.java,
+ gnu/xml/transform/FormatNumberFunction.java,
+ gnu/xml/transform/FunctionAvailableFunction.java,
+ gnu/xml/transform/GenerateIdFunction.java,
+ gnu/xml/transform/IfNode.java,
+ gnu/xml/transform/KeyFunction.java,
+ gnu/xml/transform/ParameterNode.java,
+ gnu/xml/transform/SortKey.java,
+ gnu/xml/transform/StreamSerializer.java,
+ gnu/xml/transform/Stylesheet.java,
+ gnu/xml/transform/SystemPropertyFunction.java,
+ gnu/xml/transform/TemplateNode.java,
+ gnu/xml/transform/TransformerImpl.java,
+ gnu/xml/transform/UnparsedEntityUriFunction.java,
+ gnu/xml/transform/ValueOfNode.java,
+ gnu/xml/transform/WhenNode.java,
+ gnu/xml/transform/WithParam.java,
+ gnu/xml/xpath/AndExpr.java,
+ gnu/xml/xpath/ArithmeticExpr.java,
+ gnu/xml/xpath/BooleanFunction.java,
+ gnu/xml/xpath/CeilingFunction.java,
+ gnu/xml/xpath/ConcatFunction.java,
+ gnu/xml/xpath/Constant.java,
+ gnu/xml/xpath/ContainsFunction.java,
+ gnu/xml/xpath/CountFunction.java,
+ gnu/xml/xpath/EqualityExpr.java,
+ gnu/xml/xpath/Expr.java,
+ gnu/xml/xpath/FalseFunction.java,
+ gnu/xml/xpath/FloorFunction.java,
+ gnu/xml/xpath/FunctionCall.java,
+ gnu/xml/xpath/IdFunction.java,
+ gnu/xml/xpath/LangFunction.java,
+ gnu/xml/xpath/LastFunction.java,
+ gnu/xml/xpath/LocalNameFunction.java,
+ gnu/xml/xpath/NameFunction.java,
+ gnu/xml/xpath/NameTest.java,
+ gnu/xml/xpath/NamespaceTest.java,
+ gnu/xml/xpath/NamespaceUriFunction.java,
+ gnu/xml/xpath/NegativeExpr.java,
+ gnu/xml/xpath/NodeTypeTest.java,
+ gnu/xml/xpath/NormalizeSpaceFunction.java,
+ gnu/xml/xpath/NotFunction.java,
+ gnu/xml/xpath/NumberFunction.java,
+ gnu/xml/xpath/OrExpr.java,
+ gnu/xml/xpath/ParenthesizedExpr.java,
+ gnu/xml/xpath/Pattern.java,
+ gnu/xml/xpath/PositionFunction.java,
+ gnu/xml/xpath/Predicate.java,
+ gnu/xml/xpath/RelationalExpr.java,
+ gnu/xml/xpath/Root.java,
+ gnu/xml/xpath/RoundFunction.java,
+ gnu/xml/xpath/Selector.java,
+ gnu/xml/xpath/StartsWithFunction.java,
+ gnu/xml/xpath/Steps.java,
+ gnu/xml/xpath/StringFunction.java,
+ gnu/xml/xpath/StringLengthFunction.java,
+ gnu/xml/xpath/SubstringAfterFunction.java,
+ gnu/xml/xpath/SubstringBeforeFunction.java,
+ gnu/xml/xpath/SubstringFunction.java,
+ gnu/xml/xpath/SumFunction.java,
+ gnu/xml/xpath/Test.java,
+ gnu/xml/xpath/TranslateFunction.java,
+ gnu/xml/xpath/TrueFunction.java,
+ gnu/xml/xpath/UnionExpr.java,
+ gnu/xml/xpath/VariableReference.java,
+ gnu/xml/xpath/XPathParser.java,
+ gnu/xml/xpath/XPathParser.y,
+ javax/xml/namespace/QName.java: Corrections to handling of XSL
+ variables and minor conformance updates.
+
+2005-07-09 Archie Cobbs <archie@dellroad.org>
+
+ * java/net/URLClassLoader.java: disallow directories as resources
+
+2005-07-09 Casey Marshall <csm@gnu.org>
+
+ * java/util/logging/FileHandler.java
+ (written): new field.
+ (logFiles): new field.
+ (<init>): initialize the OutputStream last.
+ (createFileStream): made non-static; append '.%g' to 'pattern'
+ if not included; open existing files if 'append' is set; return
+ byte-counting stream; use 'has', not 'String.indexOf'.
+ (publish): rotate the file if we go beyond the byte limit; flush
+ the stream after publishing each record.
+ (rotate): new method.
+ (has): new method.
+ (ostr): new member class.
+
+2005-07-08 Tom Tromey <tromey@redhat.com>
+
+ * lib/split-for-gcj.sh: Make list file depend on source file.
+ * lib/Makefile.gcj (%.stamp): Set target name to stamp file.
+
+2005-07-08 Aaron Luchko <aluchko@redhat.com>
+
+ * doc/hacking.texinfo: Fixed broken links to GNU Coding
+ Standards to point to http://www.gnu.org/prep/standards/
+
+2005-07-08 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicFileChooserUI.java:
+ (ApproveSelectionAction.actionPerformed): Allow directories to be
+ selected unless selection mode is FILES_ONLY.
+
+2005-07-08 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/basic/BasicButtonUI.java: minor API doc fixes,
+ * javax/swing/plaf/basic/BasicComboBoxEditor.java: likewise,
+ * javax/swing/plaf/basic/BasicGraphicsUtils.java: likewise,
+ * javax/swing/plaf/basic/BasicLabelUI.java: likewise,
+ * javax/swing/plaf/basic/BasicListUI.java: likewise,
+ * javax/swing/plaf/basic/BasicLookAndFeel.java: likewise,
+ * javax/swing/plaf/basic/BasicMenuBarUI.java: likewise,
+ * javax/swing/plaf/basic/BasicMenuUI.java: likewise,
+ * javax/swing/plaf/basic/BasicPopupMenuUI.java: likewise,
+ * javax/swing/plaf/basic/BasicScrollBarUI.java: likewise,
+ * javax/swing/plaf/basic/BasicSpinnerUI.java: likewise,
+ * javax/swing/plaf/basic/BasicSplitPaneDivider.java: likewise,
+ * javax/swing/plaf/basic/BasicToolTipUI.java: likewise.
+
+2005-07-08 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/filechooser/FileSystemView.java:
+ (getFiles): Added check for non-existent directory, in which case
+ default to home directory.
+
+2005-07-08 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalIconFactory.java: new file, implements
+ core tree icons.
+
+2005-07-08 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (getDefaults): Call theme.addCustomEntriesToTable() only once
+ during initialization of the defaults table.
+
+2005-07-08 Mark Wielaard <mark@klomp.org>
+
+ * lib/Makefile.am (FOUND_GCJ): Add top_builddir to compile_classpath.
+ (EXTRA_DIST): Add Makefile.gcj and split-for-gcj.sh
+ (clean-local): Remove lists and Makefile.deps.
+
+2005-07-08 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTableUI.java
+ (installDefaults): Initialize cell borders.
+ (paint): Set correct cell border before painting.
+ * javax/swing/plaf/basic/BasicLookAndFeel.java
+ (initComponentDefault): Corrected color value for the
+ Table.focusCellHighlightBorder UIResource.
+
+2005-07-07 Jeroen Frijters <jeroen@frijters.net>
+
+ * java/io/ObjectStreamClass.java
+ (findAccessibleMethod): Added code to make method accessible.
+
+2005-07-07 Robert Schuster <robertschuster@fsfe.org>
+
+ * javax/swing/JMenu.java
+ (setSelected): Added isEnabled() to expression.
+
+2005-07-07 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/util/Signature.java
+ (computeFieldSignature): New Method.
+
+2005-07-07 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JTable.java:
+ (clearSelection): Added clearing of columns as well as rows.
+
+2005-07-07 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTableUI.java:
+ (MouseInputHandler.mousePressed): Added check for control being pressed
+ and mouse clicked on already selected cell. In this case, deselect
+ the cell.
+
+2005-07-07 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java: New
+ file.
+
+2005-07-07 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/DefaultListSelectionModel.java:
+ (addSelectionInterval): Added check for leadSelectionIndex being
+ unselected (ie - after a remove operation).
+
+2005-07-07 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getRowCount): Implemented
+ (getPreferredSize): Implemented
+ (getMinimumSize): Implemented
+ (getMaximumSize): Implemented
+ (getCellBounds): checked if parameter is null
+ (paintRecursive): added in a variable to keep track of the
+ length of vertical line to be drawn. Now paints tree nicely.
+
+2005-07-07 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ Formatted code so else's are on new lines
+
+2005-07-07 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ Formatted code to get rid of TABs
+ (getPathForRow): took out redundant code.
+ (getNextVisibleNode): took out redundant code.
+
+2005-07-07 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (DocumentHandler.insertUpdate): Update caret position when document
+ changes.
+ (DocumentHandler.removeUpdate): Update caret position when document
+ changes.
+
+2005-07-07 Roman Kennke <roman@kennke.org>
+
+ * gnu/java/awt/FocusManager.java: New class. Provides a concrete
+ implementation of javax.swing.FocusManager so that we can support
+ the old-style FocusManager in Swing and AWT.
+ * gnu/classpath/SystemProperties.java: Add new system property
+ gnu.java.awt.FocusManager that sets the class that should be used
+ as the default FocusManager in AWT and Swing.
+ * java/awt/KeyboardFocusManager.java
+ (setCurrentKeyboardFocusManager): Use createFocusManager instead
+ of creating the instance directly.
+ (createFocusManager): New method. Instantiate a KeyboardFocusManager
+ that is set by the system property gnu.java.awt.FocusManager.
+ * javax/swing.FocusManager.java
+ (constructor): Call super() here.
+ (getCurrentManager): Return the current AWT KeyboardFocusManager
+ here.
+ (setCurrentManager): Set the current AWT KeyboardFocusManager
+ here.
+ (processKeyEvent): Removed method. This is no longer in the
+ API.
+ (focusNextComponent): Removed method. This is no longer in the
+ API.
+ (focusPreviousComponent): Removed method. This is no longer in the
+ API.
+
+2005-07-07 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JProgressBar.java
+ (JProgressBar(int, int, int)): fix order of parameters,
+ (JProgressBar()): reorder arguments in call to other constructor,
+ (JProgressBar(int): likewise,
+ (JProgressBar(int, int): likewise.
+
+2005-07-07 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (MouseInputHandler.mouseClicked): Access static TreeSelectionModel
+ fields via the class and not via an instance.
+
+2005-07-07 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java:
+ Reformatted source file to better match our coding standards.
+
+2005-07-06 Tom Tromey <tromey@redhat.com>
+
+ * lib/Makefile.gcj: New file.
+ * lib/Makefile.am (JAVAC): Changed for new gcj build approach.
+ * lib/gen-classlist.sh.in: Don't split list for gcj.
+ * lib/split-for-gcj.sh: New file.
+
+2005-07-06 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/basic/BasicBorders.java: fixed API docs all over.
+
+2005-07-06 Chris Burdess <dog@gnu.org>
+
+ * gnu/java/net/protocol/http/HTTPConnection.java,
+ gnu/java/net/protocol/http/HTTPURLConnection.java:
+ Fix bug with multiple threads and persistent connections.
+
+2005-07-06 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/transform/StreamSerializer.java,
+ gnu/xml/xpath/EqualityExpr.java: XSLT conformance fixes.
+
+2005-07-06 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getPathForRow): took out redundant code.
+
+2005-07-06 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getNextVisibleNode): Implemented
+ (getPathForRow): Fixed so the next node retrieved is visible.
+
+2005-07-06 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/JTree.java
+ Initialized the Hashtable.
+ (addSelectionPath): removed redundant code.
+ (doExpandParents): added in line so that state is
+ changed for current path. Changed while loop to if
+ statement, an infinite loop was occurring.
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (getPathForRow): Implemented to work with visibility.
+ (isLeaf): Implemented
+ (mouseClicked): add in check for expand/collapse.
+ Selection for DISCONTIGUOUS tree selection is
+ implemented.
+ (treeExpanded): called repaint, so the tree updates
+ visually when something is expanded.
+ (treeCollapse): Similar to treeExpanded.
+ (paintLeaf): changed to paint leaf only when visible.
+ (paintNonLeaf): paints only when visible.
+ (paintRecursive): lines for tree are only painted when
+ needed. checked for visibility of current object and
+ parent.
+ * javax/swing/tree/DefaultTreeCellRenderer.java
+ (getTreeCellRendererComponent): setting icons when
+ expanded.
+ * javax/swing/tree/DefaultTreeSelectionModel.java
+ (clearSelection): set leadPath to null because selection
+ should be completely reset.
+
+2005-07-06 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/AbstractButton.java
+ (setContentAreaFilled): Set the opaque property here.
+
+2005-07-06 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/awt/AWTKeyStroke.java: fixed API doc links,
+ * java/awt/BufferCapabilities.java: likewise,
+ * java/awt/ColorPaintContext.java: likewise,
+ * java/awt/Component.java: likewise,
+ * java/awt/Container.java: likewise,
+ * java/awt/EventQueue.java: likewise,
+ * java/awt/GraphicsDevice.java: likewise,
+ * java/awt/Image.java: likewise,
+ * java/awt/KeyboardFocusManager.java: likewise,
+ * java/awt/MediaTracker.java: likewise,
+ * java/awt/PrintJob.java: likewise,
+ * java/awt/Robot.java: likewise.
+
+2005-07-06 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JTable.java
+ (setAutoCreateColumnsFromModel): when the flag changes from false to
+ true, call createDefaultColumnsFromModel().
+
+2005-07-05 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JTable.java
+ (getColumnName): return name from column in data model.
+
+2005-07-05 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * java/awt/DefaultKeyboardFocusManager.java (dispatchEvent): Check
+ parent and target before casting target to Window.
+
+2005-07-05 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/StringReferenceCommandSet.java:
+ New file.
+
+2005-07-05 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/AbstractAction.java: updated API docs,
+ * javax/swing/Action.java: likewise.
+
+2005-07-05 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/applet/Applet.java: added import to fix API doc link.
+
+2005-07-05 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * javax/swing/text/StyleContext.java
+ (defaultStyle): New field.
+ (constructor): Add defaultStyle to the styleTable.
+ (DEFAULT_STYLE, getStyle, getStyleNames): Documented.
+
+2005-07-05 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JTable.java:
+ (addColumn): retrieve correct column name,
+ (convertColumnIndexToModel): remove check for > columnCount and let
+ exception happen,
+ (getColumnName): retrieve name from TableColumn,
+ (isCellEditable): implemented,
+ (createDefaultColumnsFromModel): implemented.
+ * javax/swing/table/DefaultTableColumnModel.java:
+ (addColumn): throw exception for null argument, set correct column
+ index in TableColumnModelEvent,
+ (removeColumn): use correct column index,
+ (moveColumn): move the column, don't swap it. Also added argument
+ checks,
+ (getColumnIndex): reimplemented.
+
+2005-07-05 Sven de Marothy <sven@physto.se>
+
+ * javax/swing/JLabel.java:
+ (JLabel): Revert previous change for JLabel(Icon) constructor.
+
+2005-07-05 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JScrollPane.java:
+ Added API documentation for class and constructors.
+
+2005-07-05 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/util/BitSet.java: fixed minor problems in API docs,
+ * java/util/Calendar.java: likewise,
+ * java/util/Collections.java: likewise,
+ * java/util/Date.java: likewise,
+ * java/util/Hashtable.java: likewise,
+ * java/util/LinkedList.java: likewise,
+ * java/util/Properties.java: likewise,
+ * java/util/PropertyResourceBundle.java: likewise,
+ * java/util/ResourceBundle.java: likewise,
+ * java/util/SimpleTimeZone.java: likewise,
+ * java/util/TreeMap.java: likewise.
+
+2005-07-05 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * javax/swing/text/JTextComponent.java (read, write): New methods.
+
+2005-07-05 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/JTable.java: fixed API doc links all over.
+
+2005-07-05 Mark Wielaard <mark@klomp.org>
+
+ * include/Makefile.am (GTKPEER_H_FILES): Removed GtkTextComponentPeer.
+ * include/gnu_java_awt_peer_gtk_GtkTextComponentPeer.h: Removed.
+ * gnu/java/awt/peer/gtk/GtkComponentPeer.java
+ (classpath_gtk_component_connect_nonfocus_signals): Mark argument
+ unused.
+ (classpath_gtk_component_connect_signals): Likewise.
+
+2005-07-04 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkComponentPeer.java (postTextEvent): New
+ method.
+ * gnu/java/awt/peer/gtk/GtkTextAreaPeer.java: Add
+ TextComponentPeer method declarations.
+ * gnu/java/awt/peer/gtk/GtkTextFieldPeer.java: Likewise.
+ * gnu/java/awt/peer/gtk/GtkTextComponentPeer.java: Remove file.
+ * include/gnu_java_awt_peer_gtk_GtkTextAreaPeer.h: Regenerate.
+ * include/gnu_java_awt_peer_gtk_GtkTextFieldPeer.h: Likewise.
+ * native/jni/gtk-peer/Makefile.am (libgtkpeer_la_SOURCES): Remove
+ gnu_java_awt_peer_gtk_GtkTextComponentPeer.c.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
+ (classpath_gtk_component_connect_nonfocus_signals): New function.
+ (classpath_gtk_component_connect_signals): Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c: Add
+ method implementations from
+ gnu_java_awt_peer_gtk_GtkTextComponentPeer.c.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c:
+ Likewise.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c:
+ Remove file.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
+ (gtkInit): Get postTextEventID from GtkComponentPeer, not
+ GtkTextComponentPeer.
+ * native/jni/gtk-peer/gtkpeer.h (classpath_gtk_textcomponent_init_jni): Declare.
+ (classpath_gtk_component_connect_signals): Likewise.
+ (classpath_gtk_component_connect_nonfocus_signals): Likewise.
+ (classpath_gtk_textcomponent_connect_signals): Likewise.
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c:
+ Rename gnu_java_awt_peer_gtk_GtkScrollbarPeer.c.
+ * native/jni/gtk-peer/Makefile.am (libgtkpeer_la_SOURCES): Rename
+ gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
+ gnu_java_awt_peer_gtk_GtkScrollbarPeer.c.
+
+ * gnu/java/awt/ClasspathToolkit.java (createEmbeddedWindow): New method.
+ * gnu/java/awt/EmbeddedWindow.java (addNotify): Assume we're using
+ ClasspathToolkit.
+ * gnu/java/awt/EmbeddedWindowSupport.java: Remove file.
+ * gnu/java/awt/peer/gtk/GtkToolkit.java: Remove references to
+ EmbeddedWindowSupport.
+
+2005-07-04 Sven de Marothy <sven@physto.se>
+
+ * javax/swing/JComponent.java:
+ (setEnabled): Fix typo in event string.
+
+2005-07-04 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JTabbedPane.java
+ (Page.setDisplayedMnemonicIndex): Added check for index being -1
+ before calling title.charAt(index). Eliminates StringIndexOutOfBounds
+ error.
+
+2005-07-04 Mark Wielaard <mark@klomp.org>
+
+ * gnu/java/awt/peer/gtk/GdkPixbufDecoder.java (initialized):
+ Remove unused field.
+ (needsClose): New private field.
+ (finish): Take needsClose boolean argument.
+ (finalize): Call finish with needsClose.
+ (produce): Set needsClose.
+ * include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h: Regenerated.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c
+ (Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_finish): Only close
+ when needed.
+
+2005-07-04 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/ParameterModeHolder.java: New constructor.
+
+2005-07-04 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/processor/CommandSet.java: New file.
+ * gnu/classpath/jdwp/processor/PacketProcessor.java: Use
+ CommandSets to handle JdwpCommandPackets.
+ * gnu/classpath/jdwp/transport/JdwpReplyPacket.java: New
+ Constructor.
+
+2005-07-04 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/JTree.java
+ (addSelectionPath): if mouse click somewhere other than
+ a row, all selections are removed
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (mouseClicked): if mouse clicked on a row, all other
+ selections are cleared. DISCONTIGUOUS mode implemented.
+ (getCellBounds): Implemented
+ (paintLeaf): paints with cell bounds
+ (paintNonLeaf): paints with cell bounds
+ * javax/swing/tree/DefaultTreeCellRenderer.java:
+ (DefaultTreeCellRendererComponent): changed color of
+ selected row
+ (getFont): Implemented
+ * javax/swing/tree/DefaultTreeSelectionModel.java:
+ (addSelectionPaths): check if parameter is null
+ (removeSelectionPaths): check if parameter is null
+
+2005-07-04 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ * configure.ac: Remove libart dependency.
+ * scripts/classpath.spec.in: Likewise.
+ * INSTALL: Remove references to libart.
+ * doc/hacking.texinfo: Likewise.
+ * doc/www.gnu.org/faq/faq.wml: Likewise.
+
+2005-07-03 Daniel Bonniot <bonniot@users.sf.net>
+
+ * java/io/ObjectStreamClass.java (inSamePackage): New private method.
+ (findAccessibleMethod): Likewise.
+ (cacheMethods): Lookup readResolve and writeReplace using the new
+ findAccessibleMethod().
+
+2005-07-03 Archie Cobbs <archie@dellroad.org>
+
+ * m4/acinclude.m4: fix broken expr(1) syntax
+
+2005-07-03 Audrius Meskauskas, <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/ServantLocatorPackage/package.html,
+ org/omg/PortableServer/ServantLocatorPackage/CookieHolder.java:
+ New files.
+
+2005-07-02 Audrius Meskauskas, <AudriusA@Bioinformatics.org>
+
+ * gnu/CORBA/_PolicyImplBase.java: Ihnerit from Policy.
+ (ids): Made final non static, new constructor.
+ (type, value, policyCode): New fields.
+ (_invoke): Handle "value" operation.
+ (getValue, getCode, destroy, toString, copy, equals, hashCode):
+ New methods.
+ * org/omg/CORBA/PolicyHelper.java (narrow): Removed check for
+ repository for repository id.
+
+2005-07-02 Audrius Meskauskas, <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/IdAssignmentPolicyValue.java,
+ org/omg/PortableServer/IdUniquenessPolicyValue.java,
+ org/omg/PortableServer/ImplicitActivationPolicyValue.java,
+ org/omg/PortableServer/LifespanPolicyValue.java,
+ org/omg/PortableServer/ServantRetentionPolicyValue.java,
+ org/omg/PortableServer/RequestProcessingPolicyValue.java:
+ Documentation update.
+
+2005-07-02 Mark Wielaard <mark@klomp.org>
+
+ * all files: Update for new FSF address.
+
+2005-07-01 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/undo/UndoManager.java: fixed API doc links,
+ * javax/swing/undo/UndoableEditSupport.java: likewise.
+
+2005-07-01 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/awt/RenderingHints.java: API doc updates.
+
+2005-07-01 Mark Wielaard <mark@klomp.org>
+
+ * doc/www.gnu.org/announce/20050630.wml: New file.
+ * doc/www.gnu.org/newsitems.txt: Add announcement.
+ * doc/www.gnu.org/downloads/downloads.wml: Add 0.16 download.
+
+2005-07-01 Roman Kennke <roman@kennke.org>
+
+ * gnu/classpath/ObjectPool.java:
+ Removed this class. Some simple benchmarks show that it
+ brings not much gain and actually decreases performance
+ speed-wise.
+
+2005-07-01 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/dom/DomNode.java,
+ gnu/xml/dom/html2/DomHTMLCollection.java,
+ gnu/xml/dom/html2/DomHTMLElement.java,
+ gnu/xml/dom/html2/DomHTMLTableElement.java,
+ gnu/xml/dom/html2/DomHTMLTableRowElement.java,
+ gnu/xml/dom/html2/DomHTMLTableSectionElement.java,
+ gnu/xml/transform/NodeNumberNode.java,
+ gnu/xml/transform/Stylesheet.java,
+ gnu/xml/transform/TemplateNode.java,
+ gnu/xml/xpath/NameTest.java,
+ gnu/xml/xpath/NamespaceTest.java: Corrections for cases where
+ elements/attributes might have been created in non-namespace-aware
+ mode.
+ * gnu/xml/transform/StreamSerializer.java: Only apply HTML attribute
+ reduction when attribute is defined as a boolean in the HTML DTD.
+ * gnu/xml/transform/TransformerImpl.java: Add support for output
+ indenting and cdata-section-elements output instruction.
+
+2005-07-01 Roman Kennke <roman@kennke.org>
+
+ * gnu/classpath/ObjectPool.java:
+ Introduced flag for turning on/off caching.
+ (getInstance): Synchronized access to this method.
+ (borrowObject): Synchronized access to the pool.
+ Added some benchmarking statements.
+ (returnObject): Synchronized access to the pool.
+ Added some benchmarking statements.
+ (createObject): Synchronized access to the pool.
+ Added some benchmarking statements.
+ (printStats): New method. Prints out some stats about the pool usage.
+
+2005-07-01 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/table/JTableHeader.java: added some API docs,
+ * javax/swing/table/TableModel.java: fixed link in API docs,
+ * javax/swing/table/package.html: added package description.
+
+2005-07-01 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/ListUI.java
+ (locationToIndex): match parameter name to API docs.
+
+2005-07-01 Roman Kennke <roman@kennke.org>
+
+ * gnu/classpath/ObjectPool.java:
+ Made singleton instance static. Otherwise this class would not
+ be of much use.
+ (getInstance): Made this method static.
+
+2005-07-01 Roman Kennke <roman@kennke.org>
+
+ * gnu/classpath/ObjectPool.java:
+ New class. This can and should be used to cache throwaway objects
+ like Rectangles, Points and Dimensions. Of course the use of
+ this class is not limited to this cases.
+
+2005-07-01 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JLayeredPane.java
+ (getLayer): Also search through the components parents to find
+ the one that is actually directly contained in the JLayeredPane.
+
+2005-07-01 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/awt/image/DataBuffer.java: fixed API doc typos;
+ * java/awt/image/DataBufferByte.java: added description to API docs;
+ * java/awt/image/DataBufferDouble.java: added description to API docs,
+ (setElem(int, int)): removed unnecessary cast;
+ (setElem(int, int, int)): likewise.
+ * java/awt/image/DataBufferFloat.java: added description to API docs;
+ (setElem(int, int)): removed unnecessary cast;
+ (setElem(int, int, int)): likewise.
+ * java/awt/image/DataBufferInt.java: added description to API docs;
+ * java/awt/image/DataBufferShort.java: likewise;
+ * java/awt/image/DataBufferUShort.java: likewise.
+
+2005-06-30 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicMenuBarUI.java
+ (installDefaults): Made JMenuBar opaque.
+ * javax/swing/plaf/basic/BasicOptionPaneUI.java
+ (installDefaults): Made JOptionPane opaque.
+ * javax/swing/plaf/basic/BasicPanelUI.java
+ (installUI): Also call installDefaults().
+ (installDefaults): New method. Made JPanel opaque.
+ * javax/swing/plaf/basic/BasicRootPaneUI.java
+ (installDefaults): Made JRootPane opaque.
+ * javax/swing/plaf/basic/BasicSeparatorUI.java
+ (installDefaults): Made JSeparator opaque.
+ * javax/swing/plaf/basic/BasicSpinnerUI.java
+ (installDefaults): Made JSpinner opaque.
+ * javax/swing/plaf/basic/BasicSplitPaneUI.java
+ (installDefaults): Made JSplitPane opaque.
+ * javax/swing/plaf/basic/BasicTabbedPaneUI.java
+ (installDefaults): Made JSplitPane opaque.
+
+2005-07-01 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (isNativeLookAndFeel): fixed return value,
+ * javax/swing/plaf/metal/MetalTheme.java
+ (getMenuDisabledForeground): fixed return value.
+
+2005-07-01 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/event/TableModelEvent.java:
+ (TableModelEvent(TableModel): set lastRowIndex to Integer.MAX_VALUE.
+
+2005-06-30 Aaron Luchko <aluchko@redhat.com>
+
+ * gnu/classpath/jdwp/util/JdwpString.java: New file.
+
+2005-06-30 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/dom/DomDocument.java: Add support for adopting nodes from
+ other implementations.
+ * gnu/xml/dom/DomNamedNodeMap.java: Fix for nodes created outside a
+ namespace context.
+ * gnu/xml/transform/AbstractNumberNode.java,
+ gnu/xml/transform/ApplyImportsNode.java,
+ gnu/xml/transform/ApplyTemplatesNode.java,
+ gnu/xml/transform/AttributeNode.java,
+ gnu/xml/transform/CallTemplateNode.java,
+ gnu/xml/transform/ChooseNode.java,
+ gnu/xml/transform/CommentNode.java,
+ gnu/xml/transform/CopyNode.java,
+ gnu/xml/transform/CopyOfNode.java,
+ gnu/xml/transform/ElementNode.java,
+ gnu/xml/transform/ForEachNode.java,
+ gnu/xml/transform/IfNode.java,
+ gnu/xml/transform/LiteralNode.java,
+ gnu/xml/transform/MessageNode.java,
+ gnu/xml/transform/NodeNumberNode.java,
+ gnu/xml/transform/NumberNode.java,
+ gnu/xml/transform/OtherwiseNode.java,
+ gnu/xml/transform/ParameterNode.java,
+ gnu/xml/transform/ProcessingInstructionNode.java,
+ gnu/xml/transform/StreamSerializer.java,
+ gnu/xml/transform/Stylesheet.java,
+ gnu/xml/transform/Template.java,
+ gnu/xml/transform/TemplateNode.java,
+ gnu/xml/transform/TextNode.java,
+ gnu/xml/transform/ValueOfNode.java,
+ gnu/xml/transform/WhenNode.java: Parsing and serialisation design
+ changes to minimise the number of virtual machine stack frames used.
+
+2005-06-30 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JTable.java:
+ (initializeLocalVars): Set dragEnabled to true by default to comply
+ with reference implementations.
+ (getSelectionModel): Don't return null if row selection is disabled,
+ still return selectionModel. This complies with reference
+ implemenations.
+ (changeSelection): New method.
+ * javax/swing/plaf/basic/BasicTableUI.java: Added a MouseMotionListener
+ so that MouseDragged events register properly.
+ (MouseInputHandler.updateSelection): Added boolean parameter for
+ Control being pressed and added functionality for this (multiple
+ selection).
+
+2005-06-30 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JComponent.java:
+ Removed all calls to repaint() and revalidate(). These are likely
+ causing infinite loops with the RepaintManager.
+
+2005-06-30 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicListUI.java
+ (damageLayout): Removed call to revalidate(). This caused an
+ infinite loop with the RepaintManager and is not necessary.
+
+2005-06-30 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicScrollBarUI.java:
+ Removed all calls to layoutContainer() in this file.
+ (installDefaults): Set this as LayoutManager for the JScrollBar.
+ This way the layoutContainer() method is called when it should be.
+
+2005-06-30 Mark Wielaard <mark@klomp.org>
+
+ * configure.ac: Set version to 0.16+cvs.
+
+2005-06-30 Mark Wielaard <mark@klomp.org>
+
+ * NEWS: Add 0.16 release date and new features.
+ * configure.ac: Set version to 0.16.
+
+2005-06-30 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/DefaultListSelectionModel.java:
+ (addSelectionInterval): Don't clear the selection state if JList's
+ selection mode is SINGLE_SELECTION_INTERVAL and index0 and index1
+ correspond to an interval adjacent to an already selected interval.
+ (removeSelectionInterval): Added check for a middle interval being
+ removed when selection mode is SINGLE_SELECTION_INTERVAL.
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (KeyHandler.keyPressed): Added check for scrolling past bottom of list.
+ (MouseHandler.mouseClicked): Added check for shift key being
+ pressed.
+
+2005-06-30 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/transport/JdwpPacket.java (write): New method.
+ (myWrite): New abstract method.
+ (toBytes): Remove.
+ (myToBytes): Remove.
+ * gnu/classpath/jdwp/transport/JdwpReplyPacket.java (myWrite): New
+ method.
+ * gnu/classpath/jdwp/transport/JdwpCommandPacket.java (myWrite): New
+ method.
+ * gnu/classpath/jdwp/transport/JdwpConnection.java (sendPacket): Use
+ JdwpPacket.write instead of JdwpPacket.toBytes.
+
+2005-06-30 Andrew John Hughes <gnu_andrew@member.fsf.org>
+
+ * gnu/java/locale/LocaleHelper.java:
+ Fixed to use new property files.
+
+2005-06-30 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/transport/JdwpConnection.java (sendEvent): New
+ method.
+ (_bytes): New member.
+ (_doStream): New member.
+ (JdwpConnection): Initialize new members.
+
+2005-06-30 Lillian Angel <langel@redhat.com>
+ * javax/swing/JTree.java:
+ (valueChanged): repaint everytime something is selected in the
+ tree.
+ (setSelectionModel): set TreeSelectionListeners
+ (isRowSelected): isRowSelected uses isPathSelected
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (setSelectionModel): works with JTree to set the selection model
+ (getPathForRow): took out unneeded lines
+ (mouseClicked): switched if statements, should check if already
+ selected first.
+ (paintLeaf): checked selection of Leaf and paint selected
+ differently than not selected cells
+ (paintNonLeaf): checked selection of nonLeaf and paint selected
+ differently than not selected cells
+ (paintRecursive): updated to work with other paint functions
+ * javax/swing/tree/DefaultTreeSelectionModel.java:
+ (addSelectionPath): fire change, so selection is registered to
+ listener
+ (addSelectionPaths): fire change, so selection is registered to
+ listener
+ (removeSelectionPath): fire change, so selection is registered
+ to listener
+ (removeSelectionPaths): fire change, so selection is registered
+ to listener
+ (isPathSelected): took out unneeded lines
+ (getTreeSelectionListeners): made more logical to call
+ getListeners
+ (fireValueChanged): fixed loop to be more logical
+
+2005-06-30 Mark Wielaard <mark@klomp.org>
+
+ * javax/swing/JEditorPane.java (getEditorKit): Call
+ createDefaultEditorKit() and setEditorKit() when editorKit == null.
+ * javax/swing/JTextPane.java: Call super for all methods where
+ possible.
+
+2005-06-29 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * INSTALL: Drop GTK requirement to 2.4.
+ * NEWS: Likewise.
+ * configure.ac: Likewise.
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c:
+ Re-add GTK 2.4 support.
+
+2005-06-29 Christian Thalinger <twisti@complang.tuwien.ac.at>
+
+ * native/fdlibm/Makefile.am: Added s_finite.c
+ * native/fdlibm/s_finite.c: Added
+
+2005-06-29 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/DefaultListSelectionModel.java:
+ (addSelectionInterval):
+ (clearSelection):
+ (removeSelectionInterval):
+ (setLeadSelectionIndex):
+ (setSelectionInterval): Check that the selection model actually
+ changes before calling fireValueChanged.
+
+2005-06-29 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ NEWS: Corrected note about CORBA status in 1.6 release.
+
+2005-06-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicLabelUI.java
+ (installDefaults): Do not set the border here.
+ (uninstallDefaults): Do not unset the border here.
+
+2005-06-29 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JComponent.java
+ (getComponentGraphics): Do not replicate the Graphics at this
+ point. This is moved into paintComponent.
+ (paintComponent): Replicate the Graphics object before going into
+ the tree. This makes sure that the state is preserved and is
+ what is specified in the JDKs API docs.
+
+2005-06-29 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java:
+ (BasicTreeUI): Initalization of listeners and instances.
+ (createUI): Implementation
+ (getHashColor): Implementation
+ (setLeftChildIndent): Implementation
+ (getLeftChildIndent): Implementation
+ (setRightChildIndent): Implementation
+ (getRightChildIndent): Implementation
+ (setExpandedIcon): Implementation
+ (getExpandedIcon): Implementation
+ (setCollapsedIcon): Implementation
+ (getCollapsedIcon): Implementation
+ (setLargeModel): Implementation
+ (isLargeModel): Implementation
+ (setRowHeight): Implementation
+ (getRowHeight): Implementation
+ (setCellRenderer): Implementation
+ (getCellRenderer): Implementation
+ (setModel): Implementation
+ (getModel): Implementation
+ (setRootVisible): Implementation
+ (isRootVisible): Implementation
+ (setShowsRootHandles): Implementation
+ (getShowsRootHandles): Implementation
+ (setCellEditor): Implementation
+ (getCellEditor): Implementation
+ (setEditable): Implementation
+ (isEditable): Implementation
+ (setSelectionModel): Implementation
+ (getSelectionModel): Implementation
+ (getPathForRow): Implementation
+ (getRowForPath): Implementation
+ (getRowCount): Implementation
+ (getClosestPathForLocation): Implementation
+ (createPropertyChangeListener): Implementation
+ (createMouseListener): Implementation
+ (createFocusListener): Implementation
+ (createKeyListener): Implementation
+ (createSelectionModelPropertyChangeListener): Implementation
+ (createTreeSelectionListener): Implementation
+ (createCellEditorListener): Implementation
+ (createComponentListener): Implementation
+ (createTreeExpansionListener): Implementation
+ (createLayoutCache): Implementation
+ (createCellRendererPane): Implementation
+ (createDefaultCellEditor): Implementation
+ (createDefaultCellRenderer): Implementation
+ (createTreeModelListener): Implementation
+ (uninstallListeners): Implementation
+ (getLastChildPath): Implementation
+ (configureLayoutCache): Implementation
+ (installDefaults): Implementation
+ (installListeners): Implementation
+ (installUI): Implementation
+ (uninstallDefaults): Implementation
+ (uninstallUI): Implementation
+ (paint): moderate changes, so painting works with new changes
+ (MouseInputHandler.mouseClicked): Implementation
+ (paintLeaf): made private
+ (paintNonLeaf): made private
+ (paintRecursive): made private
+ Several variables, instances and methods were adding according
+ to the API. The methods that were added and not in the list
+ above, have not been implemented yet. All JavaDoc is updated,
+ as well as formatting.
+ * javax/swing/JTree.java:
+ (createChildren): checked that children is not null.
+ * javax/swing/tree/AbstractLayoutCache.java:
+ (getNodeDimensions): slight modifications to return initialized
+ Rectangle when the bounds are null. Implementation not complete.
+ * javax/swing/tree/DefaultTreeSelectionModel.java:
+ (addSelectionPath): Implementation
+ (addSelectionPaths): Implementation
+ (removeSelectionPath): Implementation
+ (removeSelectionPaths): Implementation
+ (getSelectionPaths): returned the selection array
+ (clearSelection): set the selection array to null
+ * javax/swing/tree/FixedHeightLayoutCache.java:
+ (setModel): removed this method because it is defined in the
+ abstract parent.
+ (setRootVisible): removed this method because it is defined in
+ the abstract parent.
+ (setRowHeight): removed this method because it is defined in
+ the abstract parent.
+ Also, some formatting was updated.
+ * javax/swing/tree/VariableHeightLayoutCache.java:
+ (setRowHeight): removed this method because it is defined in
+ the abstract parent.
+ * javax/swing/tree/DefaultTreeModel.java:
+ (DefaultTreeModel): Needed to initialize root if it was passed
+ into the constructor as null.
+
+2005-06-29 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/event/TableModelEvent.java: updated API docs all over.
+
+2005-06-29 Roman Kennke <roman@kennke.org>
+
+ * gnu/java/awt/AWTUtilities.java
+ (VisibleComponentList): Added List implementation that iterates over
+ the child components of a Container and only returns Components
+ that are actually visible.
+ (getVisibleChildren): Now returns a List instead of an array. This
+ list is cached. This greatly decreases allocations in
+ LayoutManagers.
+ * javax/swing/BoxLayout.java:
+ Updated to use the new AWTUtilities.getVisibleChildren() method.
+
+2005-06-29 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/package.html: added package description,
+ * javax/swing/border/package.html: likewise,
+ * javax/swing/colorchooser/package.html: likewise,
+ * javax/swing/event/package.html: likewise,
+ * javax/swing/filechooser/package.html: likewise,
+ * javax/swing/plaf/package.html: likewise,
+ * javax/swing/plaf/basic/package.html: likewise,
+ * javax/swing/plaf/metal/package.html: likewise,
+ * javax/swing/tree/package.html: likewise,
+ * javax/swing/undo/package.html: likewise.
+
+2005-06-29 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/awt/Font.java: fixed API doc links.
+
+2005-06-28 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/awt/event/AWTEventListener.java: added imports to fix links
+ in API docs,
+ * java/awt/event/AWTEventListenerProxy.java: likewise,
+ * java/awt/event/InputMethodListener.java: likewise,
+ * java/awt/event/ItemListener.java: likewise,
+ * java/awt/event/MouseWheelEvent.java: likewise,
+ * java/awt/event/TextEvent.java: likewise,
+ * java/awt/event/WindowEvent.java: likewise,
+ * java/awt/event/WindowListener.java: likewise.
+
+2005-06-28 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CosNaming/BindingIterator.java: Inherit from
+ BindingIteratorOperations, added specnotes for 1.2 specific methods.
+ * org/omg/CosNaming/NamingContext.java: Inherit from
+ NamingContextOperations, added specnotes for 1.2 specific methods.
+ * org/omg/IOP/Encoding.java,
+ org/omg/IOP/TaggedComponent.java,
+ org/omg/IOP/TaggedProfile.java: Inherit from Serializable, added
+ SerialVersionUID.
+ org/omg/CosNaming/BindingIteratorOperations.java,
+ org/omg/Dynamic/Parameter.java: New files.
+
+2005-06-28 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * gnu/CORBA/gnuRequest.java (submit): If IOException is
+ thrown while opening a socket, rethrow MARSHAL.
+ * gnu/CORBA/NamingService/NamingServiceTransient.java (main):
+ Fixed regression due that the service started on the wrong port.
+
+2005-06-28 Mark Wielaard <mark@klomp.org>
+
+ From Christian Thalinger
+ * doc/www.gnu.org/stories.wml: Add CACAO description.
+
+2005-06-28 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/_IDLTypeStub.java: Added SerialVersionUID.
+ org/omg/CORBA/PolicyTypeHelper.java: New file.
+
+2005-06-28 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/table/AbstractTableModel.java: updated API docs,
+ * javax/swing/table/DefaultTableModel.java: fixed API docs.
+
+2005-06-28 Jeroen Frijters <jeroen@frijters.net>
+
+ * gnu/java/nio/DatagramChannelImpl.java
+ (getNativeFD): Removed.
+ * gnu/java/nio/DatagramChannelSelectionKey.java
+ (getNativeFD): Modified to extract the native fd via the
+ PlainDatagramSocketImpl.
+ * gnu/java/nio/ServerSocketChannelImpl.java
+ (getNativeFD): Removed.
+ * gnu/java/nio/ServerSocketChannelSelectionKey.java
+ (getNativeFD): Modified to extract the native fd via the
+ PlainSocketImpl.
+ * gnu/java/nio/SocketChannelImpl.java
+ (getNativeFD): Removed.
+ * gnu/java/nio/SocketChannelSelectionKey.java
+ (getNativeFD): Modified to extract the native fd via the
+ PlainSocketImpl.
+
+2005-06-28 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ NEWS: Added note about CORBA status in 1.6 release.
+
+2005-06-27 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ * gnu/java/awt/peer/gtk/GdkGraphics2D.java (constructors): Default to
+ a transparent background instead of black.
+ (drawImage): When drawing a raster, pass live data to avoid copying.
+ * gnu/java/awt/peer/gtk/GtkComponentPeer.java (createImage): Return
+ a BufferedImage when using Graphics2D.
+ * javax/swing/JComponent.java (getComponentGraphics): Avoid copying
+ Graphics2D instances.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_copyState): Copy the pixel
+ buffer and initialize a new cairo context in MODE_JAVA_ARRAY.
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_drawPixels): Revert
+ previous transformation patch.
+
+2005-06-27 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_copyState):
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState___3III):
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState__II):
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState__Lgnu_java_awt_peer_gtk_GtkComponentPeer_2):
+ Remove gdk_cairo_create calls.
+ Obtain dimension for the cairo surface.
+ (init_graphics2d_as_renderable): Fix cairo_xlib_surface_create
+ invocation by passing dimension.
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_drawPixels): Fix translation
+ matrix sign.
+ Use cairo_set_source for applying patterns.
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_gdkDrawDrawable): Fix
+ cairo_set_source_surface invocation by passing position instead of
+ dimension.
+ (Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState___3III):
+ (begin_drawing_operation):
+ (end_drawing_operation): In MODE_JAVA_ARRAY mode, only initialize the
+ cairo context once. Use GetPrimitiveArrayCritical for pinning down
+ pixel buffers and maintain a buffer copy if necessary.
+ * native/jni/gtk-peer/gtkcairopeer.h (javabuf_copy): New field.
+
+2005-06-27 Mark Wielaard <mark@klomp.org>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
+ (glog_func): New static function.
+ (Java_gnu_java_awt_peer_gtk_GtkToolkit_gtkInit): Install glog_func as
+ default log handler.
+ * native/jni/gtk-peer/Makefile.am (libgtkpeer_la_LIBADD): Add jcl.
+
+2005-06-27 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JComponent.java
+ (getPreferredSize): Don't let the UI replace a manually set preferred
+ size.
+
+2005-06-27 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/Box.java
+ (createGlue): Return Short.MAX_VALUE instead of Integer.MAX_VALUE as
+ dimension in the Filler component.
+ (createHorizontalGlue): Return a new Filler object with the correct
+ value instead of relying on createGlue(). The object returned by
+ createHorizontalGlue must not have a vertical dimension.
+
+2005-06-27 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/BoxLayout.java
+ (Direction): New inner interface. This abstracts the layout algorithm
+ from the layout direction.
+ (Horizontal): Implementation for the above interface for the
+ horizontal direction.
+ (Vertical): Implementation for the above interface for the
+ vertical direction.
+ (SizeReq): An inner helper class that holds size requirements for
+ Components that are laid out. This is similar but not equal to
+ the SizeRequirements class in javax.swing.
+ (layoutContainer): Removed the actual algorithm into a new method,
+ using the Direction interface.
+ (layoutAlgorithm): This is the new layout algorithm. This uses
+ the Direction interface, so that the algorithm is not duplicated
+ and can be expressed more readable.
+ (distributeSpace): A new helper method that distributes excess
+ space over a set of components. This is the actual 'worker' in
+ BoxLayout.
+
+2005-06-27 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ org/omg/DynamicAny/DynAnyPackage/InvalidValue.java,
+ org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java,
+ org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java,
+ org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java,
+ org/omg/DynamicAny/DynAnyPackage/package.html,
+ org/omg/IOP/ComponentIdHelper.java: New files.
+
+2005-06-27 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/POAPackage/ServantAlreadyActive.java,
+ org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java:
+ New files.
+
+2005-06-27 Tom Tromey <tromey@redhat.com>
+
+ * java/lang/Integer.java:
+ (valueOf(int)): Implemented.
+ (bitCount(int)): Implemented.
+ (rotateLeft(int,int)): Implemented.
+ (rotateRight(int,int)): Implemented.
+ (highestOneBit(int)): Implemented.
+ (numberOfLeadingZeros(int)): Implemented.
+ (lowestOneBit(int)): Implemented.
+ (numberOfTrailingZeros(int)): Implemented.
+ (signum(int)): Implmented.
+ (reverseBytes(int)): Implemented.
+ (reverse(int)): Implemented.
+
+2005-06-25 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java:
+ New file.
+
+2005-06-25 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/POAManagerPackage/AdapterInactive.java,
+ org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java,
+ org/omg/PortableServer/POAManagerPackage/State.java,
+ org/omg/PortableServer/POAManagerPackage/index.html: New files.
+
+2005-06-24 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/ColorUIResource.java: documented
+ IllegalArgumentExceptions in constructors;
+
+2005-06-24 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/table/AbstractTableModel.java:
+ (getColumnName): eliminated temp index to fix very minor bug,
+ (findColumn): throw NullPointerException for null argument,
+ (fireTableDataChanged): set correct row indices.
+ * javax/swing/table/DefaultTableModel.java:
+ (setDataVector): replace null argument with empty vector then call
+ setColumnIdentifiers() to set up column names,
+ (setColumnCount): call fireTableStructureChanged() rather than
+ fireTableDataChanged(),
+ (addColumn(Object, Object[])): call fireTableStructureChanged() rather
+ than fireTableDataChanged(),
+ (addRow(Vector)): fixed row indices in TableModelEvent,
+ (moveRow): fixed row indices in TableModelEvent,
+ (getColumnName): for a column index beyond the number of columns in
+ the model, pass control to the superclass.
+
+2005-06-24 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * java/awt/Container.java:
+ (LightweightDispatcher.acquireComponentForMouseEvent):
+ Use temp variable to set lastComponentEntered to null _before_
+ dispatching MOUSE_EXITED events to avoid infinite loop.
+ * javax/swing/plaf/basic/BasicPopupMenuUI.java:
+ (MouseInputHandler.acquireComponentForMouseEvent):
+ Use temp variable to set lastComponentEntered to null _before_
+ dispatching MOUSE_EXITED events to avoid infinite loop.
+
+2005-06-24 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JScrollPane.java
+ (JScrollPane): Add Viewport at index 0 rather than after the
+ JScrollBars. This complies with reference implementations.
+
+2005-05-14 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/aelfred2/XmlParser.java: ensure that charset parameter of
+ external MIME entity is trimmed.
+ * gnu/xml/dom/DomDocument.java: DomNsNodes retrieved via
+ createElement/createAttribute should not have localNames.
+
+2005-06-24 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java,
+ org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java,
+ org/omg/PortableServer/POAPackage/WrongPolicyHelper.java,
+ org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java,
+ org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java,
+ org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java,
+ org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java,
+ org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java,
+ org/omg/PortableServer/POAPackage/NoServantHelper.java,
+ org/omg/PortableServer/POAPackage/WrongAdapterHelper.java,
+ org/omg/PortableServer/POAPackage/AdapterNonExistent.java,
+ org/omg/PortableServer/POAPackage/InvalidPolicy.java,
+ org/omg/PortableServer/POAPackage/NoServant.java,
+ org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java,
+ org/omg/PortableServer/POAPackage/ObjectNotActive.java,
+ org/omg/PortableServer/POAPackage/ServantNotActive.java,
+ org/omg/PortableServer/POAPackage/WrongAdapter.java,
+ org/omg/PortableServer/POAPackage/WrongPolicy.java,
+ gnu/CORBA/Poa/InvalidPolicyHolder.java,
+ org/omg/PortableServer/POAPackage/package.html: New files.
+
+2005-06-24 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/IOP/CodecOperations.java,
+ org/omg/IOP/Codec.java,
+ org/omg/IOP/CodecFactory.java,
+ org/omg/IOP/CodecFactoryHelper.java,
+ org/omg/IOP/CodecFactoryOperations.java,
+ gnu/CORBA/cdrEncapsCodec.java,
+ gnu/CORBA/gnuCodecFactory.java: New files.
+ * gnu/CORBA/Functional_ORB.java (constructor):
+ Put "CodecFactory" into initial references.
+ * gnu/CORBA/holderFactory.java (createHolder):
+ Removed debug statement.
+
+2005-06-24 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java:
+ (GlassPaneDispatcher.acquireComponentForMouseEvent): Use
+ temp variable to set lastComponentEntered to null _before_
+ dispatching MOUSE_EXITED events, otherwise we get infinite
+ loop.
+
+2005-06-24 Roman Kennke <roman@kennke.org>
+
+ * gnu/java/awt/AWTUtilities.java:
+ Added new utility class. This provides a method for fetching
+ the visible children of a Container.
+ * javax/swing/BoxLayout.java:
+ Use AWTUtilities.getVisibleChildren() instead of
+ Container.getComponents(). LayoutManagers must not layout invisible
+ children.
+
+2005-06-24 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JTable.java
+ (constructor): Call setModel() instead of setting the model directly.
+ This makes sure that listeners and the columnModel are set up
+ correctly.
+ (initializeLocalVars): Set up tableHeader before the columnModel.
+ This way we already have a tableHeader when setColumnModel is called
+ and it can be updated accordingly.
+ (tableChanged): Update the columnModel when the table structure
+ changes.
+ (setColumnModel): Also set the columnModel of the tableHeader here.
+ This is specified in Sun's API documentation.
+ * javax/swing/table/DefaultTableModel.java
+ (setDataVector): Fire a structureChanged event, so that the
+ columnModel and header columnModel are updated correctly.
+
+2005-06-23 Sven de Marothy <sven@physto.se>
+
+ * gnu/java/awt/peer/gtk/GtkImage.java: Don't draw 0 size images.
+
+2005-06-23 Sven de Marothy <sven@physto.se>
+
+ * gnu/java/awt/peer/gtk/GtkImage.java: Add case source size > size.
+
+2005-06-23 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/LocalObject.java: New file.
+
+2005-06-22 Mark Wielaard <mark@klomp.org>
+
+ * gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
+ (pumpBytes): Throws IOException.
+ (pumpDone): New native method.
+ (produce): Call pumpDone().
+ * include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h: Regenerated.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c
+ (Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_pumpDone): New method.
+ (Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_pumpBytes): Check for
+ errors on gdk_pixbuf_loader_write.
+
+2005-06-22 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/IOP/ProfileIdHelper.java,
+ omg/IOP/MultipleComponentProfileHelper.java,
+ omg/IOP/MultipleComponentProfileHolder.java: New files.
+
+2005-06-22 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java:
+ (InternalFramePropertyChangeListener.vetoableChange):
+ Repaint the JDesktopPane when JInternalFrame is closed.
+ Also veto the close request, because hiding is not
+ closing.
+
+2005-06-22 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/SwingUtilities.java:
+ (layoutCompoundLabel): Added check for multi-line text.
+
+2005-06-22 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JDialog.java:
+ (setDefaultCloseOperation): Removed validity check for
+ operation code. Validity is handled in processWindowEvent.
+ * javax/swing/JFrame.java:
+ (setDefaultCloseOperation): Changed error message to be more
+ descriptive and similar to reference implementation.
+ * javax/swing/JInternalFrame.java:
+ (setDefaultCloseOperation): Removed validity check for
+ operation code.
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java:
+ (InternalFramePropertyListener): Added implementation of
+ VetoableChangeListener.
+ (InternalFramePropertyListener.vetoableChange): New method.
+ (InternalFramePropertyListener.propertyChange): Removed
+ check for JInternalFrame.IS_CLOSED_PROPERTY. This is now
+ handled in vetoableChange.
+ (getDesktopManager): Added a check for null pointer from
+ JInternalFrame.getDesktopPane().
+
+2005-06-22 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicLabelUI.java
+ (installDefaults): JLabels are not opaque by default.
+
+2005-06-22 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/GrayFilter.java
+ (constructor): Compute factor at initialization time.
+ (createDisabledImage): Initialize GrayFilter with correct arguments.
+ (filterRGB): Reworked filter method. This is now compliant with
+ the JDK behaviour.
+
+2005-06-22 Mark Wielaard <mark@klomp.org>
+
+ Fixes bug #13439
+ * javax/swing/JScrollPane.java (JScrollPane(Component,int,int)):
+ Set viewport, view and scrollLostener manually.
+
+2005-06-22 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/IOP/ServiceContextListHolder.java,
+ org/omg/IOP/ServiceContext.java
+ org/omg/IOP/ServiceContextHelper.java
+ org/omg/IOP/ServiceContextHolder.java
+ org/omg/IOP/ServiceContextListHelper.java
+ org/omg/IOP/ServiceIdHelper.java: New files.
+
+2005-06-21 Lillian Angel <langel@redhat.com>
+
+ * java/util/logging/Logger.java
+ (setParent): No lines after throwing an exception are executed
+ and there is no point to check if the parent is null, because a
+ NullPointerException would have been thrown earlier. Fixes Bug
+ #13460.
+
+2005-06-21 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/IOP/Encoding.java,
+ org/omg/IOP/IOR.java,
+ org/omg/IOP/IORHelper.java,
+ org/omg/IOP/IORHolder.java,
+ org/omg/IOP/TaggedProfileHolder.java,
+ org/omg/IOP/TaggedProfile.java,
+ org/omg/IOP/TaggedProfileHelper.java,
+ org/omg/IOP/TaggedComponentHolder.java,
+ org/omg/IOP/TaggedComponent.java,
+ org/omg/IOP/TaggedComponentHelper.java: New files.
+
+2005-06-21 Lillian Angel <langel@redhat.com>
+
+ * gnu/xml/aelfred2/XmlParser
+ (parseAttribute): if (type.equals("CDATA") || type == null)
+ this would always throw a NullPointerException if type is null.
+
+2005-06-21 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * gnu/CORBA/Functional_ORB.java (Port): Documentation
+ update. (setPort): Made static, documentation update.
+ (getPort): Removed.
+ * gnu/CORBA/generalTypeCode.java (UNSET): Changed value.
+ * gnu/CORBA/NamingService/NamingServiceTransient.java (main):
+ Removed call to init.
+
+2005-06-21 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/CurrentHelper.java,
+ org/omg/CORBA/CurrentHolder.java: New files.
+
+2005-06-21 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/Current.java,
+ org/omg/CORBA/CurrentOperations.java: Documentation update.
+
+2005-06-20 Mark Wielaard <mark@klomp.org>
+
+ * javax/swing/DefaultDesktopManager.java (getBoundsForIconOf):
+ Initialize desktopPane before use.
+
+2005-06-20 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * javax/swing/text/html/HTML.java: Added public parameterless
+ constructor for Tag.
+
+2005-06-20 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/PolicyListHolder.java,
+ org/omg/CORBA/PolicyListHelper.java: New files.
+
+2005-06-20 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/DefaultDesktopManager.java
+ (getBoundsForIconOf): No reason to check if desktopPane is null
+ after dereferencing desktopPane in code. Fixes bug #13461.
+
+2005-06-20 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/JScrollPane.java
+ (JScrollPane): Viewport was not being set when
+ the view was null. Whenever a view would be added to container
+ it would not appear. This was changed to use setViewportView.
+
+2005-06-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/AbstractButton.java:
+ * javax/swing/AbstractCellEditor.java:
+ * javax/swing/Action.java:
+ * javax/swing/BorderFactory.java:
+ * javax/swing/ButtonGroup.java:
+ * javax/swing/CellRendererPane.java:
+ * javax/swing/DebugGraphics.java:
+ * javax/swing/DefaultBoundedRangeModel.java:
+ * javax/swing/DefaultButtonModel.java:
+ * javax/swing/DefaultCellEditor.java:
+ * javax/swing/DefaultComboBoxModel.java:
+ * javax/swing/DefaultDesktopManager.java:
+ * javax/swing/DefaultFocusManager.java:
+ * javax/swing/DefaultListCellRenderer.java:
+ * javax/swing/DefaultListModel.java:
+ * javax/swing/DefaultListSelectionModel.java:
+ * javax/swing/FocusManager.java:
+ * javax/swing/GrayFilter.java:
+ * javax/swing/ImageIcon.java:
+ * javax/swing/JButton.java:
+ * javax/swing/JCheckBoxMenuItem.java:
+ * javax/swing/JColorChooser.java:
+ * javax/swing/JComboBox.java:
+ * javax/swing/JComponent.java:
+ * javax/swing/JDesktopPane.java:
+ Reformatted these sourcefiles to better match our coding style.
+
+2005-06-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JComponent.java
+ (getPreferredSize): Make sure that preferredSize is greater than
+ minimumSize.
+ (setMinimumSize): Removed hack to adjust preferredSize. This is moved
+ into the method getPreferredSize().
+
+2005-06-20 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JComponent.java
+ (setOpaque): Don't revalidate and repaint when the opaque property
+ is changed (at least not here).
+
+2005-06-20 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * javax/swing/text/html/HTMLEditorKit.java:
+ Inherit from StyledEditorKit, Cloneable, Serializable and adding
+ string constants.
+ (handleStartTag): Fixed typo in comment.
+
+2005-06-20 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/PolicyHelper.java,
+ org/omg/CORBA/PolicyHolder.java,
+ org/omg/CORBA/_PolicyStub.java,
+ gnu/CORBA/_PolicyImplBase.java: New files.
+
+2005-06-19 Mark Wielaard <mark@klomp.org>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
+ (gnu_java_awt_peer_gtk_GtkImage_getPixbuf,
+ gnu_java_awt_peer_gtk_GtkImage_getPixmap,
+ gnu_java_awt_peer_gtk_GtkImage_isOffScreen): Move declaration to ...
+ * native/jni/gtk-peer/gtkpeer.h: here.
+
+2005-06-18 Chris Burdess <dog@bluezoo.org>
+
+ * java/util/logging/LogManager.java: Set default level of root
+ logger to INFO.
+
+2005-06-18 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/IOP/TransactionService.java,
+ org/omg/IOP/CodeSets.java: New files.
+
2005-06-17 Jeroen Frijters <jeroen@frijters.net>
* java/lang/ThreadLocal.java,
java/util/TreeMap.java: Fixes to make compiling with Eclipse Java
Compiler SVN HEAD possible.
+2005-06-17 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java,
+ org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java,
+ org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java,
+ org/omg/PortableServer/LIFESPAN_POLICY_ID.java,
+ org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java,
+ org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java,
+ org/omg/PortableServer/THREAD_POLICY_ID.java,
+ org/omg/IOP/ENCODING_CDR_ENCAPS.java,
+ org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java,
+ org/omg/IOP/TAG_CODE_SETS.java,
+ org/omg/IOP/TAG_INTERNET_IOP.java,
+ org/omg/IOP/TAG_JAVA_CODEBASE.java,
+ org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java,
+ org/omg/IOP/TAG_ORB_TYPE.java,
+ org/omg/IOP/TAG_POLICIES.java,
+ org/omg/PortableInterceptor/LOCATION_FORWARD.java,
+ org/omg/PortableInterceptor/SUCCESSFUL.java,
+ org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java,
+ org/omg/PortableInterceptor/TRANSPORT_RETRY.java,
+ org/omg/PortableInterceptor/USER_EXCEPTION.java: New files.
+
+2005-06-17 Tom Tromey <tromey@redhat.com>
+
+ * lib/Makefile.am (JAVAC): Use JIKESENCODING.
+ * m4/acinclude.m4 (CLASSPATH_CHECK_JIKES): Check for -encoding
+ option to jikes.
+ (JIKESENCODING): New subst.
+
+2005-06-17 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/exception/VmDeadException.java: New file.
+ * gnu/classpath/jdwp/exception/NotImplementedException.java: New file.
+ * gnu/classpath/jdwp/exception/JdwpInternalErrorException.java: New
+ file.
+ * gnu/classpath/jdwp/exception/JdwpException.java: New file.
+ * gnu/classpath/jdwp/exception/InvalidThreadGroupException.java: New
+ file.
+ * gnu/classpath/jdwp/exception/InvalidThreadException.java: New file.
+ * gnu/classpath/jdwp/exception/InvalidStringException.java: New file
+ * gnu/classpath/jdwp/exception/InvalidObjectException.java: New file.
+ * gnu/classpath/jdwp/exception/InvalidEventTypeException.java: New
+ file.
+ * gnu/classpath/jdwp/exception/InvalidCountException.java: New file.
+ * gnu/classpath/jdwp/exception/InvalidClassException.java: New file.
+
+2005-06-17 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/JApplet.java,
+ javax/swing/JDialog.java,
+ javax/swing/JFrame.java,
+ javax/swing/JInternalFrame.java,
+ javax/swing/JWindow.java: Added support for adding and setting
+ layout managers directly for these top-level containers tocomply
+ with J2SE 5.0. Added private boolean initStageDone.
+ Initialized rootPaneCheckingEnabled to false.
+ (JDialog.dialogInit): Set initStageDone to true.
+ (JApplet.JApplet): Set initStageDone to true.
+ (JFrame.frameInit) : Set initStageDone to true.
+ (JInternalFrame.JInternalFrame): Set initStageDone to true.
+ (JWindow.windowInit): Set initStageDone to true.
+ (addImpl): Added check for direct adds (J2SE 5.0) and directed
+ them to getContentPane().add.
+ (setLayout): Added check for direct calls to setLayout.
+ (remove): Added check for direct calls to remove.
+
+2005-06-17 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/ToolTipManager.java
+ (mousePressed): Check if currentComponent is null.
+ If so, it should be equal to the current source.
+ Fixes Bug #11538.
+
+2005-06-17 Anthony Balkissoon <abalkiss@redhat.com>
+
+ * javax/swing/DefaultListSelectionModel.java:
+ (addSelectionInterval): Added update to leadSelectionIndex
+ and anchorSelectionIndex variables.
+ (removeSelectionInterval): Same as above.
+ (setSelectionInterval): Same as above.
+ * javax/swing/JList.java:
+ (getSelectedIndices): Increased for loop upper bound by 1.
+ * javax/swing/plaf/basic/BasicListUI.java:
+ (KeyHandler): New class.
+ (MouseInputHandler): Moved code from MousePressed to
+ MouseClicked.
+ (MouseInputHandler.MouseClicked): Added check for control
+ key being down.
+
+2005-06-17 Roman Kennke <roman@kennke.org>
+
+ * java/io/DataInputStream.java:
+ Reverted my patch from 2005-06-15.
+
+2005-06-16 Robert Schuster <thebohemian@gmx.net>
+
+ * gnu/java/nio/charset/Windows1250.java,
+ gnu/java/nio/charset/Windows1251.java,
+ gnu/java/nio/charset/Windows1252.java,
+ gnu/java/nio/charset/Windows1253.java,
+ gnu/java/nio/charset/Windows1254.java,
+ gnu/java/nio/charset/Windows1255.java,
+ gnu/java/nio/charset/Windows1256.java,
+ gnu/java/nio/charset/Windows1257.java,
+ gnu/java/nio/charset/Windows1258.java: Fixed canonical NIO
+ charset name.
+
+2005-06-16 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * gnu/CORBA/CDR/uncObjectOutputStream.java,
+ gnu/CORBA/CDR/uncObjectInputStream.java: Deleted.
+
+2005-06-16 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CosNaming/NamingContextPackage/CannotProceed.java,
+ org/omg/CosNaming/NamingContextPackage/NotEmpty.java,
+ org/omg/CosNaming/NamingContextPackage/NotFound.java:
+ Added 1.4 constructors.
+ * org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java:
+ Added 1.4 constructors and serialVersionUID.
+
+2005-06-16 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/ProtableServer/IdAssignmentPolicyValue.java,
+ org/omg/ProtableServer/IdUniquenessPolicyValue.java,
+ org/omg/ProtableServer/ImplicitActivationPolicyValue.java,
+ org/omg/ProtableServer/LifespanPolicyValue.java,
+ org/omg/ProtableServer/RequestProcessingPolicyValue.java,
+ org/omg/ProtableServer/ServantRetentionPolicyValue.java:
+ New files.
+
+2005-06-16 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java,
+ org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java,
+ org/omg/IOP/CodecPackage/FormatMismatch.java,
+ org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java,
+ org/omg/IOP/CodecPackage/TypeMismatch.java,
+ org/omg/IOP/CodecPackage/TypeMismatchHelper.java,
+ org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java,
+ org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java,
+ org/omg/PortableServer/CurrentPackage/NoContext.java: New exceptions.
+ org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java,
+ org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java,
+ org/omg/IOP/CodecPackage/FormatMismatchHelper.java,
+ org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java,
+ org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java,
+ org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java,
+ org/omg/PortableServer/CurrentPackage/NoContextHelper.java: New helpers.
+ * gnu/CORBA/ObjectCreator.java (readUserException):
+ Renamed misleading variable.
+ * gnu/CORBA/DuplicateNameHolder.java,
+ gnu/CORBA/EmptyExceptionHolder.java: New holders.
+
+2005-06-15 Goffredo Baroncelli <kreijack@inwind.it>
+
+ * gnu/java/net/protocol/http/HTTPURLConnection.java
+ (getHeaderFieldKey): Check index.
+
+2005-06-15 Roman Kennke <roman@kennke.org>
+
+ * java/io/DataInputStream.java
+ (readLine): Added checks for InputStream that support have a pos field
+ for repositioning the stream.
+
+2005-06-15 Mark Wielaard <mark@klomp.org>
+
+ * lib/gen-classlist.sh.in: Remove vm.omit, vm.add and tmp.omit files
+ after use.
+
+2005-06-15 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/Messaging/SyncScopeHelper.java (write): Made public.
+
+2005-06-14 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/id/JdwpIdFactory.java: New file.
+ * gnu/classpath/jdwp/processor/PacketProcessor.java: New file.
+
+2005-06-14 Tom Tromey <tromey@redhat.com>
+
+ * lib/gen-classlist.sh.in (vm_dirlist): Prune non-existing
+ directories.
+ * lib/Makefile.am (genclasses): Pass top_srcdir to
+ gen-classlist.sh.
+ * m4/acinclude.m4: Quote default value of vm_classes.
+
+2005-06-14 Mark Wielaard <mark@klomp.org>
+
+ * javax/swing/JComponent.java (setMinimumSize): Only adjust
+ prefferedSize or maximumSize when they are set.
+ * javax/swing/JScrollPane.java (JScrollPane(Component,int,int)):
+ Set viewport and view manually.
+
+2005-06-14 Tom Tromey <tromey@redhat.com>
+
+ * m4/acinclude.m4 (--with-vm-classes): New option.
+ * lib/gen-classlist.sh.in: Handle 'vm_classes' feature.
+ * lib/Makefile.am (compile_classpath): Updated for new
+ classpath-setting approach.
+ (noinst_DATA): Now unconditional.
+
+2005-06-14 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ * gnu/java/awt/peer/gtk/GdkGraphics2D.java (updateBufferedImage):
+ Fixed pixelBuffer array index.
+
+2005-06-14 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ Classpath bug #13353:
+ * gnu/java/net/protocol/jar/Handler.java (parseURL, toExternalForm):
+ Append fragments (#ref) to URLs.
+
+2005-06-14 Mark Wielaard <mark@klomp.org>
+
+ * javax/swing/text/InternationalFormatter.java (clone): Disabled.
+
+2005-06-14 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/text/DecimalFormat.java
+ (DecimalFormat(String, DecimalFormatSymbols)): store clone of symbols;
+ (equals): add missing checks;
+ (getDecimalFormatSymbols): return clone of symbols;
+ (setDecimalFormatSymbols): store clone of symbols.
+
+2005-06-14 Mark Wielaard <mark@klomp.org>
+
+ * lib/standard.omit: Add gnu/classpath/jdwp.
+
+2005-06-13 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/id/ArrayId.java: New file.
+ * gnu/classpath/jdwp/id/ArrayReferenceTypeId.java: New file.
+ * gnu/classpath/jdwp/id/ClassLoaderId.java: New file.
+ * gnu/classpath/jdwp/id/ClassObjectId.java: New file.
+ * gnu/classpath/jdwp/id/ClassReferenceTypeId.java: New file.
+ * gnu/classpath/jdwp/id/InterfaceReferenceTypeId.java: New file.
+ * gnu/classpath/jdwp/id/JdwpId.java: New file.
+ * gnu/classpath/jdwp/id/ObjectId.java: New file.
+ * gnu/classpath/jdwp/id/ReferenceTypeId.java: New file.
+ * gnu/classpath/jdwp/id/StringId.java: New file.
+ * gnu/classpath/jdwp/id/ThreadGroupId.java: New file.
+ * gnu/classpath/jdwp/id/ThreadId.java: New file.
+ * gnu/classpath/jdwp/util/Signature.java: New file.
+ * gnu/classpath/jdwp/transport/JdwpConnection.java: New file.
+ * gnu/classpath/jdwp/transport/ITransport.java: New file.
+ * gnu/classpath/jdwp/transport/SocketTransport.java: New file.
+ * gnu/classpath/jdwp/transport/TransportFactory.java: New file.
+ * gnu/classpath/jdwp/transport/TransportException.java: New file.
+ * gnu/classpath/jdwp/transport/JdwpPacket.java: New file.
+ * gnu/classpath/jdwp/transport/JdwpCommandPacket.java: New file.
+ * gnu/classpath/jdwp/transport/JdwpReplyPacket.java: New file.
+
+2005-06-13 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ * java/awt/image/SampleModel.java (getPixels): Fixed array
+ assignment.
+
+2005-06-13 Keith Seitz <keiths@redhat.com>
+
+ * lib/Makefile.am (metafiles): Exclude directories and CVS files.
+
+2005-06-13 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ * java/text/AttributedStringIterator.java (getRunLimit): Fixed the
+ range of the returned indexes.
+
+2005-06-13 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/metal/MetalUtils.java:
+ Added new package-private helper class.
+ * javax/swing/plaf/metal/MetalSplitPaneDivider.java:
+ Added new package-private class. This is the divider used
+ by JSplitPane.
+ * javax/swing/plaf/metal/MetalScrollBarUI.java
+ (paintThumb): Use new MetalUtils class for drawing the typical
+ Metal pattern on the thumb.
+ * javax/swing/plaf/metal/MetalScrollBarUI.java
+ (initComponentDefaults): Added color defaults for SplitPane.
+ * javax/swing/plaf/metal/MetalSplitPaneUI.java:
+ (createDefaultDivider): Implemented new method. This creates
+ the Metal divider for JSplitPane.
+
+2005-06-13 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JSpinner.java
+ (StubEditor): Removed this inner class.
+ (DefaultEditor): Implemented this class and its dummy methods.
+ (DateEditor): Added and implemented this inner class.
+
+2005-06-13 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JFormattedTextField.java
+ (setValue): Creates an AbstractFormatter instance based on the type
+ of the value beeing set.
+ (createFormatter): New helper method.
+
+2005-06-13 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/SendingContext/Runtime.java: Deleted.
+ * org/omg/SendingContext/RunTime.java: Added.
+
+2005-06-13 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/DateFormatter.java:
+ Implemented new class.
+ * javax/swing/JFormattedTextField.java
+ (setValue): Added conversion from value to text.
+
+2005-06-12 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ * java/text/MessageFormat.java (parse): When parsing strings, check
+ for an empty pattern trailer.
+
+2005-06-12 Ziga Mahkovec <ziga.mahkovec@klika.si>
+
+ PR libgcj/20435:
+ * gnu/regexp/RESyntax.java (RE_POSSESSIVE_OPS): New field.
+ (static): Add possessive matching to JAVA_1_4 syntax.
+ * gnu/regexp/RETokenRepeated.java (possessive): New field.
+ (makePossessive, isPossessive): New methods.
+ (match): Don't back off during possessive matching.
+ * gnu/regexp/RE.java (initalize): Accept possessive quantifier.
+ * java/util/regex/Pattern.java (constructor): Switch syntax from PERL5
+ to JAVA_1_4.
+
2005-06-11 Andrew John Hughes <gnu_andrew@member.fsf.org>
* doc/unicode/Blocks-4.0.0.txt:
@@ -19,6 +4317,80 @@
* scripts/unicode-blocks.pl
Updated to handle Unicode 4.0.0.
+2005-06-11 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/ORB.java,
+ org/omg/CORBA/CustomValue.java,
+ org/omg/CORBA/VM_ABSTRACT.java,
+ org/omg/CORBA/VM_CUSTOM.java,
+ org/omg/CORBA/VM_NONE.java,
+ org/omg/CORBA/VM_TRUNCATABLE.java,
+ org/omg/CORBA/VM_TRUNCATABLE.java,
+ org/omg/CORBA/portable/ValueBase.java,
+ org/omg/CORBA_2_3/portable/package.html: Documentation update.
+ * org/omg/CORBA_2_3/package.html: New file.
+
+2005-06-11 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/portable/StreamableValue.java,
+ org/omg/CORBA/portable/CustomValue.java,
+ gnu/CORBA/CDR/Vio.java: New files.
+ * org/omg/CORBA/ValueBaseHelper.java: Using gnu.CORBA.Vio.
+ * org/omg/CORBA_2_3/portable/OutputStream.java: Documentatin update.
+ (write_value): Using gnu.CORBA.Vio.
+ * org/omg/CORBA_2_3/portable/InputStream.java Documentation update.
+ (read_value): Using gnu.CORBA.Vio.
+ * gnu/CORBA/ObjectCreator.java (Idl2class, Idl2Object): New methods.
+ (toIDL): Do not insert OMG prefix.
+ * gnu/CORBA/Restricted_ORB.java (create_any): Set ORB for that Any.
+ (register_value_factory, unregister_value_factory, lookup_value_factory):
+ New CORBA 2_3 methods.
+ * gnu/CORBA/gnuAny.java (extract_Value): Use reflection if holder does
+ not implement ValueBaseHolder.
+ * gnu/CORBA/CDR/cdrInput.java: Implementing 2_3 stream and
+ DataInputStream, (read_Value, read_Abstract, read_char_array,
+ read_wchar_array, ensureArray, read_ulong_array, read_long_array,
+ read_float_array, read_double_array, read_short_array, read_ushort_array,
+ read_octet_array, read_longlong_array, read_ulonglong_array,
+ read_boolean_array, read_any_array, _truncatable_ids): New methods.
+ * gnu/CORBA/CDR/cdrOutput.java: Implementing 2_3 stream
+ and DataOutputStream, (write_any_array, _truncatable_ids, write_Abstract,
+ write_Value): New methods.
+ * org/omg/CORBA/portable/ValueBase.java: Documentation update.
+
+2005-06-10 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/InternationalFormatter.java:
+ Implemented new class.
+
+2005-06-10 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicSplitPaneUI.java
+ (BasicHorizontalLayoutManager.preferredLayoutSize): fixed return
+ statement.
+ (BasicVerticalLayoutManager.preferredLayoutSize): Likewise.
+
+2005-06-10 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JTextArea.java
+ (getPreferredSize): Implemented new method. This is overridden
+ in order to support custom set rows and columns.
+
+2005-06-10 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/SendingContext/package.html,
+ org/omg/CORBA/SendingContext/Runtime.java,
+ org/omg/CORBA/SendingContext/RuntimeOperations.java: Removed.
+ * org/omg/SendingContext/package.html,
+ org/omg/SendingContext/Runtime.java,
+ org/omg/SendingContext/RuntimeOperations.java: Added.
+
+2005-06-10 Sven de Marothy <sven@physto.se>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
+ (gdkDrawDrawable): Check if cairo pattern is non-null before
+ setting its matrix.
+
2005-06-09 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/lang/Class.java:
@@ -85,6 +4457,258 @@
(toString()): Changed StringBuffer to StringBuilder.
(invoke(Object,...)): Updated arguments.
+2005-06-09 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkPanelPeer.java,
+ gnu_java_awt_peer_gtk_GtkPanelPeer.c (connectSignals): New method.
+ * include/gnu_java_awt_peer_gtk_GtkPanelPeer.h: Regenerate.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
+ (window_focus_in_cb, window_focus_out_cb): Remove FIXMEs.
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
+ (copyState): Check if cairo pattern is null before copying it.
+ (drawPixels): Check if cairo pattern is null before retrieving it.
+
+ * java/awt/MenuItem.java (label): Initialize to empty string.
+
+2005-06-08 Bryce McKinlay <mckinlay@redhat.com>
+
+ * java/rmi/server/RMIClassLoader.java (getClassLoader): Make public.
+ From Gary Benson.
+
+2005-06-08 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GdkGraphics2D.java (cairoSetRGBColor,
+ cairoSetAlpha): Combine ...
+ (cairoSetRGBAColor): New method.
+ * include/gnu_java_awt_peer_gtk_GdkGraphics2D.h: Regenerate.
+ * include/gnu_java_awt_peer_gtk_GtkImage.h: Regenerate.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: Use
+ Cairo 0.5.0 APIs.
+ * INSTALL: Document Cairo 0.5.0 requirement.
+ * NEWS: Likewise.
+ * configure.ac: Require Cairo 0.5.0.
+
+2005-06-08 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/awt/image/BandedSampleModel.java
+ (createBankArray): New method.
+ (BandedSampleModel(int, int, int, int)): reimplemented.
+ (BandedSampleModel(int, int, int, int, int[], int[]):
+ RasterFormatException nearer to start of constructor.
+ (getPixel): Use band index, not zero.
+ (getPixels): Fixed loop indices.
+ (getSamples): Fixed loop indices.
+ (setDataElements): Use band index, not zero.
+
+2005-06-08 Audrius Meskauskas <AudriusA@Bioinformatics.org>.
+
+ * org/omg/CORBA/CustomValue.java,
+ org/omg/CORBA/CustomMarshal.java,
+ org/omg/CORBA/DataOutputStream.java,
+ org/omg/CORBA/DataInputStream.java: New classes.
+
+2005-06-08 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/DefaultFormatter.java
+ (FormatterDocumentFilter.remove): Added check for valid input.
+ (FormatterDocumentFilter.insertString): Added check for valid input.
+ Added support for overwriteMode property.
+ (FormatterDocumentFilter.replace): Added check for valid input.
+ (checkValidInput): New helper method to check for valid input
+ and roll it back if necessary.
+
+2005-06-08 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JFormattedTextField.java
+ (getActions): Call super.getActions instead of throwing an exception.
+ This is safe here.
+ (processFocusEvent): Likewise.
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (createKeymap): Construct new bindings array if UIDefaults does return
+ a null object for this.
+
+2005-06-08 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicSplitPaneUI.java
+ (installDefaults): Call resetLayoutManager() _after_ the divider
+ is created to prevent NPE.
+ (paint): Removed check for valid divider location. This is done
+ in resetComponentAt(index).
+ (resetLayoutManager): Call layout.updateComponents _after_ the
+ layout has been installed. Otherwise it has no effect.
+
+2005-06-08 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JComponent.java
+ (setMinimumSize): Adjust preferredSize and maximumSize when
+ minimumSize is greater than preferred or maximumSize.
+
+2005-06-08 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/DefaultEditorKit.java:
+ Added some API documentation.
+
+2005-06-08 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/DefaultEditorKit.java
+ (DefaultKeyTypedAction.actionPerformed): This action
+ has to filter control characters here.
+ (InsertBreakAction.actionPerformed): This action inserts
+ a newline character here.
+
+2005-06-08 Audrius Meskauskas <AudriusA@Bioinformatics.org>.
+
+ * org/omg/CORBA/UnionMemberHelper.java,
+ org/omg/CORBA/ValueMemberHelper.java,
+ org/omg/CORBA/StructMemberHelper.java,
+ org/omg/CORBA/IDLTypeHelper.java,
+ org/omg/CORBA/_IDLTypeStub.java: New files.
+ * gnu/CORBA/IOR.java (write_null, _read_no_endian),
+ gnu/CORBA/CDR/cdrInput.java (read_Object),
+ gnu/CORBA/CDR/cdrOutput.java (write_Object):
+ Implemented sending of java null.
+
+2005-06-07 Audrius Meskauskas <AudriusA@Bioinformatics.org>.
+
+ * doc/www.gnu.org/home.wml: Added "omg.org"
+
+2005-06-07 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * gnu/CORBA/IOR_Delegate.java (release),
+ gnu/CORBA/IOR_contructed_object.java (finalize):
+ Close the associated socket if the finalizer is called.
+ gnu/CORBA/gnuRequest.java (submit),
+ gnu/CORBA/Functional_ORB.java (serveStep): Try to reuse the opened sockets.
+ * gnu/CORBA/SocketRepository.java,
+ gnu/CORBA/GIOP/CloseMessage.java: New files.
+
+2005-06-06 Sven de Marothy <sven@physto.se>
+
+ * javax/swing/JLabel.java
+ (JLabel): Horizontal justification changed to default to LEADING.
+
+2005-06-06 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/text/DefaultFormatter.java:
+ Implemented new class.
+
+2005-06-06 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/CompletionStatusHelper.java (type): New method.
+ * org/omg/CORBA/Current.java: Inherit from org.omg.portable.IDLEntity.
+
+2005-06-06 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/StringValueHelper.java,
+ org/omg/CORBA/WStringValueHelper.java: New helpers.
+ * org/omg/CORBA/portable/BoxedValueHelper.java: Documentation update.
+
+2005-06-06 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JFrame.java:
+ Added the two missing constructors that take
+ java.awt.GraphicsConfiguration objects as arguments.
+
+2005-06-06 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/JTree.java
+ (removeDescendantSelectedPaths): Implemented new method.
+
+2005-06-06 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicButtonListener.java
+ (focusLost): Don't unarm button on focus lost. This behaviour is
+ not documented anywhere and disturbs correct event processing
+ in buttons.
+
+2005-06-06 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (getKeymapName): Removed debug statement.
+
+2005-06-06 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (getKeymapName): Added API documentation comments.
+
+2005-06-06 Roman Kennke <roman@kennke.org>
+
+ * javax/swing/plaf/basic/BasicTextUI.java
+ (getKeymapName): Reimplemented to return the classname of
+ itself. This way subclasses don't have to override this
+ method.
+
+2005-06-06 Sven de Marothy <sven@physto.se>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
+ (gtkWidgetSetForeground): Avoid setting black-on-black selection color.
+
+2005-06-05 Tom Tromey <tromey@redhat.com>
+
+ * java/lang/Class.java (resourcePath): Reindented.
+
+2005-06-05 Tom Tromey <tromey@redhat.com>
+
+ * scripts/generate-locale-list.sh: Remove redundant 'cd'.
+
+2005-06-06 Sven de Marothy <sven@physto.se>
+
+ * gnu/java/awt/peer/gtk/GtkImage.java
+ (getSource, deliver): Added null checks.
+ * java/awt/image/RGBImageFilter.java
+ (filterRGBPixels): Reimplement.
+
+2005-06-05 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/CORBA/VisibilityHelper.java: New helper.
+
+2005-06-05 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org/omg/stub/java/rmi/_Remote_Stub.java:
+ Inheriting from Stub, Remote and Serializable.
+
+2005-06-05 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * org\omg\CORBA\portable\ValueFactory.java (read_value): Changed
+ parameter type to org.omg.CORBA_2_3.portable.InputStream.
+ * org\omg\CosNaming\_BindingIteratorStub.java,
+ * org\omg\CosNaming\_NamingContextStub.java: Fixed serialVersionUID.
+ * org\omg\CORBA_2_3\portable\InputStream.java
+ (read_value(BoxedValueHelper)): Implemented.
+ * org\omg\CORBA_2_3\portable\OutputStream.java
+ (write_abstract_interface):
+ Changed parameter type to java.lang.Object.
+ * org\omg\CORBA\portable\BoxedValueHelper.java:
+ Moved wrongly placed bracket.
+ * org\omg\CORBA\ParameterMode.java: Inherit from
+ Serializable, IDLEntity and removing duplicated header.
+ (_PARAM_IN, _PARAM_OUT, _PARAM_INOUT): Making final.
+ * org\omg\Messaging\SyncScopeHelper.java (extract, id, insert,
+ read, type, write): Making public.
+
+2005-06-05 Ka-Hing Cheung <kahing@javabsp.org>
+
+ * javax/swing/event/TreeSelectionEvent.java
+ (getPaths): Return a cloned copy.
+ (isAddedPath): Implemented.
+ (cloneWithSource): Likewise.
+
+2005-06-05 Ka-Hing Cheung <kahing@javabsp.org>
+
+ * javax/swing/event/TreeSelectionEvent.java:
+ Reformatted.
+
+2005-06-05 Ka-Hing Cheung <kahing@javabsp.org>
+
+ * javax/swing/tree/TreePath.java
+ (toString): Implemented.
+
+2005-06-05 Sven de Marothy <sven@physto.se>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
+ (getPixels): Handle pixbufs which don't have alpha.
+
2005-06-04 Tom Tromey <tromey@redhat.com>
* javax/swing/plaf/basic/BasicListUI.java (focusListener): Use
@@ -231,8 +4855,8 @@
gnu/CORBA/GIOP/uncObjectInputStream/uncObjectOutputStream.java: New streams.
* org/omg/CORBA/ValueBaseHelper.java: Removing inner classes,
using uncObjectInputStream, uncObjectOutputStream instead.
- * org/omg/CORBA_2_3/portable (read_value): Delegate call to
- ValueBaseHelper.
+ * org/omg/CORBA_2_3/portable.InputStream.java (read_value):
+ Delegate call to ValueBaseHelper.
2005-06-03 Audrius Meskauskas <AudriusA@Bioinformatics.org>
diff --git a/INSTALL b/INSTALL
index 35d871373..b9cadee30 100644
--- a/INSTALL
+++ b/INSTALL
@@ -40,12 +40,14 @@ Suggested Software
are required unless --disable-gtk-peer is used as an argument to
configure.
- - GTK+ 2.6.x (or higher)
- - libart_lgpl 2.1.0
+ - GTK+ 2.4.x (or higher)
- gdk-pixbuf
- XTest Extension (libXtst) for GdkRobot support in java.awt.
+ For building the Cairo GdkGraphics2D backend you need at least
+ Cairo 0.5.0.
+
For building the xmlj JAXP implementation (dsabled by default, use
configure --enable-xmlj) you need the following installed:
- The XML C library for Gnome (libxml2)
diff --git a/LICENSE b/LICENSE
index f148947cd..240f834dd 100644
--- a/LICENSE
+++ b/LICENSE
@@ -46,8 +46,8 @@ Each example source code files carries the following notice:
You should have received a copy of the GNU General Public License
along with GNU Classpath examples; see the file COPYING. If not,
- write to the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ write to the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
For more information see the README file in the examples directory.
diff --git a/NEWS b/NEWS
index 2ae164e77..fc242aaa8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,113 @@
-New in release 0.16
-
-* Better GTK scrollbar peer implementation requiring GTK 2.6 or higher.
+* Moved native methods from java.lang.reflect.Proxy to VMProxy.
+* Added hook to VMClassLoader to allow VM to do class caching.
+* The Portable Object Adapter should support the output of the
+ recent IDL to java compilers. These compilers now generate servants and
+ not CORBA objects as before, making the output depended on the existing
+ POA implementation. Completing POA means that such code can already be
+ tried to run on Classpath. Our POA is tested for the following usage scenarios:
+
+ POA converts servant to the CORBA object.
+ Servant provides to the CORBA object.
+ POA activates new CORBA object with the given Object Id (byte array)
+ that is later accessible for the servant.
+ During the first call, the ServantActivator provides servant for this
+ and all subsequent calls on the current object.
+ During each call, the ServantLocator provides servant for this call only.
+ ServantLocator or ServantActivator forwards call to another server.
+ POA has a single servant, responsible for all objects.
+ POA has a default servant, but some objects are explicitly connected
+ to they specific servants.
+
+ The POA is verified using tests from the former cost.omg.org.
+
+New in release 0.17 (Jul 15, 2005)
+
+* gnu.xml fix for nodes created outside a namespace context.
+* Add support for output indenting and cdata-section-elements output
+ instruction in xml.transform.
+* xml.xpath corrections for cases where elements/attributes might have
+ been created in non-namespace-aware mode. Corrections to handling of
+ XSL variables and minor conformance updates.
+* DefaultMutableTreeNode preorder, postorder, depthFirst and breadthFirst
+ traversal enumerations implemented.
+* JInternalFrame colors and titlebar draw properly.
+* JTree is working up to par (icons, selection and keyboard traversal).
+* JMenus were made more compatible in visual and programmatic behavior.
+* JTable changeSelection and multiple selections implemented.
+* JButton and JToggleButton change states work properly now.
+* JFileChooser fixes.
+* revalidate and repaint fixes which make Free Swing much more responsive.
+* Correctly handle system call interrupts and timeouts in native nio
+ and net functions.
+* MetalIconFactory implemented.
+* Handle image loading errors correctly for gdkpixbuf and MediaTracker.
+* Added Tree World to GNU Classpath examples Free Swing demo.
+* FileChannel.lock() and FileChannel.force() implemented.
+* java.util.logging.FileHandler now rotates files.
+* Better handle GDK lock. Properly prefix gtkpeer native functions (cp_gtk).
+* Corba bug fixes and documentation updates.
+* Updated gcj build infrastructure.
+* Documentation fixes all over the place.
+ See http://developer.classpath.org/doc/
+* VM Integration Guide updates with a full section on VM/Classpath hooks.
+
+New in release 0.16 (Jun 30, 2005)
+
+* Better GTK scrollbar peer implementation when using GTK >= 2.6.
+* GdkGraphics2D has been updated to use Cairo 0.5.x APIs.
+* BufferedImage and GtkImage rewrites. All image drawing operations
+ should now work correctly (flipping requires gtk+ >= 2.6)
+* Future Graphics2D, Image and Text work is documented at:
+ http://developer.classpath.org/mediation/ClasspathGraphicsImagesText
+* Free Swing Top-Level Compatibility. JFrame, JDialog, JApplet,
+ JInternalFrame, and JWindow are now 1.5 compatible in the sense that you
+ can call add() and setLayout() directly on them, which will have the same
+ effect as calling getContentPane().add() and getContentPane().setLayout().
+* The JTree interface has been completed. JTrees now recognizes mouse clicks
+ and selections work, but the visual implementation is not yet complete.
+ Work on expansion and collapsing of the tree nodes is being implemented.
+* BoxLayout works properly now.
+* Fixed GrayFilter to actually work.
+* Metal SplitPane implemented.
+* Lots of free swing text and editor stuff work now.
+
+* When gtk+ 2.6 or higher is installed the default log handler will produce
+ stack traces whenever a WARNING, CRITICAL or ERROR message is produced.
+
+* The CORBA implementation is now a working prototype that should support
+ features up till 1.3 inclusive.
+ We would invite groups writing CORBA dependent applications to
+ try Classpath implementation, reporting any possible bugs.
+
+ The CORBA prototype is interoperable with Sun's implementation v 1.4,
+ transferring object references, primitive types, narrow and wide
+ strings, arrays, structures, trees, abstract interfaces and
+ value types (feature of CORBA 2.3) between these two platforms.
+ The remote exceptions are transferred and handled correctly.
+ The stringified object references (IORs) from various sources are
+ parsed as required.
+ The transient (for current session) and permanent (till jre restart)
+ redirections work.
+ Both Little and Big Endian encoded messages are accepted.
+ The implementation is verified using tests from the former cost.omg.org.
+ The current release includes working examples (see the examples directory),
+ demonstrating the client-server communication, using either CORBA Request
+ or IDL-based stub (usually generated by a IDL to java compiler).
+ These examples also show how to use the Classpath CORBA naming service.
+ The IDL to java compiler is not yet written, but as our library must be
+ compatible, it naturally accepts the output of other idlj implementations.
+
+* New --with-vm-classes configure option, and new 'build' setting
+ for --with-glibj. (Only for integrators.)
Runtime interface changes:
+* Start of a generic JDWP framework in gnu/classpath/jdwp.
+ This is unfinished, but feedback (at classpath@gnu.org) from runtime
+ hackers is greatly appreciated. Although most of the work is currently
+ being done around gcj/gij we want this framework to be as VM neutral as
+ possible. Early design is described in:
+ http://gcc.gnu.org/ml/java/2005-05/msg00260.html
* Native method VMClass.getModifiers() now takes an additional
boolean parameter.
* Deprecated native method VMClassLoader.defineClass(ClassLoader,
diff --git a/compat/java.net/PlainSocketImpl.java b/compat/java.net/PlainSocketImpl.java
index 163de493c..4a80eab23 100644
--- a/compat/java.net/PlainSocketImpl.java
+++ b/compat/java.net/PlainSocketImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/configure.ac b/configure.ac
index d5d02f200..daf537c81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ dnl -----------------------------------------------------------
dnl define([AC_CACHE_LOAD], )dnl
dnl define([AC_CACHE_SAVE], )dnl
-AC_INIT([GNU Classpath],[0.15+cvs],[classpath@gnu.org],[classpath])
+AC_INIT([GNU Classpath],[0.17+cvs],[classpath@gnu.org],[classpath])
AC_CONFIG_SRCDIR(java/lang/System.java)
AC_CANONICAL_TARGET
@@ -174,7 +174,9 @@ if test "x${COMPILE_JNI}" = xyes; then
inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
sys/time.h \
sys/select.h \
- crt_externs.h])
+ crt_externs.h \
+ fcntl.h \
+ sys/mman.h])
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
@@ -187,7 +189,9 @@ if test "x${COMPILE_JNI}" = xyes; then
getsockname getpeername bind listen accept \
recvfrom send sendto setsockopt getsockopt time mktime \
localtime_r \
- strerror_r])
+ strerror_r \
+ fcntl \
+ mmap munmap mincore msync madvise getpagesize sysconf])
AC_HEADER_TIME
AC_STRUCT_TM
@@ -254,7 +258,7 @@ if test "x${COMPILE_JNI}" = xyes; then
AC_SUBST(XSLT_CFLAGS)
fi
- dnl Check for AWT related gthread/gtk/libart_lgpl
+ dnl Check for AWT related gthread/gtk
if test "x${COMPILE_GTK_PEER}" = xyes; then
AC_PATH_XTRA
if test "$no_x" = yes; then
@@ -264,13 +268,13 @@ if test "x${COMPILE_JNI}" = xyes; then
AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true],
[AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
[${X_LIBS}])
- PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6 gthread-2.0 >= 2.2 libart-2.0 gdk-pixbuf-2.0)
+ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
fi
if test "x${enable_gtk_cairo}" = xyes; then
- PKG_CHECK_MODULES(CAIRO, cairo)
+ PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
PKG_CHECK_MODULES(PANGOFT2, pangoft2)
fi
AC_SUBST(CAIRO_LIBS)
diff --git a/depcomp b/depcomp
index 807b991f4..27a0ef702 100755
--- a/depcomp
+++ b/depcomp
@@ -15,8 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
diff --git a/doc/hacking.texinfo b/doc/hacking.texinfo
index 865cb53c8..e97116fd5 100644
--- a/doc/hacking.texinfo
+++ b/doc/hacking.texinfo
@@ -5,7 +5,7 @@
@settitle GNU Classpath Hacker's Guide
@c %**end of header
-@setchapternewpage none
+@setchapternewpage off
@ifinfo
This file contains important information you will need to know if you
@@ -419,10 +419,6 @@ libraries installed:
creating graphical user interfaces. It is used as the basis of the
GNU desktop project GNOME.
-@item libart-lgpl 2.1+
-@uref{http://www.gnome.org/start/,libart} is a GNOME library of
-functions for 2D graphics.
-
@item gdk-pixbuf
@uref{http://www.gnome.org/start/,gdk-pixbuf} is a GNOME library for
representing images.
@@ -462,12 +458,12 @@ java.lang.StrictMath.
@chapter Programming Standards
For C source code, follow the
-@uref{http://www.fsf.org/prep/standards_toc.html,GNU Coding Standards}.
+@uref{http://www.gnu.org/prep/standards/,GNU Coding Standards}.
The standards also specify various things like the install directory
structure. These should be followed if possible.
For Java source code, please follow the
-@uref{http://www.fsf.org/prep/standards_toc.html,GNU Coding
+@uref{http://www.gnu.org/prep/standards/,GNU Coding
Standards}, as much as possible. There are a number of exceptions to
the GNU Coding Standards that we make for GNU Classpath as documented
in this guide. We will hopefully be providing developers with a code
@@ -488,7 +484,7 @@ guidelines more tailored to GNU Classpath as part of this document.
Here is a list of some specific rules used when hacking on GNU
Classpath java source code. We try to follow the standard
-@uref{http://www.gnu.org/prep/standards_23.html,GNU Coding Standards}
+@uref{http://www.gnu.org/prep/standards/,GNU Coding Standards}
for that. There are lots of tools that can automatically generate it
(although most tools assume C source, not java source code) and it
seems as good a standard as any. There are a couple of exceptions and
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index b0a1cfc3e..ad9db2922 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -20,8 +20,8 @@
%
% You should have received a copy of the GNU General Public License
% along with this texinfo.tex file; see the file COPYING. If not, write
-% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-% Boston, MA 02111-1307, USA.
+% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+% Boston, MA 02110-1301, USA.
%
% In other words, you are welcome to use, share and improve this program.
% You are forbidden to forbid anyone else to use, share and improve
diff --git a/doc/vmintegration.texinfo b/doc/vmintegration.texinfo
index c43133730..81e9920d6 100644
--- a/doc/vmintegration.texinfo
+++ b/doc/vmintegration.texinfo
@@ -5,7 +5,7 @@
@settitle GNU Classpath VM Integration Guide
@c %**end of header
-@setchapternewpage none
+@setchapternewpage off
@ifinfo
This file contains important information you will need to know if you
@@ -110,7 +110,7 @@ provides a Java 1.1 compatible environment.
The Electrical File VM continues to be listed as a Mozilla project
though development has been somewhat quiet. A number of concepts from
EF were expected at one point to be rolled into Japhar, but that
-development has not occured as of yet.
+development has not occurred as of yet.
@item @uref{http://latte.snu.ac.kr/,LaTTe}
This VM project so far supports only Sun UltraSparc processors using the
@@ -175,42 +175,881 @@ The initialization order is currently documented in the
@comment node-name, next, previous, up
@chapter Classpath Hooks
-Several core classes must be implemented by the VM for Classpath to
-work. These classes are:
+The primary method of interaction between Classpath and the VM is via
+the helper classes, which are named after the relevant core library
+class, but include an additional `VM' prefix. The library classes from
+Classpath call out to these to get certain VM-specific dirty work done.
+A reference copy of each VM class exists. The majority consist of a
+series of static methods, some of which are simply declared
+@code{native}, and some which provide a default implementation. VMs may
+either use these as is, or create their own local variations. When
+using the default implementations, the VM is responsible for
+implementing any of the code marked as @code{native} which corresponds
+to functionality they wish their VM to provide. When using their own
+versions of the classes, VM implementors may choose to change the mix of
+native and non-native methods from that below, so as to best suit their
+implementation.
+
+@menu
+* java.lang::
+* gnu.classpath::
+* java.util::
+* java.io::
+* java.security::
+* java.net::
+* java.nio::
+* java.nio.channels::
+* gnu.java.nio::
+* Classpath Callbacks::
+@end menu
+
+@node java.lang, gnu.classpath, Classpath Hooks, Classpath Hooks
+@comment node-name, next, previous, up
+
+@section @code{java.lang}
+
+@code{java.lang} is the core Java package, being imported automatically by all
+classes. It includes basic classes as @code{Object} and @code{String}.
+A VM must implement at least some parts of this package in order to
+become operable.
+
+@menu
+* java.lang.VMClass::
+* java.lang.VMObject::
+* java.lang.VMClassLoader::
+* java.lang.VMSystem::
+* java.lang.VMThrowable::
+* java.lang.VMCompiler::
+* java.lang.VMDouble::
+* java.lang.VMFloat::
+* java.lang.VMProcess::
+* java.lang.VMRuntime::
+* java.lang.VMString::
+* java.lang.VMThread::
+@end menu
+
+@node java.lang.VMClass, java.lang.VMObject ,java.lang,java.lang
+@subsection @code{java.lang.VMClass}
+
+The core class, @code{java.lang.Class}, and the corresponding VM class,
+@code{java.lang.VMClass}, provide two main functions within GNU Classpath.
+
+@enumerate
+@item For basic VM operation, @code{java.lang.Class} provides the link between
+the Java-based representation of a class it embodies and the VM's own
+internal structure for a class. @xref{VM Hooks}.
+
+@item As far as the user is concerned, the main function of
+@code{java.lang.Class} is as an entry point to the reflection
+facilities, and so it also provides this functionality, backed by the
+VM class.
+@end enumerate
+
+This VM class lists the following methods, organized by the version of the
+Java specification in which they occur. All are @code{native}, unless
+otherwise specified, and pertain to reflection. As a result, the VM only
+needs to implement these methods in order to provide reflection support,
+and then only to the degree required.
@itemize @bullet
-@item java.lang.Class
-@item java.lang.Runtime
-@item java.lang.Thread
-@item java.lang.reflect.Constructor
-@item java.lang.reflect.Method
-@item java.lang.reflect.Field
+@item 1.0
+@itemize @bullet
+@item @code{isInterface(Class)} -- This is simply a property test, and matches
+the presence of an appropriate flag within the class file.
+@item @code{getName(Class)} -- Returns the fully-qualified name of the class.
+@item @code{getSuperclass(Class)} -- Returns a @code{Class} instance which
+represents the superclass. Again, the class file contains an element directly
+relating to this. @code{null} is returned for primitives, interfaces and
+@code{Object}.
+@item @code{getInterfaces(Class)} -- Same as the above, but the implemented
+or extended interfaces rather than the superclass. An empty array should
+be returned, rather than @code{null}.
+@item @code{getDeclaredClasses(Class,boolean)} -- Returns the internal classes
+this instance declares directly. The flag determines whether or not the
+VM should filter out non-public classes.
+@item @code{getDeclaredFields(Class,boolean)} -- The same for fields.
+@item @code{getDeclaredMethods(Class,boolean)} -- And for methods.
+@item @code{getDeclaredConstructors(Class,boolean)} -- And constructors.
+@item @code{getClassLoader(Class)} -- Returns the @code{ClassLoader} instance
+which is responsible for the specified class.
+@item @code{forName(String)} -- The VM should create a @code{Class} instance
+corresponding to the named class. As noted in @ref{VM Hooks}, the internal
+content of the instance is the responsibility of the VM.
+@item @code{isArray(Class)} -- Another property test, corresponding to a
+class file flag.
+@item @code{initialize(Class)} -- The VM should initialize the class fully,
+if it has not already done so.
+@item @code{loadArrayClass(String,ClassLoader)} -- This is called if
+@code{forName} returns @code{null} and the string specifies an array class.
+The specified array class should be loaded with the supplied class loader.
+@item @code{throwException(Throwable)} -- The VM should throw the supplied
+checked exception, without declaring it.
+@end itemize
+@item 1.1
+@itemize @bullet
+@item @code{isInstance(Class,Object)} -- This is a reflection-based equivalent
+of the @code{instanceof} operator.
+@item @code{isAssignableFrom(Class,Class)} -- Mainly a shorthand for the above,
+removing the need to create an instance to test assignability.
+@item @code{isPrimitive(Class)} -- Returns true if this class is simply
+a representation of one of the primitive types: @code{boolean}, @code{byte},
+@code{char}, @code{short}, @code{int}, @code{long}, @code{float},
+@code{double} and @code{void}.
+@item @code{getComponentType(Class)} -- Produces a @code{Class} instance which
+represents the type of the members of the array the class instance represents.
+Classes which don't represent an array type return @code{null}.
+@item @code{getModifiers(Class,boolean)} -- Returns an integer which encodes
+the class' modifiers, such as @code{public}. Again, this relates to
+information stored in the class file.
+@item @code{getDeclaringClass(Class)} -- Returns the class that declared
+an inner or member class, or @code{null} if the instance refers to a top-level
+class.
+@end itemize
+@end itemize
+
+@node java.lang.VMObject, java.lang.VMClassLoader, java.lang.VMClass, java.lang
+@subsection @code{java.lang.VMObject}
+
+@code{VMObject} is the bridge between the low level @code{Object} facilities
+such as making a clone, getting the class of the object and the wait/notify
+semantics. This is accomplished using the following @code{native}
+methods.
+
+@itemize @bullet
+@item @code{getClass(Object)} -- Returns the @code{Class} instance for the
+object. @code{Class} objects are produced by the VM, as described in
+@ref{VM Hooks}.
+@item @code{clone(Cloneable)} -- The VM should produce a low-level clone of the
+specified object, creating a field-by-field shallow copy of the original.
+The only difference between the two is that the new object should still be
+@code{finalizable}, even if the original is not.
+@item @code{notify(Object)} -- The VM should choose one of the threads waiting
+for a lock on the specified object arbitrarily, and wake it. If the current
+thread does not currently hold the lock on the object, then an
+@code{IllegalMonitorStateException} should be thrown.
+@item @code{notifyAll(Object)} -- Same as the above, but all threads are
+awakened.
+@item @code{wait(Object,long,int)} -- The VM should set the current thread
+into a waiting state, which persists until it receives a notify signal or the
+specified time (in milliseconds and nanoseconds) is exceeded. The nanoseconds
+restriction may be ignored if such granularity is not available, and a
+@code{IllegalMonitorStateException} should be thrown if the current thread
+doesn't own the object.
+@end itemize
+
+@node java.lang.VMClassLoader, java.lang.VMSystem, java.lang.VMObject, java.lang
+@subsection @code{java.lang.VMClassLoader}
+@code{VMClassLoader} provides methods for defining and resolving core and
+primitive classes, as well as handling resources, packages and assertions.
+The class is a mixture of @code{native} methods and Java-based
+implementations, with some of the latter being @emph{stubs}.
+
+@itemize @bullet
+@item Native Methods
+@itemize @bullet
+@item @code{defineClass(ClassLoader,String,byte[],int,int,ProtectionDomain)}
+-- The VM should create a @code{Class} instance from the supplied byte array.
+@item @code{resolveClass(Class)} -- Resolve references to other classes in the
+supplied class.
+@item @code{loadClass(name,boolean)} -- Load a class using the bootstrap
+loader.
+@item @code{getPrimitiveClass(char)} -- The VM should provide a @code{Class}
+implementation for one of the primitive classes. The supplied character
+matches the JNI code for the primitive class e.g. `B' for byte and
+`Z' for boolean.
+@end itemize
+@item Java Methods
+@itemize @bullet
+@item @code{getResource(String)} -- The default implementation calls
+@code{getResources} and returns the first element in the returned enumeration,
+or @code{null} if there are no elements.
+@item @code{getResources(String)} -- By default, this compiles a list of
+URLs via the boot class path. Any matching files within a zip file are added,
+and directories on the boot class path are automatically converted to file
+URLs that refer to join the directory with the resource name (whether or not
+it actually exists).
+@item @code{getPackage(String)} -- Always returns null, which may be suitable
+if the VM does not wish to return a @code{Package} implementation. Otherwise,
+it may be necessary to make this a @code{native} method.
+@item @code{getPackages()} -- As with the last, a default stub implementation
+exists (returning an empty array) which may be replaced if support is
+required.
+@item @code{defaultAssertionStatus()} -- A stub which can be implemented
+by VMs providing assertion support. At present, it always returns @code{true}.
+@item @code{packageAssertionStatus()} -- Much the same status as the above.
+The method should return a map converting package names to boolean status
+values. The stub implementation provides an empty map.
+@item @code{classAssertionStatus()} -- Same as the last, but for classes.
+@item @code{getSystemClassLoader()} -- The default calls @code{ClassLoader}
+to create a new auxillary class loader with a system and extension class
+loader. The VM may wish to replace it if it wishes to supply its own custom
+system class loader.
+@end itemize
+@end itemize
+@node java.lang.VMSystem, java.lang.VMThrowable, java.lang.VMClassLoader, java.lang
+@subsection @code{java.lang.VMSystem}
+@code{VMSystem} handles the default I/O streams, provides access to the
+system clock and environment variables and provides methods for
+@code{System.arraycopy} and the @code{identityHashCode} of an
+@code{Object}. It consists of @code{native} methods, but the default
+implementation also provides some helper methods to simplify stream
+creation.
+
+@itemize @bullet
+@item Native Methods
+@itemize @bullet
+@item @code{arraycopy(Object,int,Object,int,int)} -- The VM should copy
+a specified number of array objects from one array to another, with
+appropriate checks for compatible typing, available elements and space.
+The VM should be able to perform this more efficiently using native code
+and direct memory manipulation than would have been achieved by using Java.
+@item @code{identityHashCode(Object)} -- This is the hashcode for
+@code{Object}, which relates to the actual location of the object in memory.
+@item @code{setIn(InputStream)} -- Set the system input stream.
+@item @code{setOut(PrintStream)} -- Set the system output stream.
+@item @code{setErr(PrintStream)} -- Set the system error stream.
+@item @code{currentTimeMillis()} -- Gets the system time in milliseconds.
+@item @code{getenv(String)} -- Returns the value of the specified environment
+variable.
+@end itemize
+@item Java Methods
+@itemize @bullet
+@item @code{makeStandardInputStream()} -- Helps provide the functionality of
+@code{System.in} by wrapping the appropriate file descriptor in a buffered
+file input stream. VMs may choose to create the stream from the descriptor
+differently rather than using this method.
+@item @code{makeStandardOutputStream()} -- Helps provide the functionality of
+@code{System.out} by wrapping the appropriate file descriptor in a buffered
+file output stream. VMs may choose to create the stream from the descriptor
+differently rather than using this method.
+@item @code{makeStandardErrorStream()} -- Helps provide the functionality of
+@code{System.err} by wrapping the appropriate file descriptor in a buffered
+file output stream. VMs may choose to create the stream from the descriptor
+differently rather than using this method.
+@end itemize
+@end itemize
+
+Classpath also provides native implementations of
+
+@itemize @bullet
+@item @code{setIn(InputStream)}
+@item @code{setOut(PrintStream)}
+@item @code{setErr(PrintStream)}
+@item @code{currentTimeMillis()}
+@item @code{getenv(String)}
+@end itemize
+
+making a VM implementation optional.
+
+@node java.lang.VMThrowable, java.lang.VMCompiler, java.lang.VMSystem, java.lang
+@subsection @code{java.lang.VMThrowable}
+@code{VMThrowable} is used to hold the VM state of a throwable, created either
+when a @code{Throwable} is created or the @code{fillInStackTrace()} method is
+called (i.e. when the actual stack trace is needed, as a lot of exceptions are
+never actually used). The actual class has two @code{native} methods,
+one (@code{fillInStackTrace()}) being a method of the class used to obtain
+instances, and the other an instance method, @code{getStackTrace()}.
+@itemize @bullet
+@item @code{fillInStackTrace(Throwable)} -- The VM should return the current
+execution state of the @code{Throwable} in the form of a @code{VMThrowable}
+instance. The VM may also return @code{null} if it does not support this
+functionality.
+@item @code{getStackTrace()} -- This is used to create a real
+@code{StackTraceElement} array for the exception, using the state data
+stored during creation of the instance.
+@end itemize
+
+@node java.lang.VMCompiler, java.lang.VMDouble, java.lang.VMThrowable, java.lang
+@subsection @code{java.lang.VMCompiler}
+
+@code{VMCompiler} provides an interface for VMs which wish to provide
+JIT compilation support. The default implementation is simply a series
+of stubs. The property, @code{java.compiler}, should point to a library
+containing the function @code{java_lang_Compiler_start()} if such support
+is to be provided.
+
+@itemize @bullet
+@item @code{compileClass(Class)} -- Invoke the compiler to compile the specific
+class, returning @code{true} if successful.
+@item @code{compileClasses(String)} -- The compiler should compile the classes
+matching the specified string, again returning @code{true} on success.
+@item @code{command(Object)} -- The object represents a command given to the
+compiler, and is specific to the compiler implementation.
+@item @code{enable} -- Enable the operation of the compiler.
+@item @code{disable} -- Disable compiler operation.
+@end itemize
+
+@node java.lang.VMDouble, java.lang.VMFloat, java.lang.VMCompiler, java.lang
+@subsection @code{java.lang.VMDouble}
+
+@code{VMDouble} provides native support for the conversion and parsing
+of doubles.
+
+@itemize @bullet
+@item @code{doubleToLongBits(double)} -- Converts the double to the IEEE 754
+bit layout, collapsing NaNs to @code{0x7ff8000000000000L}.
+@item @code{doubleToRawLongBits(double)} -- Same as the above, but preserves
+NaNs.
+@item @code{longBitsToDouble(long)} -- This is the inverse of the last method,
+preserving NaNs so that the output of one can be fed into the other without
+data loss.
+@item @code{toString(double,boolean)} -- Converts the double to a string,
+giving a shorter value if the flag @code{isFloat} is @code{true}, indicating
+that the conversion was requested by @code{java.lang.Float} rather than
+@code{java.lang.Double}.
+@item @code{initIDs} -- Used by JNI-based solutions to initialize the cache
+of the static field IDs. The default @code{VMDouble} implementation has a
+static initializer which loads the JNI library and calls this method.
+@item @code{parseDouble} -- Turn the string into a usable double value.
+@end itemize
+
+Classpath provides native implementations of all these, making VM
+implementation optional.
+
+@node java.lang.VMFloat, java.lang.VMProcess, java.lang.VMDouble, java.lang
+@subsection @code{java.lang.VMFloat}
+
+@code{VMFloat} provides native support for the conversion of floats.
+
+@itemize @bullet
+@item @code{floatToIntBits(float)} -- Converts the float to the IEEE 754
+bit layout, collapsing NaNs to @code{0x7fc00000}.
+@item @code{floatToRawIntBits(float)} -- Same as the above, but preserves
+NaNs.
+@item @code{intBitsToFloat(int)} -- This is the inverse of the last method,
+preserving NaNs so that the output of one can be fed into the other without
+data loss.
+@end itemize
+
+Classpath provides native implementations of all these, making VM
+implementation optional.
+
+@node java.lang.VMProcess, java.lang.VMRuntime, java.lang.VMFloat, java.lang
+@subsection @code{java.lang.VMProcess}
+
+@code{VMProcess} handles the execution of external processes. In the
+default implementation, threads are spawned and reaped by @code{ProcessThread}.
+A constructor creates a new @code{VMProcess}, which extends rather than
+complements @code{Process}, using an array of arguments, an array of
+environment variables and a working directory. The instance maintains
+system input, output and error streams linked to the external process.
+Three @code{native} methods are used, and implementations are provided
+for all three by Classpath, making VM implementation optional. These use
+the POSIX functions, @code{fork()}, @code{waitpid()} and @code{kill()}.
+
+@itemize @bullet
+@item @code{nativeSpawn(String[],String[],File)} -- The VM should create a
+new process which uses the specified command-line arguments, environment
+variables and working directory. Unlike the other two methods, this
+method is linked to an instance, and must call @code{setProcessInfo()} with
+the results before returning.
+@item @code{nativeReap()} -- This is called to perform a reap of any
+zombie processes, and should not block, instead returning a boolean as to
+whether reaping actually took place.
+@item @code{nativeKill(long)} -- The VM should terminate the specified PID.
+@end itemize
+
+@node java.lang.VMRuntime, java.lang.VMString, java.lang.VMProcess, java.lang
+@subsection @code{java.lang.VMRuntime}
+
+The @code{VMRuntime} class provides a series of native methods
+which divulge information about the runtime or invoke certain
+operations. This includes retrieving the amount of available memory,
+and scheduling the garbage collector. There are two exceptions: the
+@code{enableShutdownHooks} method, which allows the VM to put in its own
+shutdown hooks when @code{Runtime.addShutdownHook()} is first invoked,
+and @code{exec(String[],String[],File)} which spawns an external process.
+These are Java-based static methods instead. The first is simply a stub by
+default, while the second simply links to the functionality of
+@code{VMProcess} (and should be changed if a different @code{Process}
+implementation is used).
+
+@itemize @bullet
+@item @code{availableProcessors()} -- Returns the number of processors
+available to the VM.
+@item @code{freeMemory()} -- Returns the amount of memory the VM has available
+on the heap for allocating.
+@item @code{totalMemory()} -- Returns the size of the heap.
+@item @code{maxMemory()} -- Returns the maximum memory block the VM will
+attempt to allocate. May be simply @code{Long.MAX_VALUE} (8 exabytes!)
+@item @code{gc()} -- Allows users to explicitly invoke the garbage collector.
+This is a suggestion to the VM, rather than a command, and the garbage
+collector should run anyway @emph{without} it being invoked.
+@item @code{runFinalization()} -- Like the above, but related to the
+finalilzation of objects rather than the garbage collector.
+@item @code{runFinalizationForExit()} -- Called immediately prior to VM
+shutdown in order to finalize all objects (including `live' ones)
+@item @code{traceInstructions(boolean)} -- This turns on and off the optional
+VM functionality of printing a trace of executed bytecode instructions.
+@item @code{traceMethodCalls(boolean)} -- This turns on and off the optional
+VM functionality of printing a trace of methods called.
+@item @code{runFinalizersOnExit(boolean)} -- A toggleable setting for
+running the finalization process at exit.
+@item @code{exit(int)} -- The VM should shutdown with the specified exit code.
+@item @code{nativeLoad(String,ClassLoader)} -- Attempts to load a file,
+returning an integer which is non-zero for success. Nothing happens if the
+file has already been loaded.
+@item @code{mapLibraryName(String)} -- The VM should map the system-independent
+library name supplied to the platform-dependent equivalent (e.g. a @code{.so}
+or @code{.dll} file)
+@end itemize
+
+@node java.lang.VMString, java.lang.VMThread, java.lang.VMRuntime, java.lang
+@subsection @code{java.lang.VMString}
+@code{VMString} is responsible for handling interned strings. If two strings
+are equal (using the @code{equals()} method), then the results of calling
+the @code{intern()} method on each of them makes them equal
+(using @code{==}). Thus, the same string object is always returned by
+@code{intern} if the two strings are equal. The default implementation
+is Java-based and implements @code{intern(String)} by maintaining a
+@code{WeakHashMap} which links the strings to their @code{WeakReference}.
+A new mapping is created for each new string being @code{intern}ed.
+A VM may implement this differently by implementing this method,
+which is @code{static} and the only one in @code{VMString}.
+
+@node java.lang.VMThread,, java.lang.VMString, java.lang
+@subsection @code{java.lang.VMThread}
+
+@code{VMThread} provides the link between Java's threads and the platform
+threading support. A @code{VMThread} is created via a private constructor
+and linked to a @code{Thread} instance. This occurs when the @code{Thread}
+instance is started by the static @code{create(Thread,long)} method (the second
+argument requests a certain stack size, usually zero). The thread itself is
+executed via the @code{run()} method, which handles any problems with the
+running of the thread and its eventual death.
+
+@code{VMThread} provides the following accessors and mutators for accessing
+the thread state via @code{VMThread},
+
+@itemize @bullet
+@item @code{getName()}
+@item @code{setName(String)}
+@item @code{getPriority()}
+@item @code{setPriotity(int)}
+@item @code{isDaemon()}
+@end itemize
+
+all of which refer to the @code{Thread} instance. @code{setPriority(int)} also
+calls the appropriate native method. @code{stop(Throwable)} similarly wraps
+a native method, merely adding in a check for the state of the thread.
+
+The default implementation also provides Java-based implementations of
+@code{join(long,int)}, @code{sleep(long,int)} and
+@code{holdsLock(Object)}. @code{join} and @code{sleep} simply wait for
+the appropriate amount of time, with @code{join} additionally waiting
+for the thread instance to become @code{null}. @code{holdsLock} simply
+checks if an object is locked by the current thread by trying to invoke
+the @code{notify} method, and catching the failing exception if this is
+not the case.
+
+The remainder of the class is a series of @code{native} methods, some of
+which are mandatory for VM implementation and others which provide optional
+or deprecated functionality.
+
+@itemize @bullet
+@item Mandatory Instance Methods
+@itemize @bullet
+@item @code{start(long)} -- The VM should create the native thread and start
+it running using the @code{run} method of the @code{VMThread} instance on
+which this method is called.
+@item @code{interrupt()} -- The VM should interrupt the running thread and
+throw an appropriate exception.
+@item @code{isInterrupted()} -- Checks the interrupted state of the thread.
+@item @code{suspend()} -- The thread should be suspended until resumed.
+@item @code{resume()} -- The thread should be resumed from its suspended state.
+This pair of methods are deprecated, due to the possibility of a deadlock
+occuring when a thread with locks is suspended.
+@item @code{nativeSetPriority(int)} -- Called by @code{setPriority}
+to allow the setting to flow down to the native thread.
+@item @code{nativeStop(Throwable)} -- The VM should stop the thread abnormally
+and throw the specified exception. This is clearly deprecated, due to the
+ambiguous state an abruptly-stopped thread may leave.
+@end itemize
+@item Mandatory Class Methods
+@itemize @bullet
+@item @code{currentThread()} -- Return a reference to the thread currently
+being executed.
+@item @code{yield()} -- The VM should allow some other thread to run.
+The current thread maintains its locks even though it stops executing for
+the time being.
+@item @code{interrupted()} -- A shortcut to obtaining the interrupted state
+of the current thread.
+@end itemize
+@item Other Methods
+@itemize @bullet
+@item @code{countStackFrames()} -- Returns a count of the number of stack
+frames in the thread. This depends on the deprecated method @code{suspend()}
+having returned true, and is thus deprecated as a result.
+@end itemize
+@end itemize
+
+@node gnu.classpath, java.util, java.lang, Classpath Hooks
+@section @code{gnu.classpath}
+
+The @code{gnu.classpath} package provides Classpath-specific functionality,
+primarily relating to the features in @code{java.lang}. At present, this
+includes the context of a class (the stack) and the system properties.
+
+@menu
+* gnu.classpath.VMStackWalker::
+* gnu.classpath.VMSystemProperties::
+@end menu
+
+@node gnu.classpath.VMStackWalker,gnu.classpath.VMSystemProperties,gnu.classpath,gnu.classpath
+@subsection @code{gnu.classpath.VMStackWalker}
+
+@code{VMStackWalker} provides access to the class context or stack. The
+default implementation consists of a @code{native} @code{static} method,
+@code{getClassContext()}, which obtains the class context, and two helper
+methods which obtain the calling class (the 3rd element in the context array)
+and its class loader, respectively.
+
+@itemize @bullet
+@item @code{getClassContext()} -- The VM should return an array of
+@code{Class} objects, each of which relates to the method currently being
+executed at that point on the stack. Thus, the first item (index 0) is the
+class that contains this method.
+@item @code{getCallingClass()} -- A Java-based helper method which returns
+the @code{Class} object which contains the method that called the method
+accessing @code{getCallingClass()}.
+@item @code{getCallingClassLoader()} -- Like the last, but returning the class
+loader of the class.
+@end itemize
+
+@node gnu.classpath.VMSystemProperties,,gnu.classpath.VMStackWalker,gnu.classpath
+@subsection @code{gnu.classpath.VMSystemProperties}
+
+@code{VMSystemProperties} allows the VM to hook into the property creation
+process, both before and after the system properties are added by GNU
+Classpath. The default implementation assumes that the VM will add its
+properties first, by making the pre-initialisation method @code{native},
+and that the Classpath properties may then be altered by a Java-based
+post-initialisation method.
+
+As these methods are called as part of the bootstrap process, caution should
+be used as to what classes are used, and properties should only be set
+using @code{Properties.setProperty()}. Specifically, I/O classes should be
+avoided at this early stage.
+
+@itemize @bullet
+@item @code{preInit(Properties)} -- Allows the VM to add properties
+@emph{before} the Classpath properties are added. The default implementation
+includes a full list of properties that @emph{must} be added by the VM, but
+additional VM-specific ones may also be added.
+@item @code{postInit(Properties)} -- Same as the last, but called after the
+Classpath properties have been added. The main purpose of this is to allow
+the VM to alter the properties added by GNU Classpath to suit it.
+@end itemize
+
+@node java.util, java.io, gnu.classpath, Classpath Hooks
+@section java.util
+
+The @code{java.util} VM hooks provide links between the mix of functionality
+present in that package, which includes collections, date and time handling
+and parsing. At present, there is only one hook, which connects GNU Classpath
+to the timezone information provided by the underlying platform.
+
+@menu
+* java.util.VMTimeZone::
+@end menu
+
+@node java.util.VMTimeZone,,java.util,java.util
+@subsection @code{java.util.VMTimeZone}
+
+@code{VMTimeZone} joins @code{TimeZone} to the platform timezone information
+via the static method, @code{getDefaultTimeZoneId()}. The VM hook is
+expected to return a @code{TimeZone} instance that represents the current
+timezone in use by the platform. The default implementation provides
+this functionality for POSIX or GNU-like systems, and VMs that want this
+functionality can keep this implementation and implement the native
+method, @code{getSystemTimeZoneId()}. This method is only called when
+obtaining the timezone name from the @code{TZ} environment variable,
+@code{/etc/timezone} and @code{/etc/localtime} all fail. This fallback
+mechanism also means that a system which doesn't provide the above three
+methods, but does provide a timezone in string form, can still use this
+implementation.
+
+@node java.io, java.security, java.util, Classpath Hooks
+@section java.io
+
+The @code{java.io} package is heavily reliant on access to the I/O facilities
+of the underlying platform. As far as its VM hooks go, they provide two
+areas of functionality to GNU Classpath, these being
+
+@itemize @bullet
+@item File and directory queries and manipulation
+@item Serialization of objects
@end itemize
-You also need to implement some helper classes in java.lang that classes
-from Classpath call out to to get certain VM-specific dirty work done:
+The first corresponds directly to most of the @code{File} class, while
+the latter underlies the functionality provided by the
+@code{ObjectInputStream} and @code{ObjectOutputStream}. More low-level I/O
+is provided by @ref{java.nio}.
+
+@menu
+* java.io.VMFile::
+* java.io.VMObjectInputStream::
+* java.io.VMObjectStreamClass::
+@end menu
+
+@node java.io.VMFile,java.io.VMObjectInputStream,java.io,java.io
+@subsection @code{java.io.VMFile}
+
+@code{VMFile} allows GNU Classpath's @code{File} representations to
+probe and modify the file system using the native functions of the
+platform. The default implementation (which consists of both a
+@code{VMFile} class and the native methods) is primarily UNIX-centric,
+working with POSIX functions and assuming case-sensitive filenames,
+without the restriction of the 8.3 format. It consists mainly of
+@code{static} @code{native} methods, with a few Java helper methods.
+The native methods represent the file as a string containing its path,
+rather than using the object itself.
+
+@itemize @bullet
+@item Native Methods
+@itemize @bullet
+@item @code{lastModified(String)} -- The native method should return a
+@code{long} value that represents the last modified date of the file.
+@item @code{setReadOnly(String)} -- Sets the file's permissions to read only,
+in whichever way this is realised by the platform.
+@item @code{create(String)} -- Create the named file.
+@item @code{list(String)} -- The native method opens the named directory,
+reads the contents and returns them as a Java @code{String} array.
+@item @code{renameTo(String,String)} -- Renames the first file to the second.
+@item @code{length(String)} -- Returns a @code{long} value representing
+the file size.
+@item @code{exists(String)} -- Tests for the existence of the named file
+or directory.
+@item @code{delete(String)} -- Deletes the file or directory.
+@item @code{setLastModified(String,long)} -- Change the last modified time.
+@item @code{mkdir(String)} -- Creates the named directory.
+@item @code{isFile(String)} -- Tests that the named path references a file.
+@item @code{canWrite(String)} -- Tests that the file can be written to.
+This method is @code{synchronized}, so the object is locked during the check.
+@item @code{canRead(String)} -- Complement of the last method.
+@item @code{isDirectory(String)} -- Tests that the named path references
+a directory.
+@end itemize
+@item Java Helper Methods
+@itemize @bullet
+@item @code{canWriteDirectory(File)} -- Checks that the directory can be
+written to, by trying to create a temporary file in it.
+@item @code{listRoots()} -- Returns the root of a GNU filesystem i.e. `/'
+in an array.
+@item @code{isHidden(String)} -- Checks whether the file starts with `.',
+which is how files are hidden on UNIX-style systems.
+@item @code{getName(String)} -- Pulls the actual filename from the end of
+the path, by breaking off the characters after the last occurrence of the
+platform's file separator.
+@item @code{getCanonicalForm(String)} -- This converts a UNIX path to
+its canonical form by removing the `.' and `..' sections that occur within.
+@end itemize
+@end itemize
+
+@node java.io.VMObjectInputStream,java.io.VMObjectStreamClass,java.io.VMFile,java.io
+@subsection @code{java.io.VMObjectInputStream}
+
+This class consists of two methods which provide functionality used in
+deserializing an object. @code{currentClassLoader()} provides the first
+user-defined class loader from the class context
+(@xref{gnu.classpath.VMStackWalker},) via a @code{PrivilegedAction}.
+@code{allocateObject(Class,Class,Constructor)} is a @code{native} method
+(a reference implementation is provided) which creates an object but
+calls the constructor of another class, which is a superclass of the
+object's class.
+
+@node java.io.VMObjectStreamClass,,java.io.VMObjectInputStream,java.io
+@subsection @code{java.io.VMObjectStreamClass}
+
+@code{VMObjectStreamClass} is a series of @code{static} @code{native}
+methods that provide some of the groundwork for @code{ObjectStreamClass}
+and @code{ObjectStreamField}. @code{hasClassInitializer(Class)} works
+with the former, and checks for the presence of a static initializer.
+The remaining methods are of the form @code{setXXXNative(Field,Object,XXX)}
+and support @code{ObjectStreamField}. One exists for each of the main types
+(boolean, float, double, long, int, short, char, byte and object) and is used
+to set the specified field in the supplied instance to the given value.
+
+A default implementation is provided for all of them, so a VM implementation
+is optional.
+
+@node java.security, java.net, java.io, Classpath Hooks
+@section java.security
+
+The @code{java.security} package provides support for Java's security
+architecture. At present, @code{VMAccessController} represents the sole
+VM hook for this.
+
+@menu
+* java.security.VMAccessController::
+@end menu
+
+@node java.security.VMAccessController,,java.security,java.security
+@subsection @code{java.security.VMAccessController}
+
+The @code{AccessController} is used to perform privileged actions. Its
+hook class, @code{VMAccessController}, maintains the
+@code{AccessControlContext} and the default implementation is purely
+Java-based. The VM may choose to replace this with their own.
+The methods in the reference version are as follows:
+
+@itemize @bullet
+@item @code{pushContext(AccessControlContext)} -- Adds a new context to the
+stack for the current thread. This is called before a privileged action
+takes place.
+@item @code{popContext()} -- Removes the top context from the stack. This
+is performed after the privileged action takes place.
+@item @code{getContext()} -- Either derives a context based on the
+@code{ProtectionDomain}s of the call stack (see the next method) or returns
+the top of the context stack.
+@item @code{getStack()} -- Provides access to the call stack as a pair of
+arrays of classes and method names. The actual implementation returns
+an empty array, indicating that there are no permissions.
+@end itemize
+
+@node java.net, java.nio, java.security, Classpath Hooks
+@section java.net
+
+The @code{java.net} package is heavily reliant on access to the networking
+facilities of the underlying platform. The VM hooks provide information
+about the available network interfaces, and access to lookup facilities
+for network addresses.
+
+@menu
+* java.net.VMInetAddress::
+* java.net.VMNetworkInterface::
+@end menu
+
+@node java.net.VMInetAddress,java.net.VMNetworkInterface,java.net,java.net
+@subsection @code{java.net.VMInetAddress}
+
+@code{VMInetAddress} is a series of @code{static} @code{native} methods
+which provide access to the platform's lookup facilities. All the methods
+are implemented by GNU Classpath, making VM implementation optional, and
+are as follows:
@itemize @bullet
-@item @code{java.lang.VMObject}
-is the bridge between the low level @code{Object} facilities such
-as making a clone, getting the class of the object and the wait/notify
-semantics.
-@item @code{java.lang.VMClassLoader}
-provides methods for defining and resolving core and primitive classes.
-@item @code{java.lang.VMSystem}
-is used to initialize the @code{System} properties, the @code{System.arraycopy}
-method and the @code{identityHashCode} of an @code{Object}.
-@item @code{java.lang.VMSecurityManager}
-provides the class context (stack trace) of the currently
-executing thread and a way to get the currently active @code{ClassLoader}.
-@item @code{java.lang.VMThrowable}
-used to hold the VM state of a throwable, created when a @code{Throwable} is
-created or the @code{fillInStacktrace()} method is called, when the actual stack
-trace is needed (a lot of exceptions are never actually used), the
-@code{getStackTrace()} method is used to create a real @code{StackTraceElement} array
-for the exception.
+@item @code{getLocalHostname()} -- Wraps the @code{gethostname} function, and
+falls back on `localhost'.
+@item @code{lookupInaddrAny()} -- Returns the value of @code{INADDR_ANY}.
+@item @code{getHostByAddr(byte[])} -- Looks up the hostname based on an IP
+address.
+@item @code{getHostByName(String)} -- The reverse of the last method, it
+returns the IP addresses which the given host name resolves to.
@end itemize
+@node java.net.VMNetworkInterface,,java.net.VMInetAddress,java.net
+@subsection @code{java.net.VMNetworkInterface}
+
+@code{VMNetworkInterface} currently consists of a single @code{static}
+@code{native} method, @code{getInterfaces()}, which retrieves the
+network interfaces available on the underlying platform as a @code{Vector}.
+The current GNU Classpath implementation is a native stub.
+
+@node java.nio, java.nio.channels, java.net, Classpath Hooks
+@section java.nio
+
+The @code{java.nio} package is part of the New I/O framework added in
+Java 1.4. This splits I/O into the concepts of @emph{buffers},
+@emph{charsets}, @emph{channels} and @emph{selectors}, and
+@code{java.nio} defines the buffer classes. As far as native and VM
+code is concerned, the new package needs support for low-level efficient
+buffer operations.
+
+@menu
+* java.nio.VMDirectByteBuffer::
+@end menu
+
+@node java.nio.VMDirectByteBuffer,,java.nio,java.nio
+@subsection @code{java.nio.VMDirectByteBuffer}
+
+A @code{ByteBuffer} maintains a buffer of bytes, and allows it to be
+manipulated using primitive operations such as @code{get}, @code{put},
+@code{allocate} and @code{free}. A direct buffer avoids intermediate
+copying, and uses native data which shouldn't be manipulated by a
+garbage collector. The VM class consists of @code{static} @code{native}
+methods, all of which are given default implementations by GNU
+Classpath.
+
+@itemize @bullet
+@item @code{init()} -- Creates an instance of an appropriate
+@code{gnu.classpath.RawData} class. This class is not garbage
+collected, is created natively and is used in the other methods to reference
+the buffered data.
+@item @code{allocate(int)} -- Allocates the memory for the buffer using
+@code{malloc} and returns a reference to the @code{RawData} class.
+@item @code{free(RawData)} -- Frees the memory used by the buffer.
+@item @code{get(RawData,int)} -- Returns the data at the specified index.
+@item @code{get(RawData,int,byte[],int,int)} -- Copies a section of the
+data into a byte array using @code{memcpy}.
+@item @code{put(RawData,int,byte)} -- Puts the given data in the buffer
+at the specified index.
+@item @code{adjustAddress(RawData,int)} -- Adjusts the pointer into the buffer.
+@item @code{shiftDown(RawData,int,int,int)} -- Moves the content of the buffer
+at an offset down to a new offset using @code{memmove}.
+@end itemize
+
+@node java.nio.channels, gnu.java.nio, java.nio, Classpath Hooks
+@section java.nio.channels
+
+Channels provide the data for the buffers with the New I/O packages.
+For example, a channel may wrap a file or a socket. The VM hooks,
+at the moment, simply allow the channels to be accessed by @code{java.io}
+streams.
+
+@menu
+* java.nio.channels.VMChannels::
+@end menu
+
+@node java.nio.channels.VMChannels,,java.nio.channels,java.nio.channels
+@subsection @code{java.nio.channels.VMChannels}
+
+@code{VMChannels} provides the methods that create the channels or
+streams. The default implementation is in pure Java and simply wraps
+the channels in standard I/O classes from @code{java.io}.
+
+@itemize @bullet
+@item @code{createStream(Class,Channel)} -- Creates a @code{FileChannel}
+which wraps an instance of the specified stream class, created by reflection.
+This method is private, and is used by the other two.
+@item @code{newInputStream(ReadableByteChannel)} -- Wraps the channel
+in a @code{FileInputStream}.
+@item @code{newOutputStream(WritableByteChannel)} -- Wraps the channel
+in a @code{FileOutputStream}.
+@end itemize
+
+@node gnu.java.nio, Classpath Callbacks, java.nio.channels, Classpath Hooks
+@section gnu.java.nio
+
+The @code{gnu.java.nio} class provides Classpath implementations of the
+interfaces provided by @code{java.nio}. The VM classes provide the native
+support necessary to implement @emph{pipes} and @emph{selectors}.
+
+@menu
+* gnu.java.nio.VMPipe::
+* gnu.java.nio.VMSelector::
+@end menu
+
+@node gnu.java.nio.VMPipe,gnu.java.nio.VMSelector,gnu.java.nio,gnu.java.nio
+@subsection @code{gnu.java.nio.VMPipe}
+
+@code{VMPipe} provides the native functionality for a uni-directional pipe
+between a source and a destination (sink) channel. It consists of one
+@code{static} @code{native} method, @code{init(PipeImpl,SelectorProvider)},
+the reference implementation of which is currently a native stub. Ideally,
+this should initialise the pipe at the native level.
+
+@node gnu.java.nio.VMSelector,,gnu.java.nio.VMPipe,gnu.java.nio
+@subsection @code{gnu.java.nio.VMSelector}
+
+A @code{Selector} selects between multiple @code{SelectableChannel}s based
+on their readiness and a key set. The VM hook for the Classpath implementation
+of this is @code{VMSelector}, and this allows the actual @code{select()}
+operation to be performed. This is represented by the @code{static}
+@code{native} method, @code{select(int[],int[],int[],long)}, and a default
+implementation of this is provided.
+
+@node Classpath Callbacks, , gnu.java.nio, Classpath Hooks
Some of the classes you implement for the VM will need to call back to
package-private methods in Classpath:
@@ -221,10 +1060,8 @@ the group.
@item @code{java.lang.ThreadGroup.removeThread(Thread)}
Call this method from @code{Thread} when a @code{Thread} is stopped or destroyed.
-
@end itemize
-
@node VM Hooks, JNI Implementation, Classpath Hooks, Top
@comment node-name, next, previous, up
@chapter VM Hooks
@@ -234,22 +1071,51 @@ unfortunately are dependent on the internal structure of various
classes. This is a guide to all of the things the VM itself needs to
know about classes.
+Some of the core classes, while being implemented by GNU Classpath,
+provide space for state (in the form of a @code{vmdata} object) to be
+stored by the VM, and can not be constructed normally.
+
+@itemize @bullet
+@item java.lang.Class
+@item java.lang.ClassLoader
+@end itemize
+
+The default implementations of some VM classes also follow this methodology,
+when it is intended that most VMs will keep the default.
+
+@itemize @bullet
+@item java.lang.VMThread
+@item java.lang.VMThrowable
+@end itemize
+
+Several core classes must be completely implemented by the VM for Classpath to
+work, although reference implementations are provided. These classes are:
+
+@itemize @bullet
+@item java.lang.reflect.Constructor
+@item java.lang.reflect.Method
+@item java.lang.reflect.Field
+@end itemize
+
+The following issues are of note;
+
@itemize @bullet
@item @code{java.lang.Class} @*
-You, the VM, get to create this @code{Class}, so you may define the internal
-structure any way you wish. You probably have code somewhere to
-translate your internal class structure into a @code{Class} object. That is
-the only known place where this matters. Some VMs do not create the
-@code{Class} object at the point where the class is defined; instead, they wait
-until a @code{Class} object is actually used.
+The GNU Classpath implementation of @code{java.lang.Class} provides an
+object for storing the internal state of the class maintained by the VM.
+This is the only known place where this matters. The class is
+constructed with this data by the VM. Some VMs do not create the
+@code{Class} object at the point where the class is defined; instead,
+they wait until a @code{Class} object is actually used.
@item Array Classes @*
-When you are creating an array class, you should set the @code{ClassLoader} of
-the array class to the @code{ClassLoader} of its component type. Whenever you
-add a class to a @code{ClassLoader}, you need to notify the @code{ClassLoader} and
-add the new @code{Class} to its internal cache of classes. To do this, call
-@code{ClassLoader.addVMCreatedClass(Class)}. @emph{Note: this is written in
-anticipation of 1.2 support and does not apply just yet.}
+When you are creating an array class, you should set the
+@code{ClassLoader} of the array class to the @code{ClassLoader} of its
+component type. Whenever you add a class to a @code{ClassLoader}, you
+need to notify the @code{ClassLoader} and add the new @code{Class} to
+its internal cache of classes. To do this, call
+@code{ClassLoader.addVMCreatedClass(Class)}. @emph{Note: this is
+written in anticipation of 1.2 support and does not apply just yet.}
@item Primordial Class Loader @*
When the primordial class loader loads a class, it needs to tell
@@ -422,3 +1288,4 @@ to the value of the @code{LD_LIBRARY_PATH} environment if it exists on your plat
@bye
+
diff --git a/doc/www.gnu.org/announce/20050630.wml b/doc/www.gnu.org/announce/20050630.wml
new file mode 100644
index 000000000..1784e2f11
--- /dev/null
+++ b/doc/www.gnu.org/announce/20050630.wml
@@ -0,0 +1,329 @@
+#!wml --include=..
+
+#use wml::std::page
+#use wml::std::lang
+#use wml::fmt::isolatin
+#use wml::std::case global=upper
+
+<lang:star:slice:>
+
+<set-var last-modified-author="prr">
+
+#include <include/macros.wml>
+
+<header title="GNU Classpath 0.16 Announcement (2005-04-29)">
+<pre>
+GNU Classpath 0.16 "Harmony!" released.
+
+We are pleased to announce a new developer snapshot of GNU Classpath.
+
+GNU Classpath, essential libraries for java, is a project to create free
+core class libraries for use with runtimes, compilers and tools for the
+java programming language.
+
+The GNU Classpath developer snapshot releases are not directly aimed
+at the end user but are meant to be integrated into larger development
+platforms. For example the GCC (gcj) and Kaffe projects will use the
+developer snapshots as a base for future versions.
+
+This is the first release of GNU Classpath since our Harmony
+collaboration with the Apache group. Instructions for developers
+wanting to try out and help with the core library implementation can
+be found at: http://developer.classpath.org/
+
+New is our wiki with simple steps to setup a quick development
+environment. For example developers using cygwin can find examples
+here: http://developer.classpath.org/mediation/ClasspathOnCygwin
+
+Some highlights of changes in this release (more extensive list below):
+
+AWT GtkScrollBar and GtkImage improvements. All image operations are
+now working correctly. Graphics2D has been upgraded to use Cairo
+0.5.x. Free Swing updates for 1.5 top-level compatibility. JTree
+interface completed. JFileChooser has been implemented. Completed
+implementations of BoxLayout, GrayFilter and SplitPane. Upgraded the
+Corba features to 1.3 and included new CORBA 2.3 features. Start of
+generic JDWP framework. And lots of bug fixes based on real world
+application usage.
+
+31 people actively contributed code to this release and made 389 CVS
+commits during the last two months of development. diffstat since 0.15:
+1248 files changed, 133649 insertions(+), 41802 deletions(-)
+
+More details about the various changes and contributions below.
+
+GNU Classpath 0.16 can be downloaded from
+ftp://ftp.gnu.org/pub/gnu/classpath/
+or one of the ftp.gnu.org mirrors
+http://www.gnu.org/order/ftp.html
+
+File: classpath-0.16.tar.gz
+MD5sum: 220a9c86719a2c6bd7ba9b9877495113
+SHA1sum: be6d30fbfe4d71015a455a367411a6d55df3484e
+
+This release depends on gtk+ 2.4 for AWT support. But gtk+ 2.6 or
+higher is recommended. Included, but not activated by default in this
+release is a Graphics2D implementation based on the Cairo Graphics
+framework (http://www.cairographics.org). Enabling this makes programs
+like JEdit start up on GNU Classpath based runtimes. To enable this
+support install the cairo 0.5.x snapshot, configure GNU Classpath with
+--enable-gtk-cairo and make sure the system property
+gnu.java.awt.peer.gtk.Graphics=Graphics2D is set.
+
+This release was explicitly tested against the last Eclipse 3.1
+release (thanks to various eclipse hackers for the support). For end
+user we do however recommend to use the GCJ4 packaged version of
+Eclipse 3.1 that have been prepared for the various distributions:
+
+Fedora Core
+ http://overholt.ca/wp/?p=27
+Debian GNU/Linux
+ http://gnu.wildebeest.org/diary-man-di/index.php?p=19
+Ubuntu
+ http://www.larvalstage.net/index.php?/archives/2-Introducing-Eclipse-3.1.html
+
+Not yet included is an implementation of Generic collection classes
+and classes for other 1.5 language extensions. Work on this is being
+done on a special development branch that will be included in a future
+GNU Classpath release when free runtimes, compilers and tools have all
+been upgraded to support these new language features.
+
+One of the major focuses of the GNU Classpath project is expanding
+and using the Mauve test suite for Compatibility, Completeness and
+Correctness checking. Various groups around GNU Classpath collaborate
+on the free software Mauve test suite which contains ~30.000 core
+library tests. Mauve has various modules for testing core class
+library implementations, byte code verifiers, source to byte code and
+native code compiler tests. Mauve also contains the Wonka visual test
+suite and the Jacks Compiler Killer Suite. This release passes 28801
+of the mauve core library tests. See for more information:
+http://www.sourceware.org/mauve/
+
+Conformance reports for the included jaxp support can be found in the
+doc/README.jaxp file.
+
+The GNU Classpath developers site http://developer.classpath.org/
+provides detailed information on how to start with helping the GNU
+Classpath project and gives an overview of the core class library
+packages currently provided. For each snapshot release generated
+documentation is provided through the GNU Classpath Tools gjdoc
+project. A documentation generation framework for java source files
+used by the GNU project. Full documentation on the currently
+implementated packages and classes can be found at:
+http://developer.classpath.org/doc/
+
+Here are answers to some questions you might have about this project and
+this release.
+
+1). Who should use this software?
+
+Although GNU Classpath is already capable of supporting many
+applications written in the java programming language, this is a
+development release. As such, there are still some unfinished
+components, and some problems are to be expected. You should install it
+if you are interested in GNU Classpath development or reporting bugs.
+We appreciate both.
+
+For end users we recommend to use one of the development environments
+based on GNU Classpath which combine the core libraries with compilers
+and other tools needed for creating applications and libraries.
+
+ * GCC with GCJ (http://gcc.gnu.org/java/)
+ * Kaffe (http://www.kaffe.org/)
+
+Both projects have CVS versions which track GNU Classpath closely.
+
+2). What is required to build/install/run?
+
+GNU Classpath requires a working GNU build environment and a byte code
+compiler such as jikes, gcj or kjc. When creating native code you will
+also need a working C compiler and up to date Gnome development
+libraries (gtk+, libart and gdk-pixbuf). More information on the
+precise version numbers for the tools and libraries can be found in
+the INSTALL file.
+
+You will also need a runtime environment. Most active GNU Classpath
+hackers use JamVM (http://jamvm.sourceforge.net/) and the gcj or Jikes
+bytecode compiler (http://www.jikes.org) for quick development. But
+other environments can certainly be used to hack on the GNU Classpath
+core libraries.
+
+For other environments that might need modified version of the current
+release see the README file. A complete list of virtual machines and
+compilers known to be based on GNU Classpath can be found at our
+website: http://www.gnu.org/software/classpath/stories.html
+
+Note that these are just byte code execution compilers and/or
+runtimes. For development of programs written in the java programming
+language you will also need compilers and other tools for creating
+libraries and/or executables (see question 1).
+
+3). What platforms are supported?
+
+GNU/Linux and FreeBSD on x86 and powerpc are regularly tested by the
+developers. Since 0.12 there is also support for cygwin. We plan to
+eventually support many others. Many more architectures and platforms
+are supported. Check the actual runtime you use together with GNU
+Classpath for detailed information on the supported platforms.
+
+4). Where do I go for more information?
+
+The project home page with information on our mailing list can be
+found at http://www.gnu.org/software/classpath/
+
+The GNU Classpath developer recently held a conference during Fosdem.
+This was a standing room event and provided lot of communication between
+the GNU Classpath, Kaffe, GCJ, IKVM, Apache, java-gnome and Cacao hackers
+and users. The presentations of this event have been publised and should
+give a good overview of the current status and future plans of the project:
+http://www.gnu.org/software/classpath/events/escape_fosdem05.html
+
+Developers wanting to help out with the project will find more
+information and tools on http://developer.classpath.org/
+
+5). How do I extend the functionality of the core classes?
+
+Besides combining GNU Classpath with the runtimes and compilers above
+you might want to add support for additional encryption libraries and
+algorithms as provided by GNU Crypto
+(http://www.gnu.org/software/gnu-crypto/). And for additional
+extension libraries (mail, activation, infobus, servlet, etc.) check
+out GNU ClasspathX (http://www.gnu.org/software/classpathx).
+
+Additional network protocol support is provided by a sub-project
+called GNU Classpath Inetlib, an extension library to provide extra
+network protocol support (ftp, finger, gopher) for GNU Classpath, but
+it can also standalone to ease adding http, imap, pop3 and smtp client
+support to applictions. Also distributed from
+<ftp://ftp.gnu.org/gnu/classpath/>
+
+The following projects extend the functionality of GNU Classpath
+with additional algorithms, new core packages and tools.
+All are released under GPL compatible licenses:
+
+* Jessie: A free implementation of the JSSE. Secure Sockets Extension.
+ http://www.nongnu.org/jessie/
+* Tritonus: A implementation of the javax.sound API.
+ http://www.tritonus.org/
+* gcjwebplugin: A plugin for the execution of applets in web browsers.
+ http://www.nongnu.org/gcjwebplugin/
+
+Note that the above libraries might already have been included in the
+various platforms that also integrate GNU Classpath like done by the
+Kaffe project.
+
+6). What is new in this release?
+
+New in release 0.16 (Jun 30, 2005)
+(See the ChangeLog file for a full list of changes.)
+
+* Better GTK scrollbar peer implementation when using GTK >= 2.6.
+* GdkGraphics2D has been updated to use Cairo 0.5.x APIs.
+* BufferedImage and GtkImage rewrites. All image drawing operations
+ should now work correctly (flipping requires gtk+ >= 2.6)
+* Future Graphics2D, Image and Text work is documented at:
+ http://developer.classpath.org/mediation/ClasspathGraphicsImagesText
+* Free Swing Top-Level Compatibility. JFrame, JDialog, JApplet,
+ JInternalFrame, and JWindow are now 1.5 compatible in the sense that you
+ can call add() and setLayout() directly on them, which will have the same
+ effect as calling getContentPane().add() and getContentPane().setLayout().
+* The JTree interface has been completed. JTrees now recognizes mouse clicks
+ and selections work, but the visual implementation is not yet complete.
+ Work on expansion and collapsing of the tree nodes is being implemented.
+* BoxLayout works properly now.
+* Fixed GrayFilter to actually work.
+* Metal SplitPane implemented.
+* Lots of free swing text and editor stuff work now.
+
+* When gtk+ 2.6 or higher is installed the default log handler will produce
+ stack traces whenever a WARNING, CRITICAL or ERROR message is produced.
+
+* The CORBA implementation is now a working prototype that should support
+ features up till 1.3 inclusive.
+ We would invite groups writing CORBA dependent applications to
+ try Classpath implementation, reporting any possible bugs.
+
+ The CORBA prototype is interoperable with Sun's implementation v 1.4,
+ transferring object references, primitive types, narrow and wide
+ strings, arrays, structures, trees, abstract interfaces and
+ value types (feature of CORBA 2.3) between these two platforms.
+ The remote exceptions are transferred and handled correctly.
+ The stringified object references (IORs) from various sources are
+ parsed as required.
+ The transient (for current session) and permanent (till jre restart)
+ redirections work.
+ Both Little and Big Endian encoded messages are accepted.
+ The implementation is verified using tests from the former cost.omg.org.
+ The current release includes working examples (see the examples directory),
+ demonstrating the client-server communication, using either CORBA Request
+ or IDL-based stub (usually generated by a IDL to java compiler).
+ These examples also show how to use the Classpath CORBA naming service.
+ The IDL to java compiler is not yet written, but as our library must be
+ compatible, it naturally accepts the output of other idlj implementations.
+
+* New --with-vm-classes configure option, and new 'build' setting
+ for --with-glibj. (Only for integrators.)
+
+Runtime interface changes:
+
+* Start of a generic JDWP framework in gnu/classpath/jdwp.
+ This is unfinished, but feedback (at classpath@gnu.org) from runtime
+ hackers is greatly appreciated. Although most of the work is currently
+ being done around gcj/gij we want this framework to be as VM neutral as
+ possible. Early design is described in:
+ http://gcc.gnu.org/ml/java/2005-05/msg00260.html
+* Native method VMClass.getModifiers() now takes an additional
+ boolean parameter.
+* Deprecated native method VMClassLoader.defineClass(ClassLoader,
+ String, byte[], int, int) has been replaced by
+ VMClassLoader.defineClass(ClassLoader, String, byte[], int, int,
+ ProtectionDomain)
+* VMClassLoader.loadClass(String name, boolean resolve) is now native,
+ replacing the former version which just returned null.
+* Deprecated native method VMClassLoader.getPrimitiveClass(String) has
+ been replaced by new native method VMClassLoader.getPrimitiveClass(char).
+* Previously empty implementations of methods VMThread.countStackFrames(),
+ VMThrowable.fillInStackTrace(), and VMThrowable.getStackTrace() have
+ been removed; these methods are now native methods.
+* Fields "exceptionTypes" and "parameterTypes" have been removed from
+ Contructor.java and getExceptionTypes() and getParameterTypes() are
+ now native methods.
+
+The following people helped with this release:
+
+Andreas Jaeger (mprec updates)
+Andreas Tobler (Darwin support)
+Andrew John Hughes (Locale and net fixes, URI RFC2986 updates)
+Andrew Overholt (File locking)
+Anthony Balkissoon (JList, Free Swing 1.5 updates and mouse event fixes)
+Archie Cobbs (VM interface updates)
+Audrius Meskauskas (Corba and HTML work)
+Bryce McKinlay (RMI work)
+Chris Burdess (XML work)
+Christian Thalinger (fdlibm updates)
+Dalibor Topic (SHA1PRNG and GdkPixbugDecoder updates)
+David Daney (BitSet bugfixes)
+David Gilbert (Lots and lots of documentation and awt/swing fixes)
+Gary Benson (MessageFormat fixes)
+Goffredo Baroncelli (HTTPURLConnection fixes)
+Jan Roehrich (JTree fixes)
+Jeroen Frijters (ClassLoader and nio cleanups)
+Ka-Hing Cheung (TreePath and TreeSelection fixes)
+Kalle Olavi Niemitalo (Build fixes)
+Keith Seitz (JDWP work)
+Kim Ho (JFileChooser implementation)
+Lillian Angel (JTree implementation and lots of bug fixes)
+Mark Wielaard (build fixes, GdkPixpufDecoder fixes and packaging)
+Michael Koch (Locale updates, bug and build fixes)
+Olga Rodimina (MenuSelectionManager)
+Robert Schuster (charset and awt fixes)
+Roman Kennke (BoxLayout, GrayFilter and SplitPane, plus bugfixes all over)
+Sven de Marothy (GtkImage rewrite, 2D, awt, free swing and date/time fixes)
+Thomas Fitzsimmons (Lot of upgrades to the gtk+ AWT and cairo 2D support)
+Tom Tromey (libgcj merging, build infrastructure and bug fixes)
+Ziga Mahkovec (Graphics2D upgraded to cairo 0.5 and new regex features)
+
+We would also like to thank the numerous bug reporters and testers!
+</pre>
+
+<footer>
diff --git a/doc/www.gnu.org/announce/20050715.wml b/doc/www.gnu.org/announce/20050715.wml
new file mode 100644
index 000000000..8f40c58a8
--- /dev/null
+++ b/doc/www.gnu.org/announce/20050715.wml
@@ -0,0 +1,132 @@
+#!wml --include=..
+
+#use wml::std::page
+#use wml::std::lang
+#use wml::fmt::isolatin
+#use wml::std::case global=upper
+
+<lang:star:slice:>
+
+<set-var last-modified-author="prr">
+
+#include <include/macros.wml>
+
+<header title="GNU Classpatchy 0.17 Announcement (2005-07-15)">
+<pre>
+GNU Classpatchy 0.17 released.
+
+We are pleased to announce a new developer snapshot of GNU Classpath.
+
+GNU Classpath, essential libraries for java, is a project to create free
+core class libraries for use with runtimes, compilers and tools for the
+java programming language.
+
+The GNU Classpath developer snapshot releases are not directly aimed
+at the end user but are meant to be integrated into larger development
+platforms. For example the GCC (gcj) and Kaffe projects will use the
+developer snapshots as a base for future versions.
+
+This is mainly a bug fix release for issues found with eclipse 3.1 and
+Free Swing applications just after our 0.16 release. But it also
+includes some exciting new features.
+
+Some highlights of changes in this release (more extensive list below):
+
+XML DOM, XPATH and XSL fixes. Free Swing is much more responsive.
+JInternalFram, JTree, JMenu, JTable, JButton and JFileChooser fixes.
+FileChannel lock and force implementations added. The logging
+FileHandler now rotates files. Clean locking and namespace for gtkpeer
+library. System call interrupts and timeouts are now handled correctly
+for net and nio. Corba bug fixes. Lots of documentation updates. The
+VM Integration Guide now comes with a full section on the VM/Classpath
+hooks. GNU Classpath Examples now includes a Tree World demo.
+
+21 people actively contributed code to this release and made 171 CVS
+commits during the two weeks of development. diffstat since 0.16:
+3638 files changed, 25798 insertions(+), 15596 deletions(-)
+
+More details about the various changes and contributions below.
+
+This release passes 29508 out of 30320 Mauve core library tests.
+Conformance reports for the included jaxp support can be found in the
+doc/README.jaxp file.
+
+GNU Classpath 0.17 can be downloaded from
+ftp://ftp.gnu.org/pub/gnu/classpath/
+or one of the ftp.gnu.org mirrors
+http://www.gnu.org/order/ftp.html
+
+File: classpath-0.17.tar.gz
+MD5sum: eb620987422878e05ea889d5e7496c63
+SHA1sum: 3b47cb37c91803fbc9d0426d97e1faa6a993615a
+
+The GNU Classpath developers site http://developer.classpath.org/
+provides detailed information on how to start with helping the GNU
+Classpath project and gives an overview of the core class library
+packages currently provided. For each snapshot release generated
+documentation is provided through the GNU Classpath Tools gjdoc
+project. A documentation generation framework for java source files
+used by the GNU project. Full documentation on the currently
+implementated packages and classes can be found at:
+http://developer.classpath.org/doc/
+
+New in release 0.17 (Jul 15, 2005)
+(See the ChangeLog file for a full list of changes.)
+
+* gnu.xml fix for nodes created outside a namespace context.
+* Add support for output indenting and cdata-section-elements output
+ instruction in xml.transform.
+* xml.xpath corrections for cases where elements/attributes might have
+ been created in non-namespace-aware mode. Corrections to handling of
+ XSL variables and minor conformance updates.
+* DefaultMutableTreeNode preorder, postorder, depthFirst and breadthFirst
+ traversal enumerations implemented.
+* JInternalFrame colors and titlebar draw properly.
+* JTree is working up to par (icons, selection and keyboard traversal).
+* JMenus were made more compatible in visual and programmatic behavior.
+* JTable changeSelection and multiple selections implemented.
+* JButton and JToggleButton change states work properly now.
+* JFileChooser fixes.
+* revalidate and repaint fixes which make Free Swing much more responsive.
+* Correctly handle system call interrupts and timeouts in native nio
+ and net functions.
+* MetalIconFactory implemented.
+* Handle image loading errors correctly for gdkpixbuf and MediaTracker.
+* Added Tree World to GNU Classpath examples Free Swing demo.
+* FileChannel.lock() and FileChannel.force() implemented.
+* java.util.logging.FileHandler now rotates files.
+* Better handle GDK lock. Properly prefix gtkpeer native functions (cp_gtk).
+* Corba bug fixes and documentation updates.
+* Updated gcj build infrastructure.
+* Documentation fixes all over the place.
+ See http://developer.classpath.org/doc/
+* VM Integration Guide updates with a full section on VM/Classpath hooks.
+
+The following people helped with this release:
+
+Aaron Luchko (JDWP updates and documentation fixes)
+Andrew John Hughes (VMIntegration guide update)
+Anthony Balkissoon (Lots of Free Swing updates)
+Archie Cobbs (build and URLClassLoader updates)
+Audrius Meskauskas (Corba and text and html parser fixes)
+Casey Marshall (FileChannel lock, SystemLogger and FileHandler rotate impl.)
+Chris Burdess (Lots of gnu.xml and http protocol fixes)
+Dalibor Topic (Better DEBUG support)
+Daniel Bonniot (Serialization fixes)
+David Gilbert (Lots of documentation and MetalIconFactory implementation)
+Guilhem Lavaux (Logger bug fixes)
+Jeroen Frijters (Serialization fixes)
+Lillian Angel (Lots of Free Swing updates)
+Mark Wielaard (System call interrupts, timeouts and packaging)
+Robert Schuster (TreeNode enumerations and ActionCommand and various fixes)
+Roman Kennke (Lots of Free Swing updates)
+Sven de Marothy (GtkImage fixes)
+Thomas Fitzsimmons (gtk peer updates and restructuring)
+Simon Kitching (String cleanups and optimization suggestions)
+Tom Tromey (gcj build update)
+Ziga Mahkovec (build fixes)
+
+We would also like to thank the numerous bug reporters and testers!
+</pre>
+
+<footer>
diff --git a/doc/www.gnu.org/cp-tools/texidoclet.html b/doc/www.gnu.org/cp-tools/texidoclet.html
index 5f772d251..b203029b1 100644
--- a/doc/www.gnu.org/cp-tools/texidoclet.html
+++ b/doc/www.gnu.org/cp-tools/texidoclet.html
@@ -584,14 +584,14 @@ Please send comments on these web pages to
send other questions to
<A HREF="mailto:gnu@gnu.org"><EM>gnu@gnu.org</EM></A>.
<P>
-Copyright (C) 1999 Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111, USA
+Copyright (C) 1999, 2005 Free Software Foundation, Inc.,
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<P>
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.<P>
Updated:
-$Date: 2005-03-13 14:38:24 $ by $Author: gnu_andrew $
+$Date: 2005-08-02 20:12:07 $ by $Author: gnu_andrew $
<HR>
</BODY>
</HTML>
diff --git a/doc/www.gnu.org/docs/Makefile b/doc/www.gnu.org/docs/Makefile
index 30f86d208..1b7f8ca67 100644
--- a/doc/www.gnu.org/docs/Makefile
+++ b/doc/www.gnu.org/docs/Makefile
@@ -13,7 +13,7 @@ WML_SRC = $(patsubst ../../%, %, $(TEXI_SRC:.texinfo=.html)) $(wildcard *.wml)
WML_OBJS = $(patsubst %.wml,%.html,$(WML_SRC))
%.html : %.texinfo
- texi2html -monolithic $<
+ texi2html -monolithic --ifinfo --ifhtml $<
# texi2html -monolithic $<;
# cp $< $@
# echo '#!wml --include=..' > $@
diff --git a/doc/www.gnu.org/downloads/downloads.wml b/doc/www.gnu.org/downloads/downloads.wml
index 342162bf2..48bbe5ea2 100644
--- a/doc/www.gnu.org/downloads/downloads.wml
+++ b/doc/www.gnu.org/downloads/downloads.wml
@@ -77,10 +77,10 @@ sub mylink {
<download-block>
<download
- date="29 April 2005"
- version="0.15"
- url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.15.tar.gz"
- notes="http://www.gnu.org/software/classpath/announce/20050429.html"
+ date="15 July 2005"
+ version="0.17"
+ url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.17.tar.gz"
+ notes="http://www.gnu.org/software/classpath/announce/20050715.html"
>
<!-- download
@@ -100,6 +100,18 @@ sub mylink {
<download-block>
<download
+ date="30 June 2005"
+ version="0.16"
+ url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.16.tar.gz"
+ notes="http://www.gnu.org/software/classpath/announce/20050630.html"
+>
+<download
+ date="29 April 2005"
+ version="0.15"
+ url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.15.tar.gz"
+ notes="http://www.gnu.org/software/classpath/announce/20050429.html"
+>
+<download
date="26 February 2005"
version="0.14"
url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.14.tar.gz"
diff --git a/doc/www.gnu.org/events/events.wml b/doc/www.gnu.org/events/events.wml
index fcb3de901..decbb9689 100644
--- a/doc/www.gnu.org/events/events.wml
+++ b/doc/www.gnu.org/events/events.wml
@@ -9,17 +9,58 @@
<boxitem>
<strong>Upcoming Events:</strong><br>
<ul>
-none
+[1-5 Aug 2005] <a href="http://conferences.oreillynet.com/os2005/">OSCON</a>, Portland, Oregon - USA
+<ul>
+<li><a href="http://conferences.oreillynet.com/cs/os2005/view/e_sess/6730">The State of Free JVMs</a>
+Tom Tromey</li>
</ul>
</boxitem>
<boxitem>
<strong>Past Events:</strong><br>
<ul>
+
+<li>
+[29-31 May 2005] <a href="http://2005.guadec.org/">Guadec</a>, Stuttgart - Germany
+<ul>
+<li><a href="http://2005.guadec.org/schedule/gnometalks.html#eclipseyou">The Eclipse IDE and you</a>
+Ben Konrath and Andrew Overholt
+(<a href="http://overholt.ca/eclipse/GUADEC2005-EclipseIDE.pdf">slides</a>)</li>
+<li><a href="http://2005.guadec.org/schedule/gnometalks.html#javagnome">Eclipse, Java-GNOME, and GCJ</a>
+Andrew Cowie and Ben Konrath</li>
+</ul>
+<p>
+<li>
+[1-4 Jun. 2005] <a href="http://fisl.softwarelivre.org/6.0/">6th International Free Software Forum</a> (fisl), Porto Alegre/RS, Brazil
+<ul>
+<li><a href="http://fisl.softwarelivre.org/papers/pub/programacao/360">Encontro Javali: Escape the Java Trap: GNU Classpath and Kaffe</a>
+Dalibor Topic and Mark Wielaard
+(<a href="http://www.klomp.org/mark/classpath/GNUClasspathKaffe/">slides</a>)</li>
+</ul>
+<p>
+<li>
+[22-25 Jun 2005] <a href="http://www.linuxtag.org/">LinuxTag</a>, Karlsruhe - Germany
+<ul>
+<li><a href="http://www.linuxtag.org/vcc/details.pl?id=162">GNU Classpath</a>
+Robert Schuster (in German)
+(<a href="http://www.inf.fu-berlin.de/%7Erschuste/GNUClasspath-LinuxTag2005-English.pdf">slides</a>)</li>
+<li><a href="http://www.linuxtag.org/vcc/details.pl?id=166">GCJ and Classpath: A Free Implementation of the Java programming language</a>
+Andrew Haley (in English)
+(<a href="http://people.redhat.com/~aph/linuxtag.tar.gz">slides</a>)</li>
+</ul>
+<p>
<li>[26+27 Feb. 2004] FOSDEM'05 in Brussels, Belgium. [<createlink name="Escape The Java Trap!" url="events/escape_fosdem05.html">]
-<li>[14+15 Oct. 2003] Linux Kongress '03 in Saarbr&uuml;cken, Germany.
+<p>
<li>[21+22 Feb. 2004] FOSDEM'04 in Brussels, Belgium. [<createlink name="report" url="events/fosdem04.html">]
+<p>
<li>[14+15 Oct. 2003] Linux Kongress '03 in Saarbr&uuml;cken, Germany.
+<ul>
+<li>Hacking on the VM Interface: GNU Classpath workshop, Mark Wielaard
+(<a href="http://www.klomp.org/mark/classpath/slides/gnu_classpath_workshop.html">slides</a>).
+<li>Agile2D: implementing Graphics2D over OpenGL, Jean-Daniel Fekete
+(<a href="http://www.klomp.org/mark/classpath/Agile2D.pdf">slides</a>).
+</ul>
+
</ul>
<br><br><br>
</boxitem>
diff --git a/doc/www.gnu.org/faq/faq.wml b/doc/www.gnu.org/faq/faq.wml
index dc747cdca..67ae91ff8 100644
--- a/doc/www.gnu.org/faq/faq.wml
+++ b/doc/www.gnu.org/faq/faq.wml
@@ -304,6 +304,28 @@ be a bit picky about getting signatures from all contributors. Please do
not see this as a personal offence.
<p>Giving the copyright to the FSF also gives us a clear paper trail where changes come from, which confirms our clean-room status.
+</p>
+
+<p>
+The assignment contract commits the foundation to setting distribution terms
+that permit free redistribution.
+</p>
+
+<p>
+The assignment contract we normally use has a clause that permits you to
+use your code in proprietary programs, on 30 days' notice.
+(The 30 days' notice is there because, through a legal technicality,
+it would improve our position in a suit against a hoarder.)
+Although we believe that proprietary software is wrong, we include this
+clause because it would serve no purpose to ask you to promise not to do
+it. You're giving us a gift in the first place.
+</p>
+
+<p>
+You don't need to invoke this clause in order to distribute
+copies as free software under the GNU GPL, since everyone is
+allowed to do that.
+</p>
<p>See also <a href="http://www.gnu.org/licenses/why-assign.html">http://www.gnu.org/licenses/why-assign.html</a>.
</p>
@@ -339,7 +361,6 @@ For building the Java bytecode (.class files), one of these compilers are requir
For building the JNI native libraries, the following are required unless --disable-gtk-peer is used as an argument to configure.
<ul>
<li><createlink name="GTK+ 2" url="http://www.gtk.org/">
-<li>libart-gpl
<li>gdk-pixbuf
</ul>
diff --git a/doc/www.gnu.org/home.wml b/doc/www.gnu.org/home.wml
index d5d1c872a..1d59593b8 100644
--- a/doc/www.gnu.org/home.wml
+++ b/doc/www.gnu.org/home.wml
@@ -53,7 +53,7 @@ Current snapshot releases have implementations for the following
packages (and some subpackages) <code>java.applet, java.awt,
java.beans, java.io, java.lang, java.math, java.net, java.rmi,
java.security, java.sql, java.text, java.util, java.util.jar,
-java.util.zip</code>. Not all classes and methods are implemented yet,
+java.util.zip, org.omg</code>. Not all classes and methods are implemented yet,
but most are. many of the implemented classes are already up to the
1.2 API spec. Some are already compliant with the 1.3 and 1.4 API
specification (there are preliminary implementations of
diff --git a/doc/www.gnu.org/include/macros.wml b/doc/www.gnu.org/include/macros.wml
index 5043ddac4..53f6f20fc 100644
--- a/doc/www.gnu.org/include/macros.wml
+++ b/doc/www.gnu.org/include/macros.wml
@@ -153,13 +153,13 @@ send other questions to
<A HREF="mailto:gnu@gnu.org"><EM>gnu@gnu.org</EM></A>.
<P>
Copyright (C) 1999-2003 Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111, USA
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
<P>
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.<P>
Updated:
</en>
-$Date: 2005-01-15 17:01:38 $ $Author: gnu_andrew $
+$Date: 2005-08-02 20:12:07 $ $Author: gnu_andrew $
<!--
<preserve info>
<set-var info=<get-file-properties <__file__>>>
diff --git a/doc/www.gnu.org/newsitems.txt b/doc/www.gnu.org/newsitems.txt
index a1f8e7454..815a60ff7 100644
--- a/doc/www.gnu.org/newsitems.txt
+++ b/doc/www.gnu.org/newsitems.txt
@@ -1,3 +1,13 @@
+<newsitem date="15 Jul 2005">
+<createlink name="GNU Classpath 0.17"
+ url="announce/20050715.html">
+</newsitem>
+
+<newsitem date="30 Jun 2005">
+<createlink name="GNU Classpath 0.16"
+ url="announce/20050630.html">
+</newsitem>
+
<newsitem date="29 Apr 2005">
<createlink name="GNU Classpath 0.15"
url="announce/20050429.html">
diff --git a/doc/www.gnu.org/savannah.css b/doc/www.gnu.org/savannah.css
index 217ff04db..5ec8f09c9 100644
--- a/doc/www.gnu.org/savannah.css
+++ b/doc/www.gnu.org/savannah.css
@@ -18,7 +18,7 @@
*
* you should have received a copy of the gnu general public license
* along with this program; if not, write to the free software
- * foundation, inc., 59 temple place - suite 330, boston, ma 02111-1307, usa.
+ * foundation, inc., 59 temple place - suite 330, boston, ma 02110-1301, usa.
*
* $id: savannah.css,v 1.33 2002/10/29 10:53:12 yeupou exp $
*
diff --git a/doc/www.gnu.org/stories.wml b/doc/www.gnu.org/stories.wml
index 19a92b365..c01ac1937 100644
--- a/doc/www.gnu.org/stories.wml
+++ b/doc/www.gnu.org/stories.wml
@@ -114,6 +114,15 @@ understand, and has many robustness features that have been the object
of careful design.
</project>
+<project url="http://www.cacaojvm.org/" name="CACAO">
+CACAO is a research Java Virtual Machine developed at the Vienna
+University of Technology. It has a compile-only approach, which means
+there is no interpreter at all but a JIT compiler ported to different
+architectures, like Alpha, i386, MIPS, PowerPC, and x86_64. The main
+aim of CACAO is to keep the JIT compilation time as small as possible
+while producing quite fast code.
+</project>
+
</table>
</en>
diff --git a/examples/Makefile.am b/examples/Makefile.am
index e9e81a0e5..896c0c5c0 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -87,4 +87,4 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
# Zip file be gone! (and make sure the classes are gone too)
clean-local:
- rm -f $(EXAMPLE_ZIP) classes
+ rm -rf $(EXAMPLE_ZIP) classes
diff --git a/examples/README b/examples/README
index 5452b8023..d850c2c17 100644
--- a/examples/README
+++ b/examples/README
@@ -44,5 +44,5 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath examples; see the file COPYING. If not,
-write to the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
+write to the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.
diff --git a/examples/gnu/classpath/examples/CORBA/NamingService/Demo.java b/examples/gnu/classpath/examples/CORBA/NamingService/Demo.java
index 1d6403535..b4a37720f 100644
--- a/examples/gnu/classpath/examples/CORBA/NamingService/Demo.java
+++ b/examples/gnu/classpath/examples/CORBA/NamingService/Demo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
index 70cdb1d27..85f233a1d 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java
index 262fbcd99..d4e0c56b2 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/comServer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java
index cf3c41d07..5cf372b26 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java
index 2c5c8683c..4c8f5b94c 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterImplBase.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java
index 437e81f08..b71cd8e86 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_comTesterStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java
index 7f286cbbc..08d1759d8 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comServant.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java
index 49188b6e1..495807eb9 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java
index 4040eb769..527d02d06 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/node.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java
index 46fc0a791..8d4121cda 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java
index 93d53912a..8e4913912 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/nodeHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java
index aea4a8bd9..51ea5f2d6 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java
index 415adff1f..8c499df64 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserExceptionHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java
index f9ba02dc2..2a680b91b 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java
index 13242fd63..6b9f4ce01 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThisHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java
index b13b983bb..b7c3923ce 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java
index db6a11217..79838d75c 100644
--- a/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java
+++ b/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThisHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/awt/Demo.java b/examples/gnu/classpath/examples/awt/Demo.java
index 91b67de1c..dbb6600ed 100644
--- a/examples/gnu/classpath/examples/awt/Demo.java
+++ b/examples/gnu/classpath/examples/awt/Demo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA. */
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA. */
package gnu.classpath.examples.awt;
@@ -613,7 +613,7 @@ class Demo
static class TestWindow extends SubFrame
{
static int xs = 5, ys = 5;
- private final Frame parent;
+ final Frame parent;
public TestWindow(Frame f)
{
diff --git a/examples/gnu/classpath/examples/html/Demo.java b/examples/gnu/classpath/examples/html/Demo.java
index b6ddc3550..34dd73b32 100644
--- a/examples/gnu/classpath/examples/html/Demo.java
+++ b/examples/gnu/classpath/examples/html/Demo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/examples/gnu/classpath/examples/swing/Demo.java b/examples/gnu/classpath/examples/swing/Demo.java
index 9301dd635..eef300619 100644
--- a/examples/gnu/classpath/examples/swing/Demo.java
+++ b/examples/gnu/classpath/examples/swing/Demo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
*/
@@ -429,6 +429,109 @@ public class Demo
return jsp;
}
+ private static JPanel mkTreeWorld()
+ {
+ // non-leafs
+ DefaultMutableTreeNode root = new DefaultMutableTreeNode("Exotic Subsistence");
+ DefaultMutableTreeNode fruit = new DefaultMutableTreeNode("Interesting Fruit");
+ DefaultMutableTreeNode veg = new DefaultMutableTreeNode("Extraordinary Vegetables");
+ DefaultMutableTreeNode liq = new DefaultMutableTreeNode("Peculiar Liquids");
+
+ // leafs
+ DefaultMutableTreeNode f1 = new DefaultMutableTreeNode("Abiu");
+ DefaultMutableTreeNode f2 = new DefaultMutableTreeNode("Bamboo Shoots");
+ DefaultMutableTreeNode f3 = new DefaultMutableTreeNode("Breadfruit");
+ DefaultMutableTreeNode f4 = new DefaultMutableTreeNode("Canistel");
+ DefaultMutableTreeNode f5 = new DefaultMutableTreeNode("Duku");
+ DefaultMutableTreeNode f6 = new DefaultMutableTreeNode("Guava");
+ DefaultMutableTreeNode f7 = new DefaultMutableTreeNode("Jakfruit");
+ DefaultMutableTreeNode f8 = new DefaultMutableTreeNode("Quaribea");
+
+ DefaultMutableTreeNode v1 = new DefaultMutableTreeNode("Amaranth");
+ DefaultMutableTreeNode v2 = new DefaultMutableTreeNode("Kiwano");
+ DefaultMutableTreeNode v3 = new DefaultMutableTreeNode("Leeks");
+ DefaultMutableTreeNode v4 = new DefaultMutableTreeNode("Luffa");
+ DefaultMutableTreeNode v5 = new DefaultMutableTreeNode("Chayote");
+ DefaultMutableTreeNode v6 = new DefaultMutableTreeNode("Jicama");
+ DefaultMutableTreeNode v7 = new DefaultMutableTreeNode("Okra");
+
+ DefaultMutableTreeNode l1 = new DefaultMutableTreeNode("Alcoholic");
+ DefaultMutableTreeNode l11 = new DefaultMutableTreeNode("Caipirinha");
+ DefaultMutableTreeNode l21 = new DefaultMutableTreeNode("Mojito");
+ DefaultMutableTreeNode l31 = new DefaultMutableTreeNode("Margarita");
+ DefaultMutableTreeNode l41 = new DefaultMutableTreeNode("Martini");
+ DefaultMutableTreeNode l5 = new DefaultMutableTreeNode("Non Alcoholic");
+ DefaultMutableTreeNode l55 = new DefaultMutableTreeNode("Babaji");
+ DefaultMutableTreeNode l65 = new DefaultMutableTreeNode("Chikita");
+
+ root.add(fruit);
+ root.add(veg);
+ root.add(liq);
+ fruit.add(f1);
+ fruit.add(f2);
+ fruit.add(f3);
+ fruit.add(f4);
+ fruit.add(f5);
+ fruit.add(f6);
+ fruit.add(f7);
+ fruit.add(f8);
+ veg.add(v1);
+ veg.add(v2);
+ veg.add(v3);
+ veg.add(v4);
+ veg.add(v5);
+ veg.add(v6);
+ veg.add(v7);
+ liq.add(l1);
+ l1.add(l11);
+ l1.add(l21);
+ l1.add(l31);
+ l1.add(l41);
+ liq.add(l5);
+ l5.add(l55);
+ l5.add(l65);
+
+ final JTree tree = new JTree(root);
+ tree.setLargeModel(true);
+ DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel();
+ dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
+ tree.setSelectionModel(dtsm);
+
+ // buttons to add and delete
+ JButton add = mkButton("add element");
+ add.addActionListener(new ActionListener()
+ {
+ int i = 0;
+ public void actionPerformed(ActionEvent e)
+ {
+ for (int i = 0; i < tree.getRowCount(); i++)
+ {
+ if (tree.isRowSelected(i))
+ {
+ TreePath p = tree.getPathForRow(i);
+ DefaultMutableTreeNode n = (DefaultMutableTreeNode) p.
+ getLastPathComponent();
+ n.add(new DefaultMutableTreeNode("New Element"));
+ tree.repaint();
+ break;
+ }
+ }
+ }
+ });
+
+
+ JPanel p1 = new JPanel();
+ p1.setLayout(new BorderLayout());
+
+ JPanel p2 = new JPanel();
+ p2.add(add);
+
+ p1.add(p2, BorderLayout.NORTH);
+ p1.add(mkScrollPane(tree), BorderLayout.CENTER);
+
+ return p1;
+ }
+
public static JPanel mkListWorld()
{
@@ -524,6 +627,7 @@ public class Demo
BorderLayout.CENTER);
desk.add(f);
f.setBounds(i, i, 250, 200);
+ f.setVisible(true);
i += 30;
}
});
@@ -544,6 +648,7 @@ public class Demo
tabs.add("Button world!", mkButtonWorld());
tabs.add("List world!", mkListWorld());
tabs.add("Desktop world!", mkDesktopWorld());
+ tabs.add("Tree world!", mkTreeWorld());
return tabs;
}
@@ -553,6 +658,8 @@ public class Demo
slider.setPaintTrack(true);
slider.setPaintTicks(true);
slider.setMajorTickSpacing(30);
+ slider.setMinorTickSpacing(5);
+ slider.setPaintLabels(true);
slider.setInverted(false);
JProgressBar progress = new JProgressBar();
BoundedRangeModel model = new DefaultBoundedRangeModel(10, 1, 0, 100);
@@ -837,6 +944,11 @@ public class Demo
child2.add(child24);
JTree tree = new JTree(root);
+ tree.setLargeModel(true);
+ DefaultTreeSelectionModel dtsm = new DefaultTreeSelectionModel();
+ dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
+ tree.setSelectionModel(dtsm);
+
return tree;
}
diff --git a/examples/gnu/classpath/examples/swing/GNULookAndFeel.java b/examples/gnu/classpath/examples/swing/GNULookAndFeel.java
index 9c8e4c310..97e91a89f 100644
--- a/examples/gnu/classpath/examples/swing/GNULookAndFeel.java
+++ b/examples/gnu/classpath/examples/swing/GNULookAndFeel.java
@@ -15,16 +15,18 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
*/
package gnu.classpath.examples.swing;
import java.awt.Color;
+import javax.swing.ImageIcon;
import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;
+import javax.swing.plaf.IconUIResource;
import javax.swing.plaf.basic.BasicLookAndFeel;
public class GNULookAndFeel extends BasicLookAndFeel
@@ -40,6 +42,8 @@ public class GNULookAndFeel extends BasicLookAndFeel
static UIDefaults LAF_defaults;
+ private final static String iconspath = "/gnu/javax/swing/plaf/gtk/icons/";
+
public UIDefaults getDefaults()
{
if (LAF_defaults == null)
@@ -59,7 +63,20 @@ public class GNULookAndFeel extends BasicLookAndFeel
"Menu.background", new ColorUIResource(blueGray),
"MenuBar.background", new ColorUIResource(blueGray),
"MenuItem.background", new ColorUIResource(blueGray),
- "ScrollBar.background", new ColorUIResource(blueGray)
+ "ScrollBar.background", new ColorUIResource(blueGray),
+
+ "Tree.closedIcon",
+ new IconUIResource(new ImageIcon
+ (getClass().getResource
+ (iconspath + "TreeClosed.png"))),
+ "Tree.leafIcon",
+ new IconUIResource(new ImageIcon
+ (getClass().getResource
+ (iconspath + "TreeLeaf.png"))),
+ "Tree.openIcon",
+ new IconUIResource(new ImageIcon
+ (getClass().getResource
+ (iconspath + "TreeOpen.png"))),
};
LAF_defaults.putDefaults(myDefaults);
}
diff --git a/gnu/CORBA/Asynchron.java b/gnu/CORBA/Asynchron.java
index 4ea222543..275b57091 100644
--- a/gnu/CORBA/Asynchron.java
+++ b/gnu/CORBA/Asynchron.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/BigDecimalHelper.java b/gnu/CORBA/BigDecimalHelper.java
index 9ef7ad151..f1e1dd6b4 100644
--- a/gnu/CORBA/BigDecimalHelper.java
+++ b/gnu/CORBA/BigDecimalHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/ByteArrayComparator.java b/gnu/CORBA/ByteArrayComparator.java
index 3dedc7f96..849115463 100644
--- a/gnu/CORBA/ByteArrayComparator.java
+++ b/gnu/CORBA/ByteArrayComparator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/BigEndianInputStream.java b/gnu/CORBA/CDR/BigEndianInputStream.java
index 8218b0347..bc019396a 100644
--- a/gnu/CORBA/CDR/BigEndianInputStream.java
+++ b/gnu/CORBA/CDR/BigEndianInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/BigEndianOutputStream.java b/gnu/CORBA/CDR/BigEndianOutputStream.java
index fe80bbc4f..e0aa7da77 100644
--- a/gnu/CORBA/CDR/BigEndianOutputStream.java
+++ b/gnu/CORBA/CDR/BigEndianOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/LittleEndianInputStream.java b/gnu/CORBA/CDR/LittleEndianInputStream.java
index 412608b0b..b71a9a4f6 100644
--- a/gnu/CORBA/CDR/LittleEndianInputStream.java
+++ b/gnu/CORBA/CDR/LittleEndianInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/LittleEndianOutputStream.java b/gnu/CORBA/CDR/LittleEndianOutputStream.java
index 7ff8263db..a6d56cfa6 100644
--- a/gnu/CORBA/CDR/LittleEndianOutputStream.java
+++ b/gnu/CORBA/CDR/LittleEndianOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/Vio.java b/gnu/CORBA/CDR/Vio.java
new file mode 100644
index 000000000..8f17bd2f5
--- /dev/null
+++ b/gnu/CORBA/CDR/Vio.java
@@ -0,0 +1,638 @@
+/* gnuValueBaseHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.ObjectCreator;
+
+import org.omg.CORBA.CustomMarshal;
+import org.omg.CORBA.DataInputStream;
+import org.omg.CORBA.DataOutputStream;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.StringSeqHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CORBA.portable.ValueFactory;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A specialised class for reading and writing the value types.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class Vio
+{
+ /**
+ * If true, wrap value type data into chunks. This decrease the
+ * performance, but is required for the interoperability with
+ * Sun's CORBA implementation. Chunking may increase the security,
+ * as there is more control on the number of bytes being transferred.
+ *
+ * The current implementation would accept both single chunk or multiple
+ * chunks, but will always send a single chunk.
+ */
+ public static boolean USE_CHUNKING = true;
+
+ /**
+ * The first field in the value record. The last octet may contain
+ * additional flags (vf_CODEBASE, vf_ID and vf_MULTIPLE_IDS). The tag
+ * value is different for the indirections (vt_INDIRECTION) and
+ * nulls (vt_NULL).
+ */
+ public static final int vt_VALUE_TAG = 0x7fffff00;
+
+ /**
+ * The value tag flag, indicating that the codebase URL is present
+ * in the value tag record.
+ */
+ public static final int vf_CODEBASE = 0x1;
+
+ /**
+ * The value tag flag, indicating that a single repository id is present
+ * in the value tag record.
+ */
+ public static final int vf_ID = 0x2;
+
+ /**
+ * The value tag flag, indicating, that there are multiple repository
+ * ids present in the record. If this flag is set, the flag vf_ID must
+ * also be set, resulting the value of the least significant byte 0x6.
+ */
+ public static final int vf_MULTIPLE_IDS = 0x4;
+
+ /**
+ * The value tag flag, indicating the presence of chunking. Each chunk is
+ * preceeded by a positive int, indicating the number of bytes in the chunk.
+ * A sequence of chunks is terminated by a non positive int.
+ */
+ public static final int vf_CHUNKING = 0x8;
+
+ /**
+ * The indirection tag value. Such tag must be followed by the CORBA long,
+ * indicating the offset in the CORBA message, where the indirected
+ * information is present. This offset is assumed zero at the position
+ * where the mentioned CORBA long starts and can refer both forward
+ * (positive values) and backward (negative values).
+ */
+ public static final int vt_INDIRECTION = 0xffffffff;
+
+ /**
+ * This tag value means that the value object being transferred is equal
+ * to null.
+ */
+ public static final int vt_NULL = 0x0;
+
+ /**
+ * Read the value base from the given input stream. Determines the
+ * required class from the repository id. This includes operations
+ * that are not required when an unitialised instance or at least
+ * class of the value type is known. Hence it may be faster to use
+ * the alternative methods, read(InputStream, Class) or
+ * read(InputStream, Serializable).
+ *
+ * @param input a stream to read from.
+ *
+ * @return the loaded value.
+ *
+ * @throws MARSHAL if the reading has failed due any reason.
+ */
+ public static Serializable read(InputStream input)
+ {
+ // Explicitly prevent the stream from closing as we may need
+ // to read the subsequent bytes as well. Stream may be auto-closed
+ // in its finalizer.
+ try
+ {
+ // We may need to jump back if the value is read via value factory.
+ input.mark(512);
+
+ int value_tag = input.read_long();
+ checkTag(value_tag);
+
+ String codebase = null;
+ String[] ids = null;
+ String id = null;
+
+ // The existing implementing object.
+ java.lang.Object ox = null;
+
+ // Check for the agreed null value.
+ if (value_tag == vt_NULL)
+ return null;
+ else if (value_tag == vt_INDIRECTION)
+
+ // TODO FIXME Implement support for indirections.
+ throw new NO_IMPLEMENT("Indirections unsupported");
+ else
+ {
+ // Read the value.
+ if ((value_tag & vf_CODEBASE) != 0)
+ {
+ // The codebase is present. The codebase is a space
+ // separated list of URLs from where the implementing
+ // code can be downloaded.
+ codebase = input.read_string();
+ }
+
+ if ((value_tag & vf_MULTIPLE_IDS) != 0)
+ {
+ // Multiple supported repository ids are present.
+ ids = StringSeqHelper.read(input);
+ for (int i = 0; (i < ids.length) && (ox == null); i++)
+ {
+ ox = ObjectCreator.Idl2Object(ids [ i ]);
+
+ if (ox == null)
+ {
+ // Try to find the value factory.
+ ValueFactory f =
+ ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(ids [ i ]);
+
+ if (f != null)
+ {
+ // Reset, as the value factory reads from beginning.
+ input.reset();
+ return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input);
+ }
+ }
+ }
+ }
+ else if ((value_tag & vf_ID) != 0)
+ {
+ // Single supported repository id is present.
+ id = input.read_string();
+ ox = ObjectCreator.Idl2Object(id);
+
+ if (ox == null)
+ {
+ // Try to find the value factory.
+ ValueFactory f =
+ ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(id);
+
+ if (f != null)
+ {
+ input.reset();
+ return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input);
+ }
+ }
+ }
+ }
+
+ if (ox == null)
+ throw new MARSHAL("Unable to instantiate the value type");
+ else
+ {
+ read_instance(input, ox, value_tag);
+ return (Serializable) ox;
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new MARSHAL(ex + ":" + ex.getMessage());
+ }
+ }
+
+ /**
+ * Read the value base from the given input stream when
+ * the value base class is available. Hence there is no need
+ * to guess it from the repository id.
+ *
+ * @param input a stream to read from.
+ * @param value_class the class of the value being read.
+ *
+ * @return the loaded value.
+ *
+ * @throws MARSHAL if the reading has failed due any reason.
+ */
+ public static Serializable read(InputStream input, Class value_class)
+ {
+ // Explicitly prevent the stream from closing as we may need
+ // to read the subsequent bytes as well. Stream may be auto-closed
+ // in its finalizer.
+ try
+ {
+ int value_tag = input.read_long();
+ checkTag(value_tag);
+
+ // The existing implementing object.
+ java.lang.Object ox = value_class.newInstance();
+
+ // Check for the agreed null value.
+ if (value_tag == vt_NULL)
+ return null;
+ else if (value_tag == vt_INDIRECTION)
+
+ // TODO FIXME Implement support for indirections.
+ throw new NO_IMPLEMENT("Indirections unsupported");
+ else
+ {
+ // Read the value.
+ if ((value_tag & vf_CODEBASE) != 0)
+ {
+ // The codebase is present, but skip it.
+ input.read_string();
+ }
+
+ if ((value_tag & vf_MULTIPLE_IDS) != 0)
+ {
+ // Multiple supported repository ids are present, but skip them.
+ StringSeqHelper.read(input);
+ }
+ else if ((value_tag & vf_ID) != 0)
+ {
+ // Single supported repository id is present, but skip it.
+ input.read_string();
+ }
+ }
+
+ read_instance(input, ox, value_tag);
+ return (Serializable) ox;
+ }
+ catch (Exception ex)
+ {
+ throw new MARSHAL(ex + ":" + ex.getMessage());
+ }
+ }
+
+ /**
+ * Read the value base from the given input stream when
+ * the unitialised instance is available. Hence there is no need
+ * to guess the class from the repository id and then to instantiate
+ * an instance.
+ *
+ * @param input a stream to read from.
+ * @param value_instance an instance of the value.
+ *
+ * @return the loaded value.
+ *
+ * @throws MARSHAL if the reading has failed due any reason.
+ */
+ public static Serializable read(InputStream input, Serializable value_instance)
+ {
+ // Explicitly prevent the stream from closing as we may need
+ // to read the subsequent bytes as well. Stream may be auto-closed
+ // in its finalizer.
+ try
+ {
+ int value_tag = input.read_long();
+ checkTag(value_tag);
+
+ // Check for the agreed null value.
+ if (value_tag == vt_NULL)
+ return null;
+ else if (value_tag == vt_INDIRECTION)
+
+ // TODO FIXME Implement support for indirections.
+ throw new NO_IMPLEMENT("Indirections unsupported");
+ else
+ {
+ // Read the value.
+ if ((value_tag & vf_CODEBASE) != 0)
+ {
+ // The codebase is present, but skip it.
+ input.read_string();
+ }
+
+ if ((value_tag & vf_MULTIPLE_IDS) != 0)
+ {
+ // Multiple supported repository ids are present, but skip them.
+ StringSeqHelper.read(input);
+ }
+ else if ((value_tag & vf_ID) != 0)
+ {
+ // Single supported repository id is present, but skip it.
+ input.read_string();
+ }
+ }
+
+ read_instance(input, value_instance, value_tag);
+ return (Serializable) value_instance;
+ }
+ catch (Exception ex)
+ {
+ throw new MARSHAL(ex + ":" + ex.getMessage());
+ }
+ }
+
+ /**
+ * Fill in the instance fields by the data from the input stream.
+ * The method assumes that the value header, if any, is already
+ * behind. The information from the stream is stored into the
+ * passed ox parameter.
+ *
+ * @param input an input stream to read from.
+ * @param value a value type object, must be either Streamable or
+ * CustomMarshal.
+ */
+ public static void read_instance(InputStream input, Object value,
+ int value_tag
+ )
+ {
+ try
+ {
+ if ((value_tag & vf_CHUNKING) != 0)
+ {
+ ByteArrayOutputStream bout = null;
+ int n = -1;
+
+ // Read all chunks.
+ int chunk_size = input.read_long();
+ if (chunk_size <= 0)
+ throw new MARSHAL("Invalid first chunk size " + chunk_size);
+
+ byte[] r = new byte[ chunk_size ];
+
+ while (chunk_size > 0)
+ {
+ if (r.length < chunk_size)
+ r = new byte[ chunk_size + 256 ];
+
+ n = 0;
+ reading:
+ while (n < chunk_size)
+ n += input.read(r, n, r.length - n);
+
+ // Read the size of the next chunk.
+ chunk_size = input.read_long();
+
+ // If the value is non negative, there is more than one chunk.
+ // Accumulate chunks in the buffer.
+ // The last chunk (or the only chunk, if only one chunk is
+ // present) is not written in the buffer. It is stored in the
+ // array r, avoiding unnecessary buffer operations.
+ if (chunk_size > 0)
+ {
+ bout = new ByteArrayOutputStream(2 * chunk_size);
+ bout.write(r, 0, chunk_size);
+ }
+ }
+
+ if (bout != null)
+ {
+ // More than one chunk was present.
+ // Add the last chunk.
+ bout.write(r, 0, n);
+ input = new cdrBufInput(bout.toByteArray());
+ }
+ else
+ {
+ // Only one chunk was present.
+ input = new cdrBufInput(r);
+ }
+ }
+ }
+ catch (IOException ex)
+ {
+ MARSHAL m = new MARSHAL("Unable to read chunks");
+ m.initCause(ex);
+ throw m;
+ }
+
+ // The user-defines io operations are implemented.
+ if (value instanceof CustomMarshal)
+ {
+ CustomMarshal marsh = (CustomMarshal) value;
+ try
+ {
+ marsh.unmarshal((DataInputStream) input);
+ }
+ catch (ClassCastException ex)
+ {
+ incorrect_plug_in(ex);
+ }
+ }
+ else
+ // The IDL-generated io operations are implemented.
+ if (value instanceof Streamable)
+ {
+ ((Streamable) value)._read(input);
+ }
+ else
+
+ // Stating the interfaces that the USER should use.
+ throw new MARSHAL("The " + value.getClass().getName() +
+ " must implement either StreamableValue or CustomValue."
+ );
+
+ // The negative end of state marker is expected from OMG standard.
+ // If the chunking is used, this marker is already extracted.
+ if ((value_tag & vf_CHUNKING) == 0)
+ {
+ int eor = input.read_long();
+ if (eor >= 0)
+ throw new MARSHAL("End of state marker has an invalid value " + eor);
+ }
+ }
+
+ /**
+ * Write the value base into the given stream.
+ *
+ * @param output a stream to write to.
+ *
+ * @param value a value type object, must be either Streamable or
+ * CustomMarshal.
+ *
+ * @throws MARSHAL if the writing failed due any reason.
+ */
+ public static void write(OutputStream output, Serializable value)
+ {
+ // Write null if this is a null value.
+ if (value == null)
+ output.write_long(vt_NULL);
+ else
+ write(output, value, ObjectCreator.toIDL(value.getClass().getName()));
+ }
+
+ /**
+ * Write the value base into the given stream, stating that it is an
+ * instance of the given class. The written record has no repository
+ * id and requires to supply a class or initialised instance for reading
+ * rather than an actual class it is.
+ *
+ * This results writing a different repository id.
+ *
+ * If the passed value implements the {@link CustomMarshal},
+ * the helper uses {@link CustomMarshal#marshal}
+ * to write the content in a user defined way. Otherwise,
+ * this implementation initialises the {@link ObjectOutputStream}
+ * and writes through it.
+ *
+ * @param output a stream to write to.
+ *
+ * @param value a value to write.
+ *
+ * @throws MARSHAL if the writing failed due any reason.
+ */
+ public static void write(OutputStream output, Serializable value,
+ Class substitute
+ )
+ {
+ // Write null if this is a null value.
+ if (value == null)
+ output.write_long(vt_NULL);
+
+ else
+ write(output, value, ObjectCreator.toIDL(substitute.getName()));
+ }
+
+ /**
+ * Write value when its repository Id is explicitly given.
+ *
+ * @param output an output stream to write into.
+ * @param value a value to write.
+ * @param id a value repository id.
+ */
+ public static void write(OutputStream output, Serializable value, String id)
+ {
+ if (value == null)
+ output.write_long(vt_NULL);
+ else
+ write_instance(output, value, id);
+ }
+
+ /**
+ * Write value when its repository Id is explicitly given.
+ * Does not handle null.
+ *
+ * @param output an output stream to write into.
+ * @param value a value to write.
+ * @param id a value repository id.
+ */
+ private static void write_instance(OutputStream output, Serializable value,
+ String id
+ )
+ {
+ // This implementation always writes a single repository id.
+ // It never writes multiple repository ids and currently does not use
+ // a codebase.
+ int value_tag = vt_VALUE_TAG | vf_ID;
+
+ OutputStream outObj;
+ cdrBufOutput out = null;
+
+ if (USE_CHUNKING)
+ {
+ out = new cdrBufOutput();
+ out.setOrb(output.orb());
+ outObj = out;
+ value_tag |= vf_CHUNKING;
+ }
+ else
+ outObj = output;
+
+ output.write_long(value_tag);
+ output.write_string(id);
+
+ // User defince write method is present.
+ if (value instanceof CustomMarshal)
+ {
+ try
+ {
+ ((CustomMarshal) value).marshal((DataOutputStream) outObj);
+ }
+ catch (ClassCastException ex)
+ {
+ incorrect_plug_in(ex);
+ }
+ }
+ else if (value instanceof Streamable)
+ {
+ ((Streamable) value)._write(outObj);
+ }
+ else
+
+ // Stating the interfaces that the USER should use.
+ throw new MARSHAL("The " + value.getClass().getName() +
+ " must implement either StreamableValue or CustomValue."
+ );
+
+ if (USE_CHUNKING)
+ {
+ output.write_long(out.buffer.size());
+ try
+ {
+ out.buffer.writeTo(output);
+ }
+ catch (IOException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+
+ // The end of record marker, required by OMG standard.
+ output.write_long(-1);
+ }
+
+ /**
+ * This can be called if the alternative CORBA implementation
+ * is incorrectly plugged in.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ private static void incorrect_plug_in(Throwable ex)
+ throws NO_IMPLEMENT
+ {
+ NO_IMPLEMENT no = new NO_IMPLEMENT("Incorrect CORBA plug-in");
+ no.initCause(ex);
+ throw no;
+ }
+
+ /**
+ * Check the passed value tag for correctness.
+ *
+ * @param value_tag a tag to check, must be between 0x7fffff00 and 0x7fffffff
+ *
+ * @throws MARSHAL if the tag is outside this interval.
+ */
+ private static final void checkTag(int value_tag)
+ {
+ if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) &&
+ value_tag != vt_NULL && value_tag != vt_INDIRECTION
+ )
+ throw new MARSHAL("Invalid value record, unsupported header tag: " +
+ value_tag
+ );
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/abstractDataInputStream.java b/gnu/CORBA/CDR/abstractDataInputStream.java
index 4da48bb27..be926254d 100644
--- a/gnu/CORBA/CDR/abstractDataInputStream.java
+++ b/gnu/CORBA/CDR/abstractDataInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/abstractDataOutputStream.java b/gnu/CORBA/CDR/abstractDataOutputStream.java
index b54dc0f7f..2f9b8c419 100644
--- a/gnu/CORBA/CDR/abstractDataOutputStream.java
+++ b/gnu/CORBA/CDR/abstractDataOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/aligningInputStream.java b/gnu/CORBA/CDR/aligningInputStream.java
index c29a52cfa..a719b32ee 100644
--- a/gnu/CORBA/CDR/aligningInputStream.java
+++ b/gnu/CORBA/CDR/aligningInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/aligningOutputStream.java b/gnu/CORBA/CDR/aligningOutputStream.java
index f4009c47c..8a682c1fd 100644
--- a/gnu/CORBA/CDR/aligningOutputStream.java
+++ b/gnu/CORBA/CDR/aligningOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/cdrBufInput.java b/gnu/CORBA/CDR/cdrBufInput.java
index 58715c64a..3cab7216c 100644
--- a/gnu/CORBA/CDR/cdrBufInput.java
+++ b/gnu/CORBA/CDR/cdrBufInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/cdrBufOutput.java b/gnu/CORBA/CDR/cdrBufOutput.java
index d8d34f7d4..47f5f176b 100644
--- a/gnu/CORBA/CDR/cdrBufOutput.java
+++ b/gnu/CORBA/CDR/cdrBufOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/cdrInput.java b/gnu/CORBA/CDR/cdrInput.java
index 644e01930..859f93ae5 100644
--- a/gnu/CORBA/CDR/cdrInput.java
+++ b/gnu/CORBA/CDR/cdrInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,22 +51,32 @@ import gnu.CORBA.gnuAny;
import gnu.CORBA.stubFinder;
import org.omg.CORBA.Any;
+import org.omg.CORBA.AnySeqHolder;
import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BooleanSeqHolder;
+import org.omg.CORBA.CharSeqHolder;
+import org.omg.CORBA.DoubleSeqHolder;
+import org.omg.CORBA.FloatSeqHolder;
+import org.omg.CORBA.LongLongSeqHolder;
+import org.omg.CORBA.LongSeqHolder;
import org.omg.CORBA.MARSHAL;
-import org.omg.CORBA.NO_IMPLEMENT;
import org.omg.CORBA.ORB;
-import org.omg.CORBA.Object;
+import org.omg.CORBA.OctetSeqHolder;
+import org.omg.CORBA.ShortSeqHolder;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.TypeCodePackage.Bounds;
+import org.omg.CORBA.ULongLongSeqHolder;
+import org.omg.CORBA.ULongSeqHolder;
+import org.omg.CORBA.UShortSeqHolder;
+import org.omg.CORBA.WCharSeqHolder;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.ObjectImpl;
-import java.io.DataInput;
-import java.io.DataInputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.io.Serializable;
import java.math.BigDecimal;
@@ -74,13 +84,17 @@ import java.math.BigDecimal;
* A simple CORBA CDR (common data representation)
* input stream, reading data from the
* given {@link java.io.InputStream}. The primitive types
- * are aligned on they natural boundaries by implamenting the
+ * are aligned on they natural boundaries by implementing the
* abstract method {@link #align(int boundary)}.
*
+ * The same class also implements {@link org.omg.CORBA.DataInputStream} to
+ * read the object content in a user defined way.
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class cdrInput
- extends org.omg.CORBA.portable.InputStream
+ extends org.omg.CORBA_2_3.portable.InputStream
+ implements org.omg.CORBA.DataInputStream
{
/**
* The message, explaining that the exception has been thrown due
@@ -110,7 +124,7 @@ public abstract class cdrInput
/**
* The GIOP version.
*/
- protected Version giop = new Version(1, 0);
+ protected Version giop = new Version(1, 2);
/**
* The code set information.
@@ -352,22 +366,28 @@ public abstract class cdrInput
* the .narrow method of its helper, despite in some cases the direct
* cast would also work.
*
+ * The null objects are recognised from the empty profile set.
+ * For such objects, null is returned.
+ *
* @return the loaded and constructed object.
*/
- public Object read_Object()
+ public org.omg.CORBA.Object read_Object()
{
try
{
IOR ior = new IOR();
ior._read_no_endian(this);
+ if (ior.Id == null)
+ return null;
+
// Check maybe this is a remote reference to the local object.
// This is only possible if we access the repository of the
// connected object.
if (orb instanceof Functional_ORB)
{
Functional_ORB forb = (Functional_ORB) orb;
- Object local = forb.find_local_object(ior);
+ org.omg.CORBA.Object local = forb.find_local_object(ior);
if (local != null)
return local;
}
@@ -1219,8 +1239,433 @@ public abstract class cdrInput
*
* @return the returned object.
*/
- public Object read_Object(Class klass)
+ public org.omg.CORBA.Object read_Object(Class klass)
{
return read_Object();
}
+
+ /**
+ * Read a value type structure from the stream.
+ *
+ * OMG specification states the writing format is outside the scope
+ * of GIOP definition. This implementation uses java serialization
+ * mechanism, calling {@link ObjectInputStream#readObject}
+ *
+ * @return an value type structure, unmarshaled from the stream
+ */
+ public Serializable read_Value()
+ {
+ return read_value();
+ }
+
+ /**
+ * Read the abstract interface. An abstract interface can be either
+ * CORBA value type or CORBA object and is returned as an abstract
+ * java.lang.Object.
+ *
+ * As specified in OMG specification, this reads a single
+ * boolean and then delegates either to {@link #read_Object()} (for false)
+ * or to {@link #read_Value()} (for true).
+ *
+ * @return an abstract interface, unmarshaled from the stream
+ */
+ public java.lang.Object read_Abstract()
+ {
+ return read_abstract_interface();
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_char_array(CharSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_char_array(holder.value, offset, length);
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_wchar_array(WCharSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_wchar_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the char array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing char array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private char[] ensureArray(char[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new char[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ char[] value = new char[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_ulong_array(ULongSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_ulong_array(holder.value, offset, length);
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_long_array(LongSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_ulong_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the int array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing int array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private int[] ensureArray(int[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new int[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ int[] value = new int[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_float_array(FloatSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_float_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the float array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing float array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private float[] ensureArray(float[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new float[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ float[] value = new float[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_double_array(DoubleSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_double_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the double array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing double array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private double[] ensureArray(double[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new double[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ double[] value = new double[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_short_array(ShortSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_short_array(holder.value, offset, length);
+ }
+
+ /** {@inheritDoc} */
+ public void read_ushort_array(UShortSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_ushort_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the short array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing short array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private short[] ensureArray(short[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new short[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ short[] value = new short[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_octet_array(OctetSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_octet_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the byte array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing byte array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private byte[] ensureArray(byte[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new byte[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ byte[] value = new byte[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_longlong_array(LongLongSeqHolder holder, int offset,
+ int length
+ )
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_longlong_array(holder.value, offset, length);
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_ulonglong_array(ULongLongSeqHolder holder, int offset,
+ int length
+ )
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_ulonglong_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the array of longs to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private long[] ensureArray(long[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new long[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ long[] value = new long[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_boolean_array(BooleanSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_boolean_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the array of booleans to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing array of booleans, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private boolean[] ensureArray(boolean[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new boolean[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ boolean[] value = new boolean[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_any_array(AnySeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ for (int i = offset; i < offset + length; i++)
+ {
+ holder.value [ i ] = read_any();
+ }
+ }
+
+ /**
+ * If required, allocate or resize the array of Anys to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing array of Anys, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private Any[] ensureArray(Any[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new Any[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ Any[] value = new Any[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * This method is required to represent the DataInputStream as a value
+ * type object.
+ *
+ * @return a single entity "IDL:omg.org/CORBA/DataInputStream:1.0",
+ * always.
+ */
+ public String[] _truncatable_ids()
+ {
+ return new String[] { "IDL:omg.org/CORBA/DataInputStream:1.0" };
+ }
} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/cdrOutput.java b/gnu/CORBA/CDR/cdrOutput.java
index 30efaa854..86ca3b1cb 100644
--- a/gnu/CORBA/CDR/cdrOutput.java
+++ b/gnu/CORBA/CDR/cdrOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -64,9 +64,9 @@ import org.omg.CORBA.portable.ObjectImpl;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
-import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
+import java.io.Serializable;
import java.math.BigDecimal;
@@ -75,14 +75,15 @@ import java.math.BigDecimal;
* output stream, writing data into the
* given {@link java.io.OutputStream}.
*
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ * The same class also implements the {@link DataInputStream},
+ * providing support for writing the value type objects
+ * in a user defined way.
*
- * TODO the standalone chars and char arrays are still written using
- * the native encoding, as the size under arbitrary encoding is not
- * evident.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class cdrOutput
- extends org.omg.CORBA.portable.OutputStream
+ extends org.omg.CORBA_2_3.portable.OutputStream
+ implements org.omg.CORBA.DataOutputStream
{
/**
* This instance is used to convert primitive data types into the
@@ -315,10 +316,18 @@ public abstract class cdrOutput
* form of the plain (not a string-encoded) IOR profile without the
* heading endian indicator. The responsible method for reading such
* data is {@link IOR.write_no_endian}.
+ *
+ * The null value is written as defined in OMG specification
+ * (zero length string, followed by an empty set of profiles).
*/
public void write_Object(org.omg.CORBA.Object x)
{
- if (x instanceof ObjectImpl)
+ if (x == null)
+ {
+ IOR.write_null(this);
+ return;
+ }
+ else if (x instanceof ObjectImpl)
{
Delegate d = ((ObjectImpl) x)._get_delegate();
@@ -960,4 +969,31 @@ public abstract class cdrOutput
Unexpected.error(ex);
}
}
+
+ /** {@inheritDoc} */
+ public void write_any_array(Any[] anys, int offset, int length)
+ {
+ for (int i = offset; i < offset + length; i++)
+ {
+ write_any(anys [ i ]);
+ }
+ }
+
+ public String[] _truncatable_ids()
+ {
+ /**@todo Implement this org.omg.CORBA.portable.ValueBase abstract method*/
+ throw new java.lang.UnsupportedOperationException("Method _truncatable_ids() not yet implemented.");
+ }
+
+ /** {@inheritDoc} */
+ public void write_Abstract(java.lang.Object value)
+ {
+ write_Abstract(value);
+ }
+
+ /** {@inheritDoc} */
+ public void write_Value(Serializable value)
+ {
+ write_Value(value);
+ }
} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/encapsulatedOutput.java b/gnu/CORBA/CDR/encapsulatedOutput.java
index e4673b099..3350291bc 100644
--- a/gnu/CORBA/CDR/encapsulatedOutput.java
+++ b/gnu/CORBA/CDR/encapsulatedOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Connected_objects.java b/gnu/CORBA/Connected_objects.java
index 298d49757..b7eefb133 100644
--- a/gnu/CORBA/Connected_objects.java
+++ b/gnu/CORBA/Connected_objects.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,11 +60,14 @@ public class Connected_objects
/**
* Create an initialised instance.
*/
- cObject(org.omg.CORBA.Object _object, int _port, byte[] _key)
+ cObject(org.omg.CORBA.Object _object, int _port, byte[] _key,
+ java.lang.Object an_identity
+ )
{
object = _object;
port = _port;
key = _key;
+ identity = an_identity;
}
/**
@@ -82,6 +85,12 @@ public class Connected_objects
*/
public final byte[] key;
+ /**
+ * The shared serving identity (usually POA) or null if no such
+ * applicable.
+ */
+ public final java.lang.Object identity;
+
public boolean equals(java.lang.Object other)
{
if (other instanceof cObject)
@@ -118,17 +127,23 @@ public class Connected_objects
*/
public cObject getKey(org.omg.CORBA.Object stored_object)
{
- Map.Entry item;
- Iterator iter = objects.entrySet().iterator();
- cObject ref;
-
- while (iter.hasNext())
+ synchronized (objects)
{
- item = (Map.Entry) iter.next();
- ref = (cObject) item.getValue();
- if (stored_object.equals(ref.object))
- return ref;
+ Map.Entry item;
+ Iterator iter = objects.entrySet().iterator();
+ cObject ref;
+
+ while (iter.hasNext())
+ {
+ item = (Map.Entry) iter.next();
+ ref = (cObject) item.getValue();
+ if (stored_object.equals(ref.object) ||
+ stored_object._is_equivalent(ref.object)
+ )
+ return ref;
+ }
}
+
return null;
}
@@ -144,7 +159,7 @@ public class Connected_objects
*/
public cObject add(org.omg.CORBA.Object object, int port)
{
- return add(generateObjectKey(object), object, port);
+ return add(generateObjectKey(object), object, port, null);
}
/**
@@ -155,10 +170,15 @@ public class Connected_objects
* @param port the port, on that the ORB will be listening on the
* remote invocations.
*/
- public cObject add(byte[] key, org.omg.CORBA.Object object, int port)
+ public cObject add(byte[] key, org.omg.CORBA.Object object, int port,
+ java.lang.Object identity
+ )
{
- cObject rec = new cObject(object, port, key);
- objects.put(key, rec);
+ cObject rec = new cObject(object, port, key, identity);
+ synchronized (objects)
+ {
+ objects.put(key, rec);
+ }
return rec;
}
@@ -171,12 +191,14 @@ public class Connected_objects
*/
public cObject get(byte[] key)
{
- return (cObject) objects.get(key);
+ synchronized (objects)
+ {
+ return (cObject) objects.get(key);
+ }
}
/**
* Get the map entry set.
- * @return
*/
public Set entrySet()
{
@@ -190,9 +212,12 @@ public class Connected_objects
*/
public void remove(org.omg.CORBA.Object object)
{
- cObject ref = getKey(object);
- if (ref != null)
- objects.remove(ref.key);
+ synchronized (objects)
+ {
+ cObject ref = getKey(object);
+ if (ref != null)
+ objects.remove(ref.key);
+ }
}
/**
diff --git a/gnu/CORBA/DefinitionKindHolder.java b/gnu/CORBA/DefinitionKindHolder.java
index dc6dcc0be..1ef7350dd 100644
--- a/gnu/CORBA/DefinitionKindHolder.java
+++ b/gnu/CORBA/DefinitionKindHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/DuplicateNameHolder.java b/gnu/CORBA/DuplicateNameHolder.java
new file mode 100644
index 000000000..ad004bc41
--- /dev/null
+++ b/gnu/CORBA/DuplicateNameHolder.java
@@ -0,0 +1,106 @@
+/* DuplicateNameHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper;
+
+/**
+* A holder for the exception {@link DuplicateName}.
+
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class DuplicateNameHolder
+ implements Streamable
+{
+ /**
+ * The stored DuplicateName value.
+ */
+ public DuplicateName value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public DuplicateNameHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public DuplicateNameHolder(DuplicateName initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = DuplicateNameHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ DuplicateNameHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the DuplicateName.
+ */
+ public TypeCode _type()
+ {
+ return DuplicateNameHelper.type();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/DynAn/NameValuePairHolder.java b/gnu/CORBA/DynAn/NameValuePairHolder.java
index 13ea8cf70..7afc81cd4 100644
--- a/gnu/CORBA/DynAn/NameValuePairHolder.java
+++ b/gnu/CORBA/DynAn/NameValuePairHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/EmptyExceptionHolder.java b/gnu/CORBA/EmptyExceptionHolder.java
new file mode 100644
index 000000000..890ca5fe5
--- /dev/null
+++ b/gnu/CORBA/EmptyExceptionHolder.java
@@ -0,0 +1,132 @@
+/* EmptyStructHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.UNKNOWN;
+import org.omg.CORBA.UnknownUserException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * This holder can store any CORBA exception that has no user defined fields.
+ * Only the repository ID is written when the method {@link #_write} is called.
+ * The _read method is not supported for this holder.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class EmptyExceptionHolder
+ implements Streamable
+{
+ /**
+ * The wrapped exception.
+ */
+ public Throwable value;
+
+ /**
+ * The typecode of the wrapped exception.
+ */
+ public TypeCode typecode;
+
+ /**
+ * Create the exception holder, initialised to the given values.
+ *
+ * @param an_exception the wrapped exception.
+ * @param an_id the exception repository id.
+ */
+ public EmptyExceptionHolder(Throwable an_exception, TypeCode a_typecode)
+ {
+ value = an_exception;
+ typecode = a_typecode;
+ }
+
+ /**
+ * Reads the exception from the input stream.
+ *
+ * The value field obtains the value of either the read exception or
+ * the UNKNOWN if the repository ID does not match
+ * the exception from the reachable code.
+ */
+ public void _read(InputStream input)
+ {
+ String id = input.read_string();
+ Object ex = ObjectCreator.Idl2Object(id);
+ if (ex == null)
+ value = new UNKNOWN(id);
+ else
+ value = (Throwable) ex;
+ }
+
+ /**
+ * Return the typecode of the stored exception.
+ *
+ * @return the value, passed as a_typecode in constructor.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the exception into the give output stream. Writes the
+ * repository id that is taken from the typecode. This method also
+ * works when no helper class is available.
+ *
+ * @param output a stream to write into.
+ *
+ * @throws BAD_OPERATION if the value for the holder is not set or
+ * the typecode cannot provide repository id.
+ */
+ public void _write(OutputStream output)
+ {
+ try
+ {
+ output.write_string(typecode.id());
+ }
+ catch (Exception ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION();
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/ExceptionCreator.java b/gnu/CORBA/ExceptionCreator.java
index 724eb86d4..536053cef 100644
--- a/gnu/CORBA/ExceptionCreator.java
+++ b/gnu/CORBA/ExceptionCreator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/ForwardRequestHelper.java b/gnu/CORBA/ForwardRequestHelper.java
new file mode 100644
index 000000000..74666aaf6
--- /dev/null
+++ b/gnu/CORBA/ForwardRequestHelper.java
@@ -0,0 +1,160 @@
+/* ForwardRequestHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import gnu.CORBA.Poa.ForwardRequestHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.PortableServer.ForwardRequest;
+
+/**
+ * The helper operations for the exception {@link ForwardRequest}.
+ *
+ * @specnote The helper must be here and not in POA subpackage as it must
+ * be discovered by the {@link ObjectCreator} when reading this remote
+ * exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ForwardRequestHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the ForwardRequest from given Any.
+ * This method uses the ForwardRequestHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
+ */
+ public static ForwardRequest extract(Any any)
+ {
+ try
+ {
+ return ((ForwardRequestHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ForwardRequest repository id.
+ *
+ * @return "ForwardRequest", always.
+ */
+ public static String id()
+ {
+ return "ForwardRequest";
+ }
+
+ /**
+ * Insert the ForwardRequest into the given Any.
+ * This method uses the ForwardRequestHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the ForwardRequest to insert.
+ */
+ public static void insert(Any any, ForwardRequest that)
+ {
+ any.insert_Streamable(new ForwardRequestHolder(that));
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ForwardRequest read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ForwardRequest value = new ForwardRequest();
+
+ value.forward_reference = input.read_Object();
+ return value;
+ }
+
+ /**
+ * Create the ForwardRequest typecode (structure,
+ * named "ForwardRequest").
+ * The typecode states that the structure contains the
+ * following fields: forward_reference.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 1 ];
+
+ TypeCode field;
+
+ field = ObjectHelper.type();
+ members [ 0 ] = new StructMember("forward_reference", field, null);
+ typeCode = orb.create_exception_tc(id(), "ForwardRequest", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ForwardRequest value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ output.write_Object(value.forward_reference);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Functional_ORB.java b/gnu/CORBA/Functional_ORB.java
index 437f420c4..c8d6a4c93 100644
--- a/gnu/CORBA/Functional_ORB.java
+++ b/gnu/CORBA/Functional_ORB.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,13 +40,14 @@ package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.CDR.cdrBufOutput;
+import gnu.CORBA.GIOP.CloseMessage;
import gnu.CORBA.GIOP.ErrorMessage;
import gnu.CORBA.GIOP.MessageHeader;
import gnu.CORBA.GIOP.ReplyHeader;
import gnu.CORBA.GIOP.RequestHeader;
import gnu.CORBA.NamingService.NamingServiceTransient;
+import gnu.CORBA.Poa.gnuForwardRequest;
-import org.omg.CORBA.BAD_INV_ORDER;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.CompletionStatus;
@@ -77,6 +78,7 @@ import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.Hashtable;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
@@ -86,7 +88,9 @@ import java.util.TreeMap;
/**
* The ORB implementation, capable to handle remote invocations on the
- * registered object.
+ * registered object. This class implements all features, required till
+ * the jdk 1.3 inclusive, but does not support the POA that appears since
+ * 1.4. The POA is supported by {@link gnu.CORBA.Poa.ORB_1_4}.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
@@ -154,7 +158,7 @@ public class Functional_ORB
{
try
{
- serve(this, service);
+ tick();
}
catch (SocketException ex)
{
@@ -179,6 +183,16 @@ public class Functional_ORB
}
/**
+ * Perform a single serving step.
+ * @throws java.lang.Exception
+ */
+ void tick()
+ throws Exception
+ {
+ serve(this, service);
+ }
+
+ /**
* Forcibly close the server socket and mark this port as free.
*/
public void close_now()
@@ -205,6 +219,40 @@ public class Functional_ORB
}
/**
+ * A server, responsible for listening on requests on some
+ * local port and serving multiple requests (probably to the
+ * different objects) on the same thread.
+ */
+ class sharedPortServer
+ extends portServer
+ {
+ /**
+ * Create a new portServer, serving on specific port.
+ */
+ sharedPortServer(int _port)
+ {
+ super(_port);
+ }
+
+ /**
+ * Perform a single serving step.
+ * @throws java.lang.Exception
+ */
+ void tick()
+ throws Exception
+ {
+ Socket request = service.accept();
+ serveStep(request, false);
+ }
+ }
+
+ /**
+ * The default value where the first instance of this ORB will start
+ * looking for a free port.
+ */
+ public static int DEFAULT_INITIAL_PORT = 1126;
+
+ /**
* The property of port, on that this ORB is listening for requests from clients.
* This class supports one port per ORB only.
*/
@@ -266,7 +314,7 @@ public class Functional_ORB
*/
private int TOUT_START_READING_MESSAGE = 20 * 1000;
- // (Here and below, we use * to make meaning of the constant clearler).
+ // (Here and below, we use * to make the meaning of the constant clearler).
/**
* If the client has started to send the request message, the socket time
@@ -285,17 +333,11 @@ public class Functional_ORB
* Some clients tend to submit multiple requests over the
* same socket. The server waits for the next request on
* the same socket for the duration, specified
- * below. The default time is seven seconds.
- */
- public int TANDEM_REQUESTS = 7000;
-
- /**
- * If the maximal number of threads per object is reached,
- * the server waits for the given time interval before checking
- * again maybe some threads are already complete.
- * Thr default time is 0.5 second.
+ * below. In additions, the request of this implementation also
+ * waits for the same duration before closing the socket.
+ * The default time is seven seconds.
*/
- public int PAUSE_ON_THREAD_OVERLOAD = 500;
+ public static int TANDEM_REQUESTS = 7000;
/**
* The map of the already conncted objects.
@@ -318,7 +360,7 @@ public class Functional_ORB
/**
* The map of the initial references.
*/
- private Map initial_references = new TreeMap();
+ protected Map initial_references = new TreeMap();
/**
* The currently active portServers.
@@ -331,13 +373,14 @@ public class Functional_ORB
private String ns_host;
/**
- * The port, under that the ORB is listening for remote requests.
- * Then the new object is connected, this port is used first, then
- * it is incremented by 1, etc. If the given port is not available,
- * up to 20 subsequent values are tried and then the parameterless
- * server socket contructor is called.
+ * Probably free port, under that the ORB will try listening for
+ * remote requests first. When the new object is connected, this
+ * port is used first, then it is incremented by 1, etc. If the given
+ * port is not available, up to 20 subsequent values are tried and then
+ * the parameterless server socket contructor is called. The constant is
+ * shared between multiple instances of this ORB.
*/
- private static int Port = 1126;
+ private static int Port = DEFAULT_INITIAL_PORT;
/**
* The port, on that the name service is expected to be running.
@@ -356,6 +399,11 @@ public class Functional_ORB
protected LinkedList freed_ports = new LinkedList();
/**
+ * Maps a single-threaded POAs to they sharedPortServants.
+ */
+ protected Hashtable identities = new Hashtable();
+
+ /**
* The maximal allowed number of the currently running parallel
* threads per object. For security reasons, this is made private and
* unchangeable. After exceeding this limit, the NO_RESOURCES
@@ -371,6 +419,7 @@ public class Functional_ORB
try
{
LOCAL_HOST = ns_host = InetAddress.getLocalHost().getHostAddress();
+ initial_references.put("CodecFactory", new gnuCodecFactory(this));
}
catch (UnknownHostException ex)
{
@@ -471,31 +520,17 @@ public class Functional_ORB
/**
* Set the port, on that the server is listening for the client requests.
- * In this implementation, the server is listening at only one port,
- * the default value being 1126.
+ * If only one object is connected to the orb, the server will be
+ * try listening on this port first. It the port is busy, or if more
+ * objects are connected, the subsequent object will receive a larger
+ * port values, skipping unavailable ports, if required. The change
+ * applies globally.
*
* @param a_Port a port, on that the server is listening for requests.
- *
- * @throws BAD_INV_ORDER if the server has already been started. The port
- * can only be changed when the server is not yet started.
- */
- public void setPort(int a_Port)
- {
- if (running)
- throw new BAD_INV_ORDER("The server is running");
- this.Port = a_Port;
- }
-
- /**
- * Get the port, on that the server is listening for the client requests.
- * In this implementation, the server is listening at only one port,
- * the default value being 1126.
- *
- * @return the port.
*/
- public int getPort()
+ public static void setPort(int a_Port)
{
- return Port;
+ Port = a_Port;
}
/**
@@ -547,7 +582,8 @@ public class Functional_ORB
{
int a_port = getFreePort();
- Connected_objects.cObject ref = connected_objects.add(key, object, a_port);
+ Connected_objects.cObject ref =
+ connected_objects.add(key, object, a_port, null);
IOR ior = createIOR(ref);
prepareObject(object, ior);
if (running)
@@ -555,11 +591,57 @@ public class Functional_ORB
}
/**
+ * Connect the given CORBA object to this ORB, explicitly specifying
+ * the object key and the identity of the thread (and port), where the
+ * object must be served. The identity is normally the POA.
+ *
+ * The new port server will be started only if there is no one
+ * already running for the same identity. Otherwise, the task of
+ * the existing port server will be widened, including duty to serve
+ * the given object. All objects, connected to a single identity by
+ * this method, will process they requests subsequently in the same
+ * thread. The method is used when the expected number of the
+ * objects is too large to have a single port and thread per object.
+ * This method is used by POAs, having a single thread policy.
+ *
+ * @param object the object, must implement the {@link InvokeHandler})
+ * interface.
+ * @param key the object key, usually used to identify the object from
+ * remote side.
+ * @param port the port, where the object must be connected.
+ *
+ * @throws BAD_PARAM if the object does not implement the
+ * {@link InvokeHandler}).
+ */
+ public void connect_1_thread(org.omg.CORBA.Object object, byte[] key,
+ java.lang.Object identity
+ )
+ {
+ sharedPortServer shared = (sharedPortServer) identities.get(identity);
+ if (shared == null)
+ {
+ int a_port = getFreePort();
+ shared = new sharedPortServer(a_port);
+ identities.put(identity, shared);
+ if (running)
+ {
+ portServers.add(shared);
+ shared.start();
+ }
+ }
+
+ Connected_objects.cObject ref =
+ connected_objects.add(key, object, shared.s_port, identity);
+ IOR ior = createIOR(ref);
+ prepareObject(object, ior);
+ }
+
+ /**
* Start the service on the given port of this IOR.
*
* @param ior the ior (only Internet.port is used).
*/
- private void startService(IOR ior)
+ public void startService(IOR ior)
{
portServer p = new portServer(ior.Internet.port);
portServers.add(p);
@@ -620,7 +702,7 @@ public class Functional_ORB
for (int i = 0; i < portServers.size(); i++)
{
p = (portServer) portServers.get(i);
- if (p.s_port == rmKey.port)
+ if (p.s_port == rmKey.port && !(p instanceof sharedPortServer))
{
p.close_now();
freed_ports.addFirst(new Integer(rmKey.port));
@@ -632,6 +714,41 @@ public class Functional_ORB
}
/**
+ * Notifies ORB that the shared service indentity (usually POA)
+ * is destroyed. The matching shared port server is terminated
+ * and the identity table entry is deleted. If this identity
+ * is not known for this ORB, the method returns without action.
+ *
+ * @param identity the identity that has been destroyed.
+ */
+ public void identityDestroyed(java.lang.Object identity)
+ {
+ if (identity == null)
+ return;
+
+ sharedPortServer ise = (sharedPortServer) identities.get(identity);
+ if (ise != null)
+ synchronized (connected_objects)
+ {
+ ise.close_now();
+ identities.remove(identity);
+
+ Connected_objects.cObject obj;
+ Map.Entry m;
+ Iterator iter = connected_objects.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ m = (Map.Entry) iter.next();
+ obj = (Connected_objects.cObject) m.getValue();
+ if (obj.identity == identity)
+ {
+ iter.remove();
+ }
+ }
+ }
+ }
+
+ /**
* Find the local object, connected to this ORB.
*
* @param ior the ior of the potentially local object.
@@ -769,19 +886,31 @@ public class Functional_ORB
m = (Map.Entry) iter.next();
obj = (Connected_objects.cObject) m.getValue();
- portServer subserver = new portServer(obj.port);
- portServers.add(subserver);
+ portServer subserver;
- // Reuse the current thread for the last portServer.
- if (!iter.hasNext())
+ if (obj.identity == null)
{
- // Discard the iterator, eliminating lock checks.
- iter = null;
- subserver.run();
- return;
+ subserver = new portServer(obj.port);
+ portServers.add(subserver);
}
else
- subserver.start();
+ {
+ subserver = (portServer) identities.get(obj.identity);
+ }
+
+ if (!subserver.isAlive())
+ {
+ // Reuse the current thread for the last portServer.
+ if (!iter.hasNext())
+ {
+ // Discard the iterator, eliminating lock checks.
+ iter = null;
+ subserver.run();
+ return;
+ }
+ else
+ subserver.start();
+ }
}
}
@@ -839,7 +968,7 @@ public class Functional_ORB
}
object = impl;
- connected_objects.add(ior.key, impl, ior.Internet.port);
+ connected_objects.add(ior.key, impl, ior.Internet.port, null);
}
return object;
}
@@ -1029,10 +1158,12 @@ public class Functional_ORB
private void prepareObject(org.omg.CORBA.Object object, IOR ior)
throws BAD_PARAM
{
+ /*
if (!(object instanceof InvokeHandler))
throw new BAD_PARAM(object.getClass().getName() +
" does not implement InvokeHandler. "
);
+ */
// If no delegate is set, set the default delegate.
if (object instanceof ObjectImpl)
@@ -1109,6 +1240,43 @@ public class Functional_ORB
}
/**
+ * Forward request to another target, as indicated by the passed
+ * exception.
+ */
+ private void forward_request(OutputStream net_out, MessageHeader msh_request,
+ RequestHeader rh_request, gnuForwardRequest info
+ )
+ throws IOException
+ {
+ MessageHeader msh_forward = new MessageHeader();
+ msh_forward.version = msh_request.version;
+
+ ReplyHeader rh_forward = msh_forward.create_reply_header();
+ msh_forward.message_type = MessageHeader.REPLY;
+ rh_forward.reply_status = info.forwarding_code;
+ rh_forward.request_id = rh_request.request_id;
+
+ // The forwarding code is either LOCATION_FORWARD or LOCATION_FORWARD_PERM.
+ cdrBufOutput out = new cdrBufOutput();
+ out.setOrb(this);
+ out.setOffset(msh_forward.getHeaderSize());
+
+ rh_forward.write(out);
+
+ if (msh_forward.version.since_inclusive(1, 2))
+ out.align(8);
+
+ out.write_Object(info.forward_reference);
+
+ msh_forward.message_size = out.buffer.size();
+
+ // Write the forwarding instruction.
+ msh_forward.write(net_out);
+ out.buffer.writeTo(net_out);
+ net_out.flush();
+ }
+
+ /**
* Contains a single servicing task.
*
* Normally, each task matches a single remote invocation.
@@ -1127,9 +1295,10 @@ public class Functional_ORB
service = serverSocket.accept();
// Tell the server there are no more resources.
- while (p.running_threads >= MAX_RUNNING_THREADS)
+ if (p.running_threads >= MAX_RUNNING_THREADS)
{
serveStep(service, true);
+ return;
}
new Thread()
@@ -1256,6 +1425,18 @@ public class Functional_ORB
throw new OBJECT_NOT_EXIST();
target._invoke(rh_request.operation, cin, handler);
}
+ catch (gnuForwardRequest forwarded)
+ {
+ OutputStream sou = service.getOutputStream();
+ forward_request(sou, msh_request, rh_request, forwarded);
+ if (service != null && !service.isClosed())
+ {
+ // Wait for the subsequent invocations on the
+ // same socket for the TANDEM_REQUEST duration.
+ service.setSoTimeout(TANDEM_REQUESTS);
+ continue Serving;
+ }
+ }
catch (SystemException ex)
{
sysEx = ex;
@@ -1266,6 +1447,7 @@ public class Functional_ORB
}
catch (Exception except)
{
+ except.printStackTrace();
sysEx =
new UNKNOWN("Unknown", 2, CompletionStatus.COMPLETED_MAYBE);
@@ -1284,14 +1466,21 @@ public class Functional_ORB
);
}
}
- else
- ;
+ else if (msh_request.message_type == MessageHeader.CLOSE_CONNECTION ||
+ msh_request.message_type == MessageHeader.MESSAGE_ERROR
+ )
+ {
+ CloseMessage.close(service.getOutputStream());
+ service.close();
+ return;
+ }
+ ;
// TODO log error: "Not a request message."
if (service != null && !service.isClosed())
{
// Wait for the subsequent invocations on the
- // same socket for 2 minutes.
+ // same socket for the TANDEM_REQUEST duration.
service.setSoTimeout(TANDEM_REQUESTS);
}
else
diff --git a/gnu/CORBA/GIOP/CancelHeader.java b/gnu/CORBA/GIOP/CancelHeader.java
index d40a32fe6..9f4de0d87 100644
--- a/gnu/CORBA/GIOP/CancelHeader.java
+++ b/gnu/CORBA/GIOP/CancelHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/CharSets_OSF.java b/gnu/CORBA/GIOP/CharSets_OSF.java
index 7690f3a00..f3f35dbaa 100644
--- a/gnu/CORBA/GIOP/CharSets_OSF.java
+++ b/gnu/CORBA/GIOP/CharSets_OSF.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/CloseMessage.java b/gnu/CORBA/GIOP/CloseMessage.java
new file mode 100644
index 000000000..d884329c4
--- /dev/null
+++ b/gnu/CORBA/GIOP/CloseMessage.java
@@ -0,0 +1,102 @@
+/* CloseMessage.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.GIOP;
+
+import gnu.CORBA.IOR;
+
+import org.omg.CORBA.MARSHAL;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import java.net.Socket;
+
+/**
+ * The explicit command to close the connection.
+ *
+ *
+ * The close message consists from the message header only and
+ * is the same for GIOP 1.0, 1.1, 1.2 and 1.3. The CloseMessage
+ * uses the default value from the {@link MessageHeader}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class CloseMessage
+ extends MessageHeader
+{
+ /**
+ * The singleton close message is typically enough, despite new
+ * instances may be instantiated if the specific version field
+ * value is mandatory.
+ */
+ private static final CloseMessage Singleton = new CloseMessage();
+
+ /**
+ * Create a new error message, setting the message field
+ * to the {@link MESSAGE_CLOSE} and the version number to
+ * the given major and minor values.
+ */
+ public CloseMessage()
+ {
+ message_type = CLOSE_CONNECTION;
+ }
+
+ /**
+ * Send the close message to the given output stream. The method,
+ * however, does not close the socket itself, this must be done
+ * explicitly in the calling code.
+ *
+ * @param socketStream a stream, where the close message is
+ * written.
+ */
+ public static void close(OutputStream socketStream)
+ {
+ try
+ {
+ Singleton.write(socketStream);
+ socketStream.flush();
+ }
+ catch (IOException ex)
+ {
+ MARSHAL m = new MARSHAL("Unable to flush the stream");
+ m.initCause(ex);
+ throw m;
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/GIOP/ErrorMessage.java b/gnu/CORBA/GIOP/ErrorMessage.java
index 0da5f649c..8d3b3539b 100644
--- a/gnu/CORBA/GIOP/ErrorMessage.java
+++ b/gnu/CORBA/GIOP/ErrorMessage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/MessageHeader.java b/gnu/CORBA/GIOP/MessageHeader.java
index 7640b6bfd..61c46e11e 100644
--- a/gnu/CORBA/GIOP/MessageHeader.java
+++ b/gnu/CORBA/GIOP/MessageHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/ReplyHeader.java b/gnu/CORBA/GIOP/ReplyHeader.java
index 76c6df944..1e0e154f8 100644
--- a/gnu/CORBA/GIOP/ReplyHeader.java
+++ b/gnu/CORBA/GIOP/ReplyHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/RequestHeader.java b/gnu/CORBA/GIOP/RequestHeader.java
index 77ef6dd97..f2de4e271 100644
--- a/gnu/CORBA/GIOP/RequestHeader.java
+++ b/gnu/CORBA/GIOP/RequestHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/ServiceContext.java b/gnu/CORBA/GIOP/ServiceContext.java
index d14eabbc9..7e44bdcea 100644
--- a/gnu/CORBA/GIOP/ServiceContext.java
+++ b/gnu/CORBA/GIOP/ServiceContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/cxCodeSet.java b/gnu/CORBA/GIOP/cxCodeSet.java
index 0fbf00bfe..7f42c07f2 100644
--- a/gnu/CORBA/GIOP/cxCodeSet.java
+++ b/gnu/CORBA/GIOP/cxCodeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_0/CancelHeader.java b/gnu/CORBA/GIOP/v1_0/CancelHeader.java
index 5b07e89ad..6e3650c4b 100644
--- a/gnu/CORBA/GIOP/v1_0/CancelHeader.java
+++ b/gnu/CORBA/GIOP/v1_0/CancelHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_0/ReplyHeader.java b/gnu/CORBA/GIOP/v1_0/ReplyHeader.java
index 74512d617..27181ca63 100644
--- a/gnu/CORBA/GIOP/v1_0/ReplyHeader.java
+++ b/gnu/CORBA/GIOP/v1_0/ReplyHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_0/RequestHeader.java b/gnu/CORBA/GIOP/v1_0/RequestHeader.java
index dd3e20349..ffa45c37b 100644
--- a/gnu/CORBA/GIOP/v1_0/RequestHeader.java
+++ b/gnu/CORBA/GIOP/v1_0/RequestHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_2/ReplyHeader.java b/gnu/CORBA/GIOP/v1_2/ReplyHeader.java
index 87c97b3ec..c3f51a37b 100644
--- a/gnu/CORBA/GIOP/v1_2/ReplyHeader.java
+++ b/gnu/CORBA/GIOP/v1_2/ReplyHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_2/RequestHeader.java b/gnu/CORBA/GIOP/v1_2/RequestHeader.java
index 184893bb3..d294d0067 100644
--- a/gnu/CORBA/GIOP/v1_2/RequestHeader.java
+++ b/gnu/CORBA/GIOP/v1_2/RequestHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/IOR.java b/gnu/CORBA/IOR.java
index 056009f06..cedbce461 100644
--- a/gnu/CORBA/IOR.java
+++ b/gnu/CORBA/IOR.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -371,6 +371,13 @@ public class IOR
* thansferred in this form in
* {@link write_Object(org.omg.CORBA.Object)}.
*
+ * If the stream contains a null value, the Id and Internet fields become
+ * equal to null. Otherwise Id contains some string (possibly
+ * empty).
+ *
+ * Id is checked for null in cdrInput that then returns
+ * null instead of object.
+ *
* @param c a stream to read from.
* @throws IOException if the stream throws it.
*/
@@ -381,6 +388,13 @@ public class IOR
int n_profiles = c.read_long();
+ if (n_profiles == 0)
+ {
+ Id = null;
+ Internet = null;
+ return;
+ }
+
for (int i = 0; i < n_profiles; i++)
{
int tag = c.read_long();
@@ -435,6 +449,21 @@ public class IOR
}
/**
+ * Write a null value to the CDR output stream.
+ *
+ * The null value is written as defined in OMG specification
+ * (zero length string, followed by an empty set of profiles).
+ */
+ public static void write_null(cdrOutput out)
+ {
+ // Empty Id string.
+ out.write_string("");
+
+ // Empty set of profiles.
+ out.write_long(0);
+ }
+
+ /**
* Write this IOR record to the provided CDR stream. The procedure
* writed data in Big Endian, but does NOT add any endian marker
* to the beginning.
diff --git a/gnu/CORBA/IOR_Delegate.java b/gnu/CORBA/IOR_Delegate.java
index 5b02fc2db..e3fde60ee 100644
--- a/gnu/CORBA/IOR_Delegate.java
+++ b/gnu/CORBA/IOR_Delegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,9 @@ package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.GIOP.ReplyHeader;
+import gnu.CORBA.Poa.activeObjectMap;
+import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.Context;
import org.omg.CORBA.ContextList;
import org.omg.CORBA.ExceptionList;
@@ -56,6 +58,8 @@ import org.omg.CORBA.portable.RemarshalException;
import java.io.IOException;
+import java.net.Socket;
+
/**
* The Classpath implementation of the {@link Delegate} functionality in the
* case, when the object was constructed from an IOR object. The IOR can be
@@ -69,6 +73,17 @@ public class IOR_Delegate
extends Simple_delegate
{
/**
+ * True if the current IOR does not map into the local servant.
+ * If false, the IOR is either local or should be checked.
+ */
+ boolean remote_ior;
+
+ /**
+ * If not null, this field contains data about the local servant.
+ */
+ activeObjectMap.Obj local_ior;
+
+ /**
* Contructs an instance of object using the given IOR.
*/
public IOR_Delegate(ORB an_orb, IOR an_ior)
@@ -94,7 +109,7 @@ public class IOR_Delegate
NamedValue returns
)
{
- gnuRequest request = new gnuRequest();
+ gnuRequest request = getRequestInstance(target);
request.setIor(getIor());
request.set_target(target);
@@ -125,7 +140,7 @@ public class IOR_Delegate
ContextList ctx_list
)
{
- gnuRequest request = new gnuRequest();
+ gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
@@ -142,8 +157,19 @@ public class IOR_Delegate
}
/**
- * Invoke operation on the given object, writing parameters to the given
- * output stream.
+ * Get the instance of request.
+ */
+ protected gnuRequest getRequestInstance(org.omg.CORBA.Object target)
+ {
+ return new gnuRequest();
+ }
+
+ /**
+ * Invoke operation on the given object, als handling temproray and permanent
+ * redirections. The ReplyHeader.LOCATION_FORWARD will cause to resend
+ * the request to the new direction. The ReplyHeader.LOCATION_FORWARD_PERM
+ * will cause additionally to remember the new location by this delegate,
+ * so subsequent calls will be immediately delivered to the new target.
*
* @param target the target object.
* @param output the output stream, previously returned by
@@ -211,21 +237,56 @@ public class IOR_Delegate
}
catch (IOException ex)
{
- MARSHAL t = new MARSHAL("Cant read forwarding info");
+ MARSHAL t =
+ new MARSHAL("Cant read forwarding info", 5102,
+ CompletionStatus.COMPLETED_NO
+ );
t.initCause(ex);
throw t;
}
- request.request.setIor(forwarded);
+ gnuRequest prev = request.request;
+ gnuRequest r = getRequestInstance(target);
- // If the object has moved permanently, its IOR is replaced.
- if (moved_permanently)
- setIor(forwarded);
+ r.m_args = prev.m_args;
+ r.m_context = prev.m_context;
+ r.m_context_list = prev.m_context_list;
+ r.m_environment = prev.m_environment;
+ r.m_exceptions = prev.m_exceptions;
+ r.m_operation = prev.m_operation;
+ r.m_parameter_buffer = prev.m_parameter_buffer;
+ r.m_parameter_buffer.request = r;
+ r.m_result = prev.m_result;
+ r.m_target = prev.m_target;
+ r.oneWay = prev.oneWay;
+ r.setIor(forwarded);
- return invoke(target, request);
+ IOR_contructed_object it =
+ new IOR_contructed_object(orb, forwarded);
+
+ r.m_target = it;
+
+ request.request = r;
+
+ IOR prev_ior = getIor();
+
+ setIor(forwarded);
+
+ try
+ {
+ return invoke(it, request);
+ }
+ finally
+ {
+ if (!moved_permanently)
+ setIor(prev_ior);
+ }
default :
- throw new MARSHAL("Unknow reply status: " + rh.reply_status);
+ throw new MARSHAL("Unknow reply status: " + rh.reply_status,
+ 8000 + rh.reply_status,
+ CompletionStatus.COMPLETED_NO
+ );
}
}
else
@@ -245,7 +306,7 @@ public class IOR_Delegate
*/
public Request request(org.omg.CORBA.Object target, String operation)
{
- gnuRequest request = new gnuRequest();
+ gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
@@ -270,7 +331,7 @@ public class IOR_Delegate
boolean response_expected
)
{
- gnuRequest request = new gnuRequest();
+ gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
@@ -281,4 +342,53 @@ public class IOR_Delegate
return request.getParameterStream();
}
-}
+
+ /**
+ * If there is an opened cache socket to access this object, close
+ * that socket.
+ *
+ * @param target The target is not used, this delegate requires a
+ * single instance per object.
+ */
+ public void release(org.omg.CORBA.Object target)
+ {
+ String key = ior.Internet.host + ":" + ior.Internet.port;
+
+ Socket socket = SocketRepository.get_socket(key);
+ try
+ {
+ if (socket != null)
+ {
+ socket.close();
+ }
+ }
+ catch (IOException ex)
+ {
+ // do nothing, then.
+ }
+ }
+
+ /**
+ * Reset the remote_ior flag, forcing to check if the object is local
+ * on the next getRequestInstance call.
+ */
+ public void setIor(IOR an_ior)
+ {
+ super.setIor(an_ior);
+ remote_ior = false;
+ local_ior = null;
+ }
+
+ /**
+ * Checks if the ior is local so far it is easy.
+ */
+ public boolean is_local(org.omg.CORBA.Object self)
+ {
+ if (remote_ior)
+ return false;
+ else if (local_ior != null)
+ return true;
+ else
+ return super.is_local(self);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/IOR_contructed_object.java b/gnu/CORBA/IOR_contructed_object.java
index 5c8ba7350..2fab70799 100644
--- a/gnu/CORBA/IOR_contructed_object.java
+++ b/gnu/CORBA/IOR_contructed_object.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -97,4 +97,13 @@ public class IOR_contructed_object
{
return getClass().getName() + ":IOR:" + ior;
}
-}
+
+ /**
+ * Calls realease on the delegate.
+ */
+ protected void finalize()
+ throws java.lang.Throwable
+ {
+ _get_delegate().release(this);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/NamingService/Binding_iterator_impl.java b/gnu/CORBA/NamingService/Binding_iterator_impl.java
index 6d00c8529..79d787083 100644
--- a/gnu/CORBA/NamingService/Binding_iterator_impl.java
+++ b/gnu/CORBA/NamingService/Binding_iterator_impl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/Ext.java b/gnu/CORBA/NamingService/Ext.java
index 69e11e275..fb7406c46 100644
--- a/gnu/CORBA/NamingService/Ext.java
+++ b/gnu/CORBA/NamingService/Ext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/NameValidator.java b/gnu/CORBA/NamingService/NameValidator.java
index 797202fd6..d7d5a14bb 100644
--- a/gnu/CORBA/NamingService/NameValidator.java
+++ b/gnu/CORBA/NamingService/NameValidator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/NamingMap.java b/gnu/CORBA/NamingService/NamingMap.java
index d9bbf6a8c..a69b06172 100644
--- a/gnu/CORBA/NamingService/NamingMap.java
+++ b/gnu/CORBA/NamingService/NamingMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/NamingServiceTransient.java b/gnu/CORBA/NamingService/NamingServiceTransient.java
index 295c0e488..fda46adbb 100644
--- a/gnu/CORBA/NamingService/NamingServiceTransient.java
+++ b/gnu/CORBA/NamingService/NamingServiceTransient.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -104,12 +104,6 @@ public class NamingServiceTransient
{
// Create and initialize the ORB
final Functional_ORB orb = new Functional_ORB();
- orb.setPort(PORT);
- orb.init(args, null);
-
- // Create the servant and register it with the ORB
- NamingContextExt namer = new Ext(new TransientContext());
- orb.connect(namer, getDefaultKey());
if (args.length > 1)
for (int i = 0; i < args.length - 1; i++)
@@ -121,7 +115,11 @@ public class NamingServiceTransient
iorf = args [ i + 1 ];
}
- orb.setPort(port);
+ Functional_ORB.setPort(port);
+
+ // Create the servant and register it with the ORB
+ NamingContextExt namer = new Ext(new TransientContext());
+ orb.connect(namer, getDefaultKey());
// Storing the IOR reference.
String ior = orb.object_to_string(namer);
@@ -145,7 +143,7 @@ public class NamingServiceTransient
{
public void run()
{
- // wait for invocations from clients
+ // Wait for invocations from clients.
orb.run();
}
}.start();
@@ -155,5 +153,8 @@ public class NamingServiceTransient
System.err.println("ERROR: " + e);
e.printStackTrace(System.out);
}
+
+ // Restore the default value for allocating ports for the subsequent objects.
+ Functional_ORB.setPort(Functional_ORB.DEFAULT_INITIAL_PORT);
}
}
diff --git a/gnu/CORBA/NamingService/TransientContext.java b/gnu/CORBA/NamingService/TransientContext.java
index 70deec28a..4b7c1938f 100644
--- a/gnu/CORBA/NamingService/TransientContext.java
+++ b/gnu/CORBA/NamingService/TransientContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/cmpNameComponent.java b/gnu/CORBA/NamingService/cmpNameComponent.java
index c8cc03ad7..1e06fb8ee 100644
--- a/gnu/CORBA/NamingService/cmpNameComponent.java
+++ b/gnu/CORBA/NamingService/cmpNameComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/snConverter.java b/gnu/CORBA/NamingService/snConverter.java
index dc46b7ab3..a9b9219d7 100644
--- a/gnu/CORBA/NamingService/snConverter.java
+++ b/gnu/CORBA/NamingService/snConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/ObjectCreator.java b/gnu/CORBA/ObjectCreator.java
index 4b17dbab3..b99c46ba6 100644
--- a/gnu/CORBA/ObjectCreator.java
+++ b/gnu/CORBA/ObjectCreator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -73,7 +73,7 @@ public class ObjectCreator
* The prefix for classes that are placed instide the
* gnu.CORBA namespace.
*/
- public static final String CLASSPATH_PREFIX = "gnu.CORBA";
+ public static final String CLASSPATH_PREFIX = "gnu.CORBA.";
/**
* Try to instantiate an object with the given IDL name.
@@ -184,11 +184,11 @@ public class ObjectCreator
{
try
{
- String holder = toHelperName(idl);
- Class holderClass = Class.forName(holder);
+ String helper = toHelperName(idl);
+ Class helperClass = Class.forName(helper);
Method read =
- holderClass.getMethod("read",
+ helperClass.getMethod("read",
new Class[]
{
org.omg.CORBA.portable.InputStream.class
@@ -266,19 +266,83 @@ public class ObjectCreator
}
/**
+ * Converts the given IDL name to class name and tries to load the
+ * matching class. The OMG prefix (omg.org) is replaced by
+ * the java prefix org.omg. No other prefixes are added.
+ *
+ * @param IDL the idl name.
+ *
+ * TODO Cache the returned classes, avoiding these string manipulations
+ * each time the conversion is required.
+ *
+ * @return the matching class or null if no such is available.
+ */
+ public static Class Idl2class(String IDL)
+ {
+ String s = IDL;
+ int a = s.indexOf(':') + 1;
+ int b = s.lastIndexOf(':');
+
+ s = IDL.substring(a, b);
+
+ if (s.startsWith(OMG_PREFIX))
+ s = JAVA_PREFIX + s.substring(OMG_PREFIX.length());
+
+ String cn = s.replace('/', '.');
+
+ try
+ {
+ return Class.forName(cn);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Converts the given IDL name to class name, tries to load the
+ * matching class and create an object instance with parameterless
+ * constructor. The OMG prefix (omg.org) is replaced by
+ * the java prefix org.omg. No other prefixes are added.
+ *
+ * @param IDL the idl name.
+ *
+ * @return instantiated object instance or null if such attempt was not
+ * successful.
+ */
+ public static java.lang.Object Idl2Object(String IDL)
+ {
+ Class cx = Idl2class(IDL);
+
+ try
+ {
+ if (cx != null)
+ return cx.newInstance();
+ else
+ return null;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+ }
+
+ /**
* Convert the class name to IDL name.
*
* @param cn the class name.
*
* @return the idl name.
*/
- protected static String toIDL(String cn)
+ public static String toIDL(String cn)
{
if (cn.startsWith(JAVA_PREFIX))
- cn = cn.substring(JAVA_PREFIX.length());
-
- cn = cn.replace('.', '/');
+ cn = OMG_PREFIX + cn.substring(JAVA_PREFIX.length()).replace('.', '/');
+ else if (cn.startsWith(CLASSPATH_PREFIX))
+ cn =
+ OMG_PREFIX + cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/');
- return "IDL:" + OMG_PREFIX + cn + ":1.0";
+ return "IDL:" + cn + ":1.0";
}
-}
+} \ No newline at end of file
diff --git a/gnu/CORBA/OctetHolder.java b/gnu/CORBA/OctetHolder.java
index 9b0184c16..02fd9a432 100644
--- a/gnu/CORBA/OctetHolder.java
+++ b/gnu/CORBA/OctetHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Poa/ForwardRequestHolder.java b/gnu/CORBA/Poa/ForwardRequestHolder.java
new file mode 100644
index 000000000..5e2455952
--- /dev/null
+++ b/gnu/CORBA/Poa/ForwardRequestHolder.java
@@ -0,0 +1,107 @@
+/* ForwardRequestHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.ForwardRequestHelper;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.PortableServer.ForwardRequest;
+
+/**
+* A holder for the exception {@link ForwardRequest}.
+
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ForwardRequestHolder
+ implements Streamable
+{
+ /**
+ * The stored ForwardRequest value.
+ */
+ public ForwardRequest value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public ForwardRequestHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public ForwardRequestHolder(ForwardRequest initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = ForwardRequestHelper.read(input);
+ }
+
+ /**
+ * Get the typecode of the ForwardRequest.
+ */
+ public TypeCode _type()
+ {
+ return ForwardRequestHelper.type();
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ ForwardRequestHelper.write(output, value);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/ForwardedServant.java b/gnu/CORBA/Poa/ForwardedServant.java
new file mode 100644
index 000000000..2df378df6
--- /dev/null
+++ b/gnu/CORBA/Poa/ForwardedServant.java
@@ -0,0 +1,207 @@
+/* ForwardedServant.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.IOR;
+import gnu.CORBA.IOR_Delegate;
+import gnu.CORBA.IOR_contructed_object;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.Servant;
+
+import java.io.IOException;
+
+/**
+ * A "virtual servant", delegating all invocation to the wrapped
+ * object (usually remote). Used in cases when it is necessary to
+ * handle the request forwarding.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ForwardedServant
+ extends Servant
+ implements InvokeHandler
+{
+ /**
+ * The reference object, handling requests.
+ */
+ public final ObjectImpl ref;
+
+ /**
+ * Create an instance, forwarding requests to the given object.
+ */
+ ForwardedServant(ObjectImpl a_ref)
+ {
+ ref = a_ref;
+ }
+
+ /**
+ * Create an instance of the forwarded servant.
+ *
+ * @param a_ref a reference where request should be forwarded.
+ *
+ * @return a created forwarded servant or null if the parameter
+ * forwards request to itself. Returning null will force to find
+ * a right servant in one of many possible ways, depending on
+ * policies.
+ */
+ public static Servant create(org.omg.CORBA.Object a_ref)
+ {
+ try
+ {
+ ObjectImpl fto = (ObjectImpl) a_ref;
+
+ // Check maybe the remote side forwarded back to our local object.
+ if (fto instanceof IOR_contructed_object)
+ {
+ IOR_contructed_object iref = (IOR_contructed_object) fto;
+
+ // Check maybe the IOR is local.
+ ORB t_orb = iref._orb();
+ if (t_orb instanceof ORB_1_4)
+ {
+ ORB_1_4 orb = (ORB_1_4) t_orb;
+ Delegate d = iref._get_delegate();
+ if (d instanceof IOR_Delegate)
+ {
+ IOR_Delegate ird = (IOR_Delegate) iref._get_delegate();
+ IOR ior = ird.getIor();
+ if (orb.LOCAL_HOST.equalsIgnoreCase(ior.Internet.host))
+ {
+ activeObjectMap.Obj rx = orb.rootPOA.findIorKey(ior.key);
+ if (rx != null)
+ {
+ if (rx.object == fto ||
+ rx.object._is_equivalent(fto)
+ )
+ return rx.primary_servant;
+ else
+ fto = (ObjectImpl) rx.object;
+ }
+ }
+ }
+ }
+ }
+ return new ForwardedServant(fto);
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_PARAM("ObjectImpl required but " + a_ref + " passed ",
+ 0x5005, CompletionStatus.COMPLETED_NO
+ );
+ }
+ }
+
+ /**
+ * Forward the call to the wrapped object.
+ */
+ public OutputStream _invoke(String method, InputStream input,
+ ResponseHandler handler
+ )
+ throws SystemException
+ {
+ org.omg.CORBA.portable.InputStream in = null;
+ org.omg.CORBA.portable.OutputStream out = null;
+ try
+ {
+ try
+ {
+ out = ref._request(method, true);
+
+ // Transfer request information.
+ int b;
+ while ((b = input.read()) >= 0)
+ {
+ out.write(b);
+ }
+ in = ref._invoke(out);
+
+ // Read the returned data.
+ out = handler.createReply();
+ while ((b = in.read()) >= 0)
+ {
+ out.write(b);
+ }
+ }
+ catch (IOException io_ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(io_ex);
+ throw m;
+ }
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String _id = ex.getId();
+ throw new MARSHAL(_id, 5101, CompletionStatus.COMPLETED_NO);
+ }
+ catch (RemarshalException remarsh)
+ {
+ _invoke(method, input, handler);
+ }
+ finally
+ {
+ ref._releaseReply(in);
+ }
+ return out;
+ }
+
+ /**
+ * Delegates to the wrapped object.
+ */
+ public String[] _all_interfaces(POA poa, byte[] key)
+ {
+ return ref._ids();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/InvalidPolicyHolder.java b/gnu/CORBA/Poa/InvalidPolicyHolder.java
new file mode 100644
index 000000000..154762acf
--- /dev/null
+++ b/gnu/CORBA/Poa/InvalidPolicyHolder.java
@@ -0,0 +1,106 @@
+/* InvalidPolicyHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.PortableServer.POAPackage.InvalidPolicy;
+import org.omg.PortableServer.POAPackage.InvalidPolicyHelper;
+
+/**
+* A holder for the exception {@link InvalidPolicy}.
+
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class InvalidPolicyHolder
+ implements Streamable
+{
+ /**
+ * The stored InvalidPolicy value.
+ */
+ public InvalidPolicy value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public InvalidPolicyHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public InvalidPolicyHolder(InvalidPolicy initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = InvalidPolicyHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ InvalidPolicyHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the InvalidPolicy.
+ */
+ public TypeCode _type()
+ {
+ return InvalidPolicyHelper.type();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/LocalDelegate.java b/gnu/CORBA/Poa/LocalDelegate.java
new file mode 100644
index 000000000..950e6e2ff
--- /dev/null
+++ b/gnu/CORBA/Poa/LocalDelegate.java
@@ -0,0 +1,362 @@
+/* LocalDelegate.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.CDR.cdrOutput;
+import gnu.CORBA.streamRequest;
+
+import org.omg.CORBA.ARG_INOUT;
+import org.omg.CORBA.Bounds;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.ExceptionList;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Request;
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.UnknownUserException;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA_2_3.portable.Delegate;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+
+import java.util.Arrays;
+
+/**
+ * A local delegate, transferring all object requests to the locally
+ * available servant. This class is involved in handling the method
+ * invocations on the local object, obtained by
+ * POA.create_reference_with_id.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class LocalDelegate
+ extends org.omg.CORBA_2_3.portable.Delegate
+{
+ /**
+ * The same servant as an invocation handler.
+ */
+ gnuServantObject object;
+ String operation;
+ final gnuPOA poa;
+ final byte[] Id;
+
+ /**
+ * Create a local delegate, forwarding requests to the
+ * servant that must also be an invocation handler.
+ */
+ public LocalDelegate(gnuServantObject an_object, gnuPOA a_poa, byte[] an_id)
+ {
+ object = an_object;
+ poa = a_poa;
+ Id = an_id;
+ }
+
+ public Request request(org.omg.CORBA.Object target, String method)
+ {
+ operation = method;
+
+ LocalRequest rq = new LocalRequest(object, poa, Id);
+ rq.setOperation(method);
+ rq.setORB(orb(target));
+ return rq;
+ }
+
+ public void release(org.omg.CORBA.Object target)
+ {
+ }
+
+ public boolean is_equivalent(org.omg.CORBA.Object target,
+ org.omg.CORBA.Object other
+ )
+ {
+ if (target == other)
+ return true;
+ else if (target instanceof ObjectImpl && other instanceof ObjectImpl)
+ {
+ org.omg.CORBA.portable.Delegate a = null;
+ org.omg.CORBA.portable.Delegate b = null;
+ try
+ {
+ a = ((ObjectImpl) target)._get_delegate();
+ b = ((ObjectImpl) other)._get_delegate();
+ }
+ catch (Exception ex)
+ {
+ // Unable to get one of the delegates.
+ return false;
+ }
+ if (a instanceof LocalDelegate && b instanceof LocalDelegate)
+ {
+ byte[] k1 = ((LocalDelegate) a).Id;
+ byte[] k2 = ((LocalDelegate) b).Id;
+ return Arrays.equals(k1, k2);
+ }
+ else
+ return false;
+ }
+ else
+ return false;
+ }
+
+ /**
+ * Always return false.
+ */
+ public boolean non_existent(org.omg.CORBA.Object target)
+ {
+ return false;
+ }
+
+ /**
+ * Get hash code.
+ */
+ public int hash(org.omg.CORBA.Object target, int maximum)
+ {
+ return hashCode() % maximum;
+ }
+
+ /**
+ * Check if this object could be named by the given repository id.
+ * @param idl_id the repository id to check.
+ *
+ * @return true if it is one of the possible repository ids of this
+ * object.
+ */
+ public boolean is_a(org.omg.CORBA.Object a_servant, String idl_id)
+ {
+ String[] maybe = object._ids();
+ for (int i = 0; i < maybe.length; i++)
+ {
+ if (maybe [ i ].equals(idl_id))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Return <code>this</code>.
+ */
+ public org.omg.CORBA.Object duplicate(org.omg.CORBA.Object target)
+ {
+ return target;
+ }
+
+ /**
+ * Create request for using with DII.
+ */
+ public Request create_request(org.omg.CORBA.Object target, Context context,
+ String method, NVList parameters,
+ NamedValue returns, ExceptionList exceptions,
+ ContextList ctx_list
+ )
+ {
+ operation = method;
+
+ LocalRequest rq = new LocalRequest(object, poa, Id);
+ rq.setOperation(method);
+ rq.set_args(parameters);
+ rq.set_result(returns);
+ rq.set_exceptions(exceptions);
+ rq.set_context_list(ctx_list);
+ return rq;
+ }
+
+ /**
+ * Create request for using with DII.
+ */
+ public Request create_request(org.omg.CORBA.Object target, Context context,
+ String method, NVList parameters,
+ NamedValue returns
+ )
+ {
+ operation = method;
+
+ LocalRequest rq = new LocalRequest(object, poa, Id);
+ rq.setOperation(method);
+ rq.set_args(parameters);
+ rq.set_result(returns);
+ return rq;
+ }
+
+ /**
+ * Not in use.
+ */
+ public org.omg.CORBA.Object get_interface_def(org.omg.CORBA.Object target)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Create a request to invoke the method of this CORBA object.
+ *
+ * @param operation the name of the method to invoke.
+ * @param response_expected specifies if this is one way message or the
+ * response to the message is expected.
+ *
+ * @return the stream where the method arguments should be written.
+ */
+ public org.omg.CORBA.portable.OutputStream request(org.omg.CORBA.Object target,
+ String method,
+ boolean response_expected
+ )
+ {
+ operation = method;
+
+ // Check if the object is not explicitly deactivated.
+ activeObjectMap.Obj e = poa.aom.get(Id);
+ if (e != null && e.isDeactiveted())
+ {
+ if (poa.servant_activator != null || poa.servant_locator != null)
+ {
+ // This will force the subsequent activation.
+ object.setServant(null);
+ e.setServant(null);
+ e.setDeactivated(false);
+ }
+ else
+ throw new OBJECT_NOT_EXIST("Deactivated");
+ }
+
+ LocalRequest rq = new LocalRequest(object, poa, Id);
+ rq.setOperation(method);
+ rq.setORB(orb(target));
+ return rq.getParameterStream();
+ }
+
+ /**
+ * Return the associated invocation handler.
+ */
+ public InvokeHandler getHandler(String method, CookieHolder cookie)
+ {
+ return object.getHandler(method, cookie, false);
+ }
+
+ /**
+ * Return the ORB of the associated POA. The parameter is not in use.
+ */
+ public ORB orb(org.omg.CORBA.Object target)
+ {
+ return poa.orb();
+ }
+
+ /**
+ * Make an invocation.
+ *
+ * @param target not in use.
+ * @param output the stream request that should be returned by {@link #request}
+ * in this method.
+ * @throws ApplicationException if the use exception is thrown by
+ * the servant method.
+ */
+ public InputStream invoke(org.omg.CORBA.Object target, OutputStream output)
+ throws ApplicationException
+ {
+ streamRequest sr = (streamRequest) output;
+
+ LocalRequest lr = (LocalRequest) sr.request;
+ InvokeHandler handler = lr.object.getHandler(lr.operation(), lr.cookie, false);
+
+ if (handler instanceof dynImpHandler)
+ {
+ // The local request known how to handle it, but the different
+ // method must be called.
+ lr.invoke();
+
+ // The encapsulation will inherit orb, endian, charsets, etc.
+ cdrOutput buf = sr.createEncapsulation();
+
+ // Write all request parameters to the buffer stream.
+ if (lr.env().exception() != null)
+ {
+ try
+ {
+ UnknownUserException uex =
+ (UnknownUserException) lr.env().exception();
+ throw new ApplicationException(uex.except.type().id(),
+ uex.except.create_input_stream()
+ );
+ }
+ catch (BadKind ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ }
+ if (lr.return_value() != null)
+ lr.return_value().write_value(buf);
+
+ NamedValue a;
+ try
+ {
+ for (int i = 0; i < lr.arguments().count(); i++)
+ {
+ a = lr.arguments().item(i);
+ if (a.flags() == ARG_INOUT.value ||
+ a.flags() == ARG_INOUT.value
+ )
+ {
+ a.value().write_value(buf);
+ }
+ }
+ }
+ catch (Bounds ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+
+ return buf.create_input_stream();
+ }
+ else
+ return ((LocalRequest) sr.request).s_invoke(handler);
+ }
+
+ public void releaseReply(org.omg.CORBA.Object target, InputStream input)
+ {
+ release(target);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/LocalRequest.java b/gnu/CORBA/Poa/LocalRequest.java
new file mode 100644
index 000000000..3c2816d70
--- /dev/null
+++ b/gnu/CORBA/Poa/LocalRequest.java
@@ -0,0 +1,426 @@
+/* LocalRequest.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.CDR.cdrBufOutput;
+import gnu.CORBA.GIOP.MessageHeader;
+import gnu.CORBA.Unexpected;
+import gnu.CORBA.gnuAny;
+import gnu.CORBA.gnuRequest;
+import gnu.CORBA.streamReadyHolder;
+import gnu.CORBA.streamRequest;
+
+import org.omg.CORBA.ARG_OUT;
+import org.omg.CORBA.BAD_INV_ORDER;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.Bounds;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.UnknownUserException;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.CurrentOperations;
+import org.omg.PortableServer.CurrentPackage.NoContext;
+import org.omg.PortableServer.DynamicImplementation;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.Servant;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+import org.omg.PortableServer.portable.Delegate;
+
+import java.io.IOException;
+
+/**
+ * Directs the invocation to the locally available servant.
+ * The POA servant does not longer implement the CORBA object and
+ * cannot be substituted directly.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class LocalRequest
+ extends gnuRequest
+ implements ResponseHandler, CurrentOperations
+{
+ /**
+ * Used by servant locator, if involved.
+ */
+ CookieHolder cookie;
+
+ /**
+ * The object Id.
+ */
+ final byte[] Id;
+
+ /**
+ * The message header (singleton is sufficient).
+ */
+ private static final MessageHeader header = new MessageHeader();
+
+ /**
+ * True if the stream was obtained by invoking {@link #createExceptionReply()},
+ * false otherwise.
+ */
+ boolean exceptionReply;
+
+ /**
+ * The buffer to write into.
+ */
+ cdrBufOutput buffer;
+
+ /**
+ * The responsible POA.
+ */
+ final gnuPOA poa;
+
+ /**
+ * The servant delegate to obtain the handler.
+ */
+ gnuServantObject object;
+
+ /**
+ * Used (reused) with dynamic implementation.
+ */
+ LocalServerRequest serverRequest;
+
+ /**
+ * Create an instance of the local request.
+ */
+ public LocalRequest(gnuServantObject local_object, gnuPOA a_poa, byte[] an_id)
+ {
+ Id = an_id;
+ poa = a_poa;
+
+ // Instantiate the cookie holder only if required.
+ if (poa.servant_locator != null)
+ cookie = new CookieHolder();
+ object = local_object;
+ prepareStream();
+ }
+
+ /**
+ * Make an invocation and return a stream from where the results
+ * can be read and throw ApplicationException, where applicable.
+ */
+ org.omg.CORBA.portable.InputStream s_invoke(InvokeHandler handler)
+ throws ApplicationException
+ {
+ try
+ {
+ poa.m_orb.currents.put(Thread.currentThread(), this);
+
+ org.omg.CORBA.portable.InputStream input = v_invoke(handler);
+
+ if (!exceptionReply)
+ return input;
+ else
+ {
+ input.mark(500);
+
+ String id = input.read_string();
+ try
+ {
+ input.reset();
+ }
+ catch (IOException ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ throw new ApplicationException(id, input);
+ }
+ }
+ finally
+ {
+ poa.m_orb.currents.remove(Thread.currentThread());
+ }
+ }
+
+ /**
+ * Make an invocation and return a stream from where the results
+ * can be read.
+ *
+ * @param the invoke handler (can be null, then it is obtained self
+ * dependently).
+ */
+ public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler)
+ {
+ if (handler == null)
+ handler = object.getHandler(operation(), cookie, false);
+
+ cdrBufOutput request_part = new cdrBufOutput();
+
+ request_part.setOrb(orb());
+
+ if (m_args != null && m_args.count() > 0)
+ {
+ write_parameters(header, request_part);
+
+ if (m_parameter_buffer != null)
+ throw new BAD_INV_ORDER("Please either add parameters or " +
+ "write them into stream, but not both " +
+ "at once."
+ );
+ }
+
+ if (m_parameter_buffer != null)
+ {
+ write_parameter_buffer(header, request_part);
+ }
+
+ Servant servant;
+
+ if (handler instanceof Servant)
+ servant = (Servant) handler;
+ else
+ throw new BAD_OPERATION("Unexpected handler type " + handler);
+
+ org.omg.CORBA.portable.InputStream input =
+ request_part.create_input_stream();
+
+ // Ensure the servant (handler) has a delegate set.
+ servantDelegate sd = null;
+
+ Delegate d = null;
+
+ try
+ {
+ d = servant._get_delegate();
+ }
+ catch (Exception ex)
+ {
+ // In some cases exception is thrown if the delegate is not set.
+ }
+ if (d instanceof servantDelegate)
+ {
+ // If the delegate is already set, try to reuse the existing
+ // instance.
+ sd = (servantDelegate) d;
+ if (sd.object != object)
+ sd = new servantDelegate(servant, poa, Id);
+ }
+ else
+ sd = new servantDelegate(servant, poa, Id);
+ servant._set_delegate(sd);
+
+ try
+ {
+ ORB o = orb();
+ if (o instanceof ORB_1_4)
+ {
+ ((ORB_1_4) o).currents.put(Thread.currentThread(), this);
+ }
+
+ handler._invoke(m_operation, input, this);
+ }
+ finally
+ {
+ ORB o = orb();
+ if (o instanceof ORB_1_4)
+ ((ORB_1_4) o).currents.remove(Thread.currentThread());
+ }
+
+ if (poa.servant_locator != null)
+ poa.servant_locator.postinvoke(object.Id, poa, operation(), cookie.value,
+ object.getServant()
+ );
+
+ return buffer.create_input_stream();
+ }
+
+ /**
+ * Make an invocation and store the result in the fields of this
+ * Request. Used with DII only.
+ */
+ public void invoke()
+ {
+ InvokeHandler handler = object.getHandler(operation(), cookie, false);
+
+ if (handler instanceof dynImpHandler)
+ {
+ DynamicImplementation dyn = ((dynImpHandler) handler).servant;
+ if (serverRequest == null)
+ serverRequest = new LocalServerRequest(this);
+ try
+ {
+ poa.m_orb.currents.put(Thread.currentThread(), this);
+ dyn.invoke(serverRequest);
+ }
+ finally
+ {
+ poa.m_orb.currents.remove(Thread.currentThread());
+ }
+ }
+ else
+ {
+ org.omg.CORBA.portable.InputStream input = v_invoke(handler);
+
+ if (!exceptionReply)
+ {
+ NamedValue arg;
+
+ // Read return value, if set.
+ if (m_result != null)
+ {
+ m_result.value().read_value(input, m_result.value().type());
+ }
+
+ // Read returned parameters, if set.
+ if (m_args != null)
+ for (int i = 0; i < m_args.count(); i++)
+ {
+ try
+ {
+ arg = m_args.item(i);
+
+ // Both ARG_INOUT and ARG_OUT have this binary flag set.
+ if ((arg.flags() & ARG_OUT.value) != 0)
+ {
+ arg.value().read_value(input, arg.value().type());
+ }
+ }
+ catch (Bounds ex)
+ {
+ Unexpected.error(ex);
+ }
+ }
+ }
+ else // User exception reply
+ {
+ // Prepare an Any that will hold the exception.
+ gnuAny exc = new gnuAny();
+
+ exc.insert_Streamable(new streamReadyHolder(input));
+
+ UnknownUserException unuex = new UnknownUserException(exc);
+ m_environment.exception(unuex);
+ }
+ }
+ }
+
+ /**
+ * Get an output stream for providing details about the exception.
+ * Before returning the stream, the handler automatically writes
+ * the message header and the reply about exception header,
+ * but not the message header.
+ *
+ * @return the stream to write exception details into.
+ */
+ public OutputStream createExceptionReply()
+ {
+ exceptionReply = true;
+ prepareStream();
+ return buffer;
+ }
+
+ /**
+ * Get an output stream for writing a regular reply (not an exception).
+ *
+ * Before returning the stream, the handler automatically writes
+ * the regular reply header, but not the message header.
+ *
+ * @return the output stream for writing a regular reply.
+ */
+ public OutputStream createReply()
+ {
+ exceptionReply = false;
+ prepareStream();
+ return buffer;
+ }
+
+ /**
+ * Get the buffer, normally containing the written reply.
+ * The reply includes the reply header (or the exception header)
+ * but does not include the message header.
+ *
+ * The stream buffer can also be empty if no data have been written
+ * into streams, returned by {@link #createReply()} or
+ * {@link #createExceptionReply()}.
+ *
+ * @return the CDR output stream, containing the written output.
+ */
+ cdrBufOutput getBuffer()
+ {
+ return buffer;
+ }
+
+ /**
+ * True if the stream was obtained by invoking
+ * {@link #createExceptionReply()}, false otherwise
+ * (usually no-exception reply).
+ */
+ boolean isExceptionReply()
+ {
+ return exceptionReply;
+ }
+
+ /**
+ * Compute the header offset, set the correct version number and codeset.
+ */
+ private void prepareStream()
+ {
+ buffer = new cdrBufOutput();
+ buffer.setOrb(orb());
+ }
+
+ /**
+ * Get the parameter stream, where the invocation arguments should
+ * be written if they are written into the stream directly.
+ */
+ public streamRequest getParameterStream()
+ {
+ m_parameter_buffer = new streamRequest();
+ m_parameter_buffer.request = this;
+ m_parameter_buffer.setOrb(poa.orb());
+ return m_parameter_buffer;
+ }
+
+ public byte[] get_object_id()
+ throws NoContext
+ {
+ return Id;
+ }
+
+ public POA get_POA()
+ throws NoContext
+ {
+ return poa;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/LocalServerRequest.java b/gnu/CORBA/Poa/LocalServerRequest.java
new file mode 100644
index 000000000..6d0b39650
--- /dev/null
+++ b/gnu/CORBA/Poa/LocalServerRequest.java
@@ -0,0 +1,199 @@
+/* LocalServerRequest.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.gnuNamedValue;
+
+import org.omg.CORBA.ARG_INOUT;
+import org.omg.CORBA.ARG_OUT;
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.Bounds;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.ServerRequest;
+import org.omg.CORBA.UnknownUserException;
+
+/**
+ * Used to make local invocations via LocalRequest.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class LocalServerRequest
+ extends ServerRequest
+{
+ /**
+ * The local request, on the base of that this instance is created.
+ */
+ final LocalRequest request;
+
+ /**
+ * Create a new instance.
+ */
+ public LocalServerRequest(LocalRequest _request)
+ {
+ request = _request;
+ }
+
+ /**
+ * Get the argument list that can be modified.
+ */
+ public void params(NVList args)
+ {
+ arguments(args);
+ }
+
+ /**
+ * Get contexts.
+ */
+ public Context ctx()
+ {
+ return request.ctx();
+ }
+
+ /**
+ * Get the operatin being performed.
+ */
+ public String operation()
+ {
+ return request.operation();
+ }
+
+ /**
+ * Get the argument list that can be modified.
+ * The direction depends on the size of the passed list.
+ * The empty list is filled with the request arguments.
+ * The non-empty list is used to set the request arguments.
+ */
+ public void arguments(NVList args)
+ {
+ NVList l = request.arguments();
+ NamedValue a;
+
+ try
+ {
+ if (args.count() == 0)
+ {
+ // Transfer to the passed parameter.
+ for (int i = 0; i < l.count(); i++)
+ {
+ a = l.item(i);
+ args.add_value(a.name(), a.value(), a.flags());
+ }
+ }
+ else
+ {
+ // Transfer from the passed parameter.
+ if (l.count() != args.count())
+ throw new BAD_PARAM("Argument number mismatch, current " +
+ l.count() + ", passed " + args.count()
+ );
+ try
+ {
+ for (int i = 0; i < l.count(); i++)
+ {
+ a = l.item(i);
+ if (a.flags() == ARG_INOUT.value ||
+ a.flags() == ARG_OUT.value
+ )
+ {
+ ((gnuNamedValue) a).setValue(args.item(i).value());
+ }
+ }
+ }
+ catch (ClassCastException cex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(cex);
+ throw ierr;
+ }
+ }
+ }
+ catch (Bounds ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ }
+
+ /**
+ * Set the result.
+ */
+ public void set_result(Any result)
+ {
+ gnuNamedValue g = new gnuNamedValue();
+ g.setValue(result);
+ g.setFlags(ARG_OUT.value);
+ request.set_result(g);
+ }
+
+ /**
+ * Get the name of the method being called.
+ */
+ public String op_name()
+ {
+ return request.operation();
+ }
+
+ /**
+ * Set the exception that has been thrown.
+ */
+ public void set_exception(Any exc)
+ {
+ request.env().exception(new UnknownUserException(exc));
+ }
+
+ /**
+ * Set the result.
+ */
+ public void result(Any r)
+ {
+ set_result(r);
+ }
+
+ /**
+ * Set the exception.
+ */
+ public void except(Any exc)
+ {
+ set_exception(exc);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/ORB_1_4.java b/gnu/CORBA/Poa/ORB_1_4.java
new file mode 100644
index 000000000..6302ddf12
--- /dev/null
+++ b/gnu/CORBA/Poa/ORB_1_4.java
@@ -0,0 +1,136 @@
+/* poaORB.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.Functional_ORB;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.PortableServer.POAPackage.InvalidPolicy;
+
+/**
+ * The ORB, supporting POAs that are the feature of jdk 1.4.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ORB_1_4
+ extends Functional_ORB
+{
+ /**
+ * The root POA.
+ */
+ public final gnuPOA rootPOA;
+
+ /**
+ * Maps the active threads to the invocation data ("Current's").
+ */
+ public gnuPoaCurrent currents = new gnuPoaCurrent();
+
+ /**
+ * Calls the parent constructor and additionally puts the "RootPOA" and
+ * "RootPOAManager" into initial references.
+ */
+ public ORB_1_4()
+ {
+ super();
+ try
+ {
+ rootPOA = new gnuPOA(null, "RootPOA", null, policySets.rootPoa(), this);
+ }
+ catch (InvalidPolicy ex)
+ {
+ // Invalid default policy set.
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ initial_references.put("RootPOA", rootPOA);
+ initial_references.put("RootPOAManager", rootPOA.the_POAManager());
+ initial_references.put("POACurrent", currents);
+ }
+
+ /**
+ * If the super method detects that the object is not connected to
+ * this ORB, try to find and activate the object.
+ */
+ public String object_to_string(org.omg.CORBA.Object forObject)
+ {
+ try
+ {
+ return super.object_to_string(forObject);
+ }
+ catch (Exception ex)
+ {
+ try
+ {
+ activeObjectMap.Obj exists = rootPOA.findObject(forObject);
+ if (exists == null)
+ throw new OBJECT_NOT_EXIST(forObject == null ? "null"
+ : forObject.toString()
+ );
+ else if (exists.poa instanceof gnuPOA)
+ ((gnuPOA) exists.poa).connect_to_orb(exists.key, forObject);
+ else
+ exists.poa.create_reference_with_id(exists.key,
+ ((ObjectImpl) exists.object)._ids() [ 0 ]
+ );
+ }
+ catch (Exception bex)
+ {
+ BAD_PARAM bad = new BAD_PARAM("Unable to activate " + forObject);
+ bad.initCause(bex);
+ throw bad;
+ }
+
+ return super.object_to_string(forObject);
+ }
+ }
+
+ /**
+ * Destroy all poas and then call the superclass method.
+ */
+ public void destroy()
+ {
+ // This will propagate through the whole POA tree.
+ rootPOA.destroy(true, false);
+
+ super.destroy();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/activeObjectMap.java b/gnu/CORBA/Poa/activeObjectMap.java
new file mode 100644
index 000000000..1354ba9c5
--- /dev/null
+++ b/gnu/CORBA/Poa/activeObjectMap.java
@@ -0,0 +1,394 @@
+/* activeObjectMap.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.ByteArrayComparator;
+
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.Servant;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+/**
+ * Implements the conception of the Active Object Map.
+ * If the POA supports the RETAIN policy, it maintains an Active
+ * Object Map, that associates Object Ids with active servants.
+ * Each association constitutes an active object. We use a single map
+ * for all POAs on the given orb.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class activeObjectMap
+{
+ /**
+ * The reference data about the object, placed on the AOM.
+ */
+ public class Obj
+ {
+ /**
+ * Create an initialised instance.
+ */
+ Obj(org.omg.CORBA.Object _object, byte[] _key, Servant _servant, POA _poa)
+ {
+ object = _object;
+ key = _key;
+ servant = _servant;
+ poa = _poa;
+ }
+
+ /**
+ * The object.
+ */
+ public final org.omg.CORBA.Object object;
+
+ /**
+ * The servant, serving the given object.
+ */
+ public Servant servant;
+
+ /**
+ * The local servant that once served this object.
+ * This field is used by {@link ForwardedServant} when it discovers that
+ * the forwarding chaing returns back to the original location.
+ * It should not be used anywhere else.
+ */
+ Servant primary_servant;
+
+ /**
+ * The POA, where the object is connected.
+ */
+ public final POA poa;
+
+ /**
+ * The object key.
+ */
+ public final byte[] key;
+
+ /**
+ * If true, this entry is deactivated.
+ */
+ public boolean deactivated;
+
+ /**
+ * Set the servant value, preserving any non null
+ * value as the primary servant.
+ */
+ public void setServant(Servant s)
+ {
+ if (primary_servant == null)
+ primary_servant = s;
+ servant = s;
+ }
+
+ /**
+ * Get the servant.
+ */
+ public Servant getServant()
+ {
+ return servant;
+ }
+
+ /**
+ * Get the deactivation state.
+ */
+ public boolean isDeactiveted()
+ {
+ return deactivated;
+ }
+
+ /**
+ * Set the deactivation state.
+ */
+ public void setDeactivated(boolean state)
+ {
+ deactivated = state;
+ }
+
+ public boolean equals(java.lang.Object other)
+ {
+ if (other instanceof Obj)
+ {
+ Obj o = (Obj) other;
+ return o.object.equals(object);
+ }
+ else
+ return false;
+ }
+ }
+
+ /**
+ * The free number to give for the next instance.
+ * This field is incremented each time the
+ * new collection of the connected objects is created.
+ * Each collection has its own unique instance number.
+ */
+ private static long free_id;
+
+ /**
+ * The map of the all connected objects, maps the object key to the
+ * object.
+ */
+ Map objects = new TreeMap(new ByteArrayComparator());
+
+ /**
+ * Get the record of the stored object. If the object is mapped
+ * several times under the different keys, one of the mappings
+ * is used.
+ *
+ * @param object the stored object
+ *
+ * @return the record about the stored object, null if
+ * this object is not stored here.
+ */
+ public Obj findObject(org.omg.CORBA.Object stored_object)
+ {
+ if (stored_object == null)
+ return null;
+
+ Map.Entry item;
+ Iterator iter = objects.entrySet().iterator();
+ Obj ref;
+
+ while (iter.hasNext())
+ {
+ item = (Map.Entry) iter.next();
+ ref = (Obj) item.getValue();
+ if (stored_object.equals(ref.object))
+ return ref;
+ }
+ return null;
+ }
+
+ /**
+ * Find the reference info for the given servant.
+ * If the servant is mapped to several objects, this
+ * returns the first found occurence.
+ *
+ * @param servant a servant to find.
+ *
+ * @return the servant/object/POA binding or null if no such found.
+ */
+ public Obj findServant(Servant servant)
+ {
+ if (servant == null)
+ return null;
+
+ Map.Entry item;
+ Iterator iter = objects.entrySet().iterator();
+ Obj ref;
+
+ while (iter.hasNext())
+ {
+ item = (Map.Entry) iter.next();
+ ref = (Obj) item.getValue();
+ if (servant.equals(ref.servant))
+ return ref;
+ }
+ return null;
+ }
+
+ /**
+ * Find the reference info for the given servant.
+ * If the servant is mapped to several objects, this
+ * returns the first found occurence.
+ *
+ * @param servant a servant to find.
+ * @param speficies if to search for the inactive (true) or active
+ * (false) servant. A servant with unmatching activity is ignored
+ * by this method.
+ *
+ * @return the servant/object/POA binding or null if no such found.
+ */
+ public Obj findServant(Servant servant, boolean inactive)
+ {
+ if (servant == null)
+ return null;
+
+ Map.Entry item;
+ Iterator iter = objects.entrySet().iterator();
+ Obj ref;
+
+ while (iter.hasNext())
+ {
+ item = (Map.Entry) iter.next();
+ ref = (Obj) item.getValue();
+ if (ref.deactivated == inactive)
+ if (ref.servant != null)
+ if (servant.equals(ref.servant))
+ return ref;
+ }
+ return null;
+ }
+
+ /**
+ * Add the new object to the repository. The object key is
+ * generated automatically.
+ *
+ * @param object the object to add.
+ * @param servant a servant, serving the given object.
+ * @param poa the poa, where the object is connected.
+ *
+ * @return the newly created object record.
+ */
+ public Obj add(org.omg.CORBA.Object object, Servant servant, POA poa)
+ {
+ return add(generateObjectKey(object), object, servant, poa);
+ }
+
+ /**
+ * Add the new object to the repository.
+ *
+ * @param key the object key.
+ * @param object the object to add.
+ * @param servant a servant, serving the given object.
+ * @param poa the POA, where the object is connected.
+ */
+ public Obj add(byte[] key, org.omg.CORBA.Object object, Servant servant,
+ POA poa
+ )
+ {
+ Obj rec = new Obj(object, key, servant, poa);
+ objects.put(key, rec);
+ return rec;
+ }
+
+ /**
+ * Add the new object to the repository.
+ *
+ * @param delegate the delegate, providing data about the servant, key, POA
+ * and object.
+ * @param port the port that this object would take.
+ */
+ public Obj add(servantDelegate delegate)
+ {
+ Obj rec =
+ new Obj(delegate.object, delegate.servant_id, delegate.servant,
+ delegate.poa
+ );
+ objects.put(delegate.servant_id, rec);
+ return rec;
+ }
+
+ /**
+ * Put back the definition structure that has probably been removed earlier.
+ */
+ public void put(Obj obj)
+ {
+ objects.put(obj.key, obj);
+ }
+
+ /**
+ * Get the stored object.
+ *
+ * @param key the key (in the byte array form).
+ *
+ * @return the matching object, null if none is matching.
+ */
+ public Obj get(byte[] key)
+ {
+ return (Obj) objects.get(key);
+ }
+
+ /**
+ * Get the map key set.
+ */
+ public Set keySet()
+ {
+ return objects.keySet();
+ }
+
+ /**
+ * Remove the given object, indiciating it by the key.
+ *
+ * @param object the object to remove.
+ */
+ public void remove(byte[] key)
+ {
+ objects.remove(key);
+ }
+
+ /**
+ * Generate the object key, unique in the currently
+ * running java virtual machine. The passed object
+ * parameter is currently not in use.
+ *
+ * @return the generated key.
+ */
+ protected byte[] generateObjectKey(org.omg.CORBA.Object object)
+ {
+ byte[] key;
+
+ // The repetetive keys cannot be generated, but theoretically
+ // the same keys can be passed when calling add(byte[]...).
+ // Hence we check if the key is not already in the map and,
+ // if it is, use the subsequent value.
+ do
+ {
+ key = getFreeId();
+ }
+ while (objects.containsKey(key));
+ return key;
+ }
+
+ /**
+ * Get the next free 8 byte id, surely unique between calls of this
+ * method for the currently running virtual machine.
+ */
+ public static synchronized byte[] getFreeId()
+ {
+ byte[] r = new byte[ 8 ];
+
+ // Start from the faster-changing.
+ r [ 0 ] = ((byte) (0xff & free_id));
+ r [ 1 ] = ((byte) (0xff & (free_id >> 8)));
+ r [ 2 ] = ((byte) (0xff & (free_id >> 16)));
+ r [ 3 ] = ((byte) (0xff & (free_id >> 24)));
+ r [ 4 ] = ((byte) (0xff & (free_id >> 32)));
+ r [ 5 ] = ((byte) (0xff & (free_id >> 40)));
+ r [ 6 ] = ((byte) (0xff & (free_id >> 48)));
+ r [ 7 ] = ((byte) (0xff & (free_id >> 56)));
+
+ free_id++;
+
+ return r;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/dynImpHandler.java b/gnu/CORBA/Poa/dynImpHandler.java
new file mode 100644
index 000000000..1cc3e131c
--- /dev/null
+++ b/gnu/CORBA/Poa/dynImpHandler.java
@@ -0,0 +1,85 @@
+/* dynImpHandler.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.DynamicImplementation;
+
+/**
+ * The InvokeHandler, indicating, that the target is a dynamic
+ * implementation rather than an invoke handler. These two
+ * types are not substitutable, but in some methods have possibility
+ * just to handle them differently.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class dynImpHandler
+ implements InvokeHandler
+{
+ /**
+ * The servant that is a dynamic implementation rather than
+ * invoke handler.
+ */
+ public final DynamicImplementation servant;
+
+ /**
+ * Create a new instance, wrapping some dyn implementation.
+ * @param _servant
+ */
+ public dynImpHandler(DynamicImplementation _servant)
+ {
+ servant = _servant;
+ }
+
+ /**
+ * We cannot invoke properly without having parameter info.
+ *
+ * @throws BAD_OPERATION, always.
+ */
+ public OutputStream _invoke(String method, InputStream input,
+ ResponseHandler handler
+ )
+ {
+ throw new BAD_OPERATION(servant + " is not an InvokeHandler.");
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuAdapterActivator.java b/gnu/CORBA/Poa/gnuAdapterActivator.java
new file mode 100644
index 000000000..3019a2ae9
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuAdapterActivator.java
@@ -0,0 +1,81 @@
+/* gnuAdapterActivator.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.LocalObject;
+import org.omg.PortableServer.AdapterActivator;
+import org.omg.PortableServer.POA;
+
+/**
+ * Defines a simple adapter activator.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuAdapterActivator
+ extends LocalObject
+ implements AdapterActivator
+{
+ /**
+ * Create a new POA on the parent, using the parent policy set
+ * from the suitable parent of grandparend and with independent
+ * POA manager (passing null to the createPOA).
+ *
+ * @param parent a parent. Either this parent or one of its
+ * grandparents must be gnuAbstractPOA, able to provide a
+ * policy set.
+ *
+ * @param child_name the name of the child being created.
+ *
+ * @return true on success or false if no gnuAbstractPOA
+ * found till the root poa.
+ */
+ public boolean unknown_adapter(POA parent, String child_name)
+ {
+ try
+ {
+ POA n = parent.create_POA(child_name, null, policySets.rootPoa());
+ n.the_POAManager().activate();
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ return true;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuForwardRequest.java b/gnu/CORBA/Poa/gnuForwardRequest.java
new file mode 100644
index 000000000..02fc42470
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuForwardRequest.java
@@ -0,0 +1,90 @@
+/* gnuForwardRequest.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.GIOP.ReplyHeader;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.portable.ObjectImpl;
+
+/**
+ * The class, indicating that the request should be forwarded to another
+ * target. We cannot use ForwardRequest because the exception is throws
+ * from methods that does not declare throwing it. Hence must be
+ * RuntimeException.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuForwardRequest
+ extends RuntimeException
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1L;
+
+ /**
+ * The object reference, indicating the new location of the invocation target.
+ */
+ public ObjectImpl forward_reference;
+
+ /**
+ * This information shows if we use LOCATION_FORWARD or
+ * LOCATION_FORWARD_PERM in request. By defalult, LOCATION_FORWARD
+ * is always used. To use LOCATION_FORWARD_PERM, this exception should
+ * be thrown from the servant manager instead of ForwardRequest,
+ * with this field set to ReplyHeader.LOCATION_FORWARD_PERM.
+ */
+ public byte forwarding_code = ReplyHeader.LOCATION_FORWARD;
+
+ /**
+ * Create the ForwardRequest with explaining message and
+ * initialising the object reference to the given value.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ * @param a_forward_reference a value for forward_reference.
+ */
+ public gnuForwardRequest(org.omg.CORBA.Object a_forward_reference)
+ {
+ if (a_forward_reference instanceof ObjectImpl)
+ this.forward_reference = (ObjectImpl) a_forward_reference;
+ else
+ throw new BAD_PARAM("ObjectImpl expected");
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java b/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java
new file mode 100644
index 000000000..a404486ce
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java
@@ -0,0 +1,80 @@
+/* gnuIdAssignmentPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID;
+import org.omg.PortableServer.IdAssignmentPolicy;
+import org.omg.PortableServer.IdAssignmentPolicyValue;
+
+/**
+ * Implementation of the id assignment policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuIdAssignmentPolicy
+ extends _PolicyImplBase
+ implements IdAssignmentPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuIdAssignmentPolicy(IdAssignmentPolicyValue v)
+ {
+ super(ID_ASSIGNMENT_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/IdAssignmentPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public IdAssignmentPolicyValue value()
+ {
+ return (IdAssignmentPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java b/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java
new file mode 100644
index 000000000..2abd1f484
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java
@@ -0,0 +1,80 @@
+/* gnuIdUniquenessPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.ID_UNIQUENESS_POLICY_ID;
+import org.omg.PortableServer.IdUniquenessPolicy;
+import org.omg.PortableServer.IdUniquenessPolicyValue;
+
+/**
+ * Implementation of the id uniqueness policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuIdUniquenessPolicy
+ extends _PolicyImplBase
+ implements IdUniquenessPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuIdUniquenessPolicy(IdUniquenessPolicyValue v)
+ {
+ super(ID_UNIQUENESS_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/IdUniquenessPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public IdUniquenessPolicyValue value()
+ {
+ return (IdUniquenessPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java b/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java
new file mode 100644
index 000000000..1e539a2c4
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java
@@ -0,0 +1,80 @@
+/* gnuImplicitActivationPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.IMPLICIT_ACTIVATION_POLICY_ID;
+import org.omg.PortableServer.ImplicitActivationPolicy;
+import org.omg.PortableServer.ImplicitActivationPolicyValue;
+
+/**
+ * Implementation of the implicit activation policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuImplicitActivationPolicy
+ extends _PolicyImplBase
+ implements ImplicitActivationPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuImplicitActivationPolicy(ImplicitActivationPolicyValue v)
+ {
+ super(IMPLICIT_ACTIVATION_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/ImplicitActivationPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public ImplicitActivationPolicyValue value()
+ {
+ return (ImplicitActivationPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuLifespanPolicy.java b/gnu/CORBA/Poa/gnuLifespanPolicy.java
new file mode 100644
index 000000000..97b3f2d7a
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuLifespanPolicy.java
@@ -0,0 +1,80 @@
+/* gnuLifespanPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.LIFESPAN_POLICY_ID;
+import org.omg.PortableServer.LifespanPolicy;
+import org.omg.PortableServer.LifespanPolicyValue;
+
+/**
+ * The implementation of the life span policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuLifespanPolicy
+ extends _PolicyImplBase
+ implements LifespanPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuLifespanPolicy(LifespanPolicyValue v)
+ {
+ super(LIFESPAN_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/LifespanPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public LifespanPolicyValue value()
+ {
+ return (LifespanPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuPOA.java b/gnu/CORBA/Poa/gnuPOA.java
new file mode 100644
index 000000000..1d9e83853
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuPOA.java
@@ -0,0 +1,1615 @@
+/* gnuAbstractPOA.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+
+import org.omg.CORBA.BAD_INV_ORDER;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.LocalObject;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.OBJ_ADAPTER;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.SetOverrideType;
+import org.omg.CORBA.TRANSIENT;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.PortableServer.AdapterActivator;
+import org.omg.PortableServer.ForwardRequest;
+import org.omg.PortableServer.IdAssignmentPolicy;
+import org.omg.PortableServer.IdAssignmentPolicyValue;
+import org.omg.PortableServer.IdUniquenessPolicy;
+import org.omg.PortableServer.IdUniquenessPolicyValue;
+import org.omg.PortableServer.ImplicitActivationPolicy;
+import org.omg.PortableServer.ImplicitActivationPolicyValue;
+import org.omg.PortableServer.LifespanPolicy;
+import org.omg.PortableServer.LifespanPolicyValue;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.POAManager;
+import org.omg.PortableServer.RequestProcessingPolicy;
+import org.omg.PortableServer.RequestProcessingPolicyValue;
+import org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID;
+import org.omg.PortableServer.Servant;
+import org.omg.PortableServer.ServantActivator;
+import org.omg.PortableServer.ServantLocator;
+import org.omg.PortableServer.ServantManager;
+import org.omg.PortableServer.ServantRetentionPolicy;
+import org.omg.PortableServer.ServantRetentionPolicyValue;
+import org.omg.PortableServer.ThreadPolicy;
+import org.omg.PortableServer.ThreadPolicyValue;
+import org.omg.PortableServer.POAManagerPackage.State;
+import org.omg.PortableServer.POAPackage.AdapterAlreadyExists;
+import org.omg.PortableServer.POAPackage.AdapterNonExistent;
+import org.omg.PortableServer.POAPackage.InvalidPolicy;
+import org.omg.PortableServer.POAPackage.NoServant;
+import org.omg.PortableServer.POAPackage.ObjectAlreadyActive;
+import org.omg.PortableServer.POAPackage.ObjectNotActive;
+import org.omg.PortableServer.POAPackage.ServantAlreadyActive;
+import org.omg.PortableServer.POAPackage.ServantNotActive;
+import org.omg.PortableServer.POAPackage.WrongAdapter;
+import org.omg.PortableServer.POAPackage.WrongPolicy;
+import gnu.CORBA.CDR.cdrBufInput;
+import gnu.CORBA.CDR.cdrBufOutput;
+
+/**
+ * Our POA implementation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuPOA
+ extends LocalObject
+ implements POA
+{
+ /**
+ * The active object map, mapping between object keys, objects and servants.
+ */
+ public final activeObjectMap aom = new activeObjectMap();
+
+ /**
+ * The children of this POA.
+ */
+ final ArrayList children = new ArrayList();
+
+ /**
+ * The name of this POA.
+ */
+ final String name;
+
+ /**
+ * The parent of this POA (null for the root POA).
+ */
+ final POA parent;
+
+ /**
+ * The ior key signature, indicating, that the ior key is encoded using
+ * internal agreements of this implementation (0x'free').
+ */
+ static final int SIGNATURE = 0x66726565;
+
+ /**
+ * The adapter activator for this POA, null if no activator is set.
+ */
+ AdapterActivator m_activator;
+
+ /**
+ * The POA manager for this POA.
+ */
+ POAManager m_manager;
+
+ /**
+ * The servant manager (servant activator) for this POA.
+ */
+ ServantActivator servant_activator;
+
+ /**
+ * The servant manager (servant locator) for this POA.
+ */
+ ServantLocator servant_locator;
+
+ /**
+ * The default servant, if on is in use.
+ */
+ Servant default_servant;
+
+ /**
+ * The cached poa id value, computed once.
+ */
+ private byte[] m_poa_id;
+
+ /**
+ * The all policy values that apply to this POA.
+ * The used policy values are singletons, unique between policies.
+ */
+ private final HashSet m_policies;
+
+ /**
+ * An array of the set policies.
+ */
+ Policy[] s_policies;
+
+ /**
+ * The ORB, where the POA is connected.
+ */
+ final ORB_1_4 m_orb;
+
+ /**
+ * When true, the POA is being destroyed or is destroyed.
+ */
+ boolean m_inDestruction;
+
+ /**
+ * True if the active object map is used by this POA.
+ * The value is moved into separate boolean value due
+ * necessity of the frequent checks.
+ */
+ public final boolean retain_servant;
+
+ /**
+ * Create a new abstract POA.
+ *
+ * @param a_parent the parent of this POA.
+ * @param a_name a name for this POA.
+ * @param a_manager a manager for this POA. If null, a new
+ * {@link gnuPOAManager} will be instantiated.
+ * @param a_policies an array of policies that apply to this POA.
+ * @param an_orb an ORB for this POA.
+ */
+ public gnuPOA(gnuPOA a_parent, String a_name, POAManager a_manager,
+ Policy[] a_policies, ORB_1_4 an_orb
+ )
+ throws InvalidPolicy
+ {
+ // Add default policies.
+ Policy[] all_policies = policySets.withDefault(a_policies);
+
+ name = a_name;
+ parent = a_parent;
+ m_orb = an_orb;
+
+ if (a_manager != null)
+ m_manager = a_manager;
+ else
+ m_manager = new gnuPOAManager();
+
+ if (m_manager instanceof gnuPOAManager)
+ {
+ gnuPOAManager g = (gnuPOAManager) m_manager;
+ g.addPoa(this);
+ }
+
+ m_policies = new HashSet(all_policies.length);
+
+ s_policies = new Policy[ all_policies.length ];
+ for (int i = 0; i < s_policies.length; i++)
+ {
+ s_policies [ i ] = all_policies [ i ].copy();
+ m_policies.add(((vPolicy) s_policies [ i ]).getValue());
+ }
+
+ retain_servant = applies(ServantRetentionPolicyValue.RETAIN);
+
+ validatePolicies(a_policies);
+ }
+
+ /**
+ * Wait while at least one of the threads in this POA is actively
+ * processing one of requests.
+ */
+ public void waitWhileRunning()
+ {
+ // First pause.
+ long time = 1;
+
+ // Maximal duration between checks.
+ long max = 500;
+
+ boolean runs;
+
+ do
+ {
+ runs = m_orb.currents.has(this);
+
+ if (runs)
+ {
+ // Avoid taking CPU resources
+ // from the thread that is running.
+ try
+ {
+ Thread.sleep(time);
+ time = time * 2;
+ if (time > max)
+ time = max;
+ }
+ catch (InterruptedException ex)
+ {
+ }
+ }
+ }
+ while (runs);
+ }
+
+ /**
+ * Etherealize all objects, associated with this POA. Invoked from the
+ * {@link gnuPOAManager} only if it is known that the servant_activator
+ * holds non-null value.
+ */
+ protected void etherealizeAll()
+ {
+ if (servant_activator == null)
+ return;
+
+ ArrayList keys = new ArrayList();
+ keys.addAll(aom.keySet());
+
+ byte[] key;
+ activeObjectMap.Obj obj;
+ boolean last;
+ for (int i = 0; i < keys.size(); i++)
+ {
+ key = (byte[]) keys.get(i);
+ obj = aom.get(key);
+
+ if (obj.poa == this)
+ {
+ aom.remove(key);
+
+ if (!obj.isDeactiveted())
+ {
+ // Check if the servant still stays under the other key.
+ last = aom.findServant(obj.servant) == null;
+ servant_activator.etherealize(obj.key, this, obj.servant, true,
+ last
+ );
+ }
+ }
+ }
+ }
+
+ /**
+ * Create an instance of the POA with the given features.
+ * This method is not responsible for duplicate checking
+ * or adding the returned instance to any possible table.
+ *
+ * @param child_name the name of the poa being created.
+ * @param manager the poa manager (never null).
+ * @param policies the array of policies.
+ * @param an_orb the ORB for this POA.
+ *
+ * @return the created POA.
+ *
+ * @throws InvalidPolicy for conflicting or otherwise invalid policies.|
+ */
+ protected POA createPoaInstance(String child_name, POAManager a_manager,
+ Policy[] policies, ORB_1_4 an_orb
+ )
+ throws InvalidPolicy
+ {
+ POAManager some_manager =
+ a_manager == null ? new gnuPOAManager() : a_manager;
+
+ if (some_manager instanceof gnuPOAManager)
+ {
+ ((gnuPOAManager) some_manager).addPoa(this);
+ }
+
+ return new gnuPOA(this, child_name, some_manager, policies, an_orb);
+ }
+
+ /**
+ * Check if the given policy value applies to this POA.
+ *
+ * @param policy_value a policy value to check. The policy values are
+ * singletons and unique between the different policies, so the policy
+ * type is not passed.
+ *
+ * @return true if the policy value applies, false otherwise.
+ */
+ public final boolean applies(java.lang.Object policy_value)
+ {
+ return m_policies.contains(policy_value);
+ }
+
+ /**
+ * Check for the presence of the required policy.
+ *
+ * @param policy_value a policy value to check.
+ *
+ * @throws WrongPolicy if the required policy value is not applicable.
+ */
+ public final void required(java.lang.Object policy_value)
+ throws WrongPolicy
+ {
+ if (!applies(policy_value))
+ throw new WrongPolicy(policy_value + " policy required.");
+ }
+
+ /**
+ * Check for the absence of the given policy.
+ *
+ * @param policy_value a policy value to check.
+ *
+ * @throws WrongPolicy if the passed policy value is applicable.
+ */
+ public final void excluding(java.lang.Object policy_value)
+ throws WrongPolicy
+ {
+ if (applies(policy_value))
+ throw new WrongPolicy(policy_value + " policy applies.");
+ }
+
+ /**
+ * Find and optionally activate the child POA with the given name.
+ *
+ * @param poa_name the name of the POA to find.
+ * @param activate_it if the child with the specified name is not found
+ * or inactive and this parameter is true, the target POA activator is
+ * invoked to activate that child. If this succeeds, that child POA
+ * is returned.
+ *
+ * @throws AdapterNonExistent if no active child with the given name
+ * is found and one of the following is true:
+ * a) the target POA has no associated
+ * {@link AdapterActivator}. b) that activator fails to activate the
+ * child POA. c) <code>activate_id</code> = false.
+ */
+ public POA find_POA(String poa_name, boolean activate_it)
+ throws AdapterNonExistent
+ {
+ POA child;
+ for (int i = 0; i < children.size(); i++)
+ {
+ child = (POA) children.get(i);
+ if (child.the_name().equals(poa_name))
+ return child;
+ }
+
+ if (activate_it && m_activator != null)
+ {
+ boolean activated = m_activator.unknown_adapter(this, poa_name);
+ if (!activated)
+ throw new AdapterNonExistent(poa_name + " activation failed.");
+
+ // Tha activator should add the child to the childrent table.
+ for (int i = 0; i < children.size(); i++)
+ {
+ child = (POA) children.get(i);
+ if (child.the_name().equals(poa_name))
+ return child;
+ }
+ throw new AdapterNonExistent(poa_name + " not created. ");
+ }
+ else
+ throw new AdapterNonExistent(poa_name);
+ }
+
+ /**
+ * Generate the Object Id for the given servant and add the servant to
+ * the Active Object Map using this Id a a key. If the servant
+ * activator is set, its incarnate method will be called.
+ *
+ * @param a_servant a servant that would serve the object with the
+ * returned Object Id. If null is passed, under apporoprate policies the
+ * servant activator is invoked.
+ *
+ * @return the generated objert Id for the given servant.
+ *
+ * @throws ServantAlreadyActive if this servant is already in the
+ * Active Object Map and the UNIQUE_ID policy applies.
+ *
+ * @throws WrongPolicy if the required policies SYSTEM_ID and RETAIN
+ * do not apply to this POA.
+ */
+ public byte[] activate_object(Servant a_servant)
+ throws ServantAlreadyActive, WrongPolicy
+ {
+ checkDiscarding();
+ required(ServantRetentionPolicyValue.RETAIN);
+ required(IdAssignmentPolicyValue.SYSTEM_ID);
+
+ activeObjectMap.Obj exists = aom.findServant(a_servant);
+
+ if (exists != null)
+ {
+ if (exists.isDeactiveted())
+ {
+ // If exists but deactivated, activate and return
+ // the existing key.
+ exists.setDeactivated(false);
+ incarnate(exists, exists.key, a_servant, false);
+ return exists.key;
+ }
+ else if (applies(IdUniquenessPolicyValue.UNIQUE_ID))
+ throw new ServantAlreadyActive();
+
+ // It multiple ids are allowed, exit block allowing repetetive
+ // activations.
+ }
+
+ byte[] object_key = activeObjectMap.getFreeId();
+ servantDelegate delegate = new servantDelegate(a_servant, this, object_key);
+ connectDelegate(object_key, delegate);
+ return object_key;
+ }
+
+ /**
+ * Add the given servant to the Active Object Map as a servant for the
+ * object with the provided Object Id. If the servant activator is
+ * set, its incarnate method will be called.
+ *
+ * @param an_Object_Id an object id for the given object.
+ * @param a_servant a servant that will serve the object with the given
+ * Object Id. If null is passed, under apporoprate policies the
+ * servant activator is invoked.
+ *
+ * @throws ObjectAlreadyActive if the given object id is already in the
+ * Active Object Map.
+ * @throws ServantAlreadyActive if the UNIQUE_ID policy applies and
+ * this servant is already in use.
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ * @throws BAD_PARAM if the passed object id is invalid due any reason.
+ */
+ public void activate_object_with_id(byte[] an_Object_Id, Servant a_servant)
+ throws ServantAlreadyActive, ObjectAlreadyActive,
+ WrongPolicy
+ {
+ activate_object_with_id(an_Object_Id, a_servant, false);
+ }
+
+ /**
+ * Same as activate_object_with_id, but permits gnuForwardRequest
+ * forwarding exception. This is used when the activation is called
+ * from the remote invocation context and we have possibility
+ * to return the forwarding message.
+ */
+ public void activate_object_with_id(byte[] an_Object_Id, Servant a_servant,
+ boolean use_forwarding
+ )
+ throws ServantAlreadyActive, ObjectAlreadyActive,
+ WrongPolicy
+ {
+ checkDiscarding();
+ required(ServantRetentionPolicyValue.RETAIN);
+
+ // If the UNIQUE_ID applies, the servant being passed must not be
+ // already active.
+ if (applies(IdUniquenessPolicyValue.UNIQUE_ID))
+ {
+ activeObjectMap.Obj sx = aom.findServant(a_servant, false);
+ if (sx != null)
+ throw new ServantAlreadyActive();
+ }
+
+ activeObjectMap.Obj exists = aom.get(an_Object_Id);
+ if (exists != null)
+ {
+ if (exists.servant == null)
+ {
+ locateServant(an_Object_Id, a_servant, exists, use_forwarding);
+ exists.setDeactivated(false);
+ }
+ else if (exists.isDeactiveted())
+ {
+ exists.setDeactivated(false);
+ incarnate(exists, an_Object_Id, a_servant, use_forwarding);
+ }
+ else
+ throw new ObjectAlreadyActive();
+ }
+ else
+ {
+ servantDelegate delegate =
+ new servantDelegate(a_servant, this, an_Object_Id);
+ connectDelegate(an_Object_Id, delegate);
+ }
+ }
+
+ /**
+ * Locate the servant for this object Id and connect it to ORB.
+ *
+ * @param an_Object_Id the object id.
+ * @param a_servant the servant (may be null).
+ * @param exists an existing active object map entry.
+ * @param use_forwarding allow to throw the gnuForwardRequest
+ * if the activator throws ForwardRequest.
+ *
+ * @throws OBJ_ADAPTER minor 4 if the servant cannot be located
+ * (the required servant manager may be missing).
+ */
+ private void locateServant(byte[] an_Object_Id, Servant a_servant,
+ activeObjectMap.Obj exists, boolean use_forwarding
+ )
+ throws InternalError
+ {
+ // An object was created with create_reference.
+ gnuServantObject object = (gnuServantObject) exists.object;
+ if (servant_activator != null)
+ {
+ exists.setServant(incarnate(exists, an_Object_Id, a_servant,
+ use_forwarding
+ )
+ );
+ }
+ else if (default_servant != null)
+ {
+ exists.setServant(default_servant);
+ }
+ if (exists.servant == null)
+ {
+ exists.setServant(a_servant);
+ }
+ if (exists.servant == null)
+ {
+ throw new OBJ_ADAPTER("no servant", 4, CompletionStatus.COMPLETED_NO);
+ }
+
+ servantDelegate delegate =
+ new servantDelegate(exists.servant, this, an_Object_Id);
+ exists.servant._set_delegate(delegate);
+ object.setServant(exists.servant);
+ connect_to_orb(an_Object_Id, delegate.object);
+ }
+
+ /**
+ * Deactivate object with the given id.
+ *
+ * The deactivated object will continue to process requests that arrived
+ * before decativation. If this POA has the associated
+ * servant manager, a {@link ServantActivatorOperations#etherealize} is
+ * immediately invoked on the passed id.
+ *
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ */
+ public void deactivate_object(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy
+ {
+ required(ServantRetentionPolicyValue.RETAIN);
+
+ activeObjectMap.Obj exists = aom.get(the_Object_Id);
+
+ if (exists == null || exists.isDeactiveted())
+ throw new ObjectNotActive();
+
+ exists.setDeactivated(true);
+
+ // Check if this servant is serving something else.
+ aom.remove(the_Object_Id);
+
+ activeObjectMap.Obj other = aom.findServant(exists.servant, false);
+
+ boolean remaining = other != null;
+
+ aom.put(exists);
+
+ if (servant_activator != null)
+ servant_activator.etherealize(the_Object_Id, this, exists.servant, false,
+ remaining
+ );
+ }
+
+ /**
+ * Create the object reference, encapsulating the given repository Id and
+ * the Object Id, generated by this POA. The returned object will not be
+ * activated by default and may be activated on the first invocation by
+ * the servant manager (if it is set and if policies are applicable).
+ *
+ * @param a_repository_id the repository id for the given object, can
+ * be null if to be requested from the servant later.
+ *
+ * @throws WrongPolicy if the required SYSTEM_ID policy does not apply to
+ * this POA.
+ */
+ public org.omg.CORBA.Object create_reference(String a_repository_id)
+ throws WrongPolicy
+ {
+ required(IdAssignmentPolicyValue.SYSTEM_ID);
+ return create_reference_with_id(activeObjectMap.getFreeId(), a_repository_id);
+ }
+
+ /**
+ * <p>
+ * Create the object reference, encapsulating the given repository Id and
+ * the given Object Id. The returned object will <i>not</i> be
+ * activated by default and may be activated on the first invocation by
+ * the servant manager (if the IMPLICIT_ACTIVATION policy applies).
+ *
+ * @param an_object_id the object id for the object being created. If this
+ * POA uses the SYSTEM_ID policy, the portable application should only
+ * pass the ids, generated by this POA.
+ *
+ * @param a_repository_id the repository id for the object being created,
+ * can be null if this information should be later requested from the
+ * servant.
+ */
+ public org.omg.CORBA.Object create_reference_with_id(byte[] an_object_id,
+ String a_repository_id
+ )
+ {
+ String[] ids;
+ if (a_repository_id == null)
+ ids = null;
+ else
+ ids = new String[] { a_repository_id };
+
+ // Check maybe such object is already activated.
+ activeObjectMap.Obj e = aom.get(an_object_id);
+
+ Servant servant;
+ if (e == null)
+ {
+ servant = null;
+ }
+ else
+ {
+ servant = e.servant;
+ e.setDeactivated(false);
+ }
+
+ gnuServantObject object =
+ new gnuServantObject(ids, an_object_id, this, m_orb);
+ object._set_delegate(new LocalDelegate(object, this, an_object_id));
+ aom.add(object.Id, object, servant, this);
+ connect_to_orb(an_object_id, object);
+
+ return object;
+ }
+
+ /**
+ * Creates a new POA as a child of the target POA.
+ *
+ * @param child_name the name of the child POA being created.
+ * @param manager the manager that will control the new POA. If this parameter
+ * is null, a new POA manager is created and associated with the new POA.
+ *
+ * @param policies the policies, applicable for the parent POA. Policies
+ * are <i>not</i> inherited from the parent POA.
+ *
+ * @return an newly created POA. The POA will be intially in the holding
+ * state and must be activated to start processing requests.
+ *
+ * @throws AdapterAlreadyExists if the child with the given child_name
+ * already exists for the current POA.
+ * @throws InvalidPolicy if the policies conflict with each other or are
+ * otherwise inappropriate.
+ *
+ * @see #the_children()
+ */
+ public POA create_POA(String child_name, POAManager manager, Policy[] policies)
+ throws AdapterAlreadyExists, InvalidPolicy
+ {
+ POA child;
+ for (int i = 0; i < children.size(); i++)
+ {
+ child = (POA) children.get(i);
+ if (child.the_name().equals(child_name))
+ throw new AdapterAlreadyExists(name + "/" + child_name);
+ }
+
+ POA poa = createPoaInstance(child_name, manager, policies, m_orb);
+ children.add(poa);
+ return poa;
+ }
+
+ /**
+ * Returns a default servant for this POA.
+ *
+ * @return a servant that will be used for requests for
+ * which no servant is found in the Active Object Map.
+ *
+ * @throws NoServant if there is no default servant associated with this POA.
+ * @throws WrongPolicy if the USE_DEFAULT_SERVANT policy is not active.
+ */
+ public Servant get_servant()
+ throws NoServant, WrongPolicy
+ {
+ required(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT);
+ if (default_servant == null)
+ throw new NoServant();
+ return default_servant;
+ }
+
+ /**
+ * Sets the default servant for this POA.
+ *
+ * @param a_servant a servant that will be used for requests for
+ * which no servant is found in the Active Object Map.
+ *
+ * @throws WrongPolicy if the USE_DEFAULT_SERVANT policy is not active.
+ */
+ public void set_servant(Servant a_servant)
+ throws WrongPolicy
+ {
+ required(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT);
+ default_servant = a_servant;
+ }
+
+ /**
+ * Set a servant manager for this POA.
+ *
+ * @param a servant manager being set. If the RETAIN policy applies, the
+ * manager must implement a {@link ServantActivator}. If the NON_RETAIN
+ * policy applies, the manager must implement a {@link ServantLocator}.
+ *
+ * @throws WrongPolicy if the required USE_SERVANT_MANAGER policy does not
+ * apply to this POA.
+ *
+ * @throws OBJ_ADAPTER minor code 4 if the passed manager does not
+ * implement the required interface ({@link ServantActivator},
+ * {@link ServantLocator}). The POA, that has the RETAIN policy uses
+ * servant managers that are ServantActivators. When the POA has the
+ * NON_RETAIN policy it uses servant managers that are ServantLoacators.
+ *
+ * @throws BAD_INV_ORDER minor code 6 if the method is called more than once
+ * on the same POA. The manager can be set only once.
+ */
+ public void set_servant_manager(ServantManager a_manager)
+ throws WrongPolicy
+ {
+ required(RequestProcessingPolicyValue.USE_SERVANT_MANAGER);
+ if (servant_activator != null || servant_locator != null)
+ throw new BAD_INV_ORDER("Setting manager twice for " + name, 6,
+ CompletionStatus.COMPLETED_NO
+ );
+
+ if (applies(ServantRetentionPolicyValue.RETAIN))
+ {
+ if (a_manager instanceof ServantActivator)
+ servant_activator = (ServantActivator) a_manager;
+ else
+ throw new OBJ_ADAPTER("RETAIN requires ServantActivator", 4,
+ CompletionStatus.COMPLETED_NO
+ );
+ }
+ else if (applies(ServantRetentionPolicyValue.NON_RETAIN))
+ {
+ if (a_manager instanceof ServantLocator)
+ servant_locator = (ServantLocator) a_manager;
+ else
+ throw new OBJ_ADAPTER("NON_RETAIN requires ServantLocator", 4,
+ CompletionStatus.COMPLETED_NO
+ );
+ }
+ else
+ throw new WrongPolicy("No servant retention policy is specified.");
+ }
+
+ /**
+ * Get the servant manager, associated with this POA.
+ *
+ * @return the associated servant manager or null if it has
+ * been previously set.
+ *
+ * @throws WrongPolicy if the required USE_SERVANT_MANAGER policy does not
+ * apply to this POA.
+ */
+ public ServantManager get_servant_manager()
+ throws WrongPolicy
+ {
+ required(RequestProcessingPolicyValue.USE_SERVANT_MANAGER);
+
+ if (servant_activator != null)
+ return servant_activator;
+ else
+ return servant_locator;
+ }
+
+ /**
+ * Get the unique Id of the POA in the process in which it is created.
+ * This Id is needed by portable interceptors. The id is unique
+ * for the life span of the POA in the process. For persistent
+ * POAs, if a POA is created in the same path with the same name as
+ * another POA, these POAs are identical have the same id. All transient
+ * POAs are assumed unique.
+ */
+ public byte[] id()
+ {
+ if (m_poa_id != null)
+ return m_poa_id;
+ else
+ {
+ cdrBufOutput buffer = new cdrBufOutput();
+ POA p = this;
+ while (p != null)
+ {
+ buffer.write_string(p.the_name());
+ p = p.the_parent();
+ }
+ m_poa_id = buffer.buffer.toByteArray();
+ return m_poa_id;
+ }
+ }
+
+ /**
+ * Returns the reference to the active object with the given Id.
+ *
+ * @param the_Object_Id the object id.
+ *
+ * @throws ObjectNotActive if there is no active object with such Id
+ * in the scope of this POA.
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ */
+ public org.omg.CORBA.Object id_to_reference(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy
+ {
+ required(ServantRetentionPolicyValue.RETAIN);
+
+ activeObjectMap.Obj ref = aom.get(the_Object_Id);
+ if (ref == null)
+ throw new ObjectNotActive();
+ else
+ return ref.object;
+ }
+
+ /**
+ * Returns the servant that serves the active object with the given Id.
+ *
+ * @param the_Object_Id the object id.
+ *
+ * @throws ObjectNotActive if there is no active object with such Id or
+ * it is not currently active.
+ * @throws WrongPolicy. This method requires either RETAIN or
+ * USE_DEFAULT_SERVANT policies and reaises the WrongPolicy if none of them
+ * apply to this POA.
+ */
+ public Servant id_to_servant(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy
+ {
+ if (applies(ServantRetentionPolicyValue.RETAIN))
+ {
+ activeObjectMap.Obj ref = aom.get(the_Object_Id);
+ if (ref == null || ref.isDeactiveted())
+ {
+ if (default_servant != null)
+ return default_servant;
+ else
+ throw new ObjectNotActive();
+ }
+ else if (ref.servant != null)
+ return ref.servant;
+ else if (default_servant != null)
+ return default_servant;
+ else
+ throw new ObjectNotActive();
+ }
+ else if (default_servant != null)
+ {
+ return default_servant;
+ }
+ else
+ throw new WrongPolicy("Either RETAIN or USE_DEFAULT_SERVANT required.");
+ }
+
+ /**
+ * Returns the Object Id, encapsulated in the given object reference.
+ *
+ * @param the_Object the object that has been previously created with this
+ * POA. It need not be active.
+ *
+ * @throws WrongAdapter if the passed object is not known for this POA.
+ * @throws WrongPolicy never (declared for the future extensions only).
+ */
+ public byte[] reference_to_id(org.omg.CORBA.Object the_Object)
+ throws WrongAdapter, WrongPolicy
+ {
+ activeObjectMap.Obj ref = aom.findObject(the_Object);
+ if (ref == null)
+ throw new WrongAdapter();
+ return ref.key;
+ }
+
+ /**
+ * Returns the servant that is serving this object.
+ *
+ * @return if the RETAIN policy applies and the object is in the Active
+ * Object Map, the method returns the servant, associated with this object.
+ * Otherwise, if the USE_DEFAULT_SERVANT policy applies, the method returns
+ * the default servant (if one was set).
+ *
+ * @throws ObjectNotActive if none of the conditions above are satisfied.
+ * @throws WrongAdapter if the object reference was not created with this POA.
+ * @throws WrongPolicy. This method requires either RETAIN or
+ * USE_DEFAULT_SERVANT policies and reaises the WrongPolicy if none of them
+ * apply to this POA.
+ */
+ public Servant reference_to_servant(org.omg.CORBA.Object the_Object)
+ throws ObjectNotActive, WrongPolicy,
+ WrongAdapter
+ {
+ if (applies(ServantRetentionPolicyValue.RETAIN))
+ {
+ activeObjectMap.Obj ref = aom.findObject(the_Object);
+ if (ref == null)
+ throw new WrongAdapter();
+ else if (ref.isDeactiveted() || ref.servant == null)
+ {
+ if (default_servant != null)
+ return default_servant;
+ else
+ throw new ObjectNotActive();
+ }
+ else
+ return ref.servant;
+ }
+ else if (default_servant != null)
+ {
+ return default_servant;
+ }
+ else
+ throw new WrongPolicy("Either RETAIN or USE_DEFAULT_SERVANT required.");
+ }
+
+ /**
+ * Returns the id of the object, served by the given servant
+ * (assuming that the servant serves only one object).
+ * The id is found in one of the following ways.
+ * <ul>
+ * <li>If the POA has both the RETAIN and the UNIQUE_ID policy and
+ * the specified servant is active, the method return the Object Id associated
+ * with that servant.
+ * </li><li>
+ * If the POA has both the RETAIN and the IMPLICIT_ACTIVATION policy and
+ * either the POA has the MULTIPLE_ID policy or the specified servant is
+ * inactive, the method activates the servant using a POA-generated Object Id
+ * and the Interface Id associated with the servant, and returns that
+ * Object Id.
+ * </li>
+ * <li>If the POA has the USE_DEFAULT_SERVANT policy, the servant specified
+ * is the default servant, and the method is being invoked in the context of
+ * executing a request on the default servant, the method returns the
+ * ObjectId associated with the current invocation.
+ * </li>
+ * </ul>
+ * @throws ServantNotActive in all cases, not listed in the list above.
+ * @throws WrongPolicy The method requres USE_DEFAULT_SERVANT policy or
+ * a combination of the RETAIN policy and either the UNIQUE_ID or
+ * IMPLICIT_ACTIVATION policies and throws the WrongPolicy if these conditions
+ * are not satisfied.
+ */
+ public byte[] servant_to_id(Servant the_Servant)
+ throws ServantNotActive, WrongPolicy
+ {
+ if (applies(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT) ||
+ applies(ServantRetentionPolicyValue.RETAIN) &&
+ (
+ applies(IdUniquenessPolicyValue.UNIQUE_ID) ||
+ applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
+ )
+ )
+ {
+ activeObjectMap.Obj ref = null;
+ if (!applies(IdUniquenessPolicyValue.MULTIPLE_ID))
+ ref = aom.findServant(the_Servant);
+ if (ref == null &&
+ applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
+ )
+ {
+ // Try to activate.
+ try
+ {
+ return activate_object(the_Servant);
+ }
+ catch (ServantAlreadyActive ex)
+ {
+ // Either it shuld not be or the policy allows multiple ids.
+ throw new InternalError();
+ }
+ }
+ if (ref == null)
+ throw new ServantNotActive();
+ else
+ return ref.key;
+ }
+ else
+ throw new WrongPolicy("(RETAIN and UNIQUE ID) " +
+ "or USE_DEFAULT_SERVANT required."
+ );
+ }
+
+ /**
+ * <p>Converts the given servant to the object reference.
+ * The servant will serve all methods, invoked on the returned object.
+ * The returned object reference can be passed to the remote client,
+ * enabling remote invocations.
+ * </p><p>
+ * If the specified servant is active, it is returned. Otherwise,
+ * if the POA has the IMPLICIT_ACTIVATION policy the method activates
+ * the servant. In this case, if the servant activator is set,
+ * the {@link ServantActivatorOperations#incarnate} method will be called.
+ * </p>
+ *
+ * @throws ServantNotActive if the servant is inactive and no
+ * IMPLICIT_ACTIVATION policy applies.
+ * @throws WrongPolicy This method needs the RETAIN policy and either the
+ * UNIQUE_ID or IMPLICIT_ACTIVATION policies.
+ *
+ * @return the object, exposing the given servant in the context of this POA.
+ */
+ public org.omg.CORBA.Object servant_to_reference(Servant the_Servant)
+ throws ServantNotActive,
+ WrongPolicy
+ {
+ required(ServantRetentionPolicyValue.RETAIN);
+
+ activeObjectMap.Obj exists = null;
+
+ if (!applies(IdUniquenessPolicyValue.MULTIPLE_ID))
+ exists = aom.findServant(the_Servant);
+
+ if (exists != null)
+ {
+ if (exists.isDeactiveted())
+ {
+ if (applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION))
+ {
+ checkDiscarding();
+ exists.setDeactivated(false);
+ incarnate(exists, exists.key, the_Servant, false);
+ }
+ else
+ throw new ServantNotActive();
+ }
+ else
+ return exists.object;
+ }
+ if (exists == null &&
+ applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
+ )
+ {
+ checkDiscarding();
+
+ byte[] object_key = activeObjectMap.getFreeId();
+
+ servantDelegate delegate =
+ new servantDelegate(the_Servant, this, object_key);
+ connectDelegate(object_key, delegate);
+
+ return delegate.object;
+ }
+ else
+ throw new ServantNotActive();
+ }
+
+ /**
+ * Incarnate in cases when request forwarding is not expected
+ * because the servant must be provided by the servant activator.
+ *
+ * @param x the aom entry, where the object is replaced by
+ * value, returned by servant activator (if not null).
+ *
+ * @param key the object key.
+ *
+ * @param a_servant the servant that was passed as a parameter in the
+ * activation method.
+ *
+ * @param use_forwarding if true, the gnuForwardRequest is throw
+ * under the forwarding exception (for remote client). Otherwise, the
+ * request is internally redirected (for local invocation).
+ */
+ private Servant incarnate(activeObjectMap.Obj x, byte[] object_key,
+ Servant a_servant, boolean use_forwarding
+ )
+ {
+ if (servant_activator != null)
+ {
+ Servant servant;
+ try
+ {
+ servant = servant_activator.incarnate(object_key, this);
+ }
+ catch (ForwardRequest ex)
+ {
+ if (use_forwarding)
+ throw new gnuForwardRequest(ex.forward_reference);
+ else
+ servant =
+ ForwardedServant.create((ObjectImpl) ex.forward_reference);
+ }
+ if (servant != null && x != null)
+ x.setServant(servant);
+ if (servant == null && x != null)
+ servant = x.servant;
+ return servant;
+ }
+ else if (a_servant != null)
+ {
+ x.setServant(a_servant);
+ return a_servant;
+ }
+ else if (x.servant != null)
+ {
+ return x.servant;
+ }
+ else if (default_servant != null)
+ {
+ x.setServant(default_servant);
+ return x.servant;
+ }
+ else
+ throw new BAD_INV_ORDER("No servant given and the servant activator not set");
+ }
+
+ /**
+ * Return the POA manager, associated with this POA.
+ *
+ * @return the associated POA manager (always available).
+ */
+ public POAManager the_POAManager()
+ {
+ return m_manager;
+ }
+
+ /**
+ * Returns the adapter activator, associated with this POA.
+ * The newly created POA has no activator (null would be
+ * returned). The ORB root POA also initially has no activator.
+ *
+ * @return tha adapter activator or null if this POA has no
+ * associated adapter activator.
+ */
+ public AdapterActivator the_activator()
+ {
+ return m_activator;
+ }
+
+ /**
+ * Set the adapter activator for this POA.
+ *
+ * @param the activator being set.
+ */
+ public void the_activator(AdapterActivator an_activator)
+ {
+ m_activator = an_activator;
+ }
+
+ /**
+ * The children of this POA.
+ *
+ * @return the array of all childs for this POA.
+ */
+ public POA[] the_children()
+ {
+ POA[] poas = new POA[ children.size() ];
+ for (int i = 0; i < poas.length; i++)
+ {
+ poas [ i ] = (POA) children.get(i);
+ }
+ return poas;
+ }
+
+ /**
+ * Return the name of this POA.
+ *
+ * @return the name of POA, relative to its parent.
+ */
+ public String the_name()
+ {
+ return name;
+ }
+ ;
+
+ /**
+ * Return the parent of this POA.
+ *
+ * @return the parent POA or <code>null</code> if this is a root POA.
+ */
+ public POA the_parent()
+ {
+ return parent;
+ }
+
+ /** {@inheritDoc} */
+ public IdAssignmentPolicy create_id_assignment_policy(IdAssignmentPolicyValue a_value)
+ {
+ return new gnuIdAssignmentPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public IdUniquenessPolicy create_id_uniqueness_policy(IdUniquenessPolicyValue a_value)
+ {
+ return new gnuIdUniquenessPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public ImplicitActivationPolicy create_implicit_activation_policy(ImplicitActivationPolicyValue a_value)
+ {
+ return new gnuImplicitActivationPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public LifespanPolicy create_lifespan_policy(LifespanPolicyValue a_value)
+ {
+ return new gnuLifespanPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public RequestProcessingPolicy create_request_processing_policy(RequestProcessingPolicyValue a_value)
+ {
+ return new gnuRequestProcessingPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public ServantRetentionPolicy create_servant_retention_policy(ServantRetentionPolicyValue a_value)
+ {
+ return new gnuServantRetentionPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public ThreadPolicy create_thread_policy(ThreadPolicyValue a_value)
+ {
+ return new gnuThreadPolicy(a_value);
+ }
+
+ /**
+ * <p> Destroy this POA and all descendant POAs. The destroyed POAs can be
+ * later re-created via {@link AdapterActivator} or by invoking
+ * {@link #create_POA}.
+ * This differs from {@link PoaManagerOperations#deactivate} that does
+ * not allow recreation of the deactivated POAs. After deactivation,
+ * recreation is only possible if the POAs were later destroyed.
+ * </p><p>
+ * The remote invocation on the target, belonging to the POA that is
+ * currently destroyed return the remote exception ({@link TRANSIENT},
+ * minor code 4).
+ * </p>
+ * @param etherealize_objects if true, and POA has RETAIN policy, and the
+ * servant manager is available, the servant manager method
+ * {@link ServantActivatorOperations#etherealize} is called for each
+ * <i>active</i> object in the Active Object Map. This method should not
+ * try to access POA being destroyed. If <code>destroy</code> is called
+ * multiple times before the destruction completes,
+ * the etherialization should be invoked only once.
+ *
+ * @param wait_for_completion if true, the method waits till the POA being
+ * destroyed completes all current requests and etherialization. If false,
+ * the method returns immediately.
+ */
+ public void destroy(boolean etherealize_objects, boolean wait_for_completion)
+ {
+ if (wait_for_completion)
+ waitWhileRunning();
+
+ // Put the brake instead of manager, preventing the subsequent
+ // requests.
+ gnuPOAManager g = new gnuPOAManager();
+ g.state = State.INACTIVE;
+ m_manager = g;
+
+ // Disconnect from parent.
+ if (parent instanceof gnuPOA)
+ {
+ ((gnuPOA) parent).children.remove(this);
+ }
+
+ unregisterFromManager();
+
+ // Disconnect from the ORB all objects, registered with this POA.
+ ArrayList keys = new ArrayList();
+ keys.addAll(aom.keySet());
+
+ byte[] key;
+ activeObjectMap.Obj obj;
+ for (int i = 0; i < keys.size(); i++)
+ {
+ key = (byte[]) keys.get(i);
+ obj = aom.get(key);
+ if (obj.poa == this)
+ m_orb.disconnect(obj.object);
+ }
+
+ m_orb.identityDestroyed(this);
+
+ if (etherealize_objects && servant_activator != null && !m_inDestruction)
+ {
+ etherealizeAll();
+ }
+ m_inDestruction = true;
+
+ POA[] ch = the_children();
+ for (int i = 0; i < ch.length; i++)
+ {
+ ch [ i ].destroy(etherealize_objects, wait_for_completion);
+ }
+ }
+
+ /**
+ * Destroy this POA if it has not been destroyed, destroys it.
+ */
+ protected void finalize()
+ throws java.lang.Throwable
+ {
+ if (!m_inDestruction)
+ destroy(false, false);
+ }
+
+ /**
+ * Remove self from the manager list.
+ */
+ private void unregisterFromManager()
+ {
+ if (m_manager instanceof gnuPOAManager)
+ {
+ gnuPOAManager p = (gnuPOAManager) m_manager;
+ p.removePOA(this);
+ }
+ }
+
+ /**
+ * Get the policy of the given type, associated with this POA.
+ *
+ * @param a_policy_type a type of the requested policy.
+ * @return a policy of the given type, applyting to this POA.
+ *
+ * @throws org.omg.CORBA.BAD_PARAM if the policy of this type has not
+ * been specified for this POA.
+ */
+ public Policy _get_policy(int a_policy_type)
+ throws org.omg.CORBA.BAD_PARAM
+ {
+ for (int i = 0; i < s_policies.length; i++)
+ {
+ if (s_policies [ i ].policy_type() == a_policy_type)
+ return s_policies [ i ].copy();
+ }
+ throw new BAD_PARAM("No policy type " + a_policy_type);
+ }
+
+ /**
+ * Get the copy of the policy array.
+ */
+ public Policy[] getPolicyArray()
+ {
+ Policy[] r = new Policy[ s_policies.length ];
+ for (int i = 0; i < s_policies.length; i++)
+ {
+ r [ i ] = s_policies [ i ].copy();
+ }
+ return r;
+ }
+
+ /**
+ * The POAs cannot be created by this method.
+ *
+ * @specnote this is also not possible in Suns jdk at least till 1.4.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public org.omg.CORBA.Object _set_policy_override(Policy[] policies,
+ SetOverrideType how
+ )
+ {
+ throw new NO_IMPLEMENT("Use createPOA instead.");
+ }
+
+ /**
+ * Get the ORB, where this POA is connected.
+ */
+ public ORB orb()
+ {
+ return m_orb;
+ }
+
+ /**
+ * Connect the given delegate under the given key, also calling
+ * incarnate.
+ */
+ private void connectDelegate(byte[] object_key, servantDelegate delegate)
+ {
+ aom.add(delegate);
+ connect_to_orb(object_key, delegate.object);
+ if (servant_activator != null)
+ incarnate(null, object_key, delegate.servant, false);
+ }
+
+ /**
+ * Check if the POA is not in a discarding mode. The activation
+ * operations are forbidded in discarding mode.
+ *
+ * @throws TRANSIENT if the POA is in discarding mode.
+ */
+ private void checkDiscarding()
+ throws TRANSIENT
+ {
+ if (m_manager.get_state() == State.DISCARDING)
+ throw new TRANSIENT("Discarding mode", 1, CompletionStatus.COMPLETED_MAYBE);
+ }
+
+ /**
+ * Connect the given delegate object to orb.
+ */
+ protected void connect_to_orb(byte[] an_Object_Id, org.omg.CORBA.Object object)
+ {
+ if (applies(ThreadPolicyValue.SINGLE_THREAD_MODEL))
+ m_orb.connect_1_thread(object, toIORKey(an_Object_Id), this);
+ else
+ m_orb.connect(object, toIORKey(an_Object_Id));
+ }
+
+ /**
+ * Returns the representation of this POA tree.
+ */
+ public String toString()
+ {
+ StringBuffer b = new StringBuffer(name);
+
+ if (children.size() != 0)
+ {
+ b.append(" (");
+
+ for (int i = 0; i < children.size(); i++)
+ {
+ b.append(children.get(i));
+ if (i < children.size() - 2)
+ b.append(", ");
+ }
+ b.append(")");
+ }
+ return b.toString();
+ }
+
+ /**
+ * Check if the policy set is valid.
+ */
+ protected boolean validatePolicies(Policy[] a)
+ throws InvalidPolicy
+ {
+ if (applies(ServantRetentionPolicyValue.NON_RETAIN))
+ {
+ if (!applies(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT) &&
+ !applies(RequestProcessingPolicyValue.USE_SERVANT_MANAGER)
+ )
+ {
+ short p = 0;
+ for (short i = 0; i < a.length; i++)
+ {
+ if (a [ i ].policy_type() == SERVANT_RETENTION_POLICY_ID.value)
+ p = i;
+ }
+ throw new InvalidPolicy("NON_RETAIN requires either " +
+ "USE_DEFAULT_SERVANT or USE_SERVANT_MANAGER",
+ p
+ );
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Recursively searches for the given object in the POA tree.
+ */
+ public activeObjectMap.Obj findObject(org.omg.CORBA.Object object)
+ {
+ activeObjectMap.Obj h = aom.findObject(object);
+ if (h != null)
+ return h;
+ else
+ {
+ for (int i = 0; i < children.size(); i++)
+ {
+ h = ((gnuPOA) children.get(i)).findObject(object);
+ if (h != null)
+ return h;
+ }
+ }
+ return h;
+ }
+
+ /**
+ * Recursively searches for the given key in the POA tree.
+ * @param ior_key the key, ecapsulating both object
+ * and poa ids.
+ * @return
+ */
+ public activeObjectMap.Obj findKey(byte[] object_id, byte[] poa_id)
+ {
+ activeObjectMap.Obj h = null;
+ if (Arrays.equals(poa_id, id()))
+ h = aom.get(object_id);
+ if (h != null)
+ return h;
+ else
+ {
+ for (int i = 0; i < children.size(); i++)
+ {
+ h = ((gnuPOA) children.get(i)).findKey(object_id, poa_id);
+ if (h != null)
+ return h;
+ }
+ }
+ return h;
+ }
+
+ /**
+ * Parses the given key, extracts poa and object id and searches
+ * for such reference.
+ */
+ public activeObjectMap.Obj findIorKey(byte[] ior_key)
+ {
+ cdrBufInput in = new cdrBufInput(ior_key);
+ int signature = in.read_long();
+ if (signature != SIGNATURE)
+ return null;
+
+ byte[] id = in.read_sequence();
+ byte[] poa = in.read_sequence();
+ return findKey(id, poa);
+ }
+
+ /**
+ * Converts the object Id into the IOR key. IOR key must be
+ * unique in the scope of the ORB, and Ids only in the scope of POA.
+ * Hence the IOR key includes the POA identifiers.
+ */
+ public byte[] toIORKey(byte[] object_id)
+ {
+ cdrBufOutput buffer = new cdrBufOutput();
+ buffer.write_long(SIGNATURE);
+ buffer.write_sequence(object_id);
+ buffer.write_sequence(id());
+ return buffer.buffer.toByteArray();
+ }
+
+ /**
+ * Extracts the object id from the ior key.
+ *
+ * @param ior_key
+ *
+ * @return the encapsulated object ior key or null if
+ * this ior key either refers a different POA or encoding signature
+ * mismatch.
+ */
+ public byte[] idFormIor(byte[] ior_key)
+ {
+ cdrBufInput in = new cdrBufInput(ior_key);
+ int signature = in.read_long();
+ if (signature != SIGNATURE)
+ return null;
+
+ byte[] object_id = in.read_sequence();
+ byte[] poa_id = in.read_sequence();
+ if (Arrays.equals(poa_id, id()))
+ return object_id;
+ else
+ return null;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuPOAManager.java b/gnu/CORBA/Poa/gnuPOAManager.java
new file mode 100644
index 000000000..6c1b5644f
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuPOAManager.java
@@ -0,0 +1,225 @@
+/* gnuPOAManager.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.BAD_INV_ORDER;
+import org.omg.CORBA.LocalObject;
+import org.omg.PortableServer.POAManager;
+import org.omg.PortableServer.POAManagerPackage.AdapterInactive;
+import org.omg.PortableServer.POAManagerPackage.State;
+
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * The implementation of the POA manager. The manager is a controlled
+ * switch that can change its states in response to the method calls
+ * and throw exceptions if the requested change is invalid. It is possible
+ * to check the state this switch. It does not do anything else.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuPOAManager
+ extends LocalObject
+ implements POAManager
+{
+ /**
+ * The POAs, controlled by this manager. The members must be instances of
+ * the gnuAbstractPOA.
+ */
+ HashSet POAs = new HashSet();
+
+ /**
+ * The state of the manager. The newly created manager is always
+ * in the holding state.
+ */
+ State state = State.HOLDING;
+
+ /**
+ * Get the state of the POA manager.
+ */
+ public State get_state()
+ {
+ return state;
+ }
+
+ /**
+ * Turns the associated POAs into active state, allowing them to receive
+ * and process requests.
+ *
+ * @throws if the POAs are in the inactive state. If once inactivated,
+ * the POA cannot be activated again. This method can only be called
+ * to leave the holding or discarding state.
+ */
+ public void activate()
+ throws AdapterInactive
+ {
+ if (state != State.INACTIVE)
+ state = State.ACTIVE;
+ else
+ throw new AdapterInactive();
+ }
+
+ /**
+ * Turns the associated POAs into holding state. In this state, the POAs
+ * queue incoming requests but do not process them.
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+
+ * @throws AdapterInactive if the POAs are in the inactive state.
+ */
+ public void hold_requests(boolean wait_for_completion)
+ throws AdapterInactive
+ {
+ if (state != State.INACTIVE)
+ state = State.HOLDING;
+ else
+ throw new AdapterInactive();
+ if (wait_for_completion)
+ waitForIdle();
+ }
+
+ /**
+ *
+ * Turns the asociated POAs into inactive state. The POAs in the incative
+ * state will reject new requests. If the POA is once inactivated, it
+ * cannot be activated again. The operation is used when
+ * the associated POAs are to be shut down.
+ *
+ * @param etherealize_objects if true, the servant managers of the
+ * associated POAs, having RETAIN and USE_SERVANT_MANAGER policies,
+ * will receive a call of {@link ServantActivatorOperations#etherealize}.
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+ *
+ * @throws AdapterInactive if the POAs are already in the inactive state.
+ *
+ * @see POAOperations#destroy
+ */
+ public void deactivate(boolean etherealize_objects,
+ boolean wait_for_completion
+ )
+ throws AdapterInactive
+ {
+ if (state == State.INACTIVE)
+ throw new AdapterInactive("Repetetive inactivation");
+ state = State.INACTIVE;
+ if (wait_for_completion)
+ waitForIdle();
+
+ Iterator iter = POAs.iterator();
+ while (iter.hasNext())
+ {
+ gnuPOA poa = (gnuPOA) iter.next();
+
+ // If the servant activator is non null, this means it has been
+ // set - hence the policies are appropriate.
+ if (poa.servant_activator != null)
+ poa.etherealizeAll();
+ }
+ }
+
+ /**
+ * Turns the associated POAs into discaring state. In this state, the POAs
+ * discard the incoming requests. This mode is used in situations when
+ * the server is flooded with requests. The client receives remote exception
+ * ({@link org.omg.CORBA.TRANSIENT}, minor code 1).
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+
+ * @throws AdapterInactive if the POAs are in the inactive state.
+ */
+ public void discard_requests(boolean wait_for_completion)
+ throws AdapterInactive
+ {
+ if (state != State.INACTIVE)
+ state = State.DISCARDING;
+ else
+ throw new AdapterInactive();
+ if (wait_for_completion)
+ waitForIdle();
+ }
+
+ /**
+ * Suspend the current thread while at least one of the associated POA is
+ * actively processing some requests. The method assumes that the POAs
+ * are not accepting the <i>new</i> requests due manager state.
+ *
+ * @throws BAD_INV_ORDER if the POAs are in the active state.
+ */
+ public void waitForIdle()
+ {
+ if (state == State.ACTIVE)
+ throw new BAD_INV_ORDER("The state is active");
+
+ Iterator iter = POAs.iterator();
+ while (iter.hasNext())
+ {
+ gnuPOA poa = (gnuPOA) iter.next();
+ poa.waitWhileRunning();
+ }
+ }
+
+ /**
+ * Add the POA that will be controlled by this manager.
+ *
+ * @param poa the POA.
+ */
+ public void addPoa(gnuPOA poa)
+ {
+ POAs.add(poa);
+ }
+
+ /**
+ * Remove the POA, releasing it from the control of this manager.
+ * Called in POA finaliser.
+ *
+ * @param poa the POA to remove.
+ */
+ public void removePOA(gnuPOA poa)
+ {
+ POAs.remove(poa);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuPoaCurrent.java b/gnu/CORBA/Poa/gnuPoaCurrent.java
new file mode 100644
index 000000000..927d02fe3
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuPoaCurrent.java
@@ -0,0 +1,179 @@
+/* gnuPoaCurrent.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.CurrentHelper;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.PortableServer.Current;
+import org.omg.PortableServer.CurrentOperations;
+import org.omg.PortableServer.CurrentPackage.NoContext;
+import org.omg.PortableServer.POA;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * Supports the "Poa current" concept, providing the id and poa of
+ * the object currently being served. There is only one instance
+ * of this class per ORB. It maintains a thread to information map.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuPoaCurrent
+ extends ObjectImpl
+ implements Current
+{
+ /**
+ * The table, mapping threads to records.
+ */
+ private TreeMap threads = new TreeMap();
+
+ /**
+ * Get the array of POA current repository ids.
+ *
+ * @return a single member array, containing value, returned
+ * by the {@link CurrentHelper#id}, normally
+ * "IDL:omg.org/PortableServer/Current:2.3".
+ */
+ public String[] _ids()
+ {
+ return new String[] { CurrentHelper.id() };
+ }
+
+ /**
+ * Get the object id, associated with the thread currently being served.
+ *
+ * @throws NoContext if the current thread is not associated with any
+ * object.
+ */
+ public byte[] get_object_id()
+ throws NoContext
+ {
+ CurrentOperations r;
+ synchronized (threads)
+ {
+ r = (CurrentOperations) threads.get(Thread.currentThread().getName());
+ }
+ if (r != null)
+ return r.get_object_id();
+ else
+ throw new NoContext(Thread.currentThread().getName());
+ }
+
+ /**
+ * Get the object POA, associated with the thread currently being served.
+ *
+ * @throws NoContext if the current thread is not associated with any
+ * object.
+ */
+ public POA get_POA()
+ throws NoContext
+ {
+ CurrentOperations r;
+ synchronized (threads)
+ {
+ r = (CurrentOperations) threads.get(Thread.currentThread().getName());
+ }
+ if (r != null)
+ return r.get_POA();
+ else
+ throw new NoContext(Thread.currentThread().getName());
+ }
+
+ /**
+ * Add the entry to the map.
+ */
+ public void put(Thread t, CurrentOperations record)
+ {
+ synchronized (threads)
+ {
+ threads.put(t.getName(), record);
+ }
+ }
+
+ /**
+ * Check if this Poa has some running threads.
+ */
+ public boolean has(POA poa)
+ {
+ synchronized (threads)
+ {
+ Iterator iter = threads.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Map.Entry item = (Map.Entry) iter.next();
+ try
+ {
+ if (((CurrentOperations) item.getValue()).get_POA() == poa)
+ {
+ return true;
+ }
+ }
+ catch (NoContext ex)
+ {
+ throw new InternalError();
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check if this thread is registered.
+ */
+ public boolean has(Thread t)
+ {
+ synchronized (threads)
+ {
+ return threads.containsKey(t.getName());
+ }
+ }
+
+ /**
+ * Remove the entry from the map.
+ */
+ public void remove(Thread t)
+ {
+ synchronized (threads)
+ {
+ threads.remove(t.getName());
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java b/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java
new file mode 100644
index 000000000..5bbcd1321
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java
@@ -0,0 +1,80 @@
+/* gnuRequestProcessingPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.REQUEST_PROCESSING_POLICY_ID;
+import org.omg.PortableServer.RequestProcessingPolicy;
+import org.omg.PortableServer.RequestProcessingPolicyValue;
+
+/**
+ * The implementation of the request processing policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuRequestProcessingPolicy
+ extends _PolicyImplBase
+ implements RequestProcessingPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuRequestProcessingPolicy(RequestProcessingPolicyValue v)
+ {
+ super(REQUEST_PROCESSING_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/RequestProcessingPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public RequestProcessingPolicyValue value()
+ {
+ return (RequestProcessingPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuServantObject.java b/gnu/CORBA/Poa/gnuServantObject.java
new file mode 100644
index 000000000..f096104f9
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuServantObject.java
@@ -0,0 +1,594 @@
+/* gnuServantObject.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.IOR_Delegate;
+import gnu.CORBA.IOR_contructed_object;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+import org.omg.CORBA.OBJ_ADAPTER;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.TRANSIENT;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.CurrentOperations;
+import org.omg.PortableServer.DynamicImplementation;
+import org.omg.PortableServer.ForwardRequest;
+import org.omg.PortableServer.ImplicitActivationPolicyValue;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.POAManager;
+import org.omg.PortableServer.POAManagerPackage.State;
+import org.omg.PortableServer.Servant;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+import org.omg.PortableServer.ServantRetentionPolicyValue;
+import org.omg.PortableServer.portable.Delegate;
+
+import java.util.Arrays;
+
+/**
+ * Represents a CORBA object, being locally served by the associated
+ * servant. The calls to the object are forwarded to the calls to the
+ * servant.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuServantObject
+ extends ObjectImpl
+ implements org.omg.CORBA.Object, InvokeHandler, CurrentOperations
+{
+ /**
+ * The associated servant that must also implement the
+ * {@link InvokeHandler} interface. This value can be temporary
+ * null if the object was created using
+ * POA.create_reference or POA.create_reference_with_id, private to force
+ * always to use {@link setServant}.
+ */
+ private Servant servant;
+
+ /**
+ * The Id of this object.
+ */
+ public final byte[] Id;
+
+ /**
+ * The poa that takes care about this object.
+ */
+ public final gnuPOA poa;
+
+ /**
+ * The POA manager, used to control the work of this object.
+ */
+ public final POAManager manager;
+
+ /**
+ * The orb.
+ */
+ public final ORB_1_4 orb;
+
+ /**
+ * The object repository ids, if they were specified separately.
+ * Normally, the ids are requested from the servant.
+ */
+ public final String[] repository_ids;
+
+ /**
+ * Create an object with no connected servant. The servant must be
+ * set later.
+ *
+ * @param a_repository_ids an array of repository ids, can be null
+ * (then ids will be requested from the servant).
+ * @param an_id the object id.
+ * @param a_poa the POA.
+ */
+ public gnuServantObject(String[] a_repository_ids, byte[] an_id,
+ gnuPOA a_poa, ORB_1_4 an_orb
+ )
+ {
+ repository_ids = a_repository_ids;
+ Id = an_id;
+ manager = a_poa.the_POAManager();
+ poa = a_poa;
+ orb = an_orb;
+ }
+
+ /**
+ * Create a servant object, associated with the passed servant.
+ *
+ * @param a_servant a servant, serving this object.
+ * @param an_id an Object Id for this object.
+ *
+ * @throws BAD_PARAM if the passed servant is not an
+ * {@link InvokeHandler}.
+ */
+ public gnuServantObject(Servant a_servant, byte[] an_id, ORB_1_4 an_orb,
+ gnuPOA a_poa
+ )
+ {
+ Id = an_id;
+ setServant(a_servant);
+ poa = a_poa;
+ if (poa != null)
+ manager = poa.the_POAManager();
+ else
+ manager = null;
+ repository_ids = null;
+ orb = an_orb;
+ }
+
+ /**
+ * Set a servant, if it has not been previously set.
+ *
+ * @param a_servant a servant to set, can be null to indicate
+ * the necessity for the subsequent activation.
+ *
+ * @throws BAD_PARAM if the passed servant is not an
+ * {@link InvokeHandler} or {@link DynamicImplementation} and also
+ * not null.
+ */
+ public void setServant(Servant a_servant)
+ {
+ if (a_servant != null && !(a_servant instanceof InvokeHandler) &&
+ !(a_servant instanceof DynamicImplementation)
+ )
+
+ throw new BAD_PARAM("Must be either InvokeHandler or " +
+ "DynamicImplementation, but is " + a_servant
+ );
+ servant = a_servant;
+ }
+
+ /**
+ * Returns the associated servant.
+ */
+ public Servant getServant()
+ {
+ return servant;
+ }
+
+ /**
+ * Return the associated invocation handler.
+ */
+ public InvokeHandler getHandler(String operation, CookieHolder cookie,
+ boolean forwarding_allowed
+ )
+ throws gnuForwardRequest
+ {
+ if (servant != null)
+ return servantToHandler(servant);
+ else
+ {
+ // Use servant locator to locate the servant.
+ if (poa.servant_locator != null)
+ {
+ try
+ {
+ servant =
+ poa.servant_locator.preinvoke(Id, poa, operation, cookie);
+ return servantToHandler(servant);
+ }
+ catch (ForwardRequest forw_ex)
+ {
+ if (forwarding_allowed)
+ throw new gnuForwardRequest(forw_ex.forward_reference);
+ else
+ {
+ servant =
+ ForwardedServant.create(forw_ex.forward_reference);
+ return servantToHandler(servant);
+ }
+ }
+ }
+ else
+ // Use servant activator to locate the servant.
+ if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) &&
+ poa.applies(ServantRetentionPolicyValue.RETAIN)
+ )
+ {
+ try
+ {
+ poa.activate_object_with_id(Id, servant, forwarding_allowed);
+ servant = poa.id_to_servant(Id);
+ return servantToHandler(servant);
+ }
+ catch (gnuForwardRequest forwarded)
+ {
+ throw forwarded;
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+
+ BAD_OPERATION bad =
+ new BAD_OPERATION("Unable to activate", 0x5004,
+ CompletionStatus.COMPLETED_NO
+ );
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+ else if (poa.default_servant != null)
+ {
+ servant = poa.default_servant;
+ return servantToHandler(servant);
+ }
+
+ // No servant and no servant manager - throw exception.
+ else
+ throw new BAD_OPERATION("Unable to activate", 0x5002,
+ CompletionStatus.COMPLETED_NO
+ );
+ }
+ }
+
+ /**
+ * Convert the servant to invocation handler.
+ */
+ public InvokeHandler servantToHandler(Servant servant)
+ {
+ if (servant instanceof InvokeHandler)
+ return (InvokeHandler) servant;
+ else if (servant instanceof DynamicImplementation)
+ return new dynImpHandler((DynamicImplementation) servant);
+ else
+ throw new BAD_OPERATION(servant + " must be either InvokeHandler or " +
+ "POA DynamicImplementation"
+ );
+ }
+
+ /**
+ * Create a servant object, associated with the passed servant.
+ * Requests the object id from the servant. Depending on the
+ * policies of the servants POA, the calls are eithe not
+ * synchronized or synchronized on POA or ORB.
+ *
+ * @param a_servant a servant, serving this object.
+ * @param an_id an Object Id for this object.
+ */
+ public gnuServantObject(Servant a_servant, gnuPOA poa)
+ {
+ this(a_servant, a_servant._object_id(), (ORB_1_4) a_servant._orb(), poa);
+ }
+
+ /**
+ * Delegates call to servant, passing the poa and Id.
+ */
+ public String[] _ids()
+ {
+ if (repository_ids == null)
+ return getServant()._all_interfaces(poa, Id);
+ else
+ return repository_ids;
+ }
+
+ /**
+ * Gets a string representation.
+ */
+ public String toString()
+ {
+ StringBuffer b = new StringBuffer("Servant object (");
+ for (int i = 0; i < Id.length; i++)
+ {
+ b.append(Integer.toHexString(Id [ i ] & 0xFF));
+ b.append(' ');
+ }
+ b.append(')');
+ return b.toString();
+ }
+
+ /**
+ * Always returns true.
+ */
+ public boolean _is_local()
+ {
+ return true;
+ }
+
+ /**
+ * Check if this object could be named by the given repository id.
+ * @param idl_id the repository id to check.
+ *
+ * @return true if it is one of the possible repository ids of this
+ * object.
+ */
+ public boolean _is_a(String idl_id)
+ {
+ String[] maybe = _ids();
+ for (int i = 0; i < maybe.length; i++)
+ {
+ if (maybe [ i ].equals(idl_id))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get an ORB, associated with the servant of this object.
+ * @return
+ */
+ public ORB _orb()
+ {
+ return getServant()._orb();
+ }
+
+ /**
+ * Handle the invocation (delegates to servant).
+ *
+ * @throws TRANSIENT minor 0x535503e9 if the POA is in discarding mode.
+ * @throws OBJ_ADAPTER minor 0x535503ea if the POA is inactivated.
+ * @throws OBJECT_NOT_EXISTS minor 0x535503ec if this object is
+ * inactivated.
+ *
+ * @specnote see {@link POAManagerOperations} for specnotes about
+ * the minor codes.
+ */
+ public OutputStream _invoke(String method, InputStream input,
+ ResponseHandler r_handler
+ )
+ throws SystemException
+ {
+ try
+ {
+ CookieHolder cookie = null;
+ activeObjectMap.Obj self = poa.aom.get(Id);
+
+ if (poa.servant_locator != null)
+ {
+ // If the servant locator is in use, it is always responsible
+ // for providing the servant.
+ self.servant = servant = null;
+ cookie = new CookieHolder();
+ }
+ else if (self != null && self.isDeactiveted())
+ {
+ if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) &&
+ poa.servant_activator != null
+ )
+ {
+ // Reset the servant, forcing the subsequent activation.
+ servant = null;
+ }
+ else
+ throw new OBJECT_NOT_EXIST("Object deactivated", 0x535503ec,
+ CompletionStatus.COMPLETED_NO
+ );
+ }
+
+ InvokeHandler handler = getHandler(method, cookie, true);
+
+ Delegate d = null;
+
+ try
+ {
+ d = servant._get_delegate();
+ orb.currents.put(Thread.currentThread(), this);
+ }
+ catch (Exception ex)
+ {
+ // In some cases exception is thrown if the delegate is not set.
+ }
+ if (d instanceof servantDelegate)
+ {
+ // If the delegate is already set, check maybe we can
+ // reuse the existing instance.
+ if (((servantDelegate) d).object != this)
+ servant._set_delegate(new servantDelegate(servant, poa, Id));
+ }
+ else
+ {
+ servant._set_delegate(new servantDelegate(servant, poa, Id));
+ }
+
+ try
+ {
+ switch (manager.get_state().value())
+ {
+ case State._ACTIVE :
+ return handler._invoke(method, input, r_handler);
+
+ case State._HOLDING :
+
+ // The holding mode is implemented
+ // relying on the holding capabilites of the network
+ // support (if any).
+ // TODO FIXME in more recent CORBA applications, the client
+ // ORB can free the connection and wait for a server side
+ // notification about the completed request. Implement this.
+ int sleep = 5;
+ int max = 500;
+
+ // Wait till the state will be switched into some other
+ // mode.
+ while (manager.get_state().value() == State._HOLDING)
+ {
+ try
+ {
+ Thread.sleep(sleep);
+ if (sleep < max)
+ sleep = max;
+ }
+ catch (InterruptedException ex)
+ {
+ }
+ }
+
+ // Handle another mode.
+ return _invoke(method, input, r_handler);
+
+ case State._DISCARDING :
+ throw new TRANSIENT("Discarding mode", 0x535503e9,
+ CompletionStatus.COMPLETED_NO
+ );
+
+ case State._INACTIVE :
+ throw new OBJ_ADAPTER("POA deactivated", 0x535503ea,
+ CompletionStatus.COMPLETED_NO
+ );
+
+ default :
+ throw new InternalError(); // No more states.
+ }
+ }
+ finally
+ {
+ if (poa.servant_locator != null)
+ {
+ poa.servant_locator.postinvoke(Id, poa, method, cookie.value,
+ servant
+ );
+ servant = null;
+ }
+ }
+ }
+ finally
+ {
+ orb.currents.remove(Thread.currentThread());
+ }
+ }
+
+ /**
+ * Compare with another object for equality, comparing the
+ * object keys.
+ */
+ public boolean equals(java.lang.Object other)
+ {
+ if (other instanceof gnuServantObject)
+ {
+ gnuServantObject o = (gnuServantObject) other;
+
+ return Arrays.equals(o.Id, Id);
+ }
+ else
+ return false;
+ }
+
+ /**
+ * Get the hash code, based on the object key.
+ */
+ public int hashCode()
+ {
+ long s = 0;
+ int v = 1;
+ for (int i = 0; i < Id.length; i++)
+ {
+ s += Id [ i ] * v;
+ if (s > Integer.MAX_VALUE)
+ {
+ s = s % Integer.MAX_VALUE;
+ v = 1;
+ }
+ v = v * 8;
+ }
+ return (int) (s % Integer.MAX_VALUE);
+ }
+
+ /**
+ * Get the object id.
+ */
+ public byte[] get_object_id()
+ {
+ return Id;
+ }
+
+ /**
+ * Get POA.
+ */
+ public POA get_POA()
+ {
+ return poa;
+ }
+
+ /**
+ * Returns without action.
+ */
+ public void _release()
+ {
+ }
+
+ /**
+ * Returns without action.
+ */
+ public void _releaseReply(InputStream stream)
+ {
+ }
+
+ /**
+ * Checks if this object is equivalent to another instance.
+ * These objects are assumed equal if they are connected to the
+ * same orb and poa under the same Id, regardless of they
+ * delegates.
+ *
+ * @param another instance to check.
+ * @return
+ */
+ public boolean _is_equivalent(org.omg.CORBA.Object other)
+ {
+ if (other instanceof gnuServantObject)
+ {
+ gnuServantObject g = (gnuServantObject) other;
+ return orb == g.orb && poa == g.poa && Arrays.equals(Id, g.Id);
+ }
+ else if (other instanceof IOR_contructed_object)
+ {
+ IOR_contructed_object ir = ((IOR_contructed_object) other);
+ try
+ {
+ IOR_Delegate ird = (IOR_Delegate) ir._get_delegate();
+ byte[] ior_id = poa.idFormIor(ird.getIor().key);
+ if (ior_id != null && Arrays.equals(ior_id, Id))
+ return true;
+ else
+ return false;
+ }
+ catch (Exception ex)
+ {
+ // Non - typical delegate or very specific subclass of
+ // IOR_constructed_object.
+ return super._is_equivalent(other);
+ }
+ }
+ return super._is_equivalent(other);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuServantRetentionPolicy.java b/gnu/CORBA/Poa/gnuServantRetentionPolicy.java
new file mode 100644
index 000000000..009e70e1b
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuServantRetentionPolicy.java
@@ -0,0 +1,80 @@
+/* gnuServantRetentionPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID;
+import org.omg.PortableServer.ServantRetentionPolicy;
+import org.omg.PortableServer.ServantRetentionPolicyValue;
+
+/**
+ * The implementation of the servant retention policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuServantRetentionPolicy
+ extends _PolicyImplBase
+ implements ServantRetentionPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuServantRetentionPolicy(ServantRetentionPolicyValue v)
+ {
+ super(SERVANT_RETENTION_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/ServantRetentionPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public ServantRetentionPolicyValue value()
+ {
+ return (ServantRetentionPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuThreadPolicy.java b/gnu/CORBA/Poa/gnuThreadPolicy.java
new file mode 100644
index 000000000..f42ebefb3
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuThreadPolicy.java
@@ -0,0 +1,80 @@
+/* gnuThreadPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.THREAD_POLICY_ID;
+import org.omg.PortableServer.ThreadPolicy;
+import org.omg.PortableServer.ThreadPolicyValue;
+
+/**
+ * The implementation of the thread policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuThreadPolicy
+ extends _PolicyImplBase
+ implements ThreadPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuThreadPolicy(ThreadPolicyValue v)
+ {
+ super(THREAD_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/ThreadPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public ThreadPolicyValue value()
+ {
+ return (ThreadPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/policySets.java b/gnu/CORBA/Poa/policySets.java
new file mode 100644
index 000000000..eb688467a
--- /dev/null
+++ b/gnu/CORBA/Poa/policySets.java
@@ -0,0 +1,128 @@
+/* policySets.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.Policy;
+import org.omg.PortableServer.IdAssignmentPolicyValue;
+import org.omg.PortableServer.IdUniquenessPolicyValue;
+import org.omg.PortableServer.ImplicitActivationPolicyValue;
+import org.omg.PortableServer.LifespanPolicyValue;
+import org.omg.PortableServer.RequestProcessingPolicyValue;
+import org.omg.PortableServer.ServantRetentionPolicyValue;
+import org.omg.PortableServer.ThreadPolicyValue;
+
+import java.util.ArrayList;
+
+/**
+ * Contains the frequently uset POA policy sets. The policy
+ * arrays are package private for security reasons, the cloned
+ * copies are returned.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class policySets
+{
+ /**
+ * The default policy set, as defined in OMG specs. This is also
+ * the policy set for the root POA.
+ */
+ private static final vPolicy[] rootPOASet =
+ new vPolicy[]
+ {
+ new gnuThreadPolicy(ThreadPolicyValue.ORB_CTRL_MODEL),
+ new gnuLifespanPolicy(LifespanPolicyValue.TRANSIENT),
+ new gnuIdUniquenessPolicy(IdUniquenessPolicyValue.UNIQUE_ID),
+ new gnuIdAssignmentPolicy(IdAssignmentPolicyValue.SYSTEM_ID),
+ new gnuServantRetentionPolicy(ServantRetentionPolicyValue.RETAIN),
+ new gnuRequestProcessingPolicy(RequestProcessingPolicyValue.USE_ACTIVE_OBJECT_MAP_ONLY),
+ new gnuImplicitActivationPolicy(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
+ };
+
+ /**
+ * Return the policy set, applicable for the root POA, as defined
+ * in OMG specs.
+ */
+ public static Policy[] rootPoa()
+ {
+ Policy[] p = new Policy[ rootPOASet.length ];
+ System.arraycopy(rootPOASet, 0, p, 0, p.length);
+ return p;
+ }
+
+ /**
+ * Convert the potentially incomplete policy array into array, containing
+ * the complete policy set.
+ *
+ * @param policies the policy list, may be incomplete (even zero size).
+ *
+ * @return the complete policy array. The missing, but needed policies
+ * are added with they default values.
+ */
+ public static Policy[] withDefault(Policy[] policies)
+ {
+ ArrayList current = new ArrayList(rootPOASet.length);
+ Policy p_default;
+ boolean specified;
+
+ for (int i = 0; i < rootPOASet.length; i++)
+ {
+ p_default = rootPOASet [ i ];
+ specified = false;
+ ForThis:
+ for (int j = 0; j < policies.length; j++)
+ {
+ if (policies [ j ].policy_type() == p_default.policy_type())
+ {
+ specified = true;
+ current.add(policies [ j ]);
+ break ForThis;
+ }
+ }
+ if (!specified)
+ current.add(p_default.copy());
+ }
+
+ Policy[] complete = new Policy[ current.size() ];
+ for (int i = 0; i < complete.length; i++)
+ {
+ complete [ i ] = (Policy) current.get(i);
+ }
+ return complete;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/servantDelegate.java b/gnu/CORBA/Poa/servantDelegate.java
new file mode 100644
index 000000000..1825db386
--- /dev/null
+++ b/gnu/CORBA/Poa/servantDelegate.java
@@ -0,0 +1,235 @@
+/* servantDelegate.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.Unexpected;
+
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ORBPackage.InvalidName;
+import org.omg.CORBA.Object;
+import org.omg.PortableServer.CurrentPackage.NoContext;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.POAHelper;
+import org.omg.PortableServer.Servant;
+import org.omg.PortableServer.portable.Delegate;
+
+/**
+ * The implementation of the servant delegate for the locally existing
+ * servant.The associated servant that must also implement the
+ * {@link InvokeHandler} interface. Each servant requires a separate
+ * instance of this delegate and can serve a single object only.
+ * Hence the fields are final, but the delegate is typically reused
+ * unless the same servant is connected to different objects.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class servantDelegate
+ implements Delegate
+{
+ /**
+ * The servant, associated with this object.
+ */
+ final Servant servant;
+
+ /**
+ * The servant (not object) id.
+ */
+ final byte[] servant_id;
+
+ /**
+ * The POA, where the servant is connected.
+ */
+ final gnuPOA poa;
+
+ /**
+ * The object, exposed as an object, served by this servant.
+ */
+ final gnuServantObject object;
+
+ /**
+ * Create the delegat for the servant that will be connected to the
+ * given poa. The method is normally called from inside of gnuPOA.
+ * The constructor sets the newly created delegate as the delegate to this
+ * servant by calling Servant._set_delegate.
+ *
+ * @param a_poa the poa.
+ * @param a_servant the servant.
+ * @param a_servant_id the servant id.
+ */
+ public servantDelegate(Servant a_servant, gnuPOA a_poa, byte[] a_servant_id)
+ {
+ poa = a_poa;
+ servant = a_servant;
+ servant_id = a_servant_id;
+ servant._set_delegate(this);
+ object =
+ new gnuServantObject(servant, servant_id, (ORB_1_4) servant._orb(), a_poa);
+ object._set_delegate(new LocalDelegate(object, poa, a_servant_id));
+ }
+
+ /**
+ * Check if this object could be named by the given repository id.
+ * @param idl_id the repository id to check.
+ *
+ * @return true if it is one of the possible repository ids of this
+ * object.
+ */
+ public boolean is_a(Servant a_servant, String idl_id)
+ {
+ same(a_servant);
+
+ String[] maybe = object.repository_ids;
+ if (maybe == null)
+ maybe = servant._all_interfaces(poa, object.Id);
+ for (int i = 0; i < maybe.length; i++)
+ {
+ if (maybe [ i ].equals(idl_id))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Return the ORB's default POA.
+ */
+ public POA default_POA(Servant a_servant)
+ {
+ same(a_servant);
+ try
+ {
+ return POAHelper.narrow(orb(a_servant).resolve_initial_references("RootPOA"));
+ }
+ catch (InvalidName ex)
+ {
+ throw new Unexpected(ex);
+ }
+ }
+
+ /**
+ * Get ORB.
+ */
+ public ORB orb(Servant a_servant)
+ {
+ same(a_servant);
+ return poa.orb();
+ }
+
+ /**
+ * Get the object, exposing the servant.
+ */
+ public Object this_object(Servant a_servant)
+ {
+ same(a_servant);
+ try
+ {
+ return poa.aom.get(poa.m_orb.currents.get_object_id()).object;
+ }
+ catch (NoContext ex)
+ {
+ return object;
+ }
+ }
+
+ /**
+ * Not supported.
+ *
+ * @specnote Same as for Sun up till 1.5 inclusive.
+ */
+ public Object get_interface_def(Servant a_servant)
+ {
+ same(a_servant);
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Get the Id of the object being currently served.
+ */
+ public byte[] object_id(Servant a_servant)
+ {
+ same(a_servant);
+ try
+ {
+ byte[] id = poa.m_orb.currents.get_object_id();
+ return id;
+ }
+ catch (NoContext ex)
+ {
+ // TODO remove from mature code, this is a debug statement.
+ // The message should not appear during tests.
+ System.out.println("Not ok with object id");
+ return object.Id;
+ }
+ }
+
+ /**
+ * Always returns false;
+ */
+ public boolean non_existent(Servant a_servant)
+ {
+ same(a_servant);
+ return false;
+ }
+
+ /**
+ * Return the associated POA.
+ */
+ public POA poa(Servant a_servant)
+ {
+ same(a_servant);
+ try
+ {
+ return poa.m_orb.currents.get_POA();
+ }
+ catch (NoContext ex)
+ {
+ return poa;
+ }
+ }
+
+ /**
+ * Checks if the passed servant is the same as the servant, associated with
+ * this delegate. This class requires a single servant per delegate.
+ */
+ void same(Servant some_servant)
+ {
+ if (servant != some_servant)
+ throw new InternalError("Only one servant per delegate is supported.");
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/uncObjectInputStream.java b/gnu/CORBA/Poa/vPolicy.java
index b912f5d2c..9e45b56d7 100644
--- a/gnu/CORBA/CDR/uncObjectInputStream.java
+++ b/gnu/CORBA/Poa/vPolicy.java
@@ -1,4 +1,4 @@
-/* uncObjectInputStream.java --
+/* vPolicy.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -36,35 +36,27 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.CORBA.CDR;
+package gnu.CORBA.Poa;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
+import org.omg.CORBA.Policy;
/**
- * An object input stream that cannot be closed. Used in cases where
- * it represents only part of the input data.
+ * The Classpath implementation of the policy, providing the policy
+ * value and the code of the policy type.
*
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class uncObjectInputStream
- extends ObjectInputStream
+public interface vPolicy
+ extends Policy
{
/**
- * Delegate call to super class constructor.
+ * Get the value of this policy
*/
- public uncObjectInputStream(InputStream in)
- throws IOException
- {
- super(in);
- }
+ java.lang.Object getValue();
/**
- * Do not close the stream, return without action.
+ * Get the integer code of this policy value.
*/
- public void close()
- {
- // Do nothing.
- }
+ int getCode();
+
} \ No newline at end of file
diff --git a/gnu/CORBA/Restricted_ORB.java b/gnu/CORBA/Restricted_ORB.java
index e2e7e7e93..801154e20 100644
--- a/gnu/CORBA/Restricted_ORB.java
+++ b/gnu/CORBA/Restricted_ORB.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -49,18 +49,19 @@ import org.omg.CORBA.NO_IMPLEMENT;
import org.omg.CORBA.NVList;
import org.omg.CORBA.NamedValue;
import org.omg.CORBA.ORB;
+import org.omg.CORBA.ORBPackage.InvalidName;
import org.omg.CORBA.Request;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.TypeCode;
-import org.omg.CORBA.UnionMember;
-
-import org.omg.CORBA.ORBPackage.InvalidName;
import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.UnionMember;
import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ValueFactory;
import java.applet.Applet;
+import java.util.Hashtable;
import java.util.Properties;
/**
@@ -80,7 +81,7 @@ import java.util.Properties;
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class Restricted_ORB
- extends ORB
+ extends org.omg.CORBA_2_3.ORB
{
/**
* The singleton instance of this ORB.
@@ -88,6 +89,11 @@ public class Restricted_ORB
public static final ORB Singleton = new Restricted_ORB();
/**
+ * The value factories.
+ */
+ protected Hashtable factories = new Hashtable();
+
+ /**
* Create a new instance of the RestrictedORB. This is used
* in derived classes only.
*/
@@ -104,7 +110,9 @@ public class Restricted_ORB
/** {@inheritDoc} */
public Any create_any()
{
- return new gnuAny();
+ gnuAny any = new gnuAny();
+ any.setOrb(this);
+ return any;
}
/** {@inheritDoc} */
@@ -410,4 +418,46 @@ public class Restricted_ORB
{
no();
}
+
+ /**
+ * Register the value factory under the given repository id.
+ */
+ public ValueFactory register_value_factory(String repository_id,
+ ValueFactory factory
+ )
+ {
+ factories.put(repository_id, factory);
+ return factory;
+ }
+
+ /**
+ * Unregister the value factroy.
+ */
+ public void unregister_value_factory(String id)
+ {
+ factories.remove(id);
+ }
+
+ /**
+ * Look for the value factory for the value, having the given repository id.
+ * The implementation checks for the registered value factories first.
+ * If none found, it tries to load and instantiate the class, mathing the
+ * given naming convention. If this faild, null is returned.
+ *
+ * @param repository_id a repository id.
+ *
+ * @return a found value factory, null if none.
+ */
+ public ValueFactory lookup_value_factory(String repository_id)
+ {
+ ValueFactory f = (ValueFactory) factories.get(repository_id);
+ if (f != null)
+ return f;
+
+ f = (ValueFactory) ObjectCreator.createObject(repository_id, "DefaultFactory");
+ if (f != null)
+ factories.put(repository_id, f);
+
+ return f;
+ }
} \ No newline at end of file
diff --git a/gnu/CORBA/ServiceDetailHolder.java b/gnu/CORBA/ServiceDetailHolder.java
index 8073350a0..e8786374a 100644
--- a/gnu/CORBA/ServiceDetailHolder.java
+++ b/gnu/CORBA/ServiceDetailHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/ServiceRequestAdapter.java b/gnu/CORBA/ServiceRequestAdapter.java
index f584eb7a3..7f40fc84d 100644
--- a/gnu/CORBA/ServiceRequestAdapter.java
+++ b/gnu/CORBA/ServiceRequestAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,10 +53,11 @@ import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.Streamable;
/**
- * This class exists to handle obsolete invocation style using
- * ServerRequest.
- *
- * @deprecated The method {@link ObjectImpl#_invoke} is much faster.
+ * This class supports invocation using ServerRequest. When possible,
+ * it is better to use the {@link ObjectImpl#_invoke} rather than
+ * working via ServerRequest. However since 1.4 the ServerRequest is
+ * involved into POA machinery making this type of call is sometimes
+ * inavoidable.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
@@ -86,13 +87,13 @@ public class ServiceRequestAdapter
}
/**
- * The old style invocation using the currently deprecated server
- * request class.
+ * Make an invocation.
*
* @param request a server request, containg the invocation information.
* @param target the invocation target
- * @param result the result holder with the set suitable streamable to read
- * the result or null for void.
+ * @param result the result holder with the set suitable streamable.
+ * Using this parameter only increase the performance. It can be
+ * null if the return type is void or unknown.
*/
public static void invoke(ServerRequest request, InvokeHandler target,
Streamable result
@@ -133,12 +134,20 @@ public class ServiceRequestAdapter
else
{
if (result != null)
- {
- result._read(in);
- gnuAny r = new gnuAny();
- r.insert_Streamable(result);
- request.set_result(r);
- };
+ {
+ // Use the holder for the return value, if provided.
+ result._read(in);
+
+ gnuAny r = new gnuAny();
+ r.insert_Streamable(result);
+ request.set_result(r);
+ }
+ else
+ {
+ // Use the universal holder otherwise.
+ gnuAny r = new gnuAny();
+ r.insert_Streamable(new streamReadyHolder(in));
+ }
// Unpack the arguments
for (int i = 0; i < args.count(); i++)
diff --git a/gnu/CORBA/SetOverrideTypeHolder.java b/gnu/CORBA/SetOverrideTypeHolder.java
index d1fcc18f3..12b4b9f0c 100644
--- a/gnu/CORBA/SetOverrideTypeHolder.java
+++ b/gnu/CORBA/SetOverrideTypeHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Simple_delegate.java b/gnu/CORBA/Simple_delegate.java
index 662dfef18..5eabc7da8 100644
--- a/gnu/CORBA/Simple_delegate.java
+++ b/gnu/CORBA/Simple_delegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -195,13 +195,40 @@ public class Simple_delegate
}
/**
- * Only returns true if the objects are equal ('==').
+ * Returns true if the objects are the same of have
+ * the same delegate set. All objects in this implementation
+ * have a separate delegate.
*/
public boolean is_equivalent(org.omg.CORBA.Object target,
org.omg.CORBA.Object other
)
{
- return target == other;
+ if (target == other)
+ return true;
+ if ((target instanceof ObjectImpl) && other instanceof ObjectImpl)
+ {
+ try
+ {
+ org.omg.CORBA.portable.Delegate a =
+ ((ObjectImpl) target)._get_delegate();
+ org.omg.CORBA.portable.Delegate b =
+ ((ObjectImpl) other)._get_delegate();
+ if (a == b)
+ {
+ return true;
+ }
+ if (a != null && b != null)
+ {
+ return a.equals(b);
+ }
+ }
+ catch (Exception ex)
+ {
+ // Unable to get one of the delegates.
+ return false;
+ }
+ }
+ return false;
}
/**
@@ -246,4 +273,4 @@ public class Simple_delegate
{
throw new InternalError();
}
-}
+} \ No newline at end of file
diff --git a/gnu/CORBA/SocketRepository.java b/gnu/CORBA/SocketRepository.java
new file mode 100644
index 000000000..70bceadf5
--- /dev/null
+++ b/gnu/CORBA/SocketRepository.java
@@ -0,0 +1,93 @@
+/* SocketRepository.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import java.net.Socket;
+
+import java.util.HashMap;
+
+/**
+ * This class caches the opened sockets that are reused during the
+ * frequent calls. Otherwise, some CORBA applications may spend
+ * up to 90 % of the working time just for closing and opening the sockets.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class SocketRepository
+{
+ /**
+ * The socket map.
+ */
+ private static HashMap sockets = new HashMap();
+
+ /**
+ * Put a socket.
+ *
+ * @param key as socket key.
+ *
+ * @param s a socket.
+ */
+ public static void put_socket(Object key, Socket s)
+ {
+ sockets.put(key, s);
+ }
+
+ /**
+ * Get a socket.
+ *
+ * @param key a socket key.
+ *
+ * @return an opened socket for reuse, null if no such
+ * available or it is closed.
+ */
+ public static Socket get_socket(Object key)
+ {
+ Socket s = (Socket) sockets.get(key);
+ if (s != null && s.isClosed())
+ {
+ sockets.remove(key);
+ return null;
+ }
+ else
+ {
+ sockets.remove(key);
+ return s;
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/TypeCodeHelper.java b/gnu/CORBA/TypeCodeHelper.java
index 163ebbeb9..c74227542 100644
--- a/gnu/CORBA/TypeCodeHelper.java
+++ b/gnu/CORBA/TypeCodeHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Unexpected.java b/gnu/CORBA/Unexpected.java
index f030d4dfc..89fb7e7b9 100644
--- a/gnu/CORBA/Unexpected.java
+++ b/gnu/CORBA/Unexpected.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Version.java b/gnu/CORBA/Version.java
index 64ef01853..84f40bf4f 100644
--- a/gnu/CORBA/Version.java
+++ b/gnu/CORBA/Version.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/WCharHolder.java b/gnu/CORBA/WCharHolder.java
index baa768fdf..23f0ad100 100644
--- a/gnu/CORBA/WCharHolder.java
+++ b/gnu/CORBA/WCharHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/WStringHolder.java b/gnu/CORBA/WStringHolder.java
index 84ffcae96..c9e8e3323 100644
--- a/gnu/CORBA/WStringHolder.java
+++ b/gnu/CORBA/WStringHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/_PolicyImplBase.java b/gnu/CORBA/_PolicyImplBase.java
new file mode 100644
index 000000000..d9ff9d648
--- /dev/null
+++ b/gnu/CORBA/_PolicyImplBase.java
@@ -0,0 +1,231 @@
+/* _PolicyImplBase.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.PolicyHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+
+/**
+ * The server side implementation base for the {@link Policy}.
+ *
+ * @specnote The java 1.4 API does not define the server side policy
+ * implementation base, but it defines the policy client side stub.
+ * As these two classes always work together, and even no separate testing is
+ * possible, the required implementation base is provided in gnu.CORBA
+ * namespace. Sun will probably include they base in the future java APIs.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class _PolicyImplBase
+ extends ObjectImpl
+ implements Policy, InvokeHandler
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1;
+
+ /**
+ * The policy repository ids.
+ */
+ private final String[] ids;
+
+ /**
+ * The type of this policy.
+ */
+ private final int type;
+
+ /**
+ * The value of this policy. The value object is never the same
+ * for different policies.
+ */
+ private final java.lang.Object value;
+
+ /**
+ * The policy integer code, written in request to write
+ * the policy value.
+ */
+ private final int policyCode;
+
+ /**
+ * Create the new policy of the given type, having the given value.
+ * For security reasons, the method is kept package private.
+ *
+ * @param p_type the type of this policy.
+ * @param p_value the value of this policy.
+ * @param p_code the integer code of this policy.
+ * @param p_idl the policy IDL type string. The {@link #_ids()}
+ * will return array, first line being this string and another
+ * being PolicyHelper.id().
+ */
+ public _PolicyImplBase(int p_type, java.lang.Object p_value, int p_code,
+ String p_idl
+ )
+ {
+ type = p_type;
+ value = p_value;
+ policyCode = p_code;
+ ids = new String[] { p_idl, PolicyHelper.id() };
+ }
+
+ /**
+ * Get the integer code of the type of this policy.
+ */
+ public final int policy_type()
+ {
+ return type;
+ }
+
+ /**
+ * Return the list of repository ids.
+ */
+ public final String[] _ids()
+ {
+ return ids;
+ }
+
+ /**
+ * Call the required method.
+ */
+ public final OutputStream _invoke(String method, InputStream input,
+ ResponseHandler rh
+ )
+ {
+ OutputStream output = null;
+
+ if (method.equals("destroy"))
+ {
+ // The "destroy" has been invoked.
+ destroy();
+ output = rh.createReply();
+ }
+ else if (method.equals("copy"))
+ {
+ // The "copy" has been invoked.
+ org.omg.CORBA.Object returns = copy();
+ output = rh.createReply();
+ output.write_Object(this);
+ }
+ else if (method.equals("policy_type"))
+ {
+ // The "policy_type" has been invoked.
+ int returns = policy_type();
+ output = rh.createReply();
+ output.write_long(returns);
+ }
+ else if (method.equals("value"))
+ {
+ // The "value" can be invoked on the children types
+ // and must return an integer, representing the policy value
+ // (CORBA enumeration).
+ output = rh.createReply();
+ output.write_long(policyCode);
+ }
+ else
+ throw new BAD_OPERATION(method, 0, CompletionStatus.COMPLETED_MAYBE);
+
+ return output;
+ }
+
+ /**
+ * Get the value of this policy
+ */
+ public final java.lang.Object getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Get the integer code of this policy value.
+ */
+ public final int getCode()
+ {
+ return policyCode;
+ }
+
+ /**
+ * Returns without action. It is a work of garbage collector
+ * to remove the unused objects.
+ */
+ public final void destroy()
+ {
+ }
+
+ /**
+ * Returns the string representation of the given policy.
+ */
+ public final String toString()
+ {
+ return value.toString();
+ }
+
+ /**
+ * Create a copy of this policy. The object is not mutable, so
+ * <code>this</code> can be returned.
+ *
+ * @return <code>this</code>
+ */
+ public Policy copy()
+ {
+ return this;
+ }
+
+ /**
+ * Use the value to get a hash code.
+ */
+ public int hashCode()
+ {
+ return getValue().hashCode();
+ }
+
+ /**
+ * Check the values for equality.
+ */
+ public boolean equals(Object x)
+ {
+ return x == null ? false : getValue().equals(x);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/aliasTypeCode.java b/gnu/CORBA/aliasTypeCode.java
index a211b641f..884663101 100644
--- a/gnu/CORBA/aliasTypeCode.java
+++ b/gnu/CORBA/aliasTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/binaryReply.java b/gnu/CORBA/binaryReply.java
index 6d3c19291..71afa3776 100644
--- a/gnu/CORBA/binaryReply.java
+++ b/gnu/CORBA/binaryReply.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/bufferedResponseHandler.java b/gnu/CORBA/bufferedResponseHandler.java
index 03745a03a..e7f00baeb 100644
--- a/gnu/CORBA/bufferedResponseHandler.java
+++ b/gnu/CORBA/bufferedResponseHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/cdrEncapsCodec.java b/gnu/CORBA/cdrEncapsCodec.java
new file mode 100644
index 000000000..699c6f76a
--- /dev/null
+++ b/gnu/CORBA/cdrEncapsCodec.java
@@ -0,0 +1,356 @@
+/* cdrEncapsCodec.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import gnu.CORBA.CDR.cdrBufInput;
+import gnu.CORBA.CDR.cdrBufOutput;
+import gnu.CORBA.CDR.cdrOutput;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.LocalObject;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.UserException;
+import org.omg.IOP.Codec;
+import org.omg.IOP.CodecPackage.FormatMismatch;
+import org.omg.IOP.CodecPackage.InvalidTypeForEncoding;
+import org.omg.IOP.CodecPackage.TypeMismatch;
+
+/**
+ * The local {@link Codec} implementation for ENCODING_CDR_ENCAPS
+ * encoding. This is a local implementation; the remote side should
+ * have its own Codec of this kind.
+ *
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class cdrEncapsCodec
+ extends LocalObject
+ implements Codec
+{
+ /**
+ * The default version of encoding, used in parameterless constructor.
+ */
+ private static final Version DEFAULT_VERSION = new Version(1, 2);
+
+ /**
+ * If set to true, no wide string or wide character is allowed (GIOP 1.0).
+ */
+ private final boolean noWide;
+
+ /**
+ * The version of this encoding.
+ */
+ private final Version version;
+
+ /**
+ * The associated ORB.
+ */
+ protected final ORB orb;
+
+ /**
+ * If true, this Codec writes the record length (as int) in the beginning
+ * of the record. This indicator is part of the formal OMG standard, but it is
+ * missing in Sun's implementation. Both Suns's and this Codec detects
+ * the indicator, if present, but can also decode data where this information
+ * is missing. If the length indicator is missing, the first four bytes in
+ * Suns encoding are equal to 0 (Big Endian marker).
+ */
+ private boolean lengthIndicator = true;
+
+ /**
+ * Create an instance of this Codec, encoding following the given version.
+ */
+ public cdrEncapsCodec(ORB _orb, Version _version)
+ {
+ orb = _orb;
+ version = _version;
+ noWide = version.until_inclusive(1, 0);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ *
+ * @return { "IDL:gnu/CORBA/cdrEnapsCodec:1.0" }, always.
+ */
+ public String[] _ids()
+ {
+ return new String[] { "IDL:gnu/CORBA/cdrEnapsCodec:1.0" };
+ }
+
+ /**
+ * Decode the contents of the byte array into Any.
+ * The byte array may have the optional four byte length indicator
+ * in the beginning. If these four bytes are zero, it is assumed,
+ * that no length indicator is present.
+ */
+ public Any decode(byte[] them)
+ throws FormatMismatch
+ {
+ cdrBufInput input = createInput(them);
+ cdrBufInput encapsulation = createEncapsulation(them, input);
+
+ TypeCode type = encapsulation.read_TypeCode();
+
+ try
+ {
+ checkTypePossibility("", type);
+ }
+ catch (InvalidTypeForEncoding ex)
+ {
+ throw new FormatMismatch(ex.getMessage());
+ }
+
+ return readAny(type, encapsulation);
+ }
+
+ private cdrBufInput createEncapsulation(byte[] them, cdrBufInput input)
+ {
+ cdrBufInput encapsulation;
+
+ if ((them [ 0 ] | them [ 1 ] | them [ 2 ] | them [ 3 ]) == 0)
+ {
+ // Skip that appears to be the always present Big Endian marker.
+ encapsulation = input;
+ input.read_short();
+ }
+ else
+ encapsulation = input.read_encapsulation();
+ return encapsulation;
+ }
+
+ /** {@inheritDoc} */
+ public byte[] encode(Any that)
+ throws InvalidTypeForEncoding
+ {
+ checkTypePossibility("", that.type());
+
+ cdrBufOutput output = createOutput(that);
+
+ // cdrBufOutput has internal support for this encoding.
+ cdrOutput encapsulation = output.createEncapsulation();
+
+ try
+ {
+ TypeCodeHelper.write(encapsulation, that.type());
+ that.write_value(encapsulation);
+
+ encapsulation.close();
+ output.close();
+ }
+ catch (Exception ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ return output.buffer.toByteArray();
+ }
+
+ /**
+ * Decode the value, stored in the byte array, into Any, assuming,
+ * that the byte array holds the data structure, defined by the
+ * given typecode.
+ *
+ * The byte array may have the optional four byte length indicator
+ * in the beginning. If these four bytes are zero, it is assumed,
+ * that no length indicator is present.
+ */
+ public Any decode_value(byte[] them, TypeCode type)
+ throws FormatMismatch, TypeMismatch
+ {
+ try
+ {
+ checkTypePossibility("", type);
+ }
+ catch (InvalidTypeForEncoding ex)
+ {
+ throw new TypeMismatch(ex.getMessage());
+ }
+
+ cdrBufInput input = createInput(them);
+ cdrBufInput encapsulation = createEncapsulation(them, input);
+ return readAny(type, encapsulation);
+ }
+
+ /**
+ * Read an Any from the given stream.
+ *
+ * @param type a type of the Any to read.
+ * @param input the encapsulation stream.
+ */
+ private Any readAny(TypeCode type, cdrBufInput encapsulation)
+ throws MARSHAL
+ {
+ gnuAny a = new gnuAny();
+ a.setOrb(orb);
+
+ // cdrBufInput has internal support for this encoding.
+ a.read_value(encapsulation, type);
+ return a;
+ }
+
+ /** {@inheritDoc} */
+ public byte[] encode_value(Any that)
+ throws InvalidTypeForEncoding
+ {
+ checkTypePossibility("", that.type());
+
+ cdrBufOutput output = createOutput(that);
+
+ cdrOutput encapsulation = output.createEncapsulation();
+
+ try
+ {
+ that.write_value(encapsulation);
+
+ encapsulation.close();
+ output.close();
+ }
+ catch (Exception ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ return output.buffer.toByteArray();
+ }
+
+ /**
+ * Create the CDR output stream for writing the given Any.
+ * The cdrBufOutput has internal support for encapsulation encodings.
+ *
+ * @param that the Any that will be written.
+ *
+ * @return the stream.
+ *
+ * @throws InvalidTypeForEncoding if that Any cannot be written under the
+ * given version.
+ */
+ private cdrBufOutput createOutput(Any that)
+ throws InvalidTypeForEncoding
+ {
+ cdrBufOutput output = new cdrBufOutput();
+ output.setOrb(orb);
+ output.setVersion(version);
+ return output;
+ }
+
+ /**
+ * Checks if the given type can be encoded. Currently only checks for wide
+ * strings and wide chars for GIOP 1.0.
+ *
+ * @param t a typecode to chek.
+ *
+ * @throws InvalidTypeForEncoding if the typecode is not valid for the given
+ * version.
+ */
+ private void checkTypePossibility(String name, TypeCode t)
+ throws InvalidTypeForEncoding
+ {
+ if (noWide)
+ {
+ try
+ {
+ int kind = t.kind().value();
+
+ if (kind == TCKind._tk_wchar || kind == TCKind._tk_wstring)
+ throw new InvalidTypeForEncoding(name + " wide char in " +
+ version
+ );
+ else if (kind == TCKind._tk_alias || kind == TCKind._tk_array ||
+ kind == TCKind._tk_sequence
+ )
+ checkTypePossibility("Array member", t.content_type());
+
+ else if (kind == TCKind._tk_struct || kind == TCKind._tk_union)
+ {
+ for (int i = 0; i < t.member_count(); i++)
+ {
+ checkTypePossibility(t.member_name(i), t.member_type(i));
+ }
+ }
+ }
+ catch (UserException ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ }
+ }
+
+ /**
+ * Create the CDR input stream for reading the given byte array.
+ *
+ * @param them a byte array to read.
+ *
+ * @return the stream.
+ */
+ private cdrBufInput createInput(byte[] them)
+ {
+ cdrBufInput input = new cdrBufInput(them);
+ input.setOrb(orb);
+ input.setVersion(version);
+ return input;
+ }
+
+ /**
+ * Check if the Codec writes the length indicator.
+ */
+ public boolean hasLengthIndicator()
+ {
+ return lengthIndicator;
+ }
+
+ /**
+ * Sets if the Codec must write the record length in the beginning of the
+ * array. Encodings both with and without that indicator are understood
+ * both by Suns and this codec, but the OMG specification seems requiring
+ * it. The default behavior is to use the length indicator.
+ *
+ * @param use_lengthIndicator
+ */
+ public void setUseLengthIndicator(boolean use_lengthIndicator)
+ {
+ lengthIndicator = use_lengthIndicator;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/corbaArrayList.java b/gnu/CORBA/corbaArrayList.java
index 7d531c092..1690f0583 100644
--- a/gnu/CORBA/corbaArrayList.java
+++ b/gnu/CORBA/corbaArrayList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/fixedTypeCode.java b/gnu/CORBA/fixedTypeCode.java
index 4d09e043d..ec88c22be 100644
--- a/gnu/CORBA/fixedTypeCode.java
+++ b/gnu/CORBA/fixedTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/generalTypeCode.java b/gnu/CORBA/generalTypeCode.java
index 222e7afb3..3b7914878 100644
--- a/gnu/CORBA/generalTypeCode.java
+++ b/gnu/CORBA/generalTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -62,7 +62,7 @@ public class generalTypeCode
/**
* Indicates that the field value has not been previously set.
*/
- protected static int UNSET = -Integer.MIN_VALUE;
+ protected static int UNSET = Integer.MIN_VALUE;
/**
* The kinds for that the length() must return 0 even if it
diff --git a/gnu/CORBA/gnuAny.java b/gnu/CORBA/gnuAny.java
index 7997265df..a48c50d61 100644
--- a/gnu/CORBA/gnuAny.java
+++ b/gnu/CORBA/gnuAny.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -68,6 +68,8 @@ import org.omg.CORBA.portable.Streamable;
import java.io.IOException;
import java.io.Serializable;
+import java.lang.reflect.Field;
+
import java.math.BigDecimal;
import java.util.Arrays;
@@ -279,9 +281,19 @@ public class gnuAny
{
try
{
- return ((ValueBaseHolder) has).value;
+ if (has instanceof ValueBaseHolder)
+ return ((ValueBaseHolder) has).value;
+ else
+ {
+ // Normally, ValueBase holder must be an instance of the
+ // ValueBaseHolder. However some IDL compilers probably
+ // have a bug, do not deriving this way. The the only
+ // way to access the wrapped value is via reflection.
+ Field f = has.getClass().getField("value");
+ return (Serializable) f.get(has);
+ }
}
- catch (ClassCastException ex)
+ catch (Exception ex)
{
return new BAD_OPERATION("Value type expected");
}
diff --git a/gnu/CORBA/gnuCodecFactory.java b/gnu/CORBA/gnuCodecFactory.java
new file mode 100644
index 000000000..8b71baf14
--- /dev/null
+++ b/gnu/CORBA/gnuCodecFactory.java
@@ -0,0 +1,95 @@
+/* gnuCodecFactory.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.*;
+import org.omg.CORBA.LocalObject;
+import org.omg.IOP.*;
+import org.omg.IOP.Codec;
+import org.omg.IOP.CodecFactory;
+import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;
+import org.omg.IOP.Encoding;
+
+/**
+ * A simple implementation of the Codec factory, able to return the
+ * standard Codec's. Only ENCODING_CDR_ENCAPS encoding is supported.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuCodecFactory
+ extends LocalObject
+ implements CodecFactory
+{
+ /**
+ * The associated ORB.
+ */
+ private final ORB orb;
+
+ /**
+ * Create a new instance of the this factory, associated with the given ORB.
+ */
+ public gnuCodecFactory(ORB an_orb)
+ {
+ orb = an_orb;
+ }
+
+ /**
+ * Creates the Codec for the given encoding.
+ *
+ * @param for_encoding the encoding for that the Codec must be created.
+ *
+ * @return the suitable Codec.
+ *
+ * @throws UnknownEncoding if the encoding is not a ENCODING_CDR_ENCAPS.
+ */
+ public Codec create_codec(Encoding for_encoding)
+ throws UnknownEncoding
+ {
+ if (for_encoding.format != ENCODING_CDR_ENCAPS.value)
+ throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " +
+ "supported by this factory."
+ );
+
+ return new cdrEncapsCodec(orb,
+ new Version(for_encoding.major_version,
+ for_encoding.minor_version
+ )
+ );
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/gnuContext.java b/gnu/CORBA/gnuContext.java
index 533d7026b..baa9fc804 100644
--- a/gnu/CORBA/gnuContext.java
+++ b/gnu/CORBA/gnuContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuContextList.java b/gnu/CORBA/gnuContextList.java
index 5375e8b59..2a26437de 100644
--- a/gnu/CORBA/gnuContextList.java
+++ b/gnu/CORBA/gnuContextList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuEnvironment.java b/gnu/CORBA/gnuEnvironment.java
index f470c95c0..ba02e3b19 100644
--- a/gnu/CORBA/gnuEnvironment.java
+++ b/gnu/CORBA/gnuEnvironment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuExceptionList.java b/gnu/CORBA/gnuExceptionList.java
index 55a9cc19e..b684ec928 100644
--- a/gnu/CORBA/gnuExceptionList.java
+++ b/gnu/CORBA/gnuExceptionList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuNVList.java b/gnu/CORBA/gnuNVList.java
index e423df3b4..e436c332c 100644
--- a/gnu/CORBA/gnuNVList.java
+++ b/gnu/CORBA/gnuNVList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuNamedValue.java b/gnu/CORBA/gnuNamedValue.java
index eda91df2c..6e3c271c9 100644
--- a/gnu/CORBA/gnuNamedValue.java
+++ b/gnu/CORBA/gnuNamedValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuRequest.java b/gnu/CORBA/gnuRequest.java
index 745b350d5..cbff17f69 100644
--- a/gnu/CORBA/gnuRequest.java
+++ b/gnu/CORBA/gnuRequest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,25 +51,27 @@ import org.omg.CORBA.ARG_OUT;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_INV_ORDER;
import org.omg.CORBA.Bounds;
+import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.Context;
import org.omg.CORBA.ContextList;
import org.omg.CORBA.Environment;
import org.omg.CORBA.ExceptionList;
import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.NO_RESOURCES;
import org.omg.CORBA.NVList;
import org.omg.CORBA.NamedValue;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Request;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.TypeCode;
-import org.omg.CORBA.UserException;
+import org.omg.CORBA.UnknownUserException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.net.BindException;
import java.net.Socket;
-import org.omg.CORBA.UnknownUserException;
/**
* The implementation of the CORBA request.
@@ -86,9 +88,23 @@ public class gnuRequest
public static Version MAX_SUPPORTED = new Version(1, 2);
/**
- * The request reading buffer size.
+ * The initial pause that the Request makes when
+ * the required port is not available.
+ */
+ public static int PAUSE_INITIAL = 50;
+
+ /**
+ * The number of repretetive attempts to get a required
+ * port, if it is not immediately available.
*/
- public static final int READ_BUFFER_SIZE = 2048;
+ public static int PAUSE_STEPS = 12;
+
+ /**
+ * The maximal pausing interval between two repetetive attempts.
+ * The interval doubles after each unsuccessful attempt, but
+ * will not exceed this value.
+ */
+ public static int PAUSE_MAX = 1000;
/**
* The empty byte array.
@@ -196,6 +212,11 @@ public class gnuRequest
}
/**
+ * Used when redirecting request to another target.
+ */
+ gnuRequest redirected;
+
+ /**
* Get the IOR data, sufficient to find the invocation target.
*
* @return the IOR data.
@@ -648,9 +669,54 @@ public class gnuRequest
// Now the message size is available.
header.message_size = request_part.buffer.size();
+ Socket socket = null;
+
+ java.lang.Object key = ior.Internet.host + ":" + ior.Internet.port;
+
+ synchronized (SocketRepository.class)
+ {
+ socket = SocketRepository.get_socket(key);
+ }
+
try
{
- Socket socket = new Socket(ior.Internet.host, ior.Internet.port);
+ long pause = PAUSE_INITIAL;
+
+ if (socket == null)
+ {
+ // The BindException may be thrown under very heavy parallel
+ // load. For some time, just wait, exceptiong the socket to free.
+ Open:
+ for (int i = 0; i < PAUSE_STEPS; i++)
+ {
+ try
+ {
+ socket = new Socket(ior.Internet.host, ior.Internet.port);
+ break Open;
+ }
+ catch (BindException ex)
+ {
+ try
+ {
+ // Expecting to free a socket via finaliser.
+ System.gc();
+ Thread.sleep(pause);
+ pause = pause * 2;
+ if (pause > PAUSE_MAX)
+ pause = PAUSE_MAX;
+ }
+ catch (InterruptedException iex)
+ {
+ }
+ }
+ }
+ }
+
+ if (socket == null)
+ throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port +
+ " in use"
+ );
+ socket.setKeepAlive(true);
OutputStream socketOutput = socket.getOutputStream();
@@ -674,16 +740,37 @@ public class gnuRequest
{
n += socketInput.read(r, n, r.length - n);
}
- socketInput.close();
return new binaryReply(orb, response_header, r);
}
else
return EMPTY;
}
- catch (IOException ex1)
+ catch (IOException io_ex)
+ {
+ MARSHAL m =
+ new MARSHAL("Unable to open a socket at " + ior.Internet.host + ":" +
+ ior.Internet.port, 10000 + ior.Internet.port,
+ CompletionStatus.COMPLETED_NO
+ );
+ m.initCause(io_ex);
+ throw m;
+ }
+ finally
{
- ex1.printStackTrace();
- return null;
+ try
+ {
+ if (socket != null && !socket.isClosed())
+ {
+ socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS);
+ SocketRepository.put_socket(key, socket);
+ }
+ }
+ catch (IOException scx)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(scx);
+ throw ierr;
+ }
}
}
@@ -754,8 +841,6 @@ public class gnuRequest
// The stream must be aligned sinve v1.2, but only once.
boolean align = response.header.version.since_inclusive(1, 2);
- boolean moved_permanently = false;
-
switch (rh.reply_status)
{
case ReplyHeader.NO_EXCEPTION :
@@ -843,16 +928,21 @@ public class gnuRequest
}
catch (IOException ex)
{
- throw new MARSHAL(ex + " while reading the forwarding info");
+ new MARSHAL("Cant read forwarding info", 5103,
+ CompletionStatus.COMPLETED_NO
+ );
}
setIor(forwarded);
+
// Repeat with the forwarded information.
p_invoke();
return;
default :
- throw new MARSHAL("Unknow reply status: " + rh.reply_status);
+ throw new MARSHAL("Unknow reply status", 8100 + rh.reply_status,
+ CompletionStatus.COMPLETED_NO
+ );
}
}
@@ -864,10 +954,10 @@ public class gnuRequest
*
* @throws MARSHAL if the attempt to write the parameters has failde.
*/
- private void write_parameter_buffer(MessageHeader header,
- cdrBufOutput request_part
- )
- throws MARSHAL
+ protected void write_parameter_buffer(MessageHeader header,
+ cdrBufOutput request_part
+ )
+ throws MARSHAL
{
try
{
@@ -891,8 +981,10 @@ public class gnuRequest
*
* @throws MARSHAL if the attempt to write the parameters has failde.
*/
- private void write_parameters(MessageHeader header, cdrBufOutput request_part)
- throws MARSHAL
+ protected void write_parameters(MessageHeader header,
+ cdrBufOutput request_part
+ )
+ throws MARSHAL
{
// Align after 1.2, but only once.
boolean align = header.version.since_inclusive(1, 2);
@@ -919,7 +1011,9 @@ public class gnuRequest
}
catch (Bounds ex)
{
- throw new MARSHAL("Unable to write method arguments to CDR output.");
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
}
}
-}
+} \ No newline at end of file
diff --git a/gnu/CORBA/holderFactory.java b/gnu/CORBA/holderFactory.java
index 17e0a68e5..177797a9c 100644
--- a/gnu/CORBA/holderFactory.java
+++ b/gnu/CORBA/holderFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -177,7 +177,6 @@ public class holderFactory
}
catch (Exception ex)
{
- ex.printStackTrace();
return null;
}
}
diff --git a/gnu/CORBA/primitiveArrayTypeCode.java b/gnu/CORBA/primitiveArrayTypeCode.java
index 6a4864033..7e2beebc9 100644
--- a/gnu/CORBA/primitiveArrayTypeCode.java
+++ b/gnu/CORBA/primitiveArrayTypeCode.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/primitiveTypeCode.java b/gnu/CORBA/primitiveTypeCode.java
index d240c9aee..1fa5cd09f 100644
--- a/gnu/CORBA/primitiveTypeCode.java
+++ b/gnu/CORBA/primitiveTypeCode.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/recordTypeCode.java b/gnu/CORBA/recordTypeCode.java
index 1e34b9aa3..8f2ecde7d 100644
--- a/gnu/CORBA/recordTypeCode.java
+++ b/gnu/CORBA/recordTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/recursiveTypeCode.java b/gnu/CORBA/recursiveTypeCode.java
index 1fbae2401..6bc672e6e 100644
--- a/gnu/CORBA/recursiveTypeCode.java
+++ b/gnu/CORBA/recursiveTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/streamReadyHolder.java b/gnu/CORBA/streamReadyHolder.java
index db35495c0..a777bd555 100644
--- a/gnu/CORBA/streamReadyHolder.java
+++ b/gnu/CORBA/streamReadyHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/streamRequest.java b/gnu/CORBA/streamRequest.java
index 5b63ca88e..a0f7eb099 100644
--- a/gnu/CORBA/streamRequest.java
+++ b/gnu/CORBA/streamRequest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/stringTypeCode.java b/gnu/CORBA/stringTypeCode.java
index 40adffaff..27aa119f3 100644
--- a/gnu/CORBA/stringTypeCode.java
+++ b/gnu/CORBA/stringTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/stubFinder.java b/gnu/CORBA/stubFinder.java
index 3aff84133..77efd0047 100644
--- a/gnu/CORBA/stubFinder.java
+++ b/gnu/CORBA/stubFinder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/typeNamer.java b/gnu/CORBA/typeNamer.java
index ec3cf6e97..8b701015e 100644
--- a/gnu/CORBA/typeNamer.java
+++ b/gnu/CORBA/typeNamer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/universalHolder.java b/gnu/CORBA/universalHolder.java
index 1a5226c3e..6d8b77472 100644
--- a/gnu/CORBA/universalHolder.java
+++ b/gnu/CORBA/universalHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/Configuration.java.in b/gnu/classpath/Configuration.java.in
index 27c36ddc3..569ccf541 100644
--- a/gnu/classpath/Configuration.java.in
+++ b/gnu/classpath/Configuration.java.in
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -80,33 +80,6 @@ public interface Configuration
boolean INIT_LOAD_LIBRARY = @INIT_LOAD_LIBRARY@;
/**
- * Set to true if the VM provides a native method to implement
- * Proxy.getProxyClass completely, including argument verification.
- * If this is true, HAVE_NATIVE_GET_PROXY_DATA and
- * HAVE_NATIVE_GENERATE_PROXY_CLASS should be false.
- * @see java.lang.reflect.Proxy
- */
- boolean HAVE_NATIVE_GET_PROXY_CLASS = false;
-
- /**
- * Set to true if the VM provides a native method to implement
- * the first part of Proxy.getProxyClass: generation of the array
- * of methods to convert, and verification of the arguments.
- * If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
- * @see java.lang.reflect.Proxy
- */
- boolean HAVE_NATIVE_GET_PROXY_DATA = false;
-
- /**
- * Set to true if the VM provides a native method to implement
- * the second part of Proxy.getProxyClass: conversion of an array of
- * methods into an actual proxy class.
- * If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
- * @see java.lang.reflect.Proxy
- */
- boolean HAVE_NATIVE_GENERATE_PROXY_CLASS = false;
-
- /**
* Name of default AWT peer library.
*/
String default_awt_peer_toolkit = "@default_toolkit@";
diff --git a/gnu/classpath/ObjectPool.java b/gnu/classpath/ObjectPool.java
new file mode 100644
index 000000000..dd7510c72
--- /dev/null
+++ b/gnu/classpath/ObjectPool.java
@@ -0,0 +1,250 @@
+/* ObjectPool.java -- A generic object pool.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath;
+
+import java.util.HashMap;
+import java.util.Stack;
+
+/**
+ * A generic object pool that can be used to cache frequently used
+ * objects. Typical examples are 'throwaway' objects like java.awt.Dimension
+ * java.awt.Rectangle and java.awt.Point of which are created plenty in
+ * Swing but that usually have a very short lifecycle. For such objects
+ * it is much more efficient to hold them in an object pool, because the
+ * overhead of allocating heap and garbage collecting is avoided.
+ * <p>
+ * To use this pool you have to do 3 steps:
+ * <ol>
+ * <li>Get a reference to the (singleton) ObjectPool instance.</li>
+ * <li>Get a reference to an object of the correct type; Do something with it
+ * </li>
+ * <li>After use, return the object back to the pool.</li>
+ * </ol>
+ * Note that you should never make any assumptions about the state of such
+ * an object, you are responsible to take care of this before you use the
+ * object.
+ * </p><p>
+ * If a requested object is not available in the pool, then a new instance
+ * is created. It is therefore only possible to pool objects that have
+ * a zero-argument default constructor.
+ * </p><p>
+ * Example (using a java.awt.Point object):
+ * <pre>
+ * ObjectPool pool = ObjectPool.getInstance();
+ * Point point = (Point) pool.borrowObject(Point.class);
+ * doSomething(point);
+ * pool.returnObject(point);
+ * </pre>
+ *
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+public final class ObjectPool
+{
+
+ /** The maximum number of instances that we keep for each type. */
+ private static final int MAX_POOL_SIZE = 128;
+
+ /** This flag turns on/off caching (for benchmarking purposes). */
+ private static final boolean IS_CACHING = true;
+
+ /** The only instance of ObjectPool. */
+ private static ObjectPool instance;
+
+ /**
+ * The object pool. This maps Class objects (the type of the pooled objects)
+ * to Collections that contain the pooled instances. If there is no such
+ * mapping or the mapped COllection is empty, then no instance of the
+ * requested type is in the pool.
+ */
+ private HashMap pool;
+
+ /**
+ * Collect some stats in this fields. TODO: Can be removed later.
+ */
+ int created = 0;
+ int requested = 0;
+ int returned = 0;
+ int pooled = 0;
+
+ /**
+ * Creates a new instance of ObjectPool. This constructor is made private
+ * because it is an Singleton class. Use {@link #getInstance()} to
+ * get a reference to an ObjectPool.
+ */
+ private ObjectPool() {
+ pool = new HashMap();
+ }
+
+ /**
+ * Returns the ObjectPool that is used in this VM.
+ *
+ * @return an ObjectPool instance ready for use
+ */
+ public static synchronized ObjectPool getInstance()
+ {
+ if (instance == null)
+ instance = new ObjectPool();
+ return instance;
+ }
+
+ /**
+ * Return an instance of the specified type. If no such instance is available
+ * in the pool, then one is created using the zero argument default
+ * constructor.
+ *
+ * @param type the type of the requested object
+ *
+ * @return an object of the specified type, or <code>null</code> if there
+ * is no such object in the pool and an object of this type cannot
+ * be instantiated, like when the class does not provide a default
+ * constructor or it is not accessible
+ */
+ public Object borrowObject(Class type)
+ {
+ // This is only here for benchmarking purposes.
+ if (!IS_CACHING)
+ return createObject(type);
+ // Counts the requested objects. This is only here for benchmarking
+ // purposes.
+ requested++;
+ if (requested % 10000 == 0)
+ printStats();
+
+
+ Object object = null;
+ Stack pooledInstances = null;
+ synchronized (this)
+ {
+ pooledInstances = (Stack) pool.get(type);
+ }
+ if (pooledInstances == null)
+ object = createObject(type);
+ else
+ if (pooledInstances.size() == 0)
+ object = createObject(type);
+ else
+ synchronized (this)
+ {
+ object = pooledInstances.pop();
+ }
+ return object;
+ }
+
+ /**
+ * Returns an instance back into the pool.
+ *
+ * @param object the object that is returned into the pool
+ */
+ public void returnObject(Object object)
+ {
+ // This is only here for benchmarking purposes.
+ if (!IS_CACHING)
+ return;
+ // Count the returned objects. This is only here for benchmarking purposes.
+ returned++;
+
+ Class type = object.getClass();
+ Stack pooledInstances = null;
+ synchronized (this)
+ {
+ pooledInstances = (Stack) pool.get(type);
+ }
+ if (pooledInstances == null)
+ {
+ pooledInstances = new Stack();
+ }
+ if (pooledInstances.size() < MAX_POOL_SIZE)
+ synchronized (this)
+ {
+ pool.put(type, pooledInstances);
+
+ // Count the objects that are actually pooled. This is only
+ // here for benchmarking purposes.
+ pooled++;
+ }
+
+ synchronized (this)
+ {
+ pooledInstances.push(object);
+ }
+ }
+
+ /**
+ * Creates a new instance of the specified type.
+ *
+ * @param type the type of the requested object
+ *
+ * @return an instance of that type or <code>null</code> if the object
+ * cannot be instantiated for some reason
+ */
+ private Object createObject(Class type)
+ {
+ // Counts the objects that are created here. This is only here for
+ // benchmarking purposes.
+ created++;
+
+
+ Object object = null;
+ try
+ {
+ object = type.newInstance();
+ }
+ catch (InstantiationException ex)
+ {
+ // We return null if the object cannot be instantiated.
+ }
+ catch (IllegalAccessException ex)
+ {
+ // We return null if the object cannot be instantiated.
+ }
+ return object;
+ }
+
+ /**
+ * This method prints out some stats about the object pool. This gives
+ * an indication on how efficiently the pool is used.
+ */
+ void printStats()
+ {
+ System.err.println("Requested Objects: " + requested);
+ System.err.println("Returned Objects: " + returned);
+ System.err.println("Created Objects: " + created);
+ System.err.println("Pooled Objects: " + pooled);
+ }
+}
diff --git a/gnu/classpath/RawData.java b/gnu/classpath/RawData.java
index da3e23b9b..3ce97482c 100644
--- a/gnu/classpath/RawData.java
+++ b/gnu/classpath/RawData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/RawData32.java b/gnu/classpath/RawData32.java
index 0c5df1726..c77163152 100644
--- a/gnu/classpath/RawData32.java
+++ b/gnu/classpath/RawData32.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/RawData64.java b/gnu/classpath/RawData64.java
index 38c70f05b..e3b6a93e2 100644
--- a/gnu/classpath/RawData64.java
+++ b/gnu/classpath/RawData64.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/ServiceFactory.java b/gnu/classpath/ServiceFactory.java
index e2faef9e3..711a9042c 100644
--- a/gnu/classpath/ServiceFactory.java
+++ b/gnu/classpath/ServiceFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/ServiceProviderLoadingAction.java b/gnu/classpath/ServiceProviderLoadingAction.java
index 4832c9712..b5e59cb4b 100644
--- a/gnu/classpath/ServiceProviderLoadingAction.java
+++ b/gnu/classpath/ServiceProviderLoadingAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/SystemProperties.java b/gnu/classpath/SystemProperties.java
index 5d43dce28..17f8ebdb7 100644
--- a/gnu/classpath/SystemProperties.java
+++ b/gnu/classpath/SystemProperties.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -106,6 +106,12 @@ public class SystemProperties
if (defaultProperties.get("file.encoding") == null)
defaultProperties.put("file.encoding", "8859_1");
+ // Default to the Swing FocusManager so that the old-style Swing API
+ // for FocusManager can be supported without hardcoding it in AWT.
+ if (defaultProperties.get("gnu.java.awt.FocusManager") == null)
+ defaultProperties.put("gnu.java.awt.FocusManager",
+ "gnu.java.awt.FocusManager");
+
// XXX FIXME - Temp hack for old systems that set the wrong property
if (defaultProperties.get("java.io.tmpdir") == null)
defaultProperties.put("java.io.tmpdir",
diff --git a/gnu/classpath/debug/Component.java b/gnu/classpath/debug/Component.java
new file mode 100644
index 000000000..3dfc8927b
--- /dev/null
+++ b/gnu/classpath/debug/Component.java
@@ -0,0 +1,159 @@
+/* Component.java -- a component log level.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is a part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under terms
+of your choice, provided that you also meet, for each linked independent
+module, the terms and conditions of the license of that module. An
+independent module is a module which is not derived from or based on
+this library. If you modify this library, you may extend this exception
+to your version of the library, but you are not obligated to do so. If
+you do not wish to do so, delete this exception statement from your
+version. */
+
+
+package gnu.classpath.debug;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.logging.Level;
+
+public final class Component extends Level
+{
+
+ /*
+ * HOW TO ADD NEW COMPONENTS:
+ *
+ * If you want to add a new, simple component, that you will use in
+ * logging statements, simply create a new class variable that
+ * instantiates this class, and choose an appropriate string name
+ * and a integer constant not used by any other component level.
+ *
+ * For example, if my component had to do with 'frobbing', I would
+ * add this entry below:
+ *
+ * private static final Component FROBBING = new Component ("FROBBING", 7);
+ *
+ * Then, I would update the component 'EVERYTHING' to have and end
+ * index ONE GREATER THAN the index of the new component.
+ *
+ * ADDING NEW COMPONENT CLASSES:
+ *
+ * A "component class" is a run of more than one component, which can
+ * be enabled all at once. EVERYTHING and SSL are examples of component
+ * classes. To add a new class, create a new component with a start index
+ * equal to the index of the first member component, and with an end
+ * index equal to the index of the last member component plus one.
+ */
+
+ /**
+ * Signifies that everything should be logged. This should be used to
+ * enable or disable levels only; logging code should not use it.
+ */
+ public static final Component EVERYTHING = new Component ("*", 0, 7);
+
+ /**
+ * Signifies that all SSL related messages should be logged. This should
+ * be used to enable or disable levels only; logging code should not use
+ * it.
+ */
+ public static final Component SSL = new Component ("SSL", 0, 5);
+
+ /**
+ * Traces the progression of an SSL handshake.
+ */
+ public static final Component SSL_HANDSHAKE = new Component ("SSL HANDSHAKE", 0);
+
+ /**
+ * Traces the application messages during SSL communications.
+ */
+ public static final Component SSL_APPLICATION = new Component ("SSL APPLICATION", 1);
+
+ /**
+ * Trace details about the SSL key exchange.
+ */
+ public static final Component SSL_KEY_EXCHANGE = new Component ("SSL KEY EXCHANGE", 2);
+
+ /* Indices 3 and 4 reserved for future use by SSL components. */
+
+ /**
+ * Trace the operation of cryptographic primitives.
+ */
+ public static final Component CRYPTO = new Component ("CRYPTO", 5);
+
+ /**
+ * Trace the parsing of X.509 certificates and related objects.
+ */
+ public static final Component X509 = new Component ("X.509", 6);
+
+ private final int startIndex;
+ private final int endIndex;
+
+ private Component (final String name, final int bitIndex)
+ {
+ this (name, bitIndex, bitIndex + 1);
+ }
+
+ private Component (final String name, final int startIndex, final int endIndex)
+ {
+ super (name, Level.FINE.intValue ());
+ this.startIndex = startIndex;
+ this.endIndex = endIndex;
+ }
+
+ /**
+ * Return the component for the given name.
+ *
+ * @param name The name of the component to get.
+ * @return The named component, or null if there is no such component.
+ */
+ public static Component forName (final String name)
+ {
+ try
+ {
+ Field f = Component.class.getField (name.toUpperCase ());
+ if (!Modifier.isStatic (f.getModifiers ())
+ || Component.class.isAssignableFrom (f.getClass ()))
+ return null;
+ return (Component) f.get (null);
+ }
+ catch (Throwable _)
+ {
+ return null;
+ }
+ }
+
+ public int startIndex ()
+ {
+ return startIndex;
+ }
+
+ public int endIndex ()
+ {
+ return endIndex;
+ }
+} \ No newline at end of file
diff --git a/gnu/classpath/debug/PreciseFilter.java b/gnu/classpath/debug/PreciseFilter.java
new file mode 100644
index 000000000..7b88b2c8c
--- /dev/null
+++ b/gnu/classpath/debug/PreciseFilter.java
@@ -0,0 +1,105 @@
+/* PreciseFilter.java -- filter log messages by precise level.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is a part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under terms
+of your choice, provided that you also meet, for each linked independent
+module, the terms and conditions of the license of that module. An
+independent module is a module which is not derived from or based on
+this library. If you modify this library, you may extend this exception
+to your version of the library, but you are not obligated to do so. If
+you do not wish to do so, delete this exception statement from your
+version. */
+
+
+package gnu.classpath.debug;
+
+import java.util.BitSet;
+import java.util.logging.Filter;
+import java.util.logging.LogRecord;
+
+public final class PreciseFilter implements Filter
+{
+
+ /**
+ * The singleton filter instance.
+ */
+ public static final PreciseFilter GLOBAL = new PreciseFilter ();
+
+ private final BitSet enabled;
+
+ private PreciseFilter ()
+ {
+ enabled = new BitSet ();
+ }
+
+ /**
+ * Disable logging of a component.
+ *
+ * @param component The component to disable logging for.
+ * @throws NullPointerException If component is null.
+ */
+ public void disable (final Component component)
+ {
+ enabled.clear (component.startIndex (), component.endIndex ());
+ }
+
+ /**
+ * Enable logging of a component.
+ *
+ * @param component The component to enable logging for.
+ * @throws NullPointerException If component is null.
+ */
+ public void enable (final Component component)
+ {
+ enabled.set (component.startIndex (), component.endIndex ());
+ }
+
+ /**
+ * Tell if a component is enabled for logging.
+ *
+ * @param component The component to test.
+ * @return True iff the specified component is enabled for logging.
+ * @throws NullPointerException If component is null.
+ */
+ public boolean isEnabled (final Component component)
+ {
+ return (enabled.get (component.startIndex ()));
+ }
+
+ public boolean isLoggable (final LogRecord record)
+ {
+ try
+ {
+ return isEnabled ((Component) record.getLevel ());
+ }
+ catch (ClassCastException cce)
+ {
+ return true;
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/classpath/debug/SystemLogger.java b/gnu/classpath/debug/SystemLogger.java
new file mode 100644
index 000000000..94aa93f69
--- /dev/null
+++ b/gnu/classpath/debug/SystemLogger.java
@@ -0,0 +1,71 @@
+/* SystemLogger.java -- Classpath's system debugging logger.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is a part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under terms
+of your choice, provided that you also meet, for each linked independent
+module, the terms and conditions of the license of that module. An
+independent module is a module which is not derived from or based on
+this library. If you modify this library, you may extend this exception
+to your version of the library, but you are not obligated to do so. If
+you do not wish to do so, delete this exception statement from your
+version. */
+
+
+package gnu.classpath.debug;
+
+import gnu.classpath.SystemProperties;
+import java.util.StringTokenizer;
+import java.util.logging.Logger;
+
+public final class SystemLogger
+{
+ public static final Logger SYSTEM = Logger.getLogger ("gnu.classpath");
+
+ static
+ {
+ SYSTEM.setFilter (PreciseFilter.GLOBAL);
+
+ String defaults = SystemProperties.getProperty ("gnu.classpath.debug.components");
+
+ if (defaults != null)
+ {
+ StringTokenizer tok = new StringTokenizer (defaults, ",");
+ while (tok.hasMoreTokens ())
+ {
+ Component c = Component.forName (tok.nextToken ());
+ if (c != null)
+ PreciseFilter.GLOBAL.enable (c);
+ SYSTEM.log (java.util.logging.Level.INFO, "enabled: {0}", c);
+ }
+ }
+
+ java.util.logging.Handler[] h = SYSTEM.getHandlers ();
+ for (int i = 0; i < h.length; i++)
+ System.out.println (h[i]);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidClassException.java b/gnu/classpath/jdwp/exception/InvalidClassException.java
new file mode 100644
index 000000000..cd276be8c
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidClassException.java
@@ -0,0 +1,63 @@
+/* InvalidClassException.java -- invalid/unknown class reference id exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown by the JDWP back-end when an invalid reference
+ * type id is used by the debugger.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidClassException
+ extends JdwpException
+{
+ public InvalidClassException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_CLASS,
+ "invalid class id (" + id + ")");
+ }
+
+ public InvalidClassException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_CLASS, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidCountException.java b/gnu/classpath/jdwp/exception/InvalidCountException.java
new file mode 100644
index 000000000..d5f40c96b
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidCountException.java
@@ -0,0 +1,61 @@
+/* InvalidCountException -- an invalid count exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when a count filter is given an invalid count.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidCountException
+ extends JdwpException
+{
+ public InvalidCountException (int id)
+ {
+ super (JdwpConstants.Error.INVALID_COUNT, "invalid count (" + id + ")");
+ }
+
+ public InvalidCountException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_COUNT, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidEventTypeException.java b/gnu/classpath/jdwp/exception/InvalidEventTypeException.java
new file mode 100644
index 000000000..e0402283f
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidEventTypeException.java
@@ -0,0 +1,63 @@
+/* InvalidEventTypeException.java -- an invalid event kind exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when the debugger asks for an event request
+ * for a non-existant event
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidEventTypeException
+ extends JdwpException
+{
+ public InvalidEventTypeException (byte kind)
+ {
+ super (JdwpConstants.Error.INVALID_EVENT_TYPE,
+ "invalid event type (" + kind + ")");
+ }
+
+ public InvalidEventTypeException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_EVENT_TYPE, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidObjectException.java b/gnu/classpath/jdwp/exception/InvalidObjectException.java
new file mode 100644
index 000000000..49e8ac1e5
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidObjectException.java
@@ -0,0 +1,63 @@
+/* InvalidObjectException.java -- an invalid object id exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when an invalid object id is used by
+ * the debugger
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidObjectException
+ extends JdwpException
+{
+ public InvalidObjectException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_OBJECT,
+ "invalid object id (" + id + ")");
+ }
+
+ public InvalidObjectException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_OBJECT, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidStringException.java b/gnu/classpath/jdwp/exception/InvalidStringException.java
new file mode 100644
index 000000000..c84a960f1
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidStringException.java
@@ -0,0 +1,68 @@
+/* InvalidStringException.java -- an invalid string exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when the debugger uses an invalid String.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidStringException
+ extends JdwpException
+{
+ public InvalidStringException (String str)
+ {
+ super (JdwpConstants.Error.INVALID_STRING,
+ "invalid string (" + str + ")");
+ }
+
+ public InvalidStringException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_STRING,
+ "invalid string id (" + id + ")");
+ }
+
+ public InvalidStringException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_STRING, t);
+ }
+}
diff --git a/gnu/java/awt/EmbeddedWindowSupport.java b/gnu/classpath/jdwp/exception/InvalidThreadException.java
index 3018f469f..985b1a791 100644
--- a/gnu/java/awt/EmbeddedWindowSupport.java
+++ b/gnu/classpath/jdwp/exception/InvalidThreadException.java
@@ -1,5 +1,5 @@
-/* EmbeddedWindowSupport.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+/* InvalidThreadException.java -- an invalid thread exception
+ Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -28,6 +28,7 @@ permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
@@ -36,30 +37,27 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.awt;
+package gnu.classpath.jdwp.exception;
-import gnu.java.awt.peer.EmbeddedWindowPeer;
+import gnu.classpath.jdwp.JdwpConstants;
/**
- * Declares a method for creating native embedded window peers.
- *
- * All classes inherited from java.awt.Toolkit that implement this
- * interface are assumed to support the creation of embedded window
- * peers. To create an embedded window, use
- * gnu.java.awt.EmbeddedWindow.
- *
- * @see gnu.java.awt.EmbeddedWindow
- * @see java.awt.Toolkit
+ * An exception thrown when an invalid thread is used
+ * by the debugger
*
- * @author Michael Koch (konqueror@gmx.de)
+ * @author Keith Seitz (keiths@redhat.com)
*/
-public interface EmbeddedWindowSupport
+public class InvalidThreadException
+ extends JdwpException
{
- /**
- * Creates an embedded window peer, and associates it with an
- * EmbeddedWindow object.
- *
- * @param w The embedded window with which to associate a peer.
- */
- EmbeddedWindowPeer createEmbeddedWindow (EmbeddedWindow w);
+ public InvalidThreadException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_THREAD,
+ "invalid thread id (" + id + ")");
+ }
+
+ public InvalidThreadException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_THREAD, t);
+ }
}
diff --git a/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java b/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java
new file mode 100644
index 000000000..047621892
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java
@@ -0,0 +1,63 @@
+/* InvalidThreadGroupException.java -- an invalid thread group exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when an invalid thread group is used
+ * by the debugger
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidThreadGroupException
+ extends JdwpException
+{
+ public InvalidThreadGroupException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_THREAD_GROUP,
+ "invalid thread id (" + id + ")");
+ }
+
+ public InvalidThreadGroupException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_THREAD, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/JdwpException.java b/gnu/classpath/jdwp/exception/JdwpException.java
new file mode 100644
index 000000000..5c96cc56b
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/JdwpException.java
@@ -0,0 +1,86 @@
+/* JdwpException.java -- an exception base class for all JDWP exceptions
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+/**
+ * A base class exception for all JDWP back-end exceptions
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class JdwpException
+ extends Exception
+{
+ // The integer error code defined by JDWP
+ private short _errorCode;
+
+ /**
+ * Constructs a new <code>JdwpException</code> with the
+ * given error code and given cause
+ *
+ * @param code the JDWP error code
+ * @param t the cause of the exception
+ */
+ public JdwpException (short code, Throwable t)
+ {
+ super (t);
+ _errorCode = code;
+ }
+
+ /**
+ * Constructs a new <code>JdwpException</code> with the
+ * given error code and string error message
+ *
+ * @param code the JDWP error code
+ * @param str an error message
+ */
+ public JdwpException (short code, String str)
+ {
+ super (str);
+ _errorCode = code;
+ }
+
+ /**
+ * Returns the JDWP error code represented by this exception
+ */
+ public short getErrorCode ()
+ {
+ return _errorCode;
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java b/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java
new file mode 100644
index 000000000..c022dc537
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java
@@ -0,0 +1,57 @@
+/* JdwpInternalErrorException.java -- an internal error exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown by the JDWP back-end when an unusual runtime
+ * error occurs internally
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class JdwpInternalErrorException
+ extends JdwpException
+{
+ public JdwpInternalErrorException (Throwable cause)
+ {
+ super (JdwpConstants.Error.INTERNAL, cause);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/NotImplementedException.java b/gnu/classpath/jdwp/exception/NotImplementedException.java
new file mode 100644
index 000000000..fba627ea2
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/NotImplementedException.java
@@ -0,0 +1,58 @@
+/* NotImplementedException.java -- an exception for unimplemented JDWP
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown by virtual machines when functionality
+ * or features are not implemented
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class NotImplementedException
+ extends JdwpException
+{
+ public NotImplementedException (String feature)
+ {
+ super (JdwpConstants.Error.NOT_IMPLEMENTED,
+ feature + " is not yet implemented");
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/VmDeadException.java b/gnu/classpath/jdwp/exception/VmDeadException.java
new file mode 100644
index 000000000..f3c4a152b
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/VmDeadException.java
@@ -0,0 +1,55 @@
+/* VmDeadException.java -- dead virtual machine exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when the virtual machine is dead
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class VmDeadException
+ extends JdwpException
+{
+ public VmDeadException ()
+ {
+ super (JdwpConstants.Error.VM_DEAD, "Virtual machine is dead");
+ }
+}
diff --git a/gnu/javax/swing/plaf/gtk/GtkCheckBoxUI.java b/gnu/classpath/jdwp/id/ArrayId.java
index c50b20bfa..cd428a172 100644
--- a/gnu/javax/swing/plaf/gtk/GtkCheckBoxUI.java
+++ b/gnu/classpath/jdwp/id/ArrayId.java
@@ -1,5 +1,5 @@
-/* GtkCheckBoxUI.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
+/* ArrayId.java -- array object IDs
+ Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -28,6 +28,7 @@ permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
@@ -35,35 +36,27 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
/**
+ * A class which represents a JDWP array id
*
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
+ * @author Keith Seitz <keiths@redhat.com>
*/
-public class GtkCheckBoxUI extends GtkRadioButtonUI
+public class ArrayId
+ extends ObjectId
{
- public GtkCheckBoxUI()
- {
- super();
- }
-
- public static ComponentUI createUI(JComponent c)
- {
- return new GtkCheckBoxUI();
- }
-
- public String getPropertyPrefix()
- {
- // FIXME
- System.err.println(super.getPropertyPrefix());
- return super.getPropertyPrefix();
- }
+ // Arrays are handled a little differently than other IDs
+ //public static final Class typeClass = UNDEFINED
+
+ /**
+ * Constructs a new <code>ArrayId</code>
+ */
+ public ArrayId ()
+ {
+ super (JdwpConstants.Tag.ARRAY);
+ }
}
-
diff --git a/gnu/classpath/jdwp/id/ArrayReferenceTypeId.java b/gnu/classpath/jdwp/id/ArrayReferenceTypeId.java
new file mode 100644
index 000000000..14a73dc5b
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ArrayReferenceTypeId.java
@@ -0,0 +1,59 @@
+/* ArrayReferenceTypeId.java -- array reference type ids
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A reference type ID representing java arrays
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ArrayReferenceTypeId
+ extends ReferenceTypeId
+{
+ /**
+ * Constructs a new <code>ArrayReferenceTypeId</code>
+ */
+ public ArrayReferenceTypeId ()
+ {
+ super (JdwpConstants.TypeTag.ARRAY);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ClassLoaderId.java b/gnu/classpath/jdwp/id/ClassLoaderId.java
new file mode 100644
index 000000000..133872566
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ClassLoaderId.java
@@ -0,0 +1,64 @@
+/* ClassLoaderId.java -- class loader IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP thread id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ClassLoaderId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = ClassLoader.class;
+
+ /**
+ * Constructs a new <code>ClassLoaderId</code>
+ */
+ public ClassLoaderId ()
+ {
+ super (JdwpConstants.Tag.CLASS_LOADER);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ClassObjectId.java b/gnu/classpath/jdwp/id/ClassObjectId.java
new file mode 100644
index 000000000..e5559ce10
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ClassObjectId.java
@@ -0,0 +1,64 @@
+/* ClassObjectId.java -- class object IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP class object id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ClassObjectId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = Class.class;
+
+ /**
+ * Constructs a new <code>ClassObjectId</code>
+ */
+ public ClassObjectId ()
+ {
+ super (JdwpConstants.Tag.CLASS_OBJECT);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ClassReferenceTypeId.java b/gnu/classpath/jdwp/id/ClassReferenceTypeId.java
new file mode 100644
index 000000000..6b57673f8
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ClassReferenceTypeId.java
@@ -0,0 +1,59 @@
+/* ClassReferenceTypeId.java -- class reference type ids
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A reference type ID representing java classes
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ClassReferenceTypeId
+ extends ReferenceTypeId
+{
+ /**
+ * Constructs a new <code>ClassReferenceTypeId</code>
+ */
+ public ClassReferenceTypeId ()
+ {
+ super (JdwpConstants.TypeTag.CLASS);
+ }
+}
diff --git a/gnu/javax/swing/plaf/gtk/GtkRadioButtonUI.java b/gnu/classpath/jdwp/id/InterfaceReferenceTypeId.java
index b0b064e8d..bdbd6b6eb 100644
--- a/gnu/javax/swing/plaf/gtk/GtkRadioButtonUI.java
+++ b/gnu/classpath/jdwp/id/InterfaceReferenceTypeId.java
@@ -1,5 +1,5 @@
-/* GtkRadioButtonUI.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
+/* InterfaceReferenceTypeId.java -- interface reference type ids
+ Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -28,6 +28,7 @@ permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
@@ -35,35 +36,24 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
/**
+ * A reference type ID representing java interfaces
*
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
+ * @author Keith Seitz <keiths@redhat.com>
*/
-public class GtkRadioButtonUI extends BasicRadioButtonUI
+public class InterfaceReferenceTypeId
+ extends ReferenceTypeId
{
- public GtkRadioButtonUI()
- {
- super();
- }
-
- public static ComponentUI createUI(JComponent c)
- {
- return new GtkRadioButtonUI();
- }
-
- public String getPropertyPrefix()
- {
- // FIXME
- System.err.println(super.getPropertyPrefix());
- return super.getPropertyPrefix();
- }
+ /**
+ * Constructs a new <code>InterfaceReferenceTypeId</code>
+ */
+ public InterfaceReferenceTypeId ()
+ {
+ super (JdwpConstants.TypeTag.INTERFACE);
+ }
}
-
diff --git a/gnu/classpath/jdwp/id/JdwpId.java b/gnu/classpath/jdwp/id/JdwpId.java
new file mode 100644
index 000000000..37f82e208
--- /dev/null
+++ b/gnu/classpath/jdwp/id/JdwpId.java
@@ -0,0 +1,127 @@
+/* JdwpId.java -- base class for all object ID types
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * A baseclass for all object types reported to the debugger
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public abstract class JdwpId
+{
+ /**
+ * ID assigned to this object
+ */
+ protected long _id;
+
+ /**
+ * Tag of ID's type (see {@link gnu.classpath.jdwp.JdwpConstants.Tag})
+ * for object-like IDs or the type tag (see {@link
+ * gnu.classpath.JdwpConstants.TypeTag}) for reference type IDs.
+ */
+ private byte _tag;
+
+ /**
+ * Constructs an empty <code>JdwpId</code>
+ */
+ public JdwpId (byte tag)
+ {
+ _tag = tag;
+ }
+
+ /**
+ * Sets the id for this object reference
+ */
+ void setId (long id)
+ {
+ _id = id;
+ }
+
+ /**
+ * Returns the id for this object reference
+ */
+ public long getId ()
+ {
+ return _id;
+ }
+
+ /**
+ * Compares two object ids for equality. Two object ids
+ * are equal if they point to the same type and contain to
+ * the same id number. (NOTE: This is a much stricter check
+ * than is necessary: all <code>JdwpId</code>s have unique
+ * ids.)
+ */
+ public boolean equals (JdwpId id)
+ {
+ return ((id.getClass () == getClass ()) && (id.getId () == getId ()));
+ }
+
+ /**
+ * Returns size of this type (used by IDSizes)
+ */
+ public abstract int size ();
+
+ /**
+ * Writes the contents of this type to the <code>DataOutputStream</code>
+ * @param outStream the <code>DataOutputStream</code> to use
+ * @throws IOException when an error occurs on the <code>OutputStream</code>
+ */
+ public abstract void write (DataOutputStream outStream)
+ throws IOException;
+
+ /**
+ * Writes the contents of this type to the output stream, preceded
+ * by a one-byte tag for tagged object IDs or type tag for
+ * reference type IDs.
+ *
+ * @param outStream the <code>DataOutputStream</code> to use
+ * @throws IOException when an error occurs on the <code>OutputStream</code>
+ */
+ public void writeTagged (DataOutputStream outStream)
+ throws IOException
+ {
+ outStream.writeByte (_tag);
+ write (outStream);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/JdwpIdFactory.java b/gnu/classpath/jdwp/id/JdwpIdFactory.java
new file mode 100644
index 000000000..06ec3c768
--- /dev/null
+++ b/gnu/classpath/jdwp/id/JdwpIdFactory.java
@@ -0,0 +1,165 @@
+/* JdwpIdFactory.java -- factory for generating type and object IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import java.util.HashMap;
+
+/**
+ * This factory generates ids for objects and types that may
+ * be sent to a debugger.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class JdwpIdFactory
+{
+ // ID of last object / referencetype
+ private static Object _idLock = new Object ();
+ private static Object _ridLock = new Object ();
+ private static long _lastId = 0;
+ private static long _lastRid = 0;
+
+ // A list of all ID types
+ private static HashMap _idList = new HashMap ();
+
+ // Initialize the id list with known types
+ static
+ {
+ // ObjectId and ArrayId are special cases. See newId.
+ _idList.put (ClassLoaderId.typeClass, ClassLoaderId.class);
+ _idList.put (ClassObjectId.typeClass, ClassObjectId.class);
+ //_idList.put (FieldId.typeClass, FieldId.class);
+ //_idList.put (FrameId.typeClass, FrameId.class);
+ //_idList.put (MethodId.typeClass, MethodId.class);
+ _idList.put (StringId.typeClass, StringId.class);
+ _idList.put (ThreadId.typeClass, ThreadId.class);
+ _idList.put (ThreadGroupId.typeClass, ThreadGroupId.class);
+ }
+
+ /**
+ * Returns a new id for the given object
+ *
+ * @param object the object for which an id is desired
+ * @returns a suitable object id
+ */
+ public static JdwpId newId (Object object)
+ {
+ JdwpId id = null;
+
+ // Special case: arrays
+ if (object.getClass ().isArray ())
+ id = new ArrayId ();
+ else
+ {
+ // Loop through all classes until we hit baseclass
+ Class myClass;
+ for (myClass = object.getClass (); myClass != null;
+ myClass = myClass.getSuperclass ())
+ {
+ Class clz = (Class) _idList.get (myClass);
+ if (clz != null)
+ {
+ try
+ {
+ id = (JdwpId) clz.newInstance ();
+ synchronized (_idLock)
+ {
+ id.setId (++_lastId);
+ }
+ return id;
+ }
+ catch (InstantiationException ie)
+ {
+ // This really should not happen
+ throw new RuntimeException ("cannot create new ID", ie);
+ }
+ catch (IllegalAccessException iae)
+ {
+ // This really should not happen
+ throw new RuntimeException ("illegal access of ID", iae);
+ }
+ }
+ }
+
+ /* getSuperclass returned null and no matching ID type found.
+ So it must derive from Object. */
+ id = new ObjectId ();
+ }
+
+ synchronized (_idLock)
+ {
+ id.setId (++_lastId);
+ }
+
+ return id;
+ }
+
+ /**
+ * Returns a new reference type id for the given class
+ *
+ * @param clazz the <code>Class</code> for which an id is desired
+ * @returns a suitable reference type id or <code>null</code>
+ */
+ public static ReferenceTypeId newReferenceTypeId (Class clazz)
+ {
+ ReferenceTypeId id = null;
+ try
+ {
+ if (clazz.isArray ())
+ id = new ArrayReferenceTypeId ();
+ else if (clazz.isInterface ())
+ id = new InterfaceReferenceTypeId ();
+ else
+ id = new ClassReferenceTypeId ();
+ synchronized (_ridLock)
+ {
+ id.setId (++_lastRid);
+ }
+ return id;
+ }
+ catch (InstantiationException ie)
+ {
+ return null;
+ }
+ catch (IllegalAccessException iae)
+ {
+ return null;
+ }
+ }
+}
diff --git a/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java b/gnu/classpath/jdwp/id/ObjectId.java
index 3051ecfcf..e34a3b59e 100644
--- a/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java
+++ b/gnu/classpath/jdwp/id/ObjectId.java
@@ -1,5 +1,5 @@
-/* GtkTextComponentPeer.java -- Implements TextComponentPeer with GTK
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* ObjectId.java -- object IDs
+ Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -28,6 +28,7 @@ permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
@@ -36,52 +37,63 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.awt.peer.gtk;
+package gnu.classpath.jdwp.id;
-import java.awt.Rectangle;
-import java.awt.TextComponent;
-import java.awt.event.TextEvent;
-import java.awt.peer.TextComponentPeer;
+import gnu.classpath.jdwp.JdwpConstants;
-public class GtkTextComponentPeer extends GtkComponentPeer
- implements TextComponentPeer
-{
- GtkTextComponentPeer (TextComponent tc)
- {
- super (tc);
+import java.io.DataOutputStream;
+import java.io.IOException;
- setText (tc.getText ());
- setCaretPosition(0);
- }
-
- public native void connectSignals ();
-
- public native int getCaretPosition ();
- public native void setCaretPosition (int pos);
- public native int getSelectionStart ();
- public native int getSelectionEnd ();
- public native String getText ();
- public native void select (int start, int end);
- public native void setEditable (boolean state);
- public native void setText (String text);
-
- public int getIndexAtPoint(int x, int y)
+/**
+ * A class which represents a JDWP object id for an object
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ObjectId
+ extends JdwpId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = Object.class;
+
+ /**
+ * Constructs a new <code>ObjectId</code>
+ */
+ public ObjectId ()
{
- return 0; // FIXME
+ super (JdwpConstants.Tag.OBJECT);
}
- public Rectangle getCharacterBounds (int pos)
+ /**
+ * Constructs a new <code>ObjectId</code> of the
+ * given type.
+ *
+ * @param tag the tag of this type of object ID
+ */
+ public ObjectId (byte tag)
{
- return null;
+ super (tag);
}
- public long filterEvents (long filter)
+ /**
+ * Returns the size of this id type
+ */
+ public int size ()
{
- return filter; // FIXME
+ return 8;
}
- protected void postTextEvent ()
+ /**
+ * Writes the id to the stream
+ *
+ * @param outStream the stream to which to write
+ * @throws IOException when an error occurs on the <code>OutputStream</code>
+ */
+ public void write (DataOutputStream outStream)
+ throws IOException
{
- q().postEvent (new TextEvent (awtComponent, TextEvent.TEXT_VALUE_CHANGED));
+ // All we need to do is write out our id as an 8-byte integer
+ outStream.writeLong (_id);
}
}
diff --git a/gnu/classpath/jdwp/id/ReferenceTypeId.java b/gnu/classpath/jdwp/id/ReferenceTypeId.java
new file mode 100644
index 000000000..cdb78040a
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ReferenceTypeId.java
@@ -0,0 +1,81 @@
+/* ReferenceTypeId.java -- a base class for all reference type IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Base class for reference type IDs. This class usurps
+ * <code>JdwpId</code>'s tag member for its own use (type tag).
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ReferenceTypeId
+ extends JdwpId
+{
+ /**
+ * Constructor used by {Array,Interface,Class}ReferenceTypeId
+ */
+ public ReferenceTypeId (byte tag)
+ {
+ super (tag);
+ }
+
+ /**
+ * Returns the size of this ID type
+ */
+ public int size ()
+ {
+ return 8;
+ }
+
+ /**
+ * Outputs the reference type ID to the given output stream
+ *
+ * @param outStream the stream to which to write the data
+ * @throws IOException for errors writing to the stream
+ */
+ public void write (DataOutputStream outStream)
+ throws IOException
+ {
+ outStream.writeLong (_id);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/StringId.java b/gnu/classpath/jdwp/id/StringId.java
new file mode 100644
index 000000000..ea1a83a56
--- /dev/null
+++ b/gnu/classpath/jdwp/id/StringId.java
@@ -0,0 +1,64 @@
+/* StringId.java -- string IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP string id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class StringId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = String.class;
+
+ /**
+ * Constructs a new <code>StringId</code>
+ */
+ public StringId ()
+ {
+ super (JdwpConstants.Tag.STRING);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ThreadGroupId.java b/gnu/classpath/jdwp/id/ThreadGroupId.java
new file mode 100644
index 000000000..aef7d5b54
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ThreadGroupId.java
@@ -0,0 +1,64 @@
+/* ThreadGroupId.java -- thread group IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP thread group id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ThreadGroupId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = ThreadGroup.class;
+
+ /**
+ * Constructs a new <code>ThreadGroupId</code>
+ */
+ public ThreadGroupId ()
+ {
+ super (JdwpConstants.Tag.THREAD_GROUP);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ThreadId.java b/gnu/classpath/jdwp/id/ThreadId.java
new file mode 100644
index 000000000..733bf5510
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ThreadId.java
@@ -0,0 +1,64 @@
+/* ThreadId.java -- thread IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP thread id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ThreadId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = Thread.class;
+
+ /**
+ * Constructs a new <code>ThreadId</code>
+ */
+ public ThreadId ()
+ {
+ super (JdwpConstants.Tag.THREAD);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
new file mode 100644
index 000000000..ffe709b83
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
@@ -0,0 +1,178 @@
+/* ArrayReferenceCommandSet.java -- class to implement the Array
+ Reference Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidObjectException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.util.Value;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ArrayReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ArrayReferenceCommandSet implements CommandSet
+{
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ArrayReference.LENGTH:
+ executeLength(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ArrayReference.GET_VALUES:
+ executeGetValues(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ArrayReference.SET_VALUES:
+ executeSetValues(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in Array Reference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeLength(ByteBuffer bb, DataOutputStream os)
+ throws InvalidObjectException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object array = oid.getObject();
+ os.writeInt(Array.getLength(array));
+ }
+
+ private void executeGetValues(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object array = oid.getObject();
+ int first = bb.getInt();
+ int length = bb.getInt();
+
+ // We need to write out the byte signifying the type of array first
+ Class clazz = array.getClass().getComponentType();
+
+ // Uugh, this is a little ugly but it's the only time we deal with
+ // arrayregions
+ if (clazz == byte.class)
+ os.writeByte(JdwpConstants.Tag.BYTE);
+ else if (clazz == char.class)
+ os.writeByte(JdwpConstants.Tag.CHAR);
+ else if (clazz == float.class)
+ os.writeByte(JdwpConstants.Tag.FLOAT);
+ else if (clazz == double.class)
+ os.writeByte(JdwpConstants.Tag.DOUBLE);
+ else if (clazz == int.class)
+ os.writeByte(JdwpConstants.Tag.BYTE);
+ else if (clazz == long.class)
+ os.writeByte(JdwpConstants.Tag.LONG);
+ else if (clazz == short.class)
+ os.writeByte(JdwpConstants.Tag.SHORT);
+ else if (clazz == void.class)
+ os.writeByte(JdwpConstants.Tag.VOID);
+ else if (clazz == boolean.class)
+ os.writeByte(JdwpConstants.Tag.BOOLEAN);
+ else if (clazz.isArray())
+ os.writeByte(JdwpConstants.Tag.ARRAY);
+ else if (String.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.STRING);
+ else if (Thread.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.THREAD);
+ else if (ThreadGroup.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.THREAD_GROUP);
+ else if (ClassLoader.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.CLASS_LOADER);
+ else if (Class.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.CLASS_OBJECT);
+ else
+ os.writeByte(JdwpConstants.Tag.OBJECT);
+
+ // Write all the values, primitives should be untagged and Objects must be
+ // tagged
+ for (int i = first; i < first + length; i++)
+ {
+ Object value = Array.get(array, i);
+ if (clazz.isPrimitive())
+ Value.writeUntaggedValue(os, value);
+ else
+ Value.writeTaggedValue(os, value);
+ }
+ }
+
+ private void executeSetValues(ByteBuffer bb, DataOutputStream os)
+ throws IOException, JdwpException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object array = oid.getObject();
+ int first = bb.getInt();
+ int length = bb.getInt();
+ Class type = array.getClass().getComponentType();
+ for (int i = first; i < first + length; i++)
+ {
+ Object value = Value.getUntaggedObj(bb, type);
+ Array.set(array, i, value);
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java b/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
new file mode 100644
index 000000000..91eba6183
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
@@ -0,0 +1,108 @@
+/* ArrayTypeCommandSet.java -- class to implement the ArrayType Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ArrayType Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ArrayTypeCommandSet implements CommandSet
+{
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+
+ // Although there's only a single command to choose from we still use
+ // a switch to maintain consistency with the rest of the CommandSets
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ArrayType.NEW_INSTANCE:
+ executeNewInstance(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ArrayType Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ public void executeNewInstance(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class arrayType = refId.getType();
+ Class componentType = arrayType.getComponentType();
+
+ int length = bb.getInt();
+ Object newArray = Array.newInstance(componentType, length);
+ ObjectId oid = idMan.getId(newArray);
+
+ // Since this array isn't referenced anywhere we'll disable garbage
+ // collection on it so it's still around when the debugger gets back to it.
+ oid.disableCollection();
+ oid.writeTagged(os);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
new file mode 100644
index 000000000..f219f2290
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
@@ -0,0 +1,100 @@
+/* ClassObjectReferenceCommandSet.java -- class to implement the
+ ClassObjectReference Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ClassObjectReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ClassObjectReferenceCommandSet implements CommandSet
+{
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ClassObjectReference.REFLECTED_TYPE:
+ executeReflectedType(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ClassObject Reference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ public void executeReflectedType(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Class clazz = (Class) oid.getObject();
+
+ // The difference between a ClassObjectId and a ReferenceTypeId is one is
+ // stored as an ObjectId and the other as a ReferenceTypeId.
+ ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
+ refId.writeTagged(os);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/CommandSet.java b/gnu/classpath/jdwp/processor/CommandSet.java
new file mode 100644
index 000000000..17b956cea
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/CommandSet.java
@@ -0,0 +1,68 @@
+/* CommandSet.java -- An interface defining JDWP Command Sets
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.exception.JdwpException;
+
+import java.io.DataOutputStream;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing a JDWP Command Set. This class serves as a generic
+ * interface for all Command Sets types used by JDWP.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public interface CommandSet
+{
+ /**
+ * Runs the given command with the data in distr and writes the data for the
+ * reply packet to ostr.
+ *
+ * @param bb holds the data portion of the Command Packet
+ * @param os data portion of the Reply Packet will be written here
+ * @param command the command field of the Command Packet
+ * @return true if the JDWP layer should shut down in response to this packet
+ * @throws JdwpException command wasn't carried out successfully
+ */
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os,
+ byte command)
+ throws JdwpException;
+}
diff --git a/gnu/classpath/jdwp/processor/FieldCommandSet.java b/gnu/classpath/jdwp/processor/FieldCommandSet.java
new file mode 100644
index 000000000..f14635b91
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/FieldCommandSet.java
@@ -0,0 +1,66 @@
+/* FieldCommandSet.java -- class to implement the Field Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+
+import java.io.DataOutputStream;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the Field Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class FieldCommandSet implements CommandSet
+{
+ /**
+ * There are no commands for this CommandSet at this time so we just throw a
+ * NotImplementedException whenever it's called.
+ *
+ * @throws JdwpException An exception will always be thrown
+ */
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ throw new NotImplementedException(
+ "No commands for command set Field implemented.");
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java b/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
new file mode 100644
index 000000000..a32da38b3
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
@@ -0,0 +1,67 @@
+/* InterfaceTypeCommandSet.java -- class to implement the InterfaceType
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+
+import java.io.DataOutputStream;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the InterfaceType Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class InterfaceTypeCommandSet implements CommandSet
+{
+ /**
+ * There are no commands for this CommandSet at this time so we just throw a
+ * NotImplementedException whenever it's called.
+ *
+ * @throws JdwpException An exception will always be thrown
+ */
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ throw new NotImplementedException(
+ "No commands for command set InterfaceType implemented.");
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
new file mode 100644
index 000000000..56980eecd
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
@@ -0,0 +1,266 @@
+/* ObjectReferenceCommandSet.java -- lass to implement the ObjectReference
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.IVirtualMachine;
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidFieldException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+import gnu.classpath.jdwp.util.Value;
+import gnu.classpath.jdwp.util.MethodInvoker;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ObjectReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ObjectReferenceCommandSet implements CommandSet
+{
+ // Our hook into the jvm
+ private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
+
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ObjectReference.REFERENCE_TYPE:
+ executeReferenceType(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.GET_VALUES:
+ executeGetValues(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.SET_VALUES:
+ executeSetValues(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.MONITOR_INFO:
+ executeMonitorInfo(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.INVOKE_METHOD:
+ executeInvokeMethod(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.DISABLE_COLLECTION:
+ executeDisableCollection(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.ENABLE_COLLECTION:
+ executeEnableCollection(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.IS_COLLECTED:
+ executeIsCollected(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ObjectReference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeReferenceType(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object obj = oid.getObject();
+ Class clazz = obj.getClass();
+ ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
+ refId.writeTagged(os);
+ }
+
+ private void executeGetValues(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object obj = oid.getObject();
+
+ int numFields = bb.getInt();
+
+ os.writeInt(numFields); // Looks pointless but this is the protocol
+
+ for (int i = 0; i < numFields; i++)
+ {
+ Field field = (Field) idMan.readId(bb).getObject();
+ try
+ {
+ field.setAccessible(true); // Might be a private field
+ Object value = field.get(obj);
+ Value.writeTaggedValue(os, value);
+ }
+ catch (IllegalArgumentException ex)
+ {
+ // I suppose this would best qualify as an invalid field then
+ throw new InvalidFieldException(ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ // Since we set it as accessible this really shouldn't happen
+ throw new JdwpInternalErrorException(ex);
+ }
+ }
+ }
+
+ private void executeSetValues(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object obj = oid.getObject();
+
+ int numFields = bb.getInt();
+
+ for (int i = 0; i < numFields; i++)
+ {
+ Field field = (Field) idMan.readId(bb).getObject();
+ Object value = Value.getUntaggedObj(bb, field.getType());
+ try
+ {
+ field.setAccessible(true); // Might be a private field
+ field.set(obj, value);
+ }
+ catch (IllegalArgumentException ex)
+ {
+ // I suppose this would best qualify as an invalid field then
+ throw new InvalidFieldException(ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ // Since we set it as accessible this really shouldn't happen
+ throw new JdwpInternalErrorException(ex);
+ }
+ }
+ }
+
+ private void executeMonitorInfo(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // This command is optional, determined by VirtualMachines CapabilitiesNew
+ // so we'll leave it till later to implement
+ throw new NotImplementedException(
+ "Command ExecuteMonitorInfo not implemented.");
+
+ }
+
+ private void executeInvokeMethod(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object obj = oid.getObject();
+
+ ObjectId tid = idMan.readId(bb);
+ Thread thread = (Thread) tid.getObject();
+
+ ReferenceTypeId rid = idMan.readReferenceTypeId(bb);
+ Class clazz = rid.getType();
+
+ ObjectId mid = idMan.readId(bb);
+ Method method = (Method) mid.getObject();
+
+ int args = bb.getInt();
+ Object[] values = new Object[args];
+
+ for (int i = 0; i < args; i++)
+ {
+ values[i] = Value.getObj(bb);
+ }
+
+ int invokeOptions = bb.getInt();
+
+ if ((invokeOptions & JdwpConstants.InvokeOptions.INVOKE_SINGLE_THREADED) != 0)
+ { // We must suspend all other running threads first
+ vm.suspendAllThreadsExcept(Thread.currentThread().getThreadGroup());
+ }
+ boolean nonVirtual;
+ if ((invokeOptions & JdwpConstants.InvokeOptions.INVOKE_NONVIRTUAL) != 0)
+ nonVirtual = true;
+ else
+ nonVirtual = false;
+ MethodInvoker vmi = new MethodInvoker(vm);
+
+ vmi.executeMethod(obj, thread, clazz, method, values, nonVirtual);
+ Object value = vmi.getReturnedValue();
+ ObjectId exceptionId = vmi.getExceptionId();
+
+ Value.writeTaggedValue(os, value);
+ exceptionId.writeTagged(os);
+ }
+
+ private void executeDisableCollection(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ oid.disableCollection();
+ }
+
+ private void executeEnableCollection(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ oid.enableCollection();
+ }
+
+ private void executeIsCollected(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ boolean collected = oid.isCollected();
+ os.writeBoolean(collected);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/PacketProcessor.java b/gnu/classpath/jdwp/processor/PacketProcessor.java
new file mode 100644
index 000000000..9e281f217
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/PacketProcessor.java
@@ -0,0 +1,217 @@
+/* PacketProcessor.java -- a thread which processes command packets
+ from the debugger
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.transport.JdwpCommandPacket;
+import gnu.classpath.jdwp.transport.JdwpConnection;
+import gnu.classpath.jdwp.transport.JdwpPacket;
+import gnu.classpath.jdwp.transport.JdwpReplyPacket;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.security.PrivilegedAction;
+
+/**
+ * This class is responsible for processing packets from the
+ * debugger. It waits for an available packet from the connection
+ * ({@link gnu.classpath.jdwp.transport.JdwpConnection}) and then
+ * processes the packet and any reply.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class PacketProcessor
+ implements PrivilegedAction
+{
+ // The connection to the debugger
+ private JdwpConnection _connection;
+
+ // Shutdown this thread?
+ private boolean _shutdown;
+
+ // A Mapping of the command set (Byte) to the specific CommandSet
+ private CommandSet[] _sets;
+
+ // Contents of the ReplyPackets data field
+ private ByteArrayOutputStream _outputBytes;
+
+ // Output stream around _outputBytes
+ private DataOutputStream _os;
+
+ /**
+ * Constructs a new <code>PacketProcessor</code> object
+ * Connection must be validated before getting here!
+ *
+ * @param con the connection
+ */
+ public PacketProcessor (JdwpConnection con)
+ {
+ _connection = con;
+ _shutdown = false;
+
+ // MAXIMUM is the value of the largest command set we may receive
+ _sets = new CommandSet[JdwpConstants.CommandSet.MAXIMUM + 1];
+ _outputBytes = new ByteArrayOutputStream();
+ _os = new DataOutputStream (_outputBytes);
+
+ // Create all the Command Sets and add them to our array
+ _sets[JdwpConstants.CommandSet.VirtualMachine.CS_VALUE] =
+ new VirtualMachineCommandSet();
+ _sets[JdwpConstants.CommandSet.ReferenceType.CS_VALUE] =
+ new ReferenceTypeCommandSet();
+ _sets[JdwpConstants.CommandSet.ClassType.CS_VALUE] =
+ new ClassTypeCommandSet();
+ _sets[JdwpConstants.CommandSet.ArrayType.CS_VALUE] =
+ new ArrayTypeCommandSet();
+ _sets[JdwpConstants.CommandSet.InterfaceType.CS_VALUE] =
+ new InterfaceTypeCommandSet();
+ _sets[JdwpConstants.CommandSet.Method.CS_VALUE] =
+ new MethodCommandSet();
+ _sets[JdwpConstants.CommandSet.Field.CS_VALUE] =
+ new FieldCommandSet();
+ _sets[JdwpConstants.CommandSet.ObjectReference.CS_VALUE] =
+ new ObjectReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.StringReference.CS_VALUE] =
+ new StringReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.ThreadReference.CS_VALUE] =
+ new ThreadReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.ThreadGroupReference.CS_VALUE] =
+ new ThreadGroupReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.ArrayReference.CS_VALUE] =
+ new ArrayReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.ClassLoaderReference.CS_VALUE] =
+ new ClassLoaderReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.EventRequest.CS_VALUE] =
+ new EventRequestCommandSet();
+ _sets[JdwpConstants.CommandSet.StackFrame.CS_VALUE] =
+ new StackFrameCommandSet();
+ _sets[JdwpConstants.CommandSet.ClassObjectReference.CS_VALUE] =
+ new ClassObjectReferenceCommandSet();
+ }
+
+ /**
+ * Main run routine for this thread. Will loop getting packets
+ * from the connection and processing them.
+ */
+ public Object run ()
+ {
+ try
+ {
+ while (!_shutdown)
+ {
+ _processOnePacket ();
+ }
+ }
+ catch (IOException ex)
+ {
+ ex.printStackTrace();
+ }
+ // Time to shutdown, tell Jdwp to shutdown
+ Jdwp.getDefault().shutdown();
+ return null;
+ }
+
+ /**
+ * Shutdown the packet processor
+ */
+ public void shutdown ()
+ {
+ _shutdown = true;
+ }
+
+ // Helper function which actually does all the work of waiting
+ // for a packet and getting it processed.
+ private void _processOnePacket ()
+ throws IOException
+ {
+ JdwpPacket pkt = _connection.getPacket ();
+
+ if (!(pkt instanceof JdwpCommandPacket))
+ {
+ // We're not supposed to get these from the debugger!
+ // Drop it on the floor
+ return;
+ }
+
+ if (pkt != null)
+ {
+ JdwpCommandPacket commandPkt = (JdwpCommandPacket) pkt;
+ JdwpReplyPacket reply = new JdwpReplyPacket(commandPkt);
+
+ // Reset our output stream
+ _outputBytes.reset();
+
+ // Create a ByteBuffer around the command packet
+ ByteBuffer bb = ByteBuffer.wrap(commandPkt.getData());
+ byte command = commandPkt.getCommand();
+ byte commandSet = commandPkt.getCommandSet();
+
+ CommandSet set = null;
+ try
+ {
+ // There is no command set with value 0
+ if (commandSet > 0 && commandSet < _sets.length)
+ {
+ set = _sets[commandPkt.getCommandSet()];
+ }
+ if (set != null)
+ {
+ _shutdown = set.runCommand(bb, _os, command);
+ reply.setData(_outputBytes.toByteArray());
+ }
+ else
+ {
+ // This command set wasn't in our tree
+ reply.setErrorCode(JdwpConstants.Error.NOT_IMPLEMENTED);
+ }
+ }
+ catch (JdwpException ex)
+ {
+ reply.setErrorCode(ex.getErrorCode ());
+ }
+ _connection.sendPacket (reply);
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java b/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
new file mode 100644
index 000000000..4c74db333
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
@@ -0,0 +1,339 @@
+/* ReferenceTypeCommandSet.java -- class to implement the ReferenceType
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.IVirtualMachine;
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidFieldException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+import gnu.classpath.jdwp.util.JdwpString;
+import gnu.classpath.jdwp.util.Signature;
+import gnu.classpath.jdwp.util.Value;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ReferenceType Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ReferenceTypeCommandSet implements CommandSet
+{
+ // Our hook into the jvm
+ private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
+
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ReferenceType.SIGNATURE:
+ executeSignature(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.CLASS_LOADER:
+ executeClassLoader(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.MODIFIERS:
+ executeModifiers(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.FIELDS:
+ executeFields(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.METHODS:
+ executeMethods(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.GET_VALUES:
+ executeGetValues(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.SOURCE_FILE:
+ executeSourceFile(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.NESTED_TYPES:
+ executeNestedTypes(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.STATUS:
+ executeStatus(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.INTERFACES:
+ executeInterfaces(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.CLASS_OBJECT:
+ executeClassObject(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.SOURCE_DEBUG_EXTENSION:
+ executeSourceDebugExtension(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.SIGNATURE_WITH_GENERIC:
+ executeSignatureWithGeneric(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.FIELDS_WITH_GENERIC:
+ executeFieldWithGeneric(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.METHODS_WITH_GENERIC:
+ executeMethodsWithGeneric(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ReferenceType Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeSignature(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ String sig = Signature.computeClassSignature(refId.getType());
+ JdwpString.writeString(os, sig);
+ }
+
+ private void executeClassLoader(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+
+ Class clazz = refId.getType();
+ ClassLoader loader = clazz.getClassLoader();
+ ObjectId oid = idMan.getId(loader);
+ oid.write(os);
+ }
+
+ private void executeModifiers(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+
+ Class clazz = refId.getType();
+ os.writeInt(clazz.getModifiers());
+ }
+
+ private void executeFields(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ Field[] fields = clazz.getFields();
+ os.writeInt(fields.length);
+ for (int i = 0; i < fields.length; i++)
+ {
+ Field field = fields[i];
+ idMan.getId(field).write(os);
+ JdwpString.writeString(os, field.getName());
+ JdwpString.writeString(os, Signature.computeFieldSignature(field));
+ os.writeInt(field.getModifiers());
+ }
+ }
+
+ private void executeMethods(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ Method[] methods = clazz.getMethods();
+ os.writeInt(methods.length);
+ for (int i = 0; i < methods.length; i++)
+ {
+ Method method = methods[i];
+ idMan.getId(method).write(os);
+ JdwpString.writeString(os, method.getName());
+ JdwpString.writeString(os, Signature.computeMethodSignature(method));
+ os.writeInt(method.getModifiers());
+ }
+ }
+
+ private void executeGetValues(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ int numFields = bb.getInt();
+ os.writeInt(numFields); // Looks pointless but this is the protocol
+ for (int i = 0; i < numFields; i++)
+ {
+ ObjectId fieldId = idMan.readId(bb);
+ Field field = (Field) (fieldId.getObject());
+ Class fieldClazz = field.getDeclaringClass();
+
+ // We don't actually need the clazz to get the field but we might as
+ // well check that the debugger got it right
+ if (fieldClazz.isAssignableFrom(clazz))
+ {
+ try
+ {
+ field.setAccessible(true); // Might be a private field
+ Object value = field.get(null);
+ Value.writeTaggedValue(os, value);
+ }
+ catch (IllegalArgumentException ex)
+ {
+ // I suppose this would best qualify as an invalid field then
+ throw new InvalidFieldException(ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ // Since we set it as accessible this really shouldn't happen
+ throw new JdwpInternalErrorException(ex);
+ }
+ }
+ else
+ throw new InvalidFieldException(fieldId.getId());
+ }
+ }
+
+ private void executeSourceFile(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ // We'll need to go into the jvm for this unless there's an easier way
+ String sourceFileName = vm.getSourceFile(clazz);
+ JdwpString.writeString(os, sourceFileName);
+ // clazz.getProtectionDomain().getCodeSource().getLocation();
+ }
+
+ private void executeNestedTypes(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+ Class[] declaredClazzes = clazz.getDeclaredClasses();
+ os.writeInt(declaredClazzes.length);
+ for (int i = 0; i < declaredClazzes.length; i++)
+ {
+ Class decClazz = declaredClazzes[i];
+ ReferenceTypeId clazzId = idMan.getReferenceTypeId(decClazz);
+ clazzId.writeTagged(os);
+ }
+ }
+
+ private void executeStatus(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ // I don't think there's any other way to get this
+ int status = vm.getStatus(clazz);
+ os.writeInt(status);
+ }
+
+ private void executeInterfaces(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+ Class[] interfaces = clazz.getInterfaces();
+ os.writeInt(interfaces.length);
+ for (int i = 0; i < interfaces.length; i++)
+ {
+ Class interfaceClass = interfaces[i];
+ ReferenceTypeId intId = idMan.getReferenceTypeId(interfaceClass);
+ intId.write(os);
+ }
+ }
+
+ private void executeClassObject(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+ ObjectId clazzObjectId = idMan.getId(clazz);
+ clazzObjectId.write(os);
+ }
+
+ private void executeSourceDebugExtension(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // This command is optional, determined by VirtualMachines CapabilitiesNew
+ // so we'll leave it till later to implement
+ throw new NotImplementedException(
+ "Command SourceDebugExtension not implemented.");
+ }
+
+ private void executeSignatureWithGeneric(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // We don't have generics yet
+ throw new NotImplementedException(
+ "Command SourceDebugExtension not implemented.");
+ }
+
+ private void executeFieldWithGeneric(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // We don't have generics yet
+ throw new NotImplementedException(
+ "Command SourceDebugExtension not implemented.");
+ }
+
+ private void executeMethodsWithGeneric(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // We don't have generics yet
+ throw new NotImplementedException(
+ "Command SourceDebugExtension not implemented.");
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java b/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
new file mode 100644
index 000000000..1f1b04cb0
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
@@ -0,0 +1,98 @@
+/* StringReferenceCommandSet.java -- class to implement the StringReference
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.util.JdwpString;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the StringReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class StringReferenceCommandSet implements CommandSet
+{
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+
+ // Although there's only a single command to choose from we still use
+ // a switch to maintain consistency with the rest of the CommandSets
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.StringReference.VALUE:
+ executeValue(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in String Reference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeValue(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = Jdwp.getIdManager().readId(bb);
+
+ String str = (String) oid.getObject();
+ JdwpString.writeString(os, str);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
new file mode 100644
index 000000000..28ff860c0
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
@@ -0,0 +1,178 @@
+/* ThreadGroupReferenceCommandSet.java -- class to implement the
+ ThreadGroupReference Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.util.JdwpString;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ThreadGroupReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ThreadGroupReferenceCommandSet implements CommandSet
+{
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ThreadGroupReference.NAME:
+ executeName(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ThreadGroupReference.PARENT:
+ executeParent(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ThreadGroupReference.CHILDREN:
+ executeChildren(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ThreadGroupReference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeName(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ ThreadGroup group = (ThreadGroup) oid.getObject();
+ JdwpString.writeString(os, group.getName());
+ }
+
+ private void executeParent(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ ThreadGroup group = (ThreadGroup) oid.getObject();
+ ThreadGroup parent = group.getParent();
+ ObjectId parentId = idMan.getId(parent);
+ parentId.write(os);
+ }
+
+ private void executeChildren(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ ThreadGroup group = (ThreadGroup) oid.getObject();
+
+ ThreadGroup jdwpGroup = Thread.currentThread().getThreadGroup();
+ int numThreads = group.activeCount();
+ Thread allThreads[] = new Thread[numThreads];
+
+ group.enumerate(allThreads, false);
+
+ // We need to loop through for the true count since some threads may have
+ // been destroyed since we got activeCount so those spots in the array will
+ // be null. As well we must ignore any threads that belong to jdwp
+ numThreads = 0;
+ for (int i = 0; i < allThreads.length; i++)
+ {
+ Thread thread = allThreads[i];
+ if (thread == null)
+ break; // No threads after this point
+ if (!thread.getThreadGroup().equals(jdwpGroup))
+ numThreads++;
+ }
+
+ os.writeInt(numThreads);
+
+ for (int i = 0; i < allThreads.length; i++)
+ {
+ Thread thread = allThreads[i];
+ if (thread == null)
+ break; // No threads after this point
+ if (!thread.getThreadGroup().equals(jdwpGroup))
+ idMan.getId(thread).write(os);
+ }
+
+ int numGroups = group.activeCount();
+ ThreadGroup allGroups[] = new ThreadGroup[numGroups];
+
+ group.enumerate(allGroups, false);
+
+ // We need to loop through for the true count since some ThreadGroups may
+ // have been destroyed since we got activeCount so those spots in the array
+ // will be null. As well we must ignore any threads that belong to jdwp.
+ numGroups = 0;
+ for (int i = 0; i < allGroups.length; i++)
+ {
+ ThreadGroup tgroup = allGroups[i];
+ if (tgroup == null)
+ break; // No ThreadGroups after this point
+ if (!tgroup.equals(jdwpGroup))
+ numGroups++;
+ }
+
+ os.writeInt(numGroups);
+
+ for (int i = 0; i < allGroups.length; i++)
+ {
+ ThreadGroup tgroup = allGroups[i];
+ if (tgroup == null)
+ break; // No ThreadGroups after this point
+ if (!tgroup.equals(jdwpGroup))
+ idMan.getId(tgroup).write(os);
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
new file mode 100644
index 000000000..32b987817
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
@@ -0,0 +1,474 @@
+/* VirtualMachineCommandSet.java -- class to implement the VirtualMachine
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.IVirtualMachine;
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+import gnu.classpath.jdwp.util.JdwpString;
+import gnu.classpath.jdwp.util.Signature;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * A class representing the VirtualMachine Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class VirtualMachineCommandSet implements CommandSet
+{
+ // Our hook into the jvm
+ private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
+
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ // The Jdwp object
+ private final Jdwp jdwp = Jdwp.getDefault();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ boolean keepRunning = true;
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.VirtualMachine.VERSION:
+ executeVersion(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CLASSES_BY_SIGNATURE:
+ executeClassesBySignature(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.ALL_CLASSES:
+ executeAllClasses(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.ALL_THREADS:
+ executeAllThreads(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.TOP_LEVEL_THREAD_GROUPS:
+ executeTopLevelThreadGroups(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.IDSIZES:
+ executeIDsizes(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.DISPOSE:
+ keepRunning = false;
+ executeDispose(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.SUSPEND:
+ executeSuspend(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.RESUME:
+ executeResume(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.EXIT:
+ keepRunning = false;
+ executeExit(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CREATE_STRING:
+ executeCreateString(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CAPABILITIES:
+ executeCapabilities(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CLASS_PATHS:
+ executeClassPaths(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.DISPOSE_OBJECTS:
+ executeDisposeObjects(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.HOLD_EVENTS:
+ executeHoldEvents(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.RELEASE_EVENTS:
+ executeReleaseEvents(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CAPABILITIES_NEW:
+ executeCapabilitiesNew(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.REDEFINE_CLASSES:
+ executeRedefineClasses(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.SET_DEFAULT_STRATUM:
+ executeSetDefaultStratum(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.ALL_CLASSES_WITH_GENERIC:
+ executeAllClassesWithGeneric(bb, os);
+ break;
+
+ default:
+ break;
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return keepRunning;
+ }
+
+ private void executeVersion(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+
+ Properties props = System.getProperties();
+
+ int jdwpMajor = JdwpConstants.Version.MAJOR;
+ int jdwpMinor = JdwpConstants.Version.MINOR;
+ // The description field is pretty loosely defined
+ String description = "JDWP version " + jdwpMajor + "." + jdwpMinor
+ + ", JVM version " + props.getProperty("java.vm.name")
+ + " " + props.getProperty("java.vm.version") + " "
+ + props.getProperty("java.version");
+ String vmVersion = props.getProperty("java.version");
+ String vmName = props.getProperty("java.vm.name");
+ JdwpString.writeString(os, description);
+ os.write(jdwpMajor);
+ os.write(jdwpMinor);
+ JdwpString.writeString(os, vmName);
+ JdwpString.writeString(os, vmVersion);
+ }
+
+ private void executeClassesBySignature(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ String sig = JdwpString.readString(bb);
+ ArrayList allMatchingClasses = new ArrayList();
+
+ // This will be an Iterator over all loaded Classes
+ Iterator iter = vm.getAllLoadedClasses();
+
+ while (iter.hasNext())
+ {
+ Class clazz = (Class) iter.next();
+ String clazzSig = Signature.computeClassSignature(clazz);
+ if (clazzSig.equals(sig))
+ allMatchingClasses.add(clazz);
+ }
+
+ os.writeInt(allMatchingClasses.size());
+ for (int i = 0; i < allMatchingClasses.size(); i++)
+ {
+ Class clazz = (Class) allMatchingClasses.get(i);
+ ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
+ id.writeTagged(os);
+ int status = vm.getStatus(clazz);
+ os.writeInt(status);
+ }
+ }
+
+ private void executeAllClasses(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // Disable garbage collection while we're collecting the info on loaded
+ // classes so we some classes don't get collected between the time we get
+ // the count and the time we get the list
+ vm.disableGarbageCollection();
+
+ int classCount = vm.getAllLoadedClassesCount();
+ os.writeInt(classCount);
+
+ // This will be an Iterator over all loaded Classes
+ Iterator iter = vm.getAllLoadedClasses();
+ vm.enableGarbageCollection();
+ int count = 0;
+
+ // Note it's possible classes were created since out classCount so make
+ // sure we don't write more classes than we told the debugger
+ while (iter.hasNext() && count++ < classCount)
+ {
+ Class clazz = (Class) iter.next();
+ ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
+ id.writeTagged(os);
+ String sig = Signature.computeClassSignature(clazz);
+ JdwpString.writeString(os, sig);
+ int status = vm.getStatus(clazz);
+ os.writeInt(status);
+ }
+ }
+
+ private void executeAllThreads(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ThreadGroup jdwpGroup = Thread.currentThread().getThreadGroup();
+ ThreadGroup root = getRootThreadGroup(jdwpGroup);
+
+ int numThreads = root.activeCount();
+ Thread allThreads[] = new Thread[numThreads];
+ root.enumerate(allThreads, true);
+
+ // We need to loop through for the true count since some threads may have
+ // been destroyed since we got
+ // activeCount so those spots in the array will be null. As well we must
+ // ignore any threads that belong to jdwp
+ numThreads = 0;
+ for (int i = 0; i < allThreads.length; i++)
+ {
+ Thread thread = allThreads[i];
+ if (thread == null)
+ break; // No threads after this point
+ if (!thread.getThreadGroup().equals(jdwpGroup))
+ numThreads++;
+ }
+
+ os.writeInt(numThreads);
+
+ for (int i = 0; i < allThreads.length; i++)
+ {
+ Thread thread = allThreads[i];
+ if (thread == null)
+ break; // No threads after this point
+ if (!thread.getThreadGroup().equals(jdwpGroup))
+ idMan.getId(thread).write(os);
+ }
+ }
+
+ private void executeTopLevelThreadGroups(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ThreadGroup jdwpGroup = jdwp.getJdwpThreadGroup();
+ ThreadGroup root = getRootThreadGroup(jdwpGroup);
+
+ os.writeInt(1); // Just one top level group allowed?
+ idMan.getId(root);
+ }
+
+ private void executeDispose(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // resumeAllThreads isn't sufficient as a thread may have been
+ // suspended multiple times, we likely need a way to keep track of how many
+ // times a thread has been suspended or else a stronger resume method for
+ // this purpose
+ // vm.resumeAllThreadsExcept(jdwp.getJdwpThreadGroup());
+
+ // Simply shutting down the jdwp layer will take care of the rest of the
+ // shutdown other than disabling debugging in the VM
+ // vm.disableDebugging();
+
+ // Don't implement this until we're sure how to remove all the debugging
+ // effects from the VM.
+ throw new NotImplementedException(
+ "Command VirtualMachine.Dispose not implemented");
+
+ }
+
+ private void executeIDsizes(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = new ObjectId();
+ os.writeInt(oid.size()); // fieldId
+ os.writeInt(oid.size()); // methodId
+ os.writeInt(oid.size()); // objectId
+ os.writeInt(new ReferenceTypeId((byte) 0x00).size()); // referenceTypeId
+ os.writeInt(oid.size()); // frameId
+ }
+
+ private void executeSuspend(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ vm.suspendAllThreadsExcept(jdwp.getJdwpThreadGroup());
+ }
+
+ private void executeResume(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ vm.resumeAllThreadsExcept(jdwp.getJdwpThreadGroup());
+ }
+
+ private void executeExit(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ int exitCode = bb.getInt();
+ jdwp.setExit(exitCode);
+ }
+
+ private void executeCreateString(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ String string = JdwpString.readString(bb);
+ ObjectId stringId = Jdwp.getIdManager().getId(string);
+
+ // Since this string isn't referenced anywhere we'll disable garbage
+ // collection on it so it's still around when the debugger gets back to it.
+ stringId.disableCollection();
+ stringId.write(os);
+ }
+
+ private void executeCapabilities(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // Store these somewhere?
+ os.writeBoolean(false); // canWatchFieldModification
+ os.writeBoolean(false); // canWatchFieldAccess
+ os.writeBoolean(false); // canGetBytecodes
+ os.writeBoolean(false); // canGetSyntheticAttribute
+ os.writeBoolean(false); // canGetOwnedMonitorInfo
+ os.writeBoolean(false); // canGetCurrentContendedMonitor
+ os.writeBoolean(false); // canGetMonitorInfo
+ }
+
+ private void executeClassPaths(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ String baseDir = System.getProperty("user.dir");
+ JdwpString.writeString(os, baseDir);
+
+ // Find and write the classpath
+ String classPath = System.getProperty("java.class.path");
+ String[] paths = classPath.split(":");
+
+ os.writeInt(paths.length);
+ for (int i = 0; i < paths.length; i++)
+ JdwpString.writeString(os, paths[i]);
+
+ // Now the bootpath
+ String bootPath = System.getProperty("sun.boot.class.path");
+ paths = bootPath.split(":");
+ os.writeInt(paths.length);
+ for (int i = 0; i < paths.length; i++)
+ JdwpString.writeString(os, paths[i]);
+ }
+
+ private void executeDisposeObjects(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // Instead of going through the list of objects they give us it's probably
+ // better just to find the garbage collected objects ourselves
+ idMan.update();
+ }
+
+ private void executeHoldEvents(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // Going to have to implement a send queue somewhere and do this without
+ // triggering events
+ // Until then just don't implement
+ throw new NotImplementedException(
+ "Command VirtualMachine.HoldEvents not implemented");
+ }
+
+ // Opposite of executeHoldEvents
+ private void executeReleaseEvents(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ throw new NotImplementedException(
+ "Command VirtualMachine.ReleaseEvents not implemented");
+ }
+
+ private void executeCapabilitiesNew(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // Store these somewhere?
+ final int CAPABILITIES_NEW_SIZE = 32;
+ os.writeBoolean(false); // canWatchFieldModification
+ os.writeBoolean(false); // canWatchFieldAccess
+ os.writeBoolean(false); // canGetBytecodes
+ os.writeBoolean(false); // canGetSyntheticAttribute
+ os.writeBoolean(false); // canGetOwnedMonitorInfo
+ os.writeBoolean(false); // canGetCurrentContendedMonitor
+ os.writeBoolean(false); // canGetMonitorInfo
+ os.writeBoolean(false); // canRedefineClasses
+ os.writeBoolean(false); // canAddMethod
+ os.writeBoolean(false); // canUnrestrictedlyRedefineClasses
+ os.writeBoolean(false); // canPopFrames
+ os.writeBoolean(false); // canUseInstanceFilters
+ os.writeBoolean(false); // canGetSourceDebugExtension
+ os.writeBoolean(false); // canRequestVMDeathEvent
+ os.writeBoolean(false); // canSetDefaultStratum
+ for (int i = 15; i < CAPABILITIES_NEW_SIZE; i++)
+ // Future capabilities
+ // currently unused
+ os.writeBoolean(false); // Set to false
+ }
+
+ private void executeRedefineClasses(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // Optional command, don't implement
+ throw new NotImplementedException(
+ "Command VirtualMachine.RedefineClasses not implemented");
+ }
+
+ private void executeSetDefaultStratum(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // Optional command, don't implement
+ throw new NotImplementedException(
+ "Command VirtualMachine.SetDefaultStratum not implemented");
+ }
+
+ private void executeAllClassesWithGeneric(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // We don't handle generics
+ throw new NotImplementedException(
+ "Command VirtualMachine.AllClassesWithGeneric not implemented");
+ }
+
+ /**
+ * Find the root ThreadGroup of this ThreadGroup
+ */
+ private ThreadGroup getRootThreadGroup(ThreadGroup group)
+ {
+ ThreadGroup parent = group.getParent();
+
+ while (parent != null)
+ {
+ group = parent;
+ parent = group.getParent();
+ }
+ return group; // This group was the root
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/ITransport.java b/gnu/classpath/jdwp/transport/ITransport.java
new file mode 100644
index 000000000..371cf8f06
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/ITransport.java
@@ -0,0 +1,84 @@
+/* ITransport.java -- An interface defining JDWP transports
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.IllegalArgumentException;
+import java.util.HashMap;
+
+/**
+ * A class representing a transport layer. This class serves as a generic
+ * interface for all transport types used in the JDWP back-end.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public interface ITransport
+{
+ /**
+ * Configure the transport with the given properties
+ *
+ * @param properties properties of the transport configuration
+ * @throws TransportException on configury error
+ */
+ public void configure (HashMap properties)
+ throws TransportException;
+
+ /**
+ * Initialize the transport
+ *
+ * @throws TransportException on initialization error
+ */
+ public void initialize ()
+ throws TransportException;
+
+ /**
+ * Get the input stream for the transport
+ */
+ public InputStream getInputStream ()
+ throws IOException;
+
+ /**
+ * Get the output stream for the transport
+ */
+ public OutputStream getOutputStream ()
+ throws IOException;
+}
diff --git a/gnu/classpath/jdwp/transport/JdwpCommandPacket.java b/gnu/classpath/jdwp/transport/JdwpCommandPacket.java
new file mode 100644
index 000000000..e99159aad
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/JdwpCommandPacket.java
@@ -0,0 +1,149 @@
+/* JdwpCommandPacket.java -- JDWP command packet
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * A class representing a JDWP command packet.
+ * This class adds command set and command to the packet header
+ * information in {@link gnu.classpath.jdwp.transport.JdwpPacket}
+ * and adds additional command packet-specific processing.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class JdwpCommandPacket extends JdwpPacket
+{
+ /**
+ * Command set
+ */
+ protected byte _commandSet;
+
+ /**
+ * Command
+ */
+ protected byte _command;
+
+ // Minimum packet size [excluding super class]
+ // ( commandSet (1) + command (1) )
+ private static final int MINIMUM_LENGTH = 2;
+
+ /**
+ * Constructs a new <code>JdwpCommandPacket</code>
+ */
+ public JdwpCommandPacket ()
+ {
+ // Don't assign an id. This constructor is called by
+ // JdwpPacket.fromBytes, and that will assign a packet id.
+ }
+
+ /**
+ * Constructs a new <code>JdwpCommandPacket</code>
+ * with the given command set and command
+ *
+ * @param set the command set
+ * @param command the command
+ */
+ public JdwpCommandPacket (byte set, byte command)
+ {
+ _id = ++_last_id;
+ _commandSet = set;
+ _command = command;
+ }
+
+ /**
+ * Retuns the length of this packet
+ */
+ public int getLength ()
+ {
+ return MINIMUM_LENGTH + super.getLength ();
+ }
+
+ /**
+ * Returns the command set
+ */
+ public byte getCommandSet ()
+ {
+ return _commandSet;
+ }
+
+ /**
+ * Sets the command set
+ */
+ public void setCommandSet (byte cs)
+ {
+ _commandSet = cs;
+ }
+
+ /**
+ * Returns the command
+ */
+ public byte getCommand ()
+ {
+ return _command;
+ }
+
+ /**
+ * Sets the command
+ */
+ public void setCommand (byte cmd)
+ {
+ _command = cmd;
+ }
+
+ // Reads command packet data from the given buffer, starting
+ // at the given offset
+ protected int myFromBytes (byte[] bytes, int index)
+ {
+ int i = 0;
+ setCommandSet (bytes[index + i++]);
+ setCommand (bytes[index + i++]);
+ return i;
+ }
+
+ // Writes the command packet data into the given buffer
+ protected void myWrite (DataOutputStream dos)
+ throws IOException
+ {
+ dos.writeByte (getCommandSet ());
+ dos.writeByte (getCommand ());
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/JdwpConnection.java b/gnu/classpath/jdwp/transport/JdwpConnection.java
new file mode 100644
index 000000000..18250d320
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/JdwpConnection.java
@@ -0,0 +1,298 @@
+/* JdwpConnection.java -- A JDWP-speaking connection
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.event.Event;
+import gnu.classpath.jdwp.event.EventRequest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * A connection via some transport to some JDWP-speaking entity.
+ * This is also a thread which handles all communications to/from
+ * the debugger. While access to the transport layer may be accessed by
+ * several threads, start-up and initialization should not be allowed
+ * to occur more than once.
+ *
+ * <p>This class is also a thread that is responsible for pulling
+ * packets off the wire and sticking them in a queue for packet
+ * processing threads.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class JdwpConnection
+ extends Thread
+{
+ // The JDWP handshake
+ private static final byte[] _HANDSHAKE = {'J', 'D', 'W', 'P', '-', 'H', 'a',
+ 'n', 'd', 's', 'h', 'a', 'k', 'e'};
+
+ // Transport method
+ private ITransport _transport;
+
+ // Command queue
+ private ArrayList _commandQueue;
+
+ // Shutdown flag
+ private boolean _shutdown;
+
+ // Input stream from transport
+ private DataInputStream _inStream;
+
+ // Output stream from transprot
+ private DataOutputStream _outStream;
+
+ // A buffer used to construct the packet data
+ private ByteArrayOutputStream _bytes;
+
+ // A DataOutputStream for the byte buffer
+ private DataOutputStream _doStream;
+
+ /**
+ * Creates a new <code>JdwpConnection</code> instance
+ *
+ * @param transport the transport to use for communications
+ */
+ public JdwpConnection (ITransport transport)
+ {
+ _transport = transport;
+ _commandQueue = new ArrayList ();
+ _shutdown = false;
+ _bytes = new ByteArrayOutputStream ();
+ _doStream = new DataOutputStream (_bytes);
+ }
+
+ /**
+ * Initializes the connection, including connecting
+ * to socket or shared memory endpoint
+ *
+ * @throws TransportException if initialization fails
+ */
+ public void initialize ()
+ throws TransportException
+ {
+ // Initialize transport (connect socket, e.g.)
+ _transport.initialize ();
+
+ // Do handshake
+ try
+ {
+ _inStream = new DataInputStream (_transport.getInputStream ());
+ _outStream = new DataOutputStream (_transport.getOutputStream ());
+ _doHandshake ();
+ }
+ catch (IOException ioe)
+ {
+ throw new TransportException (ioe);
+ }
+ }
+
+ /* Does the JDWP handshake -- this should not need synchronization
+ because this is called by VM startup code, i.e., no packet
+ processing threads have started yet. */
+ private void _doHandshake ()
+ throws IOException
+ {
+ // According to the spec, the handshake is always initiated by
+ // the debugger, regardless of whether the JVM is in client mode or
+ // server mode.
+
+ // Wait for handshake from debugger
+ byte[] hshake = new byte[_HANDSHAKE.length];
+ _inStream.readFully (hshake, 0, _HANDSHAKE.length);
+
+ if (Arrays.equals (hshake, _HANDSHAKE))
+ {
+ // Send reply handshake
+ _outStream.write (_HANDSHAKE, 0, _HANDSHAKE.length);
+ return;
+ }
+ else
+ {
+ throw new IOException ("invalid JDWP handshake (\"" + hshake + "\")");
+ }
+ }
+
+ /**
+ * Main run method for the thread. This thread loops waiting for
+ * packets to be read via the connection. When a packet is complete
+ * and ready for processing, it places the packet in a queue that can
+ * be accessed via <code>getPacket</code>
+ */
+ public void run ()
+ {
+ while (!_shutdown)
+ {
+ try
+ {
+ _readOnePacket ();
+ }
+ catch (IOException ioe)
+ {
+ /* IOException can occur for two reasons:
+ 1. Lost connection with the other side
+ 2. Transport was shutdown
+ In either case, we make sure that all of the
+ back-end gets shutdown. */
+ Jdwp.getInstance().shutdown ();
+ }
+ catch (Throwable t)
+ {
+ System.out.println ("JdwpConnection.run: caught an exception: "
+ + t);
+ // Just keep going
+ }
+ }
+ }
+
+ // Reads a single packet from the connection, adding it to the packet
+ // queue when a complete packet is ready.
+ private void _readOnePacket ()
+ throws IOException
+ {
+ byte[] data = null;
+
+ // Read in the packet
+ int length = _inStream.readInt ();
+ if (length < 11)
+ {
+ throw new IOException ("JDWP packet length < 11 ("
+ + length + ")");
+ }
+
+ data = new byte[length];
+ data[0] = (byte) (length >>> 24);
+ data[1] = (byte) (length >>> 16);
+ data[2] = (byte) (length >>> 8);
+ data[3] = (byte) length;
+ _inStream.readFully (data, 4, length - 4);
+
+ JdwpPacket packet = JdwpPacket.fromBytes (data);
+ if (packet != null)
+ {
+ synchronized (_commandQueue)
+ {
+ _commandQueue.add (packet);
+ _commandQueue.notifyAll ();
+ }
+ }
+ }
+
+ /**
+ * Returns a packet from the queue of ready packets
+ *
+ * @returns a <code>JdwpPacket</code> ready for processing
+ * <code>null</code> when shutting down
+ */
+ public JdwpPacket getPacket ()
+ {
+ synchronized (_commandQueue)
+ {
+ while (_commandQueue.isEmpty ())
+ {
+ try
+ {
+ _commandQueue.wait ();
+ }
+ catch (InterruptedException ie)
+ {
+ /* PacketProcessor is interrupted
+ when shutting down */
+ return null;
+ }
+ }
+
+ return (JdwpPacket) _commandQueue.remove (0);
+ }
+ }
+
+ /**
+ * Send a packet to the debugger
+ *
+ * @param pkt a <code>JdwpPacket</code> to send
+ * @throws IOException
+ */
+ public void sendPacket (JdwpPacket pkt)
+ throws IOException
+ {
+ pkt.write (_outStream);
+ }
+
+ /**
+ * Send an event notification to the debugger
+ *
+ * @param request the debugger request that wanted this event
+ * @param event the event
+ * @throws IOException
+ */
+ public void sendEvent (EventRequest request, Event event)
+ throws IOException
+ {
+ JdwpPacket pkt;
+
+ synchronized (_bytes)
+ {
+ _bytes.reset ();
+ pkt = event.toPacket (_doStream, request);
+ pkt.setData (_bytes.toByteArray ());
+ }
+
+ sendPacket (pkt);
+ }
+
+ /**
+ * Shutdown the connection
+ */
+ public void shutdown ()
+ {
+ if (!_shutdown)
+ {
+ _transport.shutdown ();
+ _shutdown = true;
+ interrupt ();
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/JdwpPacket.java b/gnu/classpath/jdwp/transport/JdwpPacket.java
new file mode 100644
index 000000000..7fa93e2de
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/JdwpPacket.java
@@ -0,0 +1,278 @@
+/* JdwpPacket.java -- Base class for JDWP command and reply packets
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * All command and reply packets in JDWP share
+ * common header type information:
+ *
+ * length (4 bytes) : size of entire packet, including length
+ * id (4 bytes) : unique packet id
+ * flags (1 byte) : flag byte
+ * [command packet stuff | reply packet stuff]
+ * data (variable) : unique command-/reply-specific data
+ *
+ * This class deal with everything except the command- and reply-specific
+ * data, which get handled in {@link
+ * gnu.classpath.jdwp.transport.JdwpCommandPacket} and {@link
+ * gnu.classpath.jdwp.transprot.JdwpReplyPacket}.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public abstract class JdwpPacket
+{
+ // Last id of packet constructed
+ protected static int _last_id = 0;
+
+ // JDWP reply packet flag
+ protected static final int JDWP_FLAG_REPLY = 0x80;
+
+ /**
+ * Minimum packet size excluding sub-class data
+ * ( length (4) + id (4) + flags (1) )
+ */
+ protected static final int MINIMUM_SIZE = 9;
+
+ /**
+ * Id of command/reply
+ */
+ protected int _id;
+
+ /**
+ * Packet flags
+ */
+ protected byte _flags;
+
+ /**
+ * Packet-specific data
+ */
+ protected byte[] _data;
+
+ /**
+ * Constructor
+ */
+ public JdwpPacket ()
+ {
+ // By default, DON'T assign an id. This way when a packet
+ // is constructed from fromBytes, _last_id won't increment (i.e.,
+ // it won't leave holes in the outgoing packet ids).
+ }
+
+ /**
+ * Constructs a <code>JdwpPacket</code> with the id
+ * from the given packet.
+ *
+ * @param pkt a packet whose id will be used in this new packet
+ */
+ public JdwpPacket (JdwpPacket pkt)
+ {
+ _id = pkt.getId ();
+ }
+
+ /**
+ * Returns the packet id
+ */
+ public int getId ()
+ {
+ return _id;
+ }
+
+ /**
+ * Sets the packet id
+ */
+ public void setId (int id)
+ {
+ _id = id;
+ }
+
+ /**
+ * Returns the packet flags
+ */
+ public byte getFlags ()
+ {
+ return _flags;
+ }
+
+ /**
+ * Sets the packet flags
+ */
+ public void setFlags (byte flags)
+ {
+ _flags = flags;
+ }
+
+ /**
+ * Gets the command/reply-specific data in this packet
+ */
+ public byte[] getData ()
+ {
+ return _data;
+ }
+
+ /**
+ * Sets the command/reply-specific data in this packet
+ */
+ public void setData (byte[] data)
+ {
+ _data = data;
+ }
+
+ /**
+ * Returns the length of this entire packet
+ */
+ public int getLength ()
+ {
+ return MINIMUM_SIZE + (_data == null ? 0 : _data.length);
+ }
+
+ /**
+ * Allow subclasses to initialize from data
+ *
+ * @param bytes packet data from the wire
+ * @param index index into <code>bytes</code> to start processing
+ * @return number of bytes in <code>bytes</code> processed
+ */
+ protected abstract int myFromBytes (byte[] bytes, int index);
+
+ /**
+ * Convert the given bytes into a <code>JdwpPacket</code>. Uses the
+ * abstract method <code>myFromBytes</code> to allow subclasses to
+ * process data.
+ *
+ * If the given data does not represent a valid JDWP packet, it returns
+ * <code>null</code>.
+ *
+ * @param bytes packet data from the wire
+ * @param index index into <code>bytes</code> to start processing
+ * @return number of bytes in <code>bytes</code> processed
+ */
+ public static JdwpPacket fromBytes (byte[] bytes)
+ {
+ int i = 0;
+ int length = ((bytes[i++] & 0xff) << 24 | (bytes[i++] & 0xff) << 16
+ | (bytes[i++] & 0xff) << 8 | (bytes[i++] & 0xff));
+ int id = 0;
+ byte flags = 0;
+
+ if (bytes.length == length)
+ {
+ id = ((bytes[i++] & 0xff) << 24 | (bytes[i++] & 0xff) << 16
+ | (bytes[i++] & 0xff) << 8 | (bytes[i++] & 0xff));
+ flags = bytes[i++];
+
+ Class clazz = null;
+ if (flags == 0)
+ clazz = JdwpCommandPacket.class;
+ else if ((flags & JDWP_FLAG_REPLY) != 0)
+ clazz = JdwpReplyPacket.class;
+ else
+ {
+ // Malformed packet. Discard it.
+ return null;
+ }
+
+ JdwpPacket pkt = null;
+ try
+ {
+ pkt = (JdwpPacket) clazz.newInstance ();
+ }
+ catch (InstantiationException ie)
+ {
+ // Discard packet
+ return null;
+ }
+ catch (IllegalAccessException iae)
+ {
+ // Discard packet
+ return null;
+ }
+
+ pkt.setId (id);
+ pkt.setFlags (flags);
+
+ i += pkt.myFromBytes (bytes, i);
+ byte[] data = new byte[length - i];
+ System.arraycopy (bytes, i, data, 0, data.length);
+ pkt.setData (data);
+
+ return pkt;
+ }
+
+ return null;
+ }
+
+ /**
+ * Put subclass information onto the stream
+ *
+ * @param dos the output stream to which to write
+ */
+ protected abstract void myWrite (DataOutputStream dos)
+ throws IOException;
+
+ /**
+ * Writes the packet to the output stream
+ *
+ * @param dos the output stream to which to write the packet
+ */
+ public void write (DataOutputStream dos)
+ throws IOException
+ {
+ // length
+ int length = getLength ();
+ dos.writeInt (length);
+
+ // ID
+ dos.writeInt (getId ());
+
+ // flag
+ dos.writeByte (getFlags ());
+
+ // packet-specific stuff
+ myWrite (dos);
+
+ // data (if any)
+ byte[] data = getData ();
+ if (data != null && data.length > 0)
+ dos.write (data, 0, data.length);
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/JdwpReplyPacket.java b/gnu/classpath/jdwp/transport/JdwpReplyPacket.java
new file mode 100644
index 000000000..de32ecf99
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/JdwpReplyPacket.java
@@ -0,0 +1,137 @@
+/* JdwpReplyPacket.java -- JDWP reply packet
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * A class represents a JDWP reply packet.
+ * This class adds an error code to the packet header information
+ * in {@link gnu.classpath.transport.JdwpPacket} and adds additional
+ * reply packet-specific processing.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class JdwpReplyPacket extends JdwpPacket
+{
+ /**
+ * Error code
+ */
+ protected short _errorCode;
+
+ // Minimum packet size [excluding super class] ( errorCode (2) )
+ private static final int MINIMUM_LENGTH = 2;
+
+ /**
+ * Constructs a <code>JdwpReplyPacket</code>.
+ */
+ public JdwpReplyPacket ()
+ {
+ // Don't assign a packet id. This is called by JdwpPacket.fromBytes
+ // which assigns a packet id. (Not that a VM would do that...)
+ }
+
+ /**
+ * Constructs a <code>JdwpReplyPacket</code> with the
+ * id from the given packet and error code
+ *
+ * @param pkt the packet whose id this packet will use
+ * @param errorCode the error code
+ */
+ public JdwpReplyPacket (JdwpPacket pkt, short errorCode)
+ {
+ this(pkt);
+ _errorCode = errorCode;
+ }
+
+ /**
+ * Constructs a <code>JdwpReplyPacket</code> with the
+ * id from the given packet and an empty error code
+ *
+ * @param pkt the packet whose id this packet will use
+ */
+ public JdwpReplyPacket (JdwpPacket pkt)
+ {
+ super (pkt);
+ _flags = (byte) JDWP_FLAG_REPLY;
+ }
+
+ /**
+ * Returns the length of this packet
+ */
+ public int getLength ()
+ {
+ return MINIMUM_LENGTH + super.getLength ();
+ }
+
+ /**
+ * Returns the error code
+ */
+ public short getErrorCode ()
+ {
+ return _errorCode;
+ }
+
+ /**
+ * Sets the error code
+ */
+ public void setErrorCode (short ec)
+ {
+ _errorCode = ec;
+ }
+
+ // Reads command packet data from the given buffer, starting
+ // at the given offset
+ protected int myFromBytes (byte[] bytes, int index)
+ {
+ int i = 0;
+ setErrorCode ((short) ((bytes[index + i++] & 0xff) << 8
+ | (bytes[index + i++] & 0xff)));
+ return i;
+ }
+
+ // Writes the command packet data into the given buffer
+ protected void myWrite (DataOutputStream dos)
+ throws IOException
+ {
+ dos.writeShort (getErrorCode ());
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/SocketTransport.java b/gnu/classpath/jdwp/transport/SocketTransport.java
new file mode 100644
index 000000000..0ad7357e1
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/SocketTransport.java
@@ -0,0 +1,171 @@
+/* SocketTransport.java -- a socket transport
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import gnu.classpath.jdwp.transport.ITransport;
+import gnu.classpath.jdwp.transport.TransportException;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.HashMap;
+
+import javax.net.ServerSocketFactory;
+import javax.net.SocketFactory;
+
+/**
+ * A socket-based transport. This transport uses
+ * configury string that looks like "name=dt_socket,
+ * address=localhost:1234,server=y".
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+class SocketTransport
+ implements ITransport
+{
+ /**
+ * Name of this transport
+ */
+ public static final String NAME = "dt_socket";
+
+ // Configure properties
+ private static final String _PROPERTY_ADDRESS = "address";
+ private static final String _PROPERTY_SERVER = "server";
+
+ // Port number
+ private int _port;
+
+ // Host name
+ private String _host;
+
+ // Are we acting as a server?
+ private boolean _server = false;
+
+ // Socket
+ private Socket _socket;
+
+ /**
+ * Setup the connection configuration from the given properties
+ *
+ * @param properties the properties of the JDWP session
+ * @throws TransportException for any configury errors
+ */
+ public void configure (HashMap properties)
+ throws TransportException
+ {
+ // Get address [form: "hostname:port"]
+ String p = (String) properties.get (_PROPERTY_ADDRESS);
+ if (p != null)
+ {
+ String[] s = p.split (":");
+ if (s.length == 2)
+ {
+ _host = s[0];
+ _port = Integer.parseInt (s[1]);
+ }
+ }
+
+ // Get server [form: "y" or "n"]
+ p = (String) properties.get (_PROPERTY_SERVER);
+ if (p != null)
+ {
+ if (p.toLowerCase().equals ("y"))
+ _server = true;
+ }
+ }
+
+ /**
+ * Initialize this socket connection. This includes
+ * connecting to the host (or listening for it).
+ *
+ * @throws TransportException if a transport-related error occurs
+ */
+ public void initialize ()
+ throws TransportException
+ {
+ try
+ {
+ if (_server)
+ {
+ // Get a server socket
+ ServerSocketFactory ssf = ServerSocketFactory.getDefault ();
+ ServerSocket ss = ssf.createServerSocket (_port, 1);
+ _socket = ss.accept ();
+ }
+ else
+ {
+ // Get a client socket (the factory will connect it)
+ SocketFactory sf = SocketFactory.getDefault ();
+ _socket = sf.createSocket (_host, _port);
+ }
+ }
+ catch (IOException ioe)
+ {
+ // This will grab UnknownHostException, too.
+ throw new TransportException (ioe);
+ }
+ }
+
+ /**
+ * Returns an <code>InputStream</code> for the transport
+ *
+ * @throws IOException if an I/O error occurs creating the stream
+ * or the socket is not connected
+ */
+ public InputStream getInputStream ()
+ throws IOException
+ {
+ return _socket.getInputStream ();
+ }
+
+ /**
+ * Returns an <code>OutputStream</code> for the transport
+ *
+ * @throws IOException if an I/O error occurs creating the stream
+ * or the socket is not connected
+ */
+ public OutputStream getOutputStream ()
+ throws IOException
+ {
+ return _socket.getOutputStream ();
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/TransportException.java b/gnu/classpath/jdwp/transport/TransportException.java
new file mode 100644
index 000000000..057422a87
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/TransportException.java
@@ -0,0 +1,75 @@
+/* TransportException.java -- Exception for transport configury errors
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+/**
+ * A transport configury or initialization exception thrown by
+ * JDWP transports. This class is a generic exception class
+ * that the different transport layers use to report transport-specific
+ * exceptions that may occur (which could be very different from
+ * one transport to the next.).
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class TransportException
+ extends Exception
+{
+ /**
+ * Constructs a <code>TransportException</code> with the
+ * given message
+ *
+ * @param message a message describing the exception
+ */
+ public TransportException (String message)
+ {
+ super (message);
+ }
+
+ /**
+ * Constructs a <code>TransportException</code> with the
+ * given <code>Throwable</code> root cause
+ *
+ * @param t the cause of the exception
+ */
+ public TransportException (Throwable t)
+ {
+ super (t);
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/TransportFactory.java b/gnu/classpath/jdwp/transport/TransportFactory.java
new file mode 100644
index 000000000..480fb3629
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/TransportFactory.java
@@ -0,0 +1,115 @@
+/* TransportFactory.java -- Factory for transports
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.util.HashMap;
+
+/**
+ * A factory class that constructs transports for use by
+ * the JDWP back-end.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class TransportFactory
+{
+ // Keyword in configspec that specifies transport method
+ private static final String _TRANSPORT_PROPERTY = "transport";
+
+ // A single transport method mapping
+ private static class TransportMethod
+ {
+ String name;
+ Class clazz;
+ public TransportMethod (String name, Class clazz)
+ {
+ this.name = name;
+ this.clazz = clazz;
+ }
+ }
+
+ // List of all supported transport methods
+ private static TransportMethod[] _transportMethods = new TransportMethod[]
+ {
+ new TransportMethod (SocketTransport.NAME, SocketTransport.class)
+ //new TransportMethod (ShmemTransport.NAME, ShmemTransport.class)
+ };
+
+ /**
+ * Get a transport configured as specified in the properties
+ *
+ * @param properties a <code>HashMap</code> specifying the JDWP
+ * configuration properties
+ * @returns the created and configured transport
+ * @throws TransportException for invalid configurations
+ */
+ public static ITransport newInstance (HashMap properties)
+ throws TransportException
+ {
+ String name = null;
+ if (properties != null)
+ name = (String) properties.get (_TRANSPORT_PROPERTY);
+ if (name == null)
+ throw new TransportException ("no transport specified");
+
+ for (int i = 0; i < _transportMethods.length; ++i)
+ {
+ if (_transportMethods[i].name.equals (name))
+ {
+ try
+ {
+ ITransport t;
+ t = (ITransport) _transportMethods[i].clazz.newInstance ();
+ t.configure (properties);
+ return t;
+ }
+ catch (TransportException te)
+ {
+ throw te;
+ }
+ catch (Exception e)
+ {
+ throw new TransportException (e);
+ }
+ }
+ }
+
+ throw new TransportException ("transport \"" + name + "\" not found");
+ }
+}
diff --git a/gnu/classpath/jdwp/util/JdwpString.java b/gnu/classpath/jdwp/util/JdwpString.java
new file mode 100644
index 000000000..e94700fe1
--- /dev/null
+++ b/gnu/classpath/jdwp/util/JdwpString.java
@@ -0,0 +1,95 @@
+/* JdwpString.java -- utility class to read and write jdwp strings
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.util;
+
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class to compute the JDWP representation of Strings.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class JdwpString
+{
+
+ /**
+ * Write this String to the outStream as a string understood by jdwp.
+ *
+ * @param os write the String here
+ * @param string the String to write
+ * @throws IOException
+ */
+ public static void writeString(DataOutputStream os, String string)
+ throws IOException
+ {
+ // Get the bytes of the string as a string in UTF-8
+ byte[] strBytes = string.getBytes("UTF-8");
+ os.writeInt(strBytes.length);
+ os.write(strBytes);
+ }
+
+ /**
+ * Read a jdwp style string from the ByteBuffer.
+ *
+ * @param bb contains the string
+ * @return the String that was read
+ * @throws JdwpInternalErrorException bb didn't contain a value UTF-8 string
+ */
+ public static String readString(ByteBuffer bb)
+ throws JdwpInternalErrorException
+ {
+ int length = bb.getInt();
+ byte[] strBytes = new byte[length];
+ bb.get(strBytes);
+ try
+ {
+ return new String(strBytes, "UTF-8");
+ }
+ catch (UnsupportedEncodingException ex)
+ {
+ // Any string from the VM should be in UTF-8 so an encoding error
+ // shouldn't be possible
+ throw new JdwpInternalErrorException(ex);
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/util/Signature.java b/gnu/classpath/jdwp/util/Signature.java
new file mode 100644
index 000000000..36445c318
--- /dev/null
+++ b/gnu/classpath/jdwp/util/Signature.java
@@ -0,0 +1,149 @@
+/* Signature.java -- utility class to compute class and method signatures
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.util;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+/**
+ * A class to compute class and method signatures.
+ *
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class Signature
+{
+ /**
+ * Computes the class signature, i.e., java.lang.String.class
+ * returns "Ljava/lang/String;".
+ *
+ * @param theClass the class for which to compute the signature
+ * @return the class's type signature
+ */
+ public static String computeClassSignature (Class theClass)
+ {
+ StringBuffer sb = new StringBuffer ();
+ _addToSignature (sb, theClass);
+ return sb.toString ();
+ }
+
+ /**
+ * Computes the field signature which is just the class signature of the
+ * field's type, ie a Field of type java.lang.String this will return
+ * "Ljava/lang/String;".
+ *
+ * @param field the field for which to compute the signature
+ * @return the field's type signature
+ */
+ public static String computeFieldSignature (Field field)
+ {
+ return computeClassSignature (field.getType());
+ }
+
+ /**
+ * Computes the method signature, i.e., java.lang.String.split (String, int)
+ * returns "(Ljava/lang/String;I)[Ljava/lang/String;"
+ *
+ * @param method the method for which to compute the signature
+ * @return the method's type signature
+ */
+ public static String computeMethodSignature (Method method)
+ {
+ return _computeSignature (method.getReturnType (),
+ method.getParameterTypes ());
+ }
+
+ private static String _computeSignature (Class returnType,
+ Class[] paramTypes)
+ {
+ StringBuffer sb = new StringBuffer ("(");
+ if (paramTypes != null)
+ {
+ for (int i = 0; i < paramTypes.length; ++i)
+ _addToSignature (sb, paramTypes[i]);
+ }
+ sb.append (")");
+ _addToSignature (sb, returnType);
+ return sb.toString();
+ }
+
+ private static void _addToSignature (StringBuffer sb, Class k)
+ {
+ // For some reason there's no easy way to get the signature of a
+ // class.
+ if (k.isPrimitive ())
+ {
+ if (k == void.class)
+ sb.append('V');
+ else if (k == boolean.class)
+ sb.append('Z');
+ else if (k == byte.class)
+ sb.append('B');
+ else if (k == char.class)
+ sb.append('C');
+ else if (k == short.class)
+ sb.append('S');
+ else if (k == int.class)
+ sb.append('I');
+ else if (k == float.class)
+ sb.append('F');
+ else if (k == double.class)
+ sb.append('D');
+ else if (k == long.class)
+ sb.append('J');
+ return;
+ }
+
+ String name = k.getName ();
+ int len = name.length ();
+ sb.ensureCapacity (len);
+ if (! k.isArray ())
+ sb.append('L');
+ for (int i = 0; i < len; ++i)
+ {
+ char c = name.charAt (i);
+ if (c == '.')
+ c = '/';
+ sb.append (c);
+ }
+ if (! k.isArray ())
+ sb.append(';');
+ }
+}
diff --git a/gnu/classpath/jdwp/util/Value.java b/gnu/classpath/jdwp/util/Value.java
new file mode 100644
index 000000000..de7194dc7
--- /dev/null
+++ b/gnu/classpath/jdwp/util/Value.java
@@ -0,0 +1,297 @@
+/* Value.java -- class to read/write JDWP tagged and untagged values
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.util;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidFieldException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.id.ObjectId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class to read/write JDWP tagged and untagged values.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class Value
+{
+ /**
+ * Will write the given object as an untagged value to the DataOutputStream.
+ *
+ * @param os write the value here
+ * @param obj the Object to write
+ * @throws IOException
+ * @throws InvalidFieldException
+ */
+ public static void writeUntaggedValue(DataOutputStream os, Object obj)
+ throws InvalidFieldException, IOException
+ {
+ writeValue(os, obj, false);
+ }
+
+ /**
+ * Will write the given object as a tagged value to the DataOutputStream.
+ *
+ * @param os write the value here
+ * @param obj the Object to write
+ * @throws IOException
+ * @throws InvalidFieldException
+ */
+ public static void writeTaggedValue(DataOutputStream os, Object obj)
+ throws InvalidFieldException, IOException
+ {
+ writeValue(os, obj, true);
+ }
+
+ /**
+ * Will write the given object as either a value or an untagged value to the
+ * DataOutputStream.
+ *
+ * @param os write the value here
+ * @param obj the Object to write
+ * @param tagged true if the value is tagged, false otherwise
+ * @throws IOException
+ * @throws InvalidFieldException
+ */
+ private static void writeValue(DataOutputStream os, Object obj,
+ boolean tagged)
+ throws IOException, InvalidFieldException
+ {
+ Class clazz = obj.getClass();
+ if (clazz.isPrimitive())
+ {
+ if (clazz == byte.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.BYTE);
+ os.writeByte(((Byte) obj).byteValue());
+ }
+ else if (clazz == char.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.CHAR);
+ os.writeChar(((Character) obj).charValue());
+ }
+ else if (clazz == float.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.FLOAT);
+ os.writeFloat(((Float) obj).floatValue());
+ }
+ else if (clazz == double.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.DOUBLE);
+ os.writeDouble(((Double) obj).doubleValue());
+ }
+ else if (clazz == int.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.BYTE);
+ os.writeInt(((Integer) obj).intValue());
+ }
+ else if (clazz == long.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.LONG);
+ os.writeLong(((Long) obj).longValue());
+ }
+ else if (clazz == short.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.SHORT);
+ os.writeInt(((Short) obj).shortValue());
+ }
+ else if (clazz == void.class)
+ { // A 'void' has no data
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.VOID);
+ }
+ else if (clazz == boolean.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.BOOLEAN);
+ os.writeBoolean(((Boolean) obj).booleanValue());
+ }
+ else
+ { // This shouldn't be possible
+ throw new InvalidFieldException("Field has invalid primitive!");
+ }
+ }
+ else
+ {
+ // Object is an Object, not a primitive type wrapped in an object
+ // Write the appropriate tag
+ if (tagged)
+ {
+ if (clazz.isArray())
+ os.writeByte(JdwpConstants.Tag.ARRAY);
+ else if (obj instanceof String)
+ os.writeByte(JdwpConstants.Tag.STRING);
+ else if (obj instanceof Thread)
+ os.writeByte(JdwpConstants.Tag.THREAD);
+ else if (obj instanceof ThreadGroup)
+ os.writeByte(JdwpConstants.Tag.THREAD_GROUP);
+ else if (obj instanceof ClassLoader)
+ os.writeByte(JdwpConstants.Tag.CLASS_LOADER);
+ else if (obj instanceof Class)
+ os.writeByte(JdwpConstants.Tag.CLASS_OBJECT);
+ else
+ os.writeByte(JdwpConstants.Tag.OBJECT);
+ }
+ ObjectId oid = Jdwp.getIdManager().getId(obj);
+ oid.write(os);
+ }
+ }
+
+ /**
+ * Reads the appropriate object for the tagged value contained in the
+ * ByteBuffer.
+ *
+ * @param bb contains the Object
+ * @return The Object referenced by the value
+ * @throws JdwpException
+ * @throws IOException
+ */
+ public static Object getObj(ByteBuffer bb)
+ throws JdwpException, IOException
+ {
+ return getUntaggedObj(bb, bb.get());
+ }
+
+ /**
+ * Reads the an object of the given Class from the untagged value contained
+ * in the ByteBuffer.
+ *
+ * @param bb contains the Object
+ * @param type corresponds to the TAG of value to be read
+ * @return
+ * @throws JdwpException
+ * @throws IOException
+ */
+ public static Object getUntaggedObj(ByteBuffer bb, Class type)
+ throws JdwpException, IOException
+ {
+ if (type.isPrimitive())
+ {
+ if (type == byte.class)
+ return new Byte(bb.get());
+ else if (type == char.class)
+ return new Character(bb.getChar());
+ else if (type == float.class)
+ return new Float(bb.getFloat());
+ else if (type == double.class)
+ return new Double(bb.getDouble());
+ else if (type == int.class)
+ return new Integer(bb.getInt());
+ else if (type == long.class)
+ return new Long(bb.getLong());
+ else if (type == short.class)
+ return new Short(bb.getShort());
+ else if (type == boolean.class)
+ return (bb.get() == 0) ? new Boolean(false) : new Boolean(true);
+ else if (type == void.class)
+ return new byte[0];
+ else
+ { // This shouldn't be possible
+ throw new InvalidFieldException("Field has invalid primitive!");
+ }
+ }
+ else
+ {
+ // Field is an object
+ ObjectId oid = Jdwp.getIdManager().readId(bb);
+ return oid.getObject();
+ }
+ }
+
+ /**
+ * Reads the an object of the given Class from the untagged value contained
+ * in the ByteBuffer.
+ *
+ * @param bb contains the Object
+ * @param tag TAG of the Value to be read
+ * @return the object
+ * @throws JdwpException
+ * @throws IOException
+ */
+ public static Object getUntaggedObj(ByteBuffer bb, byte tag)
+ throws JdwpException, IOException
+ {
+ switch (tag)
+ {
+ case JdwpConstants.Tag.BYTE:
+ return new Byte(bb.get());
+ case JdwpConstants.Tag.CHAR:
+ return new Character(bb.getChar());
+ case JdwpConstants.Tag.FLOAT:
+ return new Float(bb.getFloat());
+ case JdwpConstants.Tag.DOUBLE:
+ return new Double(bb.getDouble());
+ case JdwpConstants.Tag.INT:
+ return new Integer(bb.getInt());
+ case JdwpConstants.Tag.LONG:
+ return new Long(bb.getLong());
+ case JdwpConstants.Tag.SHORT:
+ return new Short(bb.getShort());
+ case JdwpConstants.Tag.VOID:
+ return new byte[0];
+ case JdwpConstants.Tag.BOOLEAN:
+ return (bb.get() == 0) ? new Boolean(false) : new Boolean(true);
+ case JdwpConstants.Tag.STRING:
+ return JdwpString.readString(bb);
+ case JdwpConstants.Tag.ARRAY:
+ case JdwpConstants.Tag.THREAD:
+ case JdwpConstants.Tag.OBJECT:
+ case JdwpConstants.Tag.THREAD_GROUP:
+ case JdwpConstants.Tag.CLASS_LOADER:
+ case JdwpConstants.Tag.CLASS_OBJECT:
+ // All these cases are ObjectIds
+ ObjectId oid = Jdwp.getIdManager().readId(bb);
+ return oid.getObject();
+ default:
+ throw new JdwpInternalErrorException("Could not find TAG:" + tag);
+ }
+ }
+}
diff --git a/gnu/java/awt/AWTUtilities.java b/gnu/java/awt/AWTUtilities.java
new file mode 100644
index 000000000..af1fc13ca
--- /dev/null
+++ b/gnu/java/awt/AWTUtilities.java
@@ -0,0 +1,694 @@
+/* AWTUtilities.java -- Common utility methods for AWT and Swing.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.java.awt;
+
+import java.applet.Applet;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Insets;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+import java.awt.Window;
+import java.awt.event.MouseEvent;
+import java.util.AbstractSequentialList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.NoSuchElementException;
+import java.util.WeakHashMap;
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * This class mirrors the javax.swing.SwingUtilities class. It
+ * provides commonly needed functionalities for AWT classes without
+ * the need to reference classes in the javax.swing package.
+ */
+public class AWTUtilities
+{
+
+ /**
+ * This List implementation wraps the Component[] returned by
+ * {@link Container#getComponents()} and iterates over the visible Components
+ * in that array. This class is used in {@link #getVisibleChildren}.
+ */
+ static class VisibleComponentList extends AbstractSequentialList
+ {
+ /**
+ * The ListIterator for this List.
+ */
+ class VisibleComponentIterator implements ListIterator
+ {
+ /** The current index in the Component[]. */
+ int index;
+
+ /** The index in the List of visible Components. */
+ int listIndex;
+
+ /**
+ * Creates a new VisibleComponentIterator that starts at the specified
+ * <code>listIndex</code>. The array of Components is searched from
+ * the beginning to find the matching array index.
+ *
+ * @param listIndex the index from where to begin iterating
+ */
+ VisibleComponentIterator(int listIndex)
+ {
+ this.listIndex = listIndex;
+ int visibleComponentsFound = 0;
+ for (index = 0; visibleComponentsFound != listIndex; index++)
+ {
+ if (components[index].isVisible())
+ visibleComponentsFound++;
+ }
+ }
+
+ /**
+ * Returns <code>true</code> if there are more visible components in the
+ * array, <code>false</code> otherwise.
+ *
+ * @return <code>true</code> if there are more visible components in the
+ * array, <code>false</code> otherwise
+ */
+ public boolean hasNext()
+ {
+ boolean hasNext = false;
+ for (int i = index; i < components.length; i++)
+ {
+ if (components[i].isVisible())
+ {
+ hasNext = true;
+ break;
+ }
+ }
+ return hasNext;
+ }
+
+ /**
+ * Returns the next visible <code>Component</code> in the List.
+ *
+ * @return the next visible <code>Component</code> in the List
+ *
+ * @throws if there is no next element
+ */
+ public Object next()
+ {
+ Object o = null;
+ for (; index < components.length; index++)
+ {
+ if (components[index].isVisible())
+ {
+ o = components[index];
+ break;
+ }
+ }
+ if (o != null)
+ {
+ index++;
+ listIndex++;
+ return o;
+ }
+ else
+ throw new NoSuchElementException();
+ }
+
+ /**
+ * Returns <code>true</code> if there are more visible components in the
+ * array in the reverse direction, <code>false</code> otherwise.
+ *
+ * @return <code>true</code> if there are more visible components in the
+ * array in the reverse direction, <code>false</code> otherwise
+ */
+ public boolean hasPrevious()
+ {
+ boolean hasPrevious = false;
+ for (int i = index - 1; i >= 0; i--)
+ {
+ if (components[i].isVisible())
+ {
+ hasPrevious = true;
+ break;
+ }
+ }
+ return hasPrevious;
+ }
+
+ /**
+ * Returns the previous visible <code>Component</code> in the List.
+ *
+ * @return the previous visible <code>Component</code> in the List
+ *
+ * @throws NoSuchElementException if there is no previous element
+ */
+ public Object previous()
+ {
+ Object o = null;
+ for (index--; index >= 0; index--)
+ {
+ if (components[index].isVisible())
+ {
+ o = components[index];
+ break;
+ }
+ }
+ if (o != null)
+ {
+ listIndex--;
+ return o;
+ }
+ else
+ throw new NoSuchElementException();
+ }
+
+ /**
+ * Returns the index of the next element in the List.
+ *
+ * @return the index of the next element in the List
+ */
+ public int nextIndex()
+ {
+ return listIndex + 1;
+ }
+
+ /**
+ * Returns the index of the previous element in the List.
+ *
+ * @return the index of the previous element in the List
+ */
+ public int previousIndex()
+ {
+ return listIndex - 1;
+ }
+
+ /**
+ * This operation is not supported because the List is immutable.
+ *
+ * @throws UnsupportedOperationException because the List is immutable
+ */
+ public void remove()
+ {
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
+ }
+
+ /**
+ * This operation is not supported because the List is immutable.
+ *
+ * @param o not used here
+ *
+ * @throws UnsupportedOperationException because the List is immutable
+ */
+ public void set(Object o)
+ {
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
+ }
+
+ /**
+ * This operation is not supported because the List is immutable.
+ *
+ * @param o not used here
+ *
+ * @throws UnsupportedOperationException because the List is immutable
+ */
+ public void add(Object o)
+ {
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
+ }
+ }
+
+ /**
+ * The components over which we iterate. Only the visible components
+ * are returned by this List.
+ */
+ Component[] components;
+
+ /**
+ * Creates a new instance of VisibleComponentList that wraps the specified
+ * <code>Component[]</code>.
+ *
+ * @param c the <code>Component[]</code> to be wrapped.
+ */
+ VisibleComponentList(Component[] c)
+ {
+ components = c;
+ }
+
+ /**
+ * Returns a {@link ListIterator} for iterating over this List.
+ *
+ * @return a {@link ListIterator} for iterating over this List
+ */
+ public ListIterator listIterator(int index)
+ {
+ return new VisibleComponentIterator(index);
+ }
+
+ /**
+ * Returns the number of visible components in the wrapped Component[].
+ *
+ * @return the number of visible components
+ */
+ public int size()
+ {
+ int visibleComponents = 0;
+ for (int i = 0; i < components.length; i++)
+ if (components[i].isVisible())
+ visibleComponents++;
+ return visibleComponents;
+ }
+ }
+
+ /**
+ * The cache for our List instances. We try to hold one instance of
+ * VisibleComponentList for each Component[] that is requested. Note
+ * that we use a WeakHashMap for caching, so that the cache itself
+ * does not keep the array or the List from beeing garbage collected
+ * if no other objects hold references to it.
+ */
+ static WeakHashMap visibleChildrenCache = new WeakHashMap();
+
+ /**
+ * Returns the visible children of a {@link Container}. This method is
+ * commonly needed in LayoutManagers, because they only have to layout
+ * the visible children of a Container.
+ *
+ * @param c the Container from which to extract the visible children
+ *
+ * @return the visible children of <code>c</code>
+ */
+ public static List getVisibleChildren(Container c)
+ {
+ Component[] children = c.getComponents();
+ Object o = visibleChildrenCache.get(children);
+ VisibleComponentList visibleChildren = null;
+ if (o == null)
+ {
+ visibleChildren = new VisibleComponentList(children);
+ visibleChildrenCache.put(children, visibleChildren);
+ }
+ else
+ visibleChildren = (VisibleComponentList) o;
+
+ return visibleChildren;
+ }
+
+ /**
+ * Calculates the portion of the base rectangle which is inside the
+ * insets.
+ *
+ * @param base The rectangle to apply the insets to
+ * @param insets The insets to apply to the base rectangle
+ * @param ret A rectangle to use for storing the return value, or
+ * <code>null</code>
+ *
+ * @return The calculated area inside the base rectangle and its insets,
+ * either stored in ret or a new Rectangle if ret is <code>null</code>
+ *
+ * @see #calculateInnerArea
+ */
+ public static Rectangle calculateInsetArea(Rectangle base, Insets insets,
+ Rectangle ret)
+ {
+ if (ret == null)
+ ret = new Rectangle();
+ ret.setBounds(base.x + insets.left, base.y + insets.top,
+ base.width - (insets.left + insets.right),
+ base.height - (insets.top + insets.bottom));
+ return ret;
+ }
+
+ /**
+ * Calculates the bounds of a component in the component's own coordinate
+ * space. The result has the same height and width as the component's
+ * bounds, but its location is set to (0,0).
+ *
+ * @param aComponent The component to measure
+ *
+ * @return The component's bounds in its local coordinate space
+ */
+ public static Rectangle getLocalBounds(Component aComponent)
+ {
+ Rectangle bounds = aComponent.getBounds();
+ return new Rectangle(0, 0, bounds.width, bounds.height);
+ }
+
+ /**
+ * Returns the font metrics object for a given font. The metrics can be
+ * used to calculate crude bounding boxes and positioning information,
+ * for laying out components with textual elements.
+ *
+ * @param font The font to get metrics for
+ *
+ * @return The font's metrics
+ *
+ * @see java.awt.font.GlyphMetrics
+ */
+ public static FontMetrics getFontMetrics(Font font)
+ {
+ return Toolkit.getDefaultToolkit().getFontMetrics(font);
+ }
+
+ /**
+ * Returns the least ancestor of <code>comp</code> which has the
+ * specified name.
+ *
+ * @param name The name to search for
+ * @param comp The component to search the ancestors of
+ *
+ * @return The nearest ancestor of <code>comp</code> with the given
+ * name, or <code>null</code> if no such ancestor exists
+ *
+ * @see java.awt.Component#getName
+ * @see #getAncestorOfClass
+ */
+ public static Container getAncestorNamed(String name, Component comp)
+ {
+ while (comp != null && (comp.getName() != name))
+ comp = comp.getParent();
+ return (Container) comp;
+ }
+
+ /**
+ * Returns the least ancestor of <code>comp</code> which is an instance
+ * of the specified class.
+ *
+ * @param c The class to search for
+ * @param comp The component to search the ancestors of
+ *
+ * @return The nearest ancestor of <code>comp</code> which is an instance
+ * of the given class, or <code>null</code> if no such ancestor exists
+ *
+ * @see #getAncestorOfClass
+ * @see #windowForComponent
+ * @see
+ *
+ */
+ public static Container getAncestorOfClass(Class c, Component comp)
+ {
+ while (comp != null && (! c.isInstance(comp)))
+ comp = comp.getParent();
+ return (Container) comp;
+ }
+
+ /**
+ * Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.
+ *
+ * @param comp The component to search for an ancestor window
+ *
+ * @return An ancestral window, or <code>null</code> if none exists
+ */
+ public static Window windowForComponent(Component comp)
+ {
+ return (Window) getAncestorOfClass(Window.class, comp);
+ }
+
+ /**
+ * Returns the "root" of the component tree containint <code>comp</code>
+ * The root is defined as either the <em>least</em> ancestor of
+ * <code>comp</code> which is a {@link Window}, or the <em>greatest</em>
+ * ancestor of <code>comp</code> which is a {@link Applet} if no {@link
+ * Window} ancestors are found.
+ *
+ * @param comp The component to search for a root
+ *
+ * @return The root of the component's tree, or <code>null</code>
+ */
+ public static Component getRoot(Component comp)
+ {
+ Applet app = null;
+ Window win = null;
+
+ while (comp != null)
+ {
+ if (win == null && comp instanceof Window)
+ win = (Window) comp;
+ else if (comp instanceof Applet)
+ app = (Applet) comp;
+ comp = comp.getParent();
+ }
+
+ if (win != null)
+ return win;
+ else
+ return app;
+ }
+
+ /**
+ * Return true if a descends from b, in other words if b is an
+ * ancestor of a.
+ *
+ * @param a The child to search the ancestry of
+ * @param b The potential ancestor to search for
+ *
+ * @return true if a is a descendent of b, false otherwise
+ */
+ public static boolean isDescendingFrom(Component a, Component b)
+ {
+ while (true)
+ {
+ if (a == null || b == null)
+ return false;
+ if (a == b)
+ return true;
+ a = a.getParent();
+ }
+ }
+
+ /**
+ * Returns the deepest descendent of parent which is both visible and
+ * contains the point <code>(x,y)</code>. Returns parent when either
+ * parent is not a container, or has no children which contain
+ * <code>(x,y)</code>. Returns <code>null</code> when either
+ * <code>(x,y)</code> is outside the bounds of parent, or parent is
+ * <code>null</code>.
+ *
+ * @param parent The component to search the descendents of
+ * @param x Horizontal coordinate to search for
+ * @param y Vertical coordinate to search for
+ *
+ * @return A component containing <code>(x,y)</code>, or
+ * <code>null</code>
+ *
+ * @see java.awt.Container#findComponentAt
+ */
+ public static Component getDeepestComponentAt(Component parent, int x, int y)
+ {
+ if (parent == null || (! parent.contains(x, y)))
+ return null;
+
+ if (! (parent instanceof Container))
+ return parent;
+
+ Container c = (Container) parent;
+ return c.findComponentAt(x, y);
+ }
+
+ /**
+ * Converts a point from a component's local coordinate space to "screen"
+ * coordinates (such as the coordinate space mouse events are delivered
+ * in). This operation is equivalent to translating the point by the
+ * location of the component (which is the origin of its coordinate
+ * space).
+ *
+ * @param p The point to convert
+ * @param c The component which the point is expressed in terms of
+ *
+ * @see convertPointFromScreen
+ */
+ public static void convertPointToScreen(Point p, Component c)
+ {
+ Point c0 = c.getLocationOnScreen();
+ p.translate(c0.x, c0.y);
+ }
+
+ /**
+ * Converts a point from "screen" coordinates (such as the coordinate
+ * space mouse events are delivered in) to a component's local coordinate
+ * space. This operation is equivalent to translating the point by the
+ * negation of the component's location (which is the origin of its
+ * coordinate space).
+ *
+ * @param p The point to convert
+ * @param c The component which the point should be expressed in terms of
+ */
+ public static void convertPointFromScreen(Point p, Component c)
+ {
+ Point c0 = c.getLocationOnScreen();
+ p.translate(-c0.x, -c0.y);
+ }
+
+ /**
+ * Converts a point <code>(x,y)</code> from the coordinate space of one
+ * component to another. This is equivalent to converting the point from
+ * <code>source</code> space to screen space, then back from screen space
+ * to <code>destination</code> space. If exactly one of the two
+ * Components is <code>null</code>, it is taken to refer to the root
+ * ancestor of the other component. If both are <code>null</code>, no
+ * transformation is done.
+ *
+ * @param source The component which the point is expressed in terms of
+ * @param x Horizontal coordinate of point to transform
+ * @param y Vertical coordinate of point to transform
+ * @param destination The component which the return value will be
+ * expressed in terms of
+ *
+ * @return The point <code>(x,y)</code> converted from the coordinate
+ * space of the
+ * source component to the coordinate space of the destination component
+ *
+ * @see #convertPointToScreen
+ * @see #convertPointFromScreen
+ * @see #convertRectangle
+ * @see #getRoot
+ */
+ public static Point convertPoint(Component source, int x, int y,
+ Component destination)
+ {
+ Point pt = new Point(x, y);
+
+ if (source == null && destination == null)
+ return pt;
+
+ if (source == null)
+ source = getRoot(destination);
+
+ if (destination == null)
+ destination = getRoot(source);
+
+ convertPointToScreen(pt, source);
+ convertPointFromScreen(pt, destination);
+
+ return pt;
+ }
+
+
+ /**
+ * Converts a rectangle from the coordinate space of one component to
+ * another. This is equivalent to converting the rectangle from
+ * <code>source</code> space to screen space, then back from screen space
+ * to <code>destination</code> space. If exactly one of the two
+ * Components is <code>null</code>, it is taken to refer to the root
+ * ancestor of the other component. If both are <code>null</code>, no
+ * transformation is done.
+ *
+ * @param source The component which the rectangle is expressed in terms of
+ * @param rect The rectangle to convert
+ * @param destination The component which the return value will be
+ * expressed in terms of
+ *
+ * @return A new rectangle, equal in size to the input rectangle, but
+ * with its position converted from the coordinate space of the source
+ * component to the coordinate space of the destination component
+ *
+ * @see #convertPointToScreen
+ * @see #convertPointFromScreen
+ * @see #convertPoint
+ * @see #getRoot
+ */
+ public static Rectangle convertRectangle(Component source, Rectangle rect,
+ Component destination)
+ {
+ Point pt = convertPoint(source, rect.x, rect.y, destination);
+ return new Rectangle(pt.x, pt.y, rect.width, rect.height);
+ }
+
+ /**
+ * Convert a mouse event which refrers to one component to another. This
+ * includes changing the mouse event's coordinate space, as well as the
+ * source property of the event. If <code>source</code> is
+ * <code>null</code>, it is taken to refer to <code>destination</code>'s
+ * root component. If <code>destination</code> is <code>null</code>, the
+ * new event will remain expressed in <code>source</code>'s coordinate
+ * system.
+ *
+ * @param source The component the mouse event currently refers to
+ * @param sourceEvent The mouse event to convert
+ * @param destination The component the new mouse event should refer to
+ *
+ * @return A new mouse event expressed in terms of the destination
+ * component's coordinate space, and with the destination component as
+ * its source
+ *
+ * @see #convertPoint
+ */
+ public static MouseEvent convertMouseEvent(Component source,
+ MouseEvent sourceEvent,
+ Component destination)
+ {
+ Point newpt = convertPoint(source, sourceEvent.getX(), sourceEvent.getY(),
+ destination);
+
+ return new MouseEvent(destination, sourceEvent.getID(),
+ sourceEvent.getWhen(), sourceEvent.getModifiers(),
+ newpt.x, newpt.y, sourceEvent.getClickCount(),
+ sourceEvent.isPopupTrigger(),
+ sourceEvent.getButton());
+ }
+
+
+ /**
+ * Calls {@link java.awt.EventQueue.invokeLater} with the
+ * specified {@link Runnable}.
+ */
+ public static void invokeLater(Runnable doRun)
+ {
+ java.awt.EventQueue.invokeLater(doRun);
+ }
+
+ /**
+ * Calls {@link java.awt.EventQueue.invokeAndWait} with the
+ * specified {@link Runnable}.
+ */
+ public static void invokeAndWait(Runnable doRun)
+ throws InterruptedException,
+ InvocationTargetException
+ {
+ java.awt.EventQueue.invokeAndWait(doRun);
+ }
+
+ /**
+ * Calls {@link java.awt.EventQueue.isEventDispatchThread}.
+ */
+ public static boolean isEventDispatchThread()
+ {
+ return java.awt.EventQueue.isDispatchThread();
+ }
+}
diff --git a/gnu/java/awt/BitMaskExtent.java b/gnu/java/awt/BitMaskExtent.java
index 3caad76a9..281349910 100644
--- a/gnu/java/awt/BitMaskExtent.java
+++ b/gnu/java/awt/BitMaskExtent.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/BitwiseXORComposite.java b/gnu/java/awt/BitwiseXORComposite.java
index 6a05ee6c5..b568e1108 100644
--- a/gnu/java/awt/BitwiseXORComposite.java
+++ b/gnu/java/awt/BitwiseXORComposite.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/Buffers.java b/gnu/java/awt/Buffers.java
index 22fc1f8ab..c6ccf9191 100644
--- a/gnu/java/awt/Buffers.java
+++ b/gnu/java/awt/Buffers.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/ClasspathToolkit.java b/gnu/java/awt/ClasspathToolkit.java
index 72302e11c..5fb444f98 100644
--- a/gnu/java/awt/ClasspathToolkit.java
+++ b/gnu/java/awt/ClasspathToolkit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,7 +38,9 @@ exception statement from your version. */
package gnu.java.awt;
+import gnu.java.awt.EmbeddedWindow;
import gnu.java.awt.peer.ClasspathFontPeer;
+import gnu.java.awt.peer.EmbeddedWindowPeer;
import gnu.java.awt.peer.ClasspathTextLayoutPeer;
import java.awt.AWTException;
@@ -355,6 +357,14 @@ public abstract class ClasspathToolkit
public abstract RobotPeer createRobot (GraphicsDevice screen)
throws AWTException;
+ /**
+ * Creates an embedded window peer, and associates it with an
+ * EmbeddedWindow object.
+ *
+ * @param w The embedded window with which to associate a peer.
+ */
+ public abstract EmbeddedWindowPeer createEmbeddedWindow (EmbeddedWindow w);
+
/**
* Used to register ImageIO SPIs provided by the toolkit.
*/
diff --git a/gnu/java/awt/ComponentDataBlitOp.java b/gnu/java/awt/ComponentDataBlitOp.java
index 3401a8063..545427ea7 100644
--- a/gnu/java/awt/ComponentDataBlitOp.java
+++ b/gnu/java/awt/ComponentDataBlitOp.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/EmbeddedWindow.java b/gnu/java/awt/EmbeddedWindow.java
index c3cfac48b..a85ce7454 100644
--- a/gnu/java/awt/EmbeddedWindow.java
+++ b/gnu/java/awt/EmbeddedWindow.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -85,12 +85,8 @@ public class EmbeddedWindow extends Frame
*/
public void addNotify()
{
- Toolkit tk = getToolkit();
-
- if (! (tk instanceof EmbeddedWindowSupport))
- throw new UnsupportedOperationException
- ("Embedded windows are not supported by the current peers: "
- + tk.getClass());
+ // Assume we're using ClasspathToolkit
+ ClasspathToolkit tk = (ClasspathToolkit) getToolkit();
// Circumvent the package-privateness of the AWT internal
// java.awt.Component.peer member variable.
@@ -98,7 +94,7 @@ public class EmbeddedWindow extends Frame
{
Field peerField = Component.class.getDeclaredField("peer");
AccessController.doPrivileged(new SetAccessibleAction(peerField));
- peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this));
+ peerField.set(this, tk.createEmbeddedWindow (this));
}
catch (IllegalAccessException e)
{
diff --git a/gnu/java/awt/EventModifier.java b/gnu/java/awt/EventModifier.java
index fe1a2782a..565fcbc32 100644
--- a/gnu/java/awt/EventModifier.java
+++ b/gnu/java/awt/EventModifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/FocusManager.java b/gnu/java/awt/FocusManager.java
new file mode 100644
index 000000000..49b40bfc1
--- /dev/null
+++ b/gnu/java/awt/FocusManager.java
@@ -0,0 +1,52 @@
+/* FocusManager.java -- Provide Swing FocusManager API compatibility
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.java.awt;
+
+/**
+ * This is a subclass of the otherwise abstract class
+ * {@link javax.swing.FocusManager}. Its sole purpose is to make the Swing
+ * FocusManager usable as a FocusManager in AWT, so that we can provide both
+ * the new (1.4) KeyboardFocusManager API and still support the older
+ * Swing FocusManager.
+ *
+ * @author Roman Kennke
+ */
+public class FocusManager
+ extends javax.swing.FocusManager
+{
+}
diff --git a/gnu/java/awt/GradientPaintContext.java b/gnu/java/awt/GradientPaintContext.java
index 6073917cd..5e1d62dd9 100644
--- a/gnu/java/awt/GradientPaintContext.java
+++ b/gnu/java/awt/GradientPaintContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/CieXyzConverter.java b/gnu/java/awt/color/CieXyzConverter.java
index 4078ffa51..174280585 100644
--- a/gnu/java/awt/color/CieXyzConverter.java
+++ b/gnu/java/awt/color/CieXyzConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ClutProfileConverter.java b/gnu/java/awt/color/ClutProfileConverter.java
index 471a47932..bff97cc9b 100644
--- a/gnu/java/awt/color/ClutProfileConverter.java
+++ b/gnu/java/awt/color/ClutProfileConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ColorLookUpTable.java b/gnu/java/awt/color/ColorLookUpTable.java
index bf128907d..6b6418bc2 100644
--- a/gnu/java/awt/color/ColorLookUpTable.java
+++ b/gnu/java/awt/color/ColorLookUpTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ColorSpaceConverter.java b/gnu/java/awt/color/ColorSpaceConverter.java
index 20bb89b7a..63ba08a4f 100644
--- a/gnu/java/awt/color/ColorSpaceConverter.java
+++ b/gnu/java/awt/color/ColorSpaceConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/GrayProfileConverter.java b/gnu/java/awt/color/GrayProfileConverter.java
index 94ab3db5d..3c725138a 100644
--- a/gnu/java/awt/color/GrayProfileConverter.java
+++ b/gnu/java/awt/color/GrayProfileConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/GrayScaleConverter.java b/gnu/java/awt/color/GrayScaleConverter.java
index 6ac3e6d38..7a27ddba8 100644
--- a/gnu/java/awt/color/GrayScaleConverter.java
+++ b/gnu/java/awt/color/GrayScaleConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/LinearRGBConverter.java b/gnu/java/awt/color/LinearRGBConverter.java
index 20ba56dbf..13a4e2c04 100644
--- a/gnu/java/awt/color/LinearRGBConverter.java
+++ b/gnu/java/awt/color/LinearRGBConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ProfileHeader.java b/gnu/java/awt/color/ProfileHeader.java
index 759400540..4fdef560a 100644
--- a/gnu/java/awt/color/ProfileHeader.java
+++ b/gnu/java/awt/color/ProfileHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/PyccConverter.java b/gnu/java/awt/color/PyccConverter.java
index b3607af6d..cd50d8776 100644
--- a/gnu/java/awt/color/PyccConverter.java
+++ b/gnu/java/awt/color/PyccConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/RgbProfileConverter.java b/gnu/java/awt/color/RgbProfileConverter.java
index a52e80a2d..0cbd28f6c 100644
--- a/gnu/java/awt/color/RgbProfileConverter.java
+++ b/gnu/java/awt/color/RgbProfileConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/SrgbConverter.java b/gnu/java/awt/color/SrgbConverter.java
index f94ee674a..a30a0db90 100644
--- a/gnu/java/awt/color/SrgbConverter.java
+++ b/gnu/java/awt/color/SrgbConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/TagEntry.java b/gnu/java/awt/color/TagEntry.java
index 1e67dc2b6..a97864683 100644
--- a/gnu/java/awt/color/TagEntry.java
+++ b/gnu/java/awt/color/TagEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ToneReproductionCurve.java b/gnu/java/awt/color/ToneReproductionCurve.java
index f3b59b2ae..a1bccbd40 100644
--- a/gnu/java/awt/color/ToneReproductionCurve.java
+++ b/gnu/java/awt/color/ToneReproductionCurve.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/package.html b/gnu/java/awt/color/package.html
index 209002146..c4705cce5 100644
--- a/gnu/java/awt/color/package.html
+++ b/gnu/java/awt/color/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/image/ImageDecoder.java b/gnu/java/awt/image/ImageDecoder.java
index 63d3937bf..141c85417 100644
--- a/gnu/java/awt/image/ImageDecoder.java
+++ b/gnu/java/awt/image/ImageDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/image/XBMDecoder.java b/gnu/java/awt/image/XBMDecoder.java
index 54bfd6cb0..0793d8ee7 100644
--- a/gnu/java/awt/image/XBMDecoder.java
+++ b/gnu/java/awt/image/XBMDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/image/package.html b/gnu/java/awt/image/package.html
index 2aa55c40f..8823367ea 100644
--- a/gnu/java/awt/image/package.html
+++ b/gnu/java/awt/image/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/package.html b/gnu/java/awt/package.html
index d23292649..166168510 100644
--- a/gnu/java/awt/package.html
+++ b/gnu/java/awt/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/ClasspathFontPeer.java b/gnu/java/awt/peer/ClasspathFontPeer.java
index d34e86300..78ab3a9de 100644
--- a/gnu/java/awt/peer/ClasspathFontPeer.java
+++ b/gnu/java/awt/peer/ClasspathFontPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/ClasspathTextLayoutPeer.java b/gnu/java/awt/peer/ClasspathTextLayoutPeer.java
index 07b4b3eb4..70df2ef74 100644
--- a/gnu/java/awt/peer/ClasspathTextLayoutPeer.java
+++ b/gnu/java/awt/peer/ClasspathTextLayoutPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/EmbeddedWindowPeer.java b/gnu/java/awt/peer/EmbeddedWindowPeer.java
index 95a56d1a5..4c64a1d2d 100644
--- a/gnu/java/awt/peer/EmbeddedWindowPeer.java
+++ b/gnu/java/awt/peer/EmbeddedWindowPeer.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/GLightweightPeer.java b/gnu/java/awt/peer/GLightweightPeer.java
index c3219d1ea..3bcaebcea 100644
--- a/gnu/java/awt/peer/GLightweightPeer.java
+++ b/gnu/java/awt/peer/GLightweightPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GThreadMutex.java b/gnu/java/awt/peer/gtk/GThreadMutex.java
index 111c9a801..e73df9e55 100644
--- a/gnu/java/awt/peer/gtk/GThreadMutex.java
+++ b/gnu/java/awt/peer/gtk/GThreadMutex.java
@@ -18,8 +18,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java b/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java
index 753c7cd46..9a1b8e3a3 100644
--- a/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java
+++ b/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java
@@ -19,8 +19,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkFontMetrics.java b/gnu/java/awt/peer/gtk/GdkFontMetrics.java
index e871587a4..7a439e83a 100644
--- a/gnu/java/awt/peer/gtk/GdkFontMetrics.java
+++ b/gnu/java/awt/peer/gtk/GdkFontMetrics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkFontPeer.java b/gnu/java/awt/peer/gtk/GdkFontPeer.java
index d130c1175..c6d42b372 100644
--- a/gnu/java/awt/peer/gtk/GdkFontPeer.java
+++ b/gnu/java/awt/peer/gtk/GdkFontPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkGlyphVector.java b/gnu/java/awt/peer/gtk/GdkGlyphVector.java
index 29d38b5e3..f0ddea43a 100644
--- a/gnu/java/awt/peer/gtk/GdkGlyphVector.java
+++ b/gnu/java/awt/peer/gtk/GdkGlyphVector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkGraphics.java b/gnu/java/awt/peer/gtk/GdkGraphics.java
index c870dc1d4..65c01b86e 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphics.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package gnu.java.awt.peer.gtk;
+import gnu.classpath.Configuration;
+
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
@@ -52,7 +54,17 @@ import java.text.AttributedCharacterIterator;
public class GdkGraphics extends Graphics
{
- private final int native_state = GtkGenericPeer.getUniqueInteger();
+ static
+ {
+ if (Configuration.INIT_LOAD_LIBRARY)
+ {
+ System.loadLibrary("gtkpeer");
+ }
+ initStaticState ();
+ }
+
+ static native void initStaticState();
+ private final int native_state = GtkGenericPeer.getUniqueInteger ();
Color color, xorColor;
GtkComponentPeer component;
diff --git a/gnu/java/awt/peer/gtk/GdkGraphics2D.java b/gnu/java/awt/peer/gtk/GdkGraphics2D.java
index 0ddc1c7a8..b8203179d 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphics2D.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphics2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -201,7 +201,7 @@ public class GdkGraphics2D extends Graphics2D
initState(width, height);
setColor(Color.black);
- setBackground(Color.black);
+ setBackground(new Color(0, 0, 0, 0));
setPaint(getColor());
setFont(new Font("SansSerif", Font.PLAIN, 12));
setTransform(new AffineTransform());
@@ -255,7 +255,7 @@ public class GdkGraphics2D extends Graphics2D
initState(this.pixelBuffer, bimage.getWidth(), bimage.getHeight());
setColor(Color.black);
- setBackground(Color.black);
+ setBackground(new Color(0, 0, 0, 0));
setPaint(getColor());
setFont(new Font("SansSerif", Font.PLAIN, 12));
setTransform(new AffineTransform());
@@ -290,8 +290,8 @@ public class GdkGraphics2D extends Graphics2D
private native void cairoRestore();
private native void cairoSetMatrix(double[] m);
private native void cairoSetOperator(int cairoOperator);
- private native void cairoSetRGBColor(double red, double green, double blue);
- private native void cairoSetAlpha(double alpha);
+ private native void cairoSetRGBAColor(double red, double green,
+ double blue, double alpha);
private native void cairoSetFillRule(int cairoFillRule);
private native void cairoSetLineWidth(double width);
private native void cairoSetLineCap(int cairoLineCap);
@@ -498,9 +498,10 @@ public class GdkGraphics2D extends Graphics2D
{
int height = bimage.getHeight();
int width = bimage.getWidth();
+ int index = 0;
for (int y = 0; y < height; ++y)
for (int x = 0; x < width; ++x)
- bimage.setRGB(x, y, pixelBuffer[y*width+height]);
+ bimage.setRGB(x, y, pixelBuffer[index++]);
}
}
@@ -544,7 +545,7 @@ public class GdkGraphics2D extends Graphics2D
// draw an image which has actually been loaded
// into memory fully
BufferedImage b = (BufferedImage) img;
- return drawRaster(b.getColorModel(), b.getData(),
+ return drawRaster(b.getColorModel(), b.getTile(0, 0),
invertedXform, bgcolor);
}
else
@@ -807,9 +808,8 @@ public class GdkGraphics2D extends Graphics2D
fg = c;
paint = c;
- cairoSetRGBColor(fg.getRed() / 255.0, fg.getGreen() / 255.0,
- fg.getBlue() / 255.0);
- cairoSetAlpha((fg.getAlpha() & 255) / 255.0);
+ cairoSetRGBAColor(fg.getRed() / 255.0, fg.getGreen() / 255.0,
+ fg.getBlue() / 255.0, fg.getAlpha() / 255.0);
}
public Color getColor()
@@ -914,9 +914,8 @@ public class GdkGraphics2D extends Graphics2D
public void clearRect(int x, int y, int width, int height)
{
- cairoSetRGBColor(bg.getRed() / 255.0, bg.getGreen() / 255.0,
- bg.getBlue() / 255.0);
- cairoSetAlpha(1.0);
+ cairoSetRGBAColor(bg.getRed() / 255.0, bg.getGreen() / 255.0,
+ bg.getBlue() / 255.0, 1.0);
cairoNewPath();
cairoRectangle(x, y, width, height);
cairoFill();
diff --git a/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java b/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
index 94e1b0f01..bfad87aca 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java b/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
index 3f7b87f45..4f9d1c27a 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java b/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
index ee6c38f3c..57d5a36da 100644
--- a/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
+++ b/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -83,15 +83,18 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
static native void initStaticState();
private final int native_state = GtkGenericPeer.getUniqueInteger ();
- private boolean initialized = false;
+
+ // initState() has been called, but pumpDone() has not yet been called.
+ private boolean needsClose = false;
// the current set of ImageConsumers for this decoder
Vector curr;
// interface to GdkPixbuf
native void initState ();
- native void pumpBytes (byte[] bytes, int len);
- native void finish ();
+ native void pumpBytes (byte[] bytes, int len) throws IOException;
+ native void pumpDone () throws IOException;
+ native void finish (boolean needsClose);
static native void streamImage(int[] bytes, String format, int width, int height, boolean hasAlpha, DataOutput sink);
// gdk-pixbuf provids data in RGBA format
@@ -163,8 +166,11 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
byte bytes[] = new byte[4096];
int len = 0;
initState();
+ needsClose = true;
while ((len = is.read (bytes)) != -1)
pumpBytes (bytes, len);
+ pumpDone();
+ needsClose = false;
for (int i = 0; i < curr.size (); i++)
{
@@ -177,7 +183,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
public void finalize()
{
- finish();
+ finish(needsClose);
}
diff --git a/gnu/java/awt/peer/gtk/GdkRobotPeer.java b/gnu/java/awt/peer/gtk/GdkRobotPeer.java
index 054e73322..6d0218d05 100644
--- a/gnu/java/awt/peer/gtk/GdkRobotPeer.java
+++ b/gnu/java/awt/peer/gtk/GdkRobotPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java b/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
index c74fb880f..2bf9d23db 100644
--- a/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
+++ b/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkTextLayout.java b/gnu/java/awt/peer/gtk/GdkTextLayout.java
index 1a456d12a..ff51745f2 100644
--- a/gnu/java/awt/peer/gtk/GdkTextLayout.java
+++ b/gnu/java/awt/peer/gtk/GdkTextLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkButtonPeer.java b/gnu/java/awt/peer/gtk/GtkButtonPeer.java
index 1ef992f02..ab5df9f46 100644
--- a/gnu/java/awt/peer/gtk/GtkButtonPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkButtonPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkCanvasPeer.java b/gnu/java/awt/peer/gtk/GtkCanvasPeer.java
index 1a0c4c968..dc2176120 100644
--- a/gnu/java/awt/peer/gtk/GtkCanvasPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCanvasPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java b/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java
index e387f1287..46b0733d3 100644
--- a/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java b/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
index 83aa98981..01a6e3102 100644
--- a/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java b/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
index 4af88f533..851757245 100644
--- a/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkChoicePeer.java b/gnu/java/awt/peer/gtk/GtkChoicePeer.java
index 43e48328d..5028ea779 100644
--- a/gnu/java/awt/peer/gtk/GtkChoicePeer.java
+++ b/gnu/java/awt/peer/gtk/GtkChoicePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -72,6 +72,8 @@ public class GtkChoicePeer extends GtkComponentPeer
native void nativeRemove (int index);
native void nativeRemoveAll ();
+ native void connectSignals ();
+
public native void select (int position);
public void add (String item, int index)
@@ -118,7 +120,7 @@ public class GtkChoicePeer extends GtkComponentPeer
add (item, position);
}
- protected void choicePostItemEvent (String label, int stateChange)
+ protected void postChoiceItemEvent (String label, int stateChange)
{
// Must set our state before notifying listeners
if (stateChange == ItemEvent.SELECTED)
diff --git a/gnu/java/awt/peer/gtk/GtkClipboard.java b/gnu/java/awt/peer/gtk/GtkClipboard.java
index b9cc1613b..c719cddb5 100644
--- a/gnu/java/awt/peer/gtk/GtkClipboard.java
+++ b/gnu/java/awt/peer/gtk/GtkClipboard.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkComponentPeer.java b/gnu/java/awt/peer/gtk/GtkComponentPeer.java
index 3a1bf8b66..a7aea091d 100644
--- a/gnu/java/awt/peer/gtk/GtkComponentPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkComponentPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -63,11 +63,15 @@ import java.awt.event.ItemEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.event.PaintEvent;
+import java.awt.event.TextEvent;
+import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.awt.image.VolatileImage;
import java.awt.peer.ComponentPeer;
+import java.util.Timer;
+import java.util.TimerTask;
public class GtkComponentPeer extends GtkGenericPeer
implements ComponentPeer
@@ -81,6 +85,8 @@ public class GtkComponentPeer extends GtkGenericPeer
boolean isInRepaint;
+ Timer repaintTimer = new Timer (true);
+
/* this isEnabled differs from Component.isEnabled, in that it
knows if a parent is disabled. In that case Component.isEnabled
may return true, but our isEnabled will always return false */
@@ -103,6 +109,13 @@ public class GtkComponentPeer extends GtkGenericPeer
native boolean isRealized ();
+ void realize ()
+ {
+ // Default implementation does nothing
+ }
+
+ native void setNativeEventMask ();
+
void create ()
{
throw new RuntimeException ();
@@ -135,6 +148,10 @@ public class GtkComponentPeer extends GtkGenericPeer
if (awtComponent instanceof Window
|| (parent != null && ! parent.isShowing ()))
setParentAndBounds ();
+
+ setNativeEventMask ();
+
+ realize ();
}
void setParentAndBounds ()
@@ -208,7 +225,12 @@ public class GtkComponentPeer extends GtkGenericPeer
public Image createImage (int width, int height)
{
- GtkImage image = new GtkImage (width, height);
+ Image image;
+ if (GtkToolkit.useGraphics2D ())
+ image = new BufferedImage (width, height, BufferedImage.TYPE_INT_RGB);
+ else
+ image = new GtkImage (width, height);
+
Graphics g = image.getGraphics();
g.setColor(getBackground());
g.fillRect(0, 0, width, height);
@@ -354,8 +376,26 @@ public class GtkComponentPeer extends GtkGenericPeer
if (x == 0 && y == 0 && width == 0 && height == 0)
return;
- q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE,
- new Rectangle (x, y, width, height)));
+ repaintTimer.schedule(new RepaintTimerTask(x, y, width, height), tm);
+ }
+
+ private class RepaintTimerTask extends TimerTask
+ {
+ private int x, y, width, height;
+
+ RepaintTimerTask(int x, int y, int width, int height)
+ {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+
+ public void run()
+ {
+ q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE,
+ new Rectangle (x, y, width, height)));
+ }
}
public void requestFocus ()
@@ -524,6 +564,11 @@ public class GtkComponentPeer extends GtkGenericPeer
item, stateChange));
}
+ protected void postTextEvent ()
+ {
+ q().postEvent (new TextEvent (awtComponent, TextEvent.TEXT_VALUE_CHANGED));
+ }
+
public GraphicsConfiguration getGraphicsConfiguration ()
{
// FIXME: just a stub for now.
@@ -563,7 +608,8 @@ public class GtkComponentPeer extends GtkGenericPeer
public void updateCursorImmediately ()
{
-
+ if (awtComponent.getCursor() != null)
+ setCursor(awtComponent.getCursor());
}
public boolean handlesWheelScrolling ()
diff --git a/gnu/java/awt/peer/gtk/GtkContainerPeer.java b/gnu/java/awt/peer/gtk/GtkContainerPeer.java
index e4aea64c9..c2865f70f 100644
--- a/gnu/java/awt/peer/gtk/GtkContainerPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkContainerPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkDialogPeer.java b/gnu/java/awt/peer/gtk/GtkDialogPeer.java
index 9bf234404..c2cbc37dc 100644
--- a/gnu/java/awt/peer/gtk/GtkDialogPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkDialogPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java b/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java
index 9ee41c985..0533d2759 100644
--- a/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java b/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
index 4281b49cc..bd1f0775a 100644
--- a/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkFontPeer.java b/gnu/java/awt/peer/gtk/GtkFontPeer.java
index e0f070368..80ad15803 100644
--- a/gnu/java/awt/peer/gtk/GtkFontPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFontPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkFramePeer.java b/gnu/java/awt/peer/gtk/GtkFramePeer.java
index 53e06bc08..b242d66ad 100644
--- a/gnu/java/awt/peer/gtk/GtkFramePeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFramePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkGenericPeer.java b/gnu/java/awt/peer/gtk/GtkGenericPeer.java
index f161526f6..705eed235 100644
--- a/gnu/java/awt/peer/gtk/GtkGenericPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkGenericPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -90,4 +90,9 @@ public class GtkGenericPeer
}
native void gtkWidgetModifyFont (String name, int style, int size);
+
+ static void printCurrentThread ()
+ {
+ System.out.println ("gtkgenericpeer, thread: " + Thread.currentThread ());
+ }
}
diff --git a/gnu/java/awt/peer/gtk/GtkImage.java b/gnu/java/awt/peer/gtk/GtkImage.java
index 9b794b4aa..abb4137f4 100644
--- a/gnu/java/awt/peer/gtk/GtkImage.java
+++ b/gnu/java/awt/peer/gtk/GtkImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -100,6 +100,11 @@ public class GtkImage extends Image
boolean offScreen;
/**
+ * Error flag for loading.
+ */
+ boolean errorLoading;
+
+ /**
* Original source, if created from an ImageProducer.
*/
ImageProducer source;
@@ -176,6 +181,7 @@ public class GtkImage extends Image
isLoaded = false;
observers = new Vector();
source = producer;
+ errorLoading = false;
source.startProduction(new GtkImageConsumer(this, source));
offScreen = false;
}
@@ -243,6 +249,13 @@ public class GtkImage extends Image
this.width = width;
this.height = height;
props = (properties != null) ? properties : new Hashtable();
+
+ if (width <= 0 || height <= 0 || pixels == null)
+ {
+ errorLoading = true;
+ return;
+ }
+
isLoaded = true;
deliver();
createPixmap();
@@ -281,6 +294,8 @@ public class GtkImage extends Image
*/
public ImageProducer getSource ()
{
+ if (!isLoaded)
+ return null;
return new MemoryImageSource(width, height, nativeModel, getPixels(),
0, width);
}
@@ -344,7 +359,12 @@ public class GtkImage extends Image
public int checkImage (ImageObserver observer)
{
if (addObserver(observer))
- return 0;
+ {
+ if (errorLoading == true)
+ return ImageObserver.ERROR;
+ else
+ return 0;
+ }
return ImageObserver.ALLBITS | ImageObserver.WIDTH | ImageObserver.HEIGHT;
}
@@ -373,18 +393,33 @@ public class GtkImage extends Image
int dstY = (dy1 < dy2) ? dy1 : dy2;
// Clipping. This requires the dst to be scaled as well,
+ if (srcWidth > width)
+ {
+ dstWidth = (int)((double)dstWidth*((double)width/(double)srcWidth));
+ srcWidth = width - srcX;
+ }
+
+ if (srcHeight > height)
+ {
+ dstHeight = (int)((double)dstHeight*((double)height/(double)srcHeight));
+ srcHeight = height - srcY;
+ }
+
if (srcWidth + srcX > width)
{
dstWidth = (int)((double)dstWidth * (double)(width - srcX)/(double)srcWidth);
srcWidth = width - srcX;
- }
+ }
if (srcHeight + srcY > height)
{
dstHeight = (int)((double)dstHeight * (double)(width - srcY)/(double)srcHeight);
srcHeight = height - srcY;
}
-
+
+ if ( srcWidth <= 0 || srcHeight <= 0 || dstWidth <= 0 || dstHeight <= 0)
+ return true;
+
if(bgcolor != null)
drawPixelsScaledFlipped (g, bgcolor.getRed (), bgcolor.getGreen (),
bgcolor.getBlue (),
@@ -433,7 +468,8 @@ public class GtkImage extends Image
ImageObserver.PROPERTIES |
ImageObserver.ALLBITS;
- for(int i=0; i < observers.size(); i++)
+ if (observers != null)
+ for(int i=0; i < observers.size(); i++)
((ImageObserver)observers.elementAt(i)).
imageUpdate(this, flags, 0, 0, width, height);
diff --git a/gnu/java/awt/peer/gtk/GtkImageConsumer.java b/gnu/java/awt/peer/gtk/GtkImageConsumer.java
index 93743fe1a..299f01dca 100644
--- a/gnu/java/awt/peer/gtk/GtkImageConsumer.java
+++ b/gnu/java/awt/peer/gtk/GtkImageConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,6 +45,7 @@ import java.awt.image.DirectColorModel;
import java.awt.image.ImageConsumer;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
+import java.awt.image.MemoryImageSource;
import java.util.Hashtable;
import java.util.Vector;
@@ -70,7 +71,10 @@ public class GtkImageConsumer implements ImageConsumer
public synchronized void imageComplete (int status)
{
- source.removeConsumer(this);
+ // we need to reuse the pixel cache for memory image sources since
+ // a memory image's backing array can be updated "live".
+ if (!(source instanceof MemoryImageSource))
+ source.removeConsumer(this);
target.setImage(width, height, pixelCache, properties);
}
diff --git a/gnu/java/awt/peer/gtk/GtkLabelPeer.java b/gnu/java/awt/peer/gtk/GtkLabelPeer.java
index 02251632b..fdd5fd15f 100644
--- a/gnu/java/awt/peer/gtk/GtkLabelPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkLabelPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkListPeer.java b/gnu/java/awt/peer/gtk/GtkListPeer.java
index 13055d33c..ff12fe34b 100644
--- a/gnu/java/awt/peer/gtk/GtkListPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkListPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkMenuBarPeer.java b/gnu/java/awt/peer/gtk/GtkMenuBarPeer.java
index 4b547f56a..79eeaf9ba 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuBarPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuBarPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java b/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
index cd7ca8ac7..8d9d1ca04 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java b/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
index f85648ee8..5728f262b 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkMenuPeer.java b/gnu/java/awt/peer/gtk/GtkMenuPeer.java
index 971a349d2..80332dd6a 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkPanelPeer.java b/gnu/java/awt/peer/gtk/GtkPanelPeer.java
index fbdfcf472..fb5addeb4 100644
--- a/gnu/java/awt/peer/gtk/GtkPanelPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkPanelPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -65,4 +65,6 @@ public class GtkPanelPeer extends GtkContainerPeer
}
super.handleEvent (event);
}
+
+ native void connectSignals ();
}
diff --git a/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java b/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
index ed0b52193..d14c16dd7 100644
--- a/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java b/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java
index ae337a071..69f8b4946 100644
--- a/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java
+++ b/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java b/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
index 065bab12e..aa3a26e34 100644
--- a/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java b/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java
index 94874deb6..a842b8318 100644
--- a/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,11 +41,13 @@ package gnu.java.awt.peer.gtk;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
+import java.awt.Rectangle;
import java.awt.TextArea;
import java.awt.peer.TextAreaPeer;
+import java.awt.peer.TextComponentPeer;
-public class GtkTextAreaPeer extends GtkTextComponentPeer
- implements TextAreaPeer
+public class GtkTextAreaPeer extends GtkComponentPeer
+ implements TextComponentPeer, TextAreaPeer
{
private static transient int DEFAULT_ROWS = 10;
private static transient int DEFAULT_COLS = 80;
@@ -55,6 +57,35 @@ public class GtkTextAreaPeer extends GtkTextComponentPeer
native void gtkWidgetModifyFont (String name, int style, int size);
native void gtkWidgetRequestFocus ();
+ public native void connectSignals ();
+
+ public native int getCaretPosition ();
+ public native void setCaretPosition (int pos);
+ public native int getSelectionStart ();
+ public native int getSelectionEnd ();
+ public native String getText ();
+ public native void select (int start, int end);
+ public native void setEditable (boolean state);
+ public native void setText (String text);
+
+ public int getIndexAtPoint(int x, int y)
+ {
+ // FIXME
+ return 0;
+ }
+
+ public Rectangle getCharacterBounds (int pos)
+ {
+ // FIXME
+ return null;
+ }
+
+ public long filterEvents (long filter)
+ {
+ // FIXME
+ return filter;
+ }
+
void create ()
{
Font f = awtComponent.getFont ();
@@ -87,6 +118,9 @@ public class GtkTextAreaPeer extends GtkTextComponentPeer
public GtkTextAreaPeer (TextArea ta)
{
super (ta);
+
+ setText (ta.getText ());
+ setCaretPosition (0);
}
public native void insert (String str, int pos);
diff --git a/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java b/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java
index bd1ac8124..73a976bba 100644
--- a/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,17 +42,48 @@ import java.awt.AWTEvent;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
+import java.awt.Rectangle;
import java.awt.TextField;
import java.awt.event.KeyEvent;
import java.awt.peer.TextFieldPeer;
+import java.awt.peer.TextComponentPeer;
-public class GtkTextFieldPeer extends GtkTextComponentPeer
- implements TextFieldPeer
+public class GtkTextFieldPeer extends GtkComponentPeer
+ implements TextComponentPeer, TextFieldPeer
{
native void create (int width);
native void gtkWidgetSetBackground (int red, int green, int blue);
native void gtkWidgetSetForeground (int red, int green, int blue);
+ public native void connectSignals ();
+
+ public native int getCaretPosition ();
+ public native void setCaretPosition (int pos);
+ public native int getSelectionStart ();
+ public native int getSelectionEnd ();
+ public native String getText ();
+ public native void select (int start, int end);
+ public native void setEditable (boolean state);
+ public native void setText (String text);
+
+ public int getIndexAtPoint(int x, int y)
+ {
+ // FIXME
+ return 0;
+ }
+
+ public Rectangle getCharacterBounds (int pos)
+ {
+ // FIXME
+ return null;
+ }
+
+ public long filterEvents (long filter)
+ {
+ // FIXME
+ return filter;
+ }
+
void create ()
{
Font f = awtComponent.getFont ();
@@ -86,6 +117,9 @@ public class GtkTextFieldPeer extends GtkTextComponentPeer
{
super (tf);
+ setText (tf.getText ());
+ setCaretPosition (0);
+
if (tf.echoCharIsSet ())
setEchoChar (tf.getEchoChar ());
}
diff --git a/gnu/java/awt/peer/gtk/GtkToolkit.java b/gnu/java/awt/peer/gtk/GtkToolkit.java
index 5c0ab5438..69901102f 100644
--- a/gnu/java/awt/peer/gtk/GtkToolkit.java
+++ b/gnu/java/awt/peer/gtk/GtkToolkit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,6 @@ package gnu.java.awt.peer.gtk;
import gnu.classpath.Configuration;
import gnu.java.awt.EmbeddedWindow;
-import gnu.java.awt.EmbeddedWindowSupport;
import gnu.java.awt.peer.ClasspathFontPeer;
import gnu.java.awt.peer.ClasspathTextLayoutPeer;
import gnu.java.awt.peer.EmbeddedWindowPeer;
@@ -86,7 +85,6 @@ import javax.imageio.spi.IIORegistry;
* object to be used.
*/
public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
- implements EmbeddedWindowSupport
{
Hashtable containers = new Hashtable();
static EventQueue q;
diff --git a/gnu/java/awt/peer/gtk/GtkVolatileImage.java b/gnu/java/awt/peer/gtk/GtkVolatileImage.java
index e4d6bc8fa..496090a09 100644
--- a/gnu/java/awt/peer/gtk/GtkVolatileImage.java
+++ b/gnu/java/awt/peer/gtk/GtkVolatileImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkWindowPeer.java b/gnu/java/awt/peer/gtk/GtkWindowPeer.java
index eabe59140..71e05a87d 100644
--- a/gnu/java/awt/peer/gtk/GtkWindowPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkWindowPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -63,6 +63,8 @@ public class GtkWindowPeer extends GtkContainerPeer
native void gtkWindowSetResizable (boolean resizable);
native void gtkWindowSetModal (boolean modal);
+ native void realize ();
+
int getWidth ()
{
return awtComponent.getWidth();
diff --git a/gnu/java/awt/peer/gtk/package.html b/gnu/java/awt/peer/gtk/package.html
index 96bc821dd..8dd4dd892 100644
--- a/gnu/java/awt/peer/gtk/package.html
+++ b/gnu/java/awt/peer/gtk/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/package.html b/gnu/java/awt/peer/package.html
index 458edc52c..846759a28 100644
--- a/gnu/java/awt/peer/package.html
+++ b/gnu/java/awt/peer/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/BeanInfoEmbryo.java b/gnu/java/beans/BeanInfoEmbryo.java
index 7c60e7cd3..0cf73e5b9 100644
--- a/gnu/java/beans/BeanInfoEmbryo.java
+++ b/gnu/java/beans/BeanInfoEmbryo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/DummyAppletContext.java b/gnu/java/beans/DummyAppletContext.java
index e10a9074f..4facb470d 100644
--- a/gnu/java/beans/DummyAppletContext.java
+++ b/gnu/java/beans/DummyAppletContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/DummyAppletStub.java b/gnu/java/beans/DummyAppletStub.java
index ff99e98d9..3bcb43534 100644
--- a/gnu/java/beans/DummyAppletStub.java
+++ b/gnu/java/beans/DummyAppletStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/ExplicitBeanInfo.java b/gnu/java/beans/ExplicitBeanInfo.java
index 6746bd8cc..6da5e8696 100644
--- a/gnu/java/beans/ExplicitBeanInfo.java
+++ b/gnu/java/beans/ExplicitBeanInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/IntrospectionIncubator.java b/gnu/java/beans/IntrospectionIncubator.java
index 9c2a652c3..e0d9480e3 100644
--- a/gnu/java/beans/IntrospectionIncubator.java
+++ b/gnu/java/beans/IntrospectionIncubator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AbstractContext.java b/gnu/java/beans/decoder/AbstractContext.java
index ae945c295..0e95d4329 100644
--- a/gnu/java/beans/decoder/AbstractContext.java
+++ b/gnu/java/beans/decoder/AbstractContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AbstractCreatableObjectContext.java b/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
index e2943e213..47f04fa1c 100644
--- a/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
+++ b/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AbstractElementHandler.java b/gnu/java/beans/decoder/AbstractElementHandler.java
index a097a759b..e5578a990 100644
--- a/gnu/java/beans/decoder/AbstractElementHandler.java
+++ b/gnu/java/beans/decoder/AbstractElementHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AbstractObjectContext.java b/gnu/java/beans/decoder/AbstractObjectContext.java
index 3e3227902..202c33b34 100644
--- a/gnu/java/beans/decoder/AbstractObjectContext.java
+++ b/gnu/java/beans/decoder/AbstractObjectContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ArrayContext.java b/gnu/java/beans/decoder/ArrayContext.java
index 73b8731a8..cf4267f27 100644
--- a/gnu/java/beans/decoder/ArrayContext.java
+++ b/gnu/java/beans/decoder/ArrayContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ArrayHandler.java b/gnu/java/beans/decoder/ArrayHandler.java
index ac8f48673..23f028519 100644
--- a/gnu/java/beans/decoder/ArrayHandler.java
+++ b/gnu/java/beans/decoder/ArrayHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AssemblyException.java b/gnu/java/beans/decoder/AssemblyException.java
index 0b5075b15..29dfa65ac 100644
--- a/gnu/java/beans/decoder/AssemblyException.java
+++ b/gnu/java/beans/decoder/AssemblyException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/BooleanHandler.java b/gnu/java/beans/decoder/BooleanHandler.java
index 2cb1e0405..a34fe346e 100644
--- a/gnu/java/beans/decoder/BooleanHandler.java
+++ b/gnu/java/beans/decoder/BooleanHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ByteHandler.java b/gnu/java/beans/decoder/ByteHandler.java
index f21b280a8..d6c33d14d 100644
--- a/gnu/java/beans/decoder/ByteHandler.java
+++ b/gnu/java/beans/decoder/ByteHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/CharHandler.java b/gnu/java/beans/decoder/CharHandler.java
index 269c250c0..1b31e5b05 100644
--- a/gnu/java/beans/decoder/CharHandler.java
+++ b/gnu/java/beans/decoder/CharHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ClassHandler.java b/gnu/java/beans/decoder/ClassHandler.java
index 1c8aebd60..1dbdd63e7 100644
--- a/gnu/java/beans/decoder/ClassHandler.java
+++ b/gnu/java/beans/decoder/ClassHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ConstructorContext.java b/gnu/java/beans/decoder/ConstructorContext.java
index e2e6ef0ff..7838fb7e2 100644
--- a/gnu/java/beans/decoder/ConstructorContext.java
+++ b/gnu/java/beans/decoder/ConstructorContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/Context.java b/gnu/java/beans/decoder/Context.java
index 55746c856..a2db09732 100644
--- a/gnu/java/beans/decoder/Context.java
+++ b/gnu/java/beans/decoder/Context.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DecoderContext.java b/gnu/java/beans/decoder/DecoderContext.java
index 42700e6ed..69d84e576 100644
--- a/gnu/java/beans/decoder/DecoderContext.java
+++ b/gnu/java/beans/decoder/DecoderContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DefaultExceptionListener.java b/gnu/java/beans/decoder/DefaultExceptionListener.java
index bb20095f0..71e7158e7 100644
--- a/gnu/java/beans/decoder/DefaultExceptionListener.java
+++ b/gnu/java/beans/decoder/DefaultExceptionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DoubleHandler.java b/gnu/java/beans/decoder/DoubleHandler.java
index ae0f18fa1..8f6be7ec0 100644
--- a/gnu/java/beans/decoder/DoubleHandler.java
+++ b/gnu/java/beans/decoder/DoubleHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DummyContext.java b/gnu/java/beans/decoder/DummyContext.java
index 55851dd6e..f3b24549d 100644
--- a/gnu/java/beans/decoder/DummyContext.java
+++ b/gnu/java/beans/decoder/DummyContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DummyHandler.java b/gnu/java/beans/decoder/DummyHandler.java
index 81fb2f8e3..880d76adc 100644
--- a/gnu/java/beans/decoder/DummyHandler.java
+++ b/gnu/java/beans/decoder/DummyHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ElementHandler.java b/gnu/java/beans/decoder/ElementHandler.java
index b3d720c59..e6ae60af8 100644
--- a/gnu/java/beans/decoder/ElementHandler.java
+++ b/gnu/java/beans/decoder/ElementHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/FloatHandler.java b/gnu/java/beans/decoder/FloatHandler.java
index d930aead2..5f0e15cef 100644
--- a/gnu/java/beans/decoder/FloatHandler.java
+++ b/gnu/java/beans/decoder/FloatHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/GrowableArrayContext.java b/gnu/java/beans/decoder/GrowableArrayContext.java
index 971989028..f24a60b4a 100644
--- a/gnu/java/beans/decoder/GrowableArrayContext.java
+++ b/gnu/java/beans/decoder/GrowableArrayContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/IndexContext.java b/gnu/java/beans/decoder/IndexContext.java
index be67ee582..11f840cae 100644
--- a/gnu/java/beans/decoder/IndexContext.java
+++ b/gnu/java/beans/decoder/IndexContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/IntHandler.java b/gnu/java/beans/decoder/IntHandler.java
index e04f95958..a96f4a031 100644
--- a/gnu/java/beans/decoder/IntHandler.java
+++ b/gnu/java/beans/decoder/IntHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/JavaHandler.java b/gnu/java/beans/decoder/JavaHandler.java
index e0a78624a..3bc8c6028 100644
--- a/gnu/java/beans/decoder/JavaHandler.java
+++ b/gnu/java/beans/decoder/JavaHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/LongHandler.java b/gnu/java/beans/decoder/LongHandler.java
index e61726ce0..d7bfa54e5 100644
--- a/gnu/java/beans/decoder/LongHandler.java
+++ b/gnu/java/beans/decoder/LongHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/MethodContext.java b/gnu/java/beans/decoder/MethodContext.java
index 2f951e487..bad0a213f 100644
--- a/gnu/java/beans/decoder/MethodContext.java
+++ b/gnu/java/beans/decoder/MethodContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/MethodFinder.java b/gnu/java/beans/decoder/MethodFinder.java
index ad3d222c6..3968b173a 100644
--- a/gnu/java/beans/decoder/MethodFinder.java
+++ b/gnu/java/beans/decoder/MethodFinder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/NullHandler.java b/gnu/java/beans/decoder/NullHandler.java
index 60a87c380..549617db3 100644
--- a/gnu/java/beans/decoder/NullHandler.java
+++ b/gnu/java/beans/decoder/NullHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ObjectContext.java b/gnu/java/beans/decoder/ObjectContext.java
index 81b270af7..cf88a2c2c 100644
--- a/gnu/java/beans/decoder/ObjectContext.java
+++ b/gnu/java/beans/decoder/ObjectContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ObjectHandler.java b/gnu/java/beans/decoder/ObjectHandler.java
index 801dc747b..dc5b3290b 100644
--- a/gnu/java/beans/decoder/ObjectHandler.java
+++ b/gnu/java/beans/decoder/ObjectHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/PersistenceParser.java b/gnu/java/beans/decoder/PersistenceParser.java
index 5bb4acfdf..4eb37abef 100644
--- a/gnu/java/beans/decoder/PersistenceParser.java
+++ b/gnu/java/beans/decoder/PersistenceParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/PropertyContext.java b/gnu/java/beans/decoder/PropertyContext.java
index 54785764e..838ef814b 100644
--- a/gnu/java/beans/decoder/PropertyContext.java
+++ b/gnu/java/beans/decoder/PropertyContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ShortHandler.java b/gnu/java/beans/decoder/ShortHandler.java
index 8ac74a152..ab6ddbece 100644
--- a/gnu/java/beans/decoder/ShortHandler.java
+++ b/gnu/java/beans/decoder/ShortHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/SimpleHandler.java b/gnu/java/beans/decoder/SimpleHandler.java
index 14b5b9a35..bc187e8a0 100644
--- a/gnu/java/beans/decoder/SimpleHandler.java
+++ b/gnu/java/beans/decoder/SimpleHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/StaticMethodContext.java b/gnu/java/beans/decoder/StaticMethodContext.java
index 407a5d1ea..959c949f7 100644
--- a/gnu/java/beans/decoder/StaticMethodContext.java
+++ b/gnu/java/beans/decoder/StaticMethodContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/StringHandler.java b/gnu/java/beans/decoder/StringHandler.java
index 3154593cf..6f2311a9e 100644
--- a/gnu/java/beans/decoder/StringHandler.java
+++ b/gnu/java/beans/decoder/StringHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/VoidHandler.java b/gnu/java/beans/decoder/VoidHandler.java
index cc291d679..ca3664bbe 100644
--- a/gnu/java/beans/decoder/VoidHandler.java
+++ b/gnu/java/beans/decoder/VoidHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/package.html b/gnu/java/beans/decoder/package.html
index 573e70767..8fe65eeed 100644
--- a/gnu/java/beans/decoder/package.html
+++ b/gnu/java/beans/decoder/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/ColorEditor.java b/gnu/java/beans/editors/ColorEditor.java
index 853633572..b099eb2f0 100644
--- a/gnu/java/beans/editors/ColorEditor.java
+++ b/gnu/java/beans/editors/ColorEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/FontEditor.java b/gnu/java/beans/editors/FontEditor.java
index d634dac15..904f7bebf 100644
--- a/gnu/java/beans/editors/FontEditor.java
+++ b/gnu/java/beans/editors/FontEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeBooleanEditor.java b/gnu/java/beans/editors/NativeBooleanEditor.java
index 84ffdb9e3..3620cc174 100644
--- a/gnu/java/beans/editors/NativeBooleanEditor.java
+++ b/gnu/java/beans/editors/NativeBooleanEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeByteEditor.java b/gnu/java/beans/editors/NativeByteEditor.java
index 2d41f29e3..f3ec5fa19 100644
--- a/gnu/java/beans/editors/NativeByteEditor.java
+++ b/gnu/java/beans/editors/NativeByteEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeDoubleEditor.java b/gnu/java/beans/editors/NativeDoubleEditor.java
index a06b5e08f..8d8aae153 100644
--- a/gnu/java/beans/editors/NativeDoubleEditor.java
+++ b/gnu/java/beans/editors/NativeDoubleEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeFloatEditor.java b/gnu/java/beans/editors/NativeFloatEditor.java
index b76a96255..801377e7d 100644
--- a/gnu/java/beans/editors/NativeFloatEditor.java
+++ b/gnu/java/beans/editors/NativeFloatEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeIntEditor.java b/gnu/java/beans/editors/NativeIntEditor.java
index fcb429652..a6148841c 100644
--- a/gnu/java/beans/editors/NativeIntEditor.java
+++ b/gnu/java/beans/editors/NativeIntEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeLongEditor.java b/gnu/java/beans/editors/NativeLongEditor.java
index 4facba97b..95e9dc870 100644
--- a/gnu/java/beans/editors/NativeLongEditor.java
+++ b/gnu/java/beans/editors/NativeLongEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeShortEditor.java b/gnu/java/beans/editors/NativeShortEditor.java
index 326a51792..ffaa26649 100644
--- a/gnu/java/beans/editors/NativeShortEditor.java
+++ b/gnu/java/beans/editors/NativeShortEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/StringEditor.java b/gnu/java/beans/editors/StringEditor.java
index 3e7fe7788..8242d5475 100644
--- a/gnu/java/beans/editors/StringEditor.java
+++ b/gnu/java/beans/editors/StringEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/package.html b/gnu/java/beans/editors/package.html
index 3d7ac222b..465f68d17 100644
--- a/gnu/java/beans/editors/package.html
+++ b/gnu/java/beans/editors/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/package.html b/gnu/java/beans/package.html
index 108185b1c..f3b052683 100644
--- a/gnu/java/beans/package.html
+++ b/gnu/java/beans/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/ASN1ParsingException.java b/gnu/java/io/ASN1ParsingException.java
index 3a5dade81..5d2c64ab5 100644
--- a/gnu/java/io/ASN1ParsingException.java
+++ b/gnu/java/io/ASN1ParsingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/Base64InputStream.java b/gnu/java/io/Base64InputStream.java
index 617e83151..b0824ab69 100644
--- a/gnu/java/io/Base64InputStream.java
+++ b/gnu/java/io/Base64InputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/ClassLoaderObjectInputStream.java b/gnu/java/io/ClassLoaderObjectInputStream.java
index 5368ec90e..238ab26b1 100644
--- a/gnu/java/io/ClassLoaderObjectInputStream.java
+++ b/gnu/java/io/ClassLoaderObjectInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/NullOutputStream.java b/gnu/java/io/NullOutputStream.java
index 44b5ff17c..526bd26e8 100644
--- a/gnu/java/io/NullOutputStream.java
+++ b/gnu/java/io/NullOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/ObjectIdentityWrapper.java b/gnu/java/io/ObjectIdentityWrapper.java
index bebd69131..6db2e3a52 100644
--- a/gnu/java/io/ObjectIdentityWrapper.java
+++ b/gnu/java/io/ObjectIdentityWrapper.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/PlatformHelper.java b/gnu/java/io/PlatformHelper.java
index 1e21af30a..d2c601231 100644
--- a/gnu/java/io/PlatformHelper.java
+++ b/gnu/java/io/PlatformHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/package.html b/gnu/java/io/package.html
index 465525025..74da8277f 100644
--- a/gnu/java/io/package.html
+++ b/gnu/java/io/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/ArrayHelper.java b/gnu/java/lang/ArrayHelper.java
index 5ce0a99f5..5f675831e 100644
--- a/gnu/java/lang/ArrayHelper.java
+++ b/gnu/java/lang/ArrayHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/CharData.java b/gnu/java/lang/CharData.java
index ce38c95b6..b12078d9f 100644
--- a/gnu/java/lang/CharData.java
+++ b/gnu/java/lang/CharData.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/ClassHelper.java b/gnu/java/lang/ClassHelper.java
index 604c9087a..14c8a39c4 100644
--- a/gnu/java/lang/ClassHelper.java
+++ b/gnu/java/lang/ClassHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/MainThread.java b/gnu/java/lang/MainThread.java
index 64ab19a92..ab529efd1 100644
--- a/gnu/java/lang/MainThread.java
+++ b/gnu/java/lang/MainThread.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/package.html b/gnu/java/lang/package.html
index 4f105c67f..1f16776b6 100644
--- a/gnu/java/lang/package.html
+++ b/gnu/java/lang/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/reflect/TypeSignature.java b/gnu/java/lang/reflect/TypeSignature.java
index 248b3dd8c..842e5bdf0 100644
--- a/gnu/java/lang/reflect/TypeSignature.java
+++ b/gnu/java/lang/reflect/TypeSignature.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/reflect/package.html b/gnu/java/lang/reflect/package.html
index e8effbab7..a837d37d2 100644
--- a/gnu/java/lang/reflect/package.html
+++ b/gnu/java/lang/reflect/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/locale/LocaleHelper.java b/gnu/java/locale/LocaleHelper.java
index 0bf77a6c6..ff0029390 100644
--- a/gnu/java/locale/LocaleHelper.java
+++ b/gnu/java/locale/LocaleHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,7 +38,6 @@ exception statement from your version. */
package gnu.java.locale;
-import java.util.Hashtable;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -87,17 +86,17 @@ public class LocaleHelper
boolean checkRoot)
{
String localizedString;
- Hashtable table;
+ String property;
if (key.equals(""))
return "";
+ property = name + "." + key;
/* Localize to inLocale */
try
{
- table = (Hashtable)
+ localizedString =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
- inLocale).getObject(name);
- localizedString = (String) table.get(key);
+ inLocale).getString(property);
}
catch (MissingResourceException exception)
{
@@ -110,10 +109,9 @@ public class LocaleHelper
{
ResourceBundle bundle;
- bundle =
+ bundle =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation");
- table = (Hashtable) bundle.getObject(name);
- localizedString = (String) table.get(key);
+ localizedString = bundle.getString(property);
}
catch (MissingResourceException exception)
{
@@ -125,10 +123,9 @@ public class LocaleHelper
{
try
{
- table = (Hashtable)
+ localizedString =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
- Locale.ENGLISH).getObject(name);
- localizedString= (String) table.get(key);
+ Locale.ENGLISH).getString(property);
}
catch (MissingResourceException exception)
{
@@ -140,10 +137,10 @@ public class LocaleHelper
{
try
{
- table = (Hashtable)
+ localizedString =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
- new Locale("","","")).getObject(name);
- localizedString= (String) table.get(key);
+ new Locale("","","")
+ ).getString(property);
}
catch (MissingResourceException exception)
{
diff --git a/gnu/java/locale/package.html b/gnu/java/locale/package.html
index b63a101f0..c4bc7c3e8 100644
--- a/gnu/java/locale/package.html
+++ b/gnu/java/locale/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/math/MPN.java b/gnu/java/math/MPN.java
index 34a708170..05491bb7e 100644
--- a/gnu/java/math/MPN.java
+++ b/gnu/java/math/MPN.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/math/package.html b/gnu/java/math/package.html
index 73fa2e5f5..97e101831 100644
--- a/gnu/java/math/package.html
+++ b/gnu/java/math/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/BASE64.java b/gnu/java/net/BASE64.java
index 2b997e38a..901aa0c35 100644
--- a/gnu/java/net/BASE64.java
+++ b/gnu/java/net/BASE64.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/CRLFInputStream.java b/gnu/java/net/CRLFInputStream.java
index 927201c92..d0f9e8c41 100644
--- a/gnu/java/net/CRLFInputStream.java
+++ b/gnu/java/net/CRLFInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/CRLFOutputStream.java b/gnu/java/net/CRLFOutputStream.java
index 665a02b62..f27e0f218 100644
--- a/gnu/java/net/CRLFOutputStream.java
+++ b/gnu/java/net/CRLFOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/EmptyX509TrustManager.java b/gnu/java/net/EmptyX509TrustManager.java
index 18d433b53..b8faf41ad 100644
--- a/gnu/java/net/EmptyX509TrustManager.java
+++ b/gnu/java/net/EmptyX509TrustManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/GetLocalHostAction.java b/gnu/java/net/GetLocalHostAction.java
index 36d17d9df..7483b0257 100644
--- a/gnu/java/net/GetLocalHostAction.java
+++ b/gnu/java/net/GetLocalHostAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/HeaderFieldHelper.java b/gnu/java/net/HeaderFieldHelper.java
index 7c78e69c5..0fb8d953d 100644
--- a/gnu/java/net/HeaderFieldHelper.java
+++ b/gnu/java/net/HeaderFieldHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/LineInputStream.java b/gnu/java/net/LineInputStream.java
index 5028fe480..5ca068618 100644
--- a/gnu/java/net/LineInputStream.java
+++ b/gnu/java/net/LineInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/PlainDatagramSocketImpl.java b/gnu/java/net/PlainDatagramSocketImpl.java
index 1e3425fcd..339b5561c 100644
--- a/gnu/java/net/PlainDatagramSocketImpl.java
+++ b/gnu/java/net/PlainDatagramSocketImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/PlainSocketImpl.java b/gnu/java/net/PlainSocketImpl.java
index 07bbaeee3..05221ff88 100644
--- a/gnu/java/net/PlainSocketImpl.java
+++ b/gnu/java/net/PlainSocketImpl.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/URLParseError.java b/gnu/java/net/URLParseError.java
index 7cb105fb3..90907480f 100644
--- a/gnu/java/net/URLParseError.java
+++ b/gnu/java/net/URLParseError.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/package.html b/gnu/java/net/package.html
index d0a4c8924..5641fbd92 100644
--- a/gnu/java/net/package.html
+++ b/gnu/java/net/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/file/Connection.java b/gnu/java/net/protocol/file/Connection.java
index 05611e24d..52bd04845 100644
--- a/gnu/java/net/protocol/file/Connection.java
+++ b/gnu/java/net/protocol/file/Connection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/file/Handler.java b/gnu/java/net/protocol/file/Handler.java
index fe3fafa7c..fc560491d 100644
--- a/gnu/java/net/protocol/file/Handler.java
+++ b/gnu/java/net/protocol/file/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/file/package.html b/gnu/java/net/protocol/file/package.html
index 81f5faaa5..cbce7413f 100644
--- a/gnu/java/net/protocol/file/package.html
+++ b/gnu/java/net/protocol/file/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/ActiveModeDTP.java b/gnu/java/net/protocol/ftp/ActiveModeDTP.java
index 5e38bfdbd..3755e8beb 100644
--- a/gnu/java/net/protocol/ftp/ActiveModeDTP.java
+++ b/gnu/java/net/protocol/ftp/ActiveModeDTP.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/BlockInputStream.java b/gnu/java/net/protocol/ftp/BlockInputStream.java
index 882e79aee..63897f1d6 100644
--- a/gnu/java/net/protocol/ftp/BlockInputStream.java
+++ b/gnu/java/net/protocol/ftp/BlockInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/BlockOutputStream.java b/gnu/java/net/protocol/ftp/BlockOutputStream.java
index 15ee95679..85481c95b 100644
--- a/gnu/java/net/protocol/ftp/BlockOutputStream.java
+++ b/gnu/java/net/protocol/ftp/BlockOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/CompressedInputStream.java b/gnu/java/net/protocol/ftp/CompressedInputStream.java
index 8a5a34a24..f2e65b7d3 100644
--- a/gnu/java/net/protocol/ftp/CompressedInputStream.java
+++ b/gnu/java/net/protocol/ftp/CompressedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/CompressedOutputStream.java b/gnu/java/net/protocol/ftp/CompressedOutputStream.java
index 136d8b635..b960fb3af 100644
--- a/gnu/java/net/protocol/ftp/CompressedOutputStream.java
+++ b/gnu/java/net/protocol/ftp/CompressedOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/DTP.java b/gnu/java/net/protocol/ftp/DTP.java
index 6c9089710..25580af40 100644
--- a/gnu/java/net/protocol/ftp/DTP.java
+++ b/gnu/java/net/protocol/ftp/DTP.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/DTPInputStream.java b/gnu/java/net/protocol/ftp/DTPInputStream.java
index a9df39087..363a5590f 100644
--- a/gnu/java/net/protocol/ftp/DTPInputStream.java
+++ b/gnu/java/net/protocol/ftp/DTPInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/DTPOutputStream.java b/gnu/java/net/protocol/ftp/DTPOutputStream.java
index 69ae0f81a..83f0be1e3 100644
--- a/gnu/java/net/protocol/ftp/DTPOutputStream.java
+++ b/gnu/java/net/protocol/ftp/DTPOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/FTPConnection.java b/gnu/java/net/protocol/ftp/FTPConnection.java
index 5ead9c814..d0f48727c 100644
--- a/gnu/java/net/protocol/ftp/FTPConnection.java
+++ b/gnu/java/net/protocol/ftp/FTPConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/FTPException.java b/gnu/java/net/protocol/ftp/FTPException.java
index cdf4cc7a4..14ad3813f 100644
--- a/gnu/java/net/protocol/ftp/FTPException.java
+++ b/gnu/java/net/protocol/ftp/FTPException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/FTPResponse.java b/gnu/java/net/protocol/ftp/FTPResponse.java
index 3ce998291..ec72c732c 100644
--- a/gnu/java/net/protocol/ftp/FTPResponse.java
+++ b/gnu/java/net/protocol/ftp/FTPResponse.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/FTPURLConnection.java b/gnu/java/net/protocol/ftp/FTPURLConnection.java
index efc6f635b..62c40f19e 100644
--- a/gnu/java/net/protocol/ftp/FTPURLConnection.java
+++ b/gnu/java/net/protocol/ftp/FTPURLConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/Handler.java b/gnu/java/net/protocol/ftp/Handler.java
index 01e187c4c..88491b3c1 100644
--- a/gnu/java/net/protocol/ftp/Handler.java
+++ b/gnu/java/net/protocol/ftp/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/PassiveModeDTP.java b/gnu/java/net/protocol/ftp/PassiveModeDTP.java
index 495a59d73..6f4fd6341 100644
--- a/gnu/java/net/protocol/ftp/PassiveModeDTP.java
+++ b/gnu/java/net/protocol/ftp/PassiveModeDTP.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/StreamInputStream.java b/gnu/java/net/protocol/ftp/StreamInputStream.java
index 0efd2ffc9..93eee4e19 100644
--- a/gnu/java/net/protocol/ftp/StreamInputStream.java
+++ b/gnu/java/net/protocol/ftp/StreamInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/StreamOutputStream.java b/gnu/java/net/protocol/ftp/StreamOutputStream.java
index 67fd4f3b8..a6e28ece3 100644
--- a/gnu/java/net/protocol/ftp/StreamOutputStream.java
+++ b/gnu/java/net/protocol/ftp/StreamOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/package.html b/gnu/java/net/protocol/ftp/package.html
index ce48c3918..fa3e34d74 100644
--- a/gnu/java/net/protocol/ftp/package.html
+++ b/gnu/java/net/protocol/ftp/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Authenticator.java b/gnu/java/net/protocol/http/Authenticator.java
index 1943810c9..0d7c98819 100644
--- a/gnu/java/net/protocol/http/Authenticator.java
+++ b/gnu/java/net/protocol/http/Authenticator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java b/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
index d817114dc..35ad2bccf 100644
--- a/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
+++ b/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java b/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java
index 1e615916c..680e45d3e 100644
--- a/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java
+++ b/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ChunkedInputStream.java b/gnu/java/net/protocol/http/ChunkedInputStream.java
index cd4a88d9f..c0706b708 100644
--- a/gnu/java/net/protocol/http/ChunkedInputStream.java
+++ b/gnu/java/net/protocol/http/ChunkedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Cookie.java b/gnu/java/net/protocol/http/Cookie.java
index 452ca0f7a..45e2f733f 100644
--- a/gnu/java/net/protocol/http/Cookie.java
+++ b/gnu/java/net/protocol/http/Cookie.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/CookieManager.java b/gnu/java/net/protocol/http/CookieManager.java
index 59a36e317..cc1225c49 100644
--- a/gnu/java/net/protocol/http/CookieManager.java
+++ b/gnu/java/net/protocol/http/CookieManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Credentials.java b/gnu/java/net/protocol/http/Credentials.java
index ff4a9ad12..9e5fcd172 100644
--- a/gnu/java/net/protocol/http/Credentials.java
+++ b/gnu/java/net/protocol/http/Credentials.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/HTTPConnection.java b/gnu/java/net/protocol/http/HTTPConnection.java
index 779dbbdfc..6d9f447a2 100644
--- a/gnu/java/net/protocol/http/HTTPConnection.java
+++ b/gnu/java/net/protocol/http/HTTPConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -402,7 +402,7 @@ public class HTTPConnection
* Retrieves the socket associated with this connection.
* This creates the socket if necessary.
*/
- protected Socket getSocket()
+ protected synchronized Socket getSocket()
throws IOException
{
if (socket == null)
@@ -489,7 +489,7 @@ public class HTTPConnection
sslSocketFactory = factory;
}
- protected InputStream getInputStream()
+ protected synchronized InputStream getInputStream()
throws IOException
{
if (socket == null)
@@ -499,7 +499,7 @@ public class HTTPConnection
return in;
}
- protected OutputStream getOutputStream()
+ protected synchronized OutputStream getOutputStream()
throws IOException
{
if (socket == null)
@@ -512,7 +512,7 @@ public class HTTPConnection
/**
* Closes the underlying socket, if any.
*/
- protected void closeConnection()
+ protected synchronized void closeConnection()
throws IOException
{
if (socket != null)
diff --git a/gnu/java/net/protocol/http/HTTPDateFormat.java b/gnu/java/net/protocol/http/HTTPDateFormat.java
index 0137596aa..2f59e4318 100644
--- a/gnu/java/net/protocol/http/HTTPDateFormat.java
+++ b/gnu/java/net/protocol/http/HTTPDateFormat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/HTTPURLConnection.java b/gnu/java/net/protocol/http/HTTPURLConnection.java
index e739e6f22..9f2055fe6 100644
--- a/gnu/java/net/protocol/http/HTTPURLConnection.java
+++ b/gnu/java/net/protocol/http/HTTPURLConnection.java
@@ -1,5 +1,5 @@
/* HTTPURLConnection.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -82,11 +82,12 @@ public class HTTPURLConnection
*/
private HTTPConnection connection;
- private String proxyHostname;
- private int proxyPort;
- private String agent;
- private boolean keepAlive;
- private int maxConnections;
+ // These are package private for use in anonymous inner classes.
+ String proxyHostname;
+ int proxyPort;
+ String agent;
+ boolean keepAlive;
+ int maxConnections;
private Request request;
private Headers requestHeaders;
@@ -328,6 +329,8 @@ public class HTTPURLConnection
if (keepAlive)
{
StringBuffer buf = new StringBuffer(secure ? "https://" : "http://");
+ buf.append(Thread.currentThread().hashCode());
+ buf.append('@');
buf.append(host);
buf.append(':');
buf.append(port);
@@ -575,6 +578,10 @@ public class HTTPURLConnection
int count = 1;
do
{
+ if (!i.hasNext())
+ {
+ return null;
+ }
entry = (Map.Entry) i.next();
count++;
}
diff --git a/gnu/java/net/protocol/http/Handler.java b/gnu/java/net/protocol/http/Handler.java
index 43ff63df9..640542513 100644
--- a/gnu/java/net/protocol/http/Handler.java
+++ b/gnu/java/net/protocol/http/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Headers.java b/gnu/java/net/protocol/http/Headers.java
index 9968b2e77..847ebefc1 100644
--- a/gnu/java/net/protocol/http/Headers.java
+++ b/gnu/java/net/protocol/http/Headers.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Request.java b/gnu/java/net/protocol/http/Request.java
index 323a325da..21205e6bb 100644
--- a/gnu/java/net/protocol/http/Request.java
+++ b/gnu/java/net/protocol/http/Request.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/RequestBodyWriter.java b/gnu/java/net/protocol/http/RequestBodyWriter.java
index c977451c3..05d98ebb8 100644
--- a/gnu/java/net/protocol/http/RequestBodyWriter.java
+++ b/gnu/java/net/protocol/http/RequestBodyWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Response.java b/gnu/java/net/protocol/http/Response.java
index 5a0a618f8..29dc28b17 100644
--- a/gnu/java/net/protocol/http/Response.java
+++ b/gnu/java/net/protocol/http/Response.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ResponseBodyReader.java b/gnu/java/net/protocol/http/ResponseBodyReader.java
index dea3ce9bb..49e1b376f 100644
--- a/gnu/java/net/protocol/http/ResponseBodyReader.java
+++ b/gnu/java/net/protocol/http/ResponseBodyReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ResponseHeaderHandler.java b/gnu/java/net/protocol/http/ResponseHeaderHandler.java
index ea0112076..8e4e6492a 100644
--- a/gnu/java/net/protocol/http/ResponseHeaderHandler.java
+++ b/gnu/java/net/protocol/http/ResponseHeaderHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/SimpleCookieManager.java b/gnu/java/net/protocol/http/SimpleCookieManager.java
index 19649074a..894747188 100644
--- a/gnu/java/net/protocol/http/SimpleCookieManager.java
+++ b/gnu/java/net/protocol/http/SimpleCookieManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/ConnectionEvent.java b/gnu/java/net/protocol/http/event/ConnectionEvent.java
index 749f711fa..3f6f5454e 100644
--- a/gnu/java/net/protocol/http/event/ConnectionEvent.java
+++ b/gnu/java/net/protocol/http/event/ConnectionEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/ConnectionListener.java b/gnu/java/net/protocol/http/event/ConnectionListener.java
index a29955d80..073e89d44 100644
--- a/gnu/java/net/protocol/http/event/ConnectionListener.java
+++ b/gnu/java/net/protocol/http/event/ConnectionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/RequestEvent.java b/gnu/java/net/protocol/http/event/RequestEvent.java
index ebc91d2ef..281c621f3 100644
--- a/gnu/java/net/protocol/http/event/RequestEvent.java
+++ b/gnu/java/net/protocol/http/event/RequestEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/RequestListener.java b/gnu/java/net/protocol/http/event/RequestListener.java
index 6bf0c96e6..c880fbce6 100644
--- a/gnu/java/net/protocol/http/event/RequestListener.java
+++ b/gnu/java/net/protocol/http/event/RequestListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/package.html b/gnu/java/net/protocol/http/event/package.html
index 6ee147a36..6aed0fc01 100644
--- a/gnu/java/net/protocol/http/event/package.html
+++ b/gnu/java/net/protocol/http/event/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/package.html b/gnu/java/net/protocol/http/package.html
index 46207bee5..8cf7c1e16 100644
--- a/gnu/java/net/protocol/http/package.html
+++ b/gnu/java/net/protocol/http/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/https/Handler.java b/gnu/java/net/protocol/https/Handler.java
index 0e040d64e..2b1375170 100644
--- a/gnu/java/net/protocol/https/Handler.java
+++ b/gnu/java/net/protocol/https/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/jar/Connection.java b/gnu/java/net/protocol/jar/Connection.java
index 966aad277..bd7a80da7 100644
--- a/gnu/java/net/protocol/jar/Connection.java
+++ b/gnu/java/net/protocol/jar/Connection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/jar/Handler.java b/gnu/java/net/protocol/jar/Handler.java
index 726eb4404..316d8cb02 100644
--- a/gnu/java/net/protocol/jar/Handler.java
+++ b/gnu/java/net/protocol/jar/Handler.java
@@ -1,5 +1,5 @@
/* gnu.java.net.protocol.jar.Handler - jar protocol handler for java.net
- Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -99,7 +99,7 @@ public class Handler extends URLStreamHandler
file = file.substring (0, idx + 1) + url_string;
}
- else
+ else if (url_string.length() > 0)
{
int idx = file.lastIndexOf ("/");
if (idx == -1) //context path is weird
@@ -156,14 +156,18 @@ public class Handler extends URLStreamHandler
protected String toExternalForm (URL url)
{
String file = url.getFile();
+ String ref = url.getRef();
// return "jar:" + file;
// Performance!!:
// Do the concatenation manually to avoid resize StringBuffer's
- // internal buffer.
+ // internal buffer. The length of ref is not taken into consideration
+ // as it's a rare path.
StringBuffer sb = new StringBuffer (file.length() + 5);
sb.append ("jar:");
sb.append (file);
+ if (ref != null)
+ sb.append('#').append(ref);
return sb.toString();
}
}
diff --git a/gnu/java/net/protocol/jar/package.html b/gnu/java/net/protocol/jar/package.html
index 90571965f..dcd263d59 100644
--- a/gnu/java/net/protocol/jar/package.html
+++ b/gnu/java/net/protocol/jar/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/ChannelInputStream.java b/gnu/java/nio/ChannelInputStream.java
index b7b1974cf..675a62f3d 100644
--- a/gnu/java/nio/ChannelInputStream.java
+++ b/gnu/java/nio/ChannelInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/ChannelOutputStream.java b/gnu/java/nio/ChannelOutputStream.java
index 73fd7dc3c..08323eace 100644
--- a/gnu/java/nio/ChannelOutputStream.java
+++ b/gnu/java/nio/ChannelOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/ChannelReader.java b/gnu/java/nio/ChannelReader.java
index 11e66a77e..44fe6625a 100644
--- a/gnu/java/nio/ChannelReader.java
+++ b/gnu/java/nio/ChannelReader.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/DatagramChannelImpl.java b/gnu/java/nio/DatagramChannelImpl.java
index 68535e627..51c7031fe 100644
--- a/gnu/java/nio/DatagramChannelImpl.java
+++ b/gnu/java/nio/DatagramChannelImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -93,11 +93,6 @@ public final class DatagramChannelImpl extends DatagramChannel
configureBlocking(true);
}
- public int getNativeFD()
- {
- return socket.getPlainDatagramSocketImpl().getNativeFD();
- }
-
public DatagramSocket socket ()
{
return socket;
diff --git a/gnu/java/nio/DatagramChannelSelectionKey.java b/gnu/java/nio/DatagramChannelSelectionKey.java
index 33f8123e9..698e07e34 100644
--- a/gnu/java/nio/DatagramChannelSelectionKey.java
+++ b/gnu/java/nio/DatagramChannelSelectionKey.java
@@ -1,5 +1,5 @@
/* DatagramChannelSelectionKey.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,6 +54,8 @@ public final class DatagramChannelSelectionKey
public int getNativeFD()
{
- return ((DatagramChannelImpl) ch).getNativeFD();
+ NIODatagramSocket socket =
+ (NIODatagramSocket) ((DatagramChannelImpl) ch).socket();
+ return socket.getPlainDatagramSocketImpl().getNativeFD();
}
}
diff --git a/gnu/java/nio/FileLockImpl.java b/gnu/java/nio/FileLockImpl.java
index 8591dac43..245fa7340 100644
--- a/gnu/java/nio/FileLockImpl.java
+++ b/gnu/java/nio/FileLockImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/InputStreamChannel.java b/gnu/java/nio/InputStreamChannel.java
index 6e0119eb5..a3dffe245 100644
--- a/gnu/java/nio/InputStreamChannel.java
+++ b/gnu/java/nio/InputStreamChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/NIOConstants.java b/gnu/java/nio/NIOConstants.java
index 8a71202a3..bb5b3b7f9 100644
--- a/gnu/java/nio/NIOConstants.java
+++ b/gnu/java/nio/NIOConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/NIODatagramSocket.java b/gnu/java/nio/NIODatagramSocket.java
index e35a20b6e..f23236eca 100644
--- a/gnu/java/nio/NIODatagramSocket.java
+++ b/gnu/java/nio/NIODatagramSocket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/NIOServerSocket.java b/gnu/java/nio/NIOServerSocket.java
index 71a5076f8..fc4d0dbe0 100644
--- a/gnu/java/nio/NIOServerSocket.java
+++ b/gnu/java/nio/NIOServerSocket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/NIOSocket.java b/gnu/java/nio/NIOSocket.java
index 7f955c3ac..4d812bf44 100644
--- a/gnu/java/nio/NIOSocket.java
+++ b/gnu/java/nio/NIOSocket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/OutputStreamChannel.java b/gnu/java/nio/OutputStreamChannel.java
index 98f3f15dc..8167426b0 100644
--- a/gnu/java/nio/OutputStreamChannel.java
+++ b/gnu/java/nio/OutputStreamChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/PipeImpl.java b/gnu/java/nio/PipeImpl.java
index ca374c52f..f7b01c8b7 100644
--- a/gnu/java/nio/PipeImpl.java
+++ b/gnu/java/nio/PipeImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/SelectionKeyImpl.java b/gnu/java/nio/SelectionKeyImpl.java
index 0d3636037..a1f125e9f 100644
--- a/gnu/java/nio/SelectionKeyImpl.java
+++ b/gnu/java/nio/SelectionKeyImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/SelectorImpl.java b/gnu/java/nio/SelectorImpl.java
index f64c86d1f..dcafedeb8 100644
--- a/gnu/java/nio/SelectorImpl.java
+++ b/gnu/java/nio/SelectorImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/SelectorProviderImpl.java b/gnu/java/nio/SelectorProviderImpl.java
index 37f4074cb..47521107e 100644
--- a/gnu/java/nio/SelectorProviderImpl.java
+++ b/gnu/java/nio/SelectorProviderImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/ServerSocketChannelImpl.java b/gnu/java/nio/ServerSocketChannelImpl.java
index 38f2058bd..c538ea802 100644
--- a/gnu/java/nio/ServerSocketChannelImpl.java
+++ b/gnu/java/nio/ServerSocketChannelImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,11 +60,6 @@ public final class ServerSocketChannelImpl extends ServerSocketChannel
configureBlocking(true);
}
- public int getNativeFD()
- {
- return serverSocket.getPlainSocketImpl().getNativeFD();
- }
-
public void finalizer()
{
if (connected)
diff --git a/gnu/java/nio/ServerSocketChannelSelectionKey.java b/gnu/java/nio/ServerSocketChannelSelectionKey.java
index 55847e49a..d00c2b748 100644
--- a/gnu/java/nio/ServerSocketChannelSelectionKey.java
+++ b/gnu/java/nio/ServerSocketChannelSelectionKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,6 +51,8 @@ public final class ServerSocketChannelSelectionKey
public int getNativeFD()
{
- return ((ServerSocketChannelImpl) ch).getNativeFD();
+ NIOServerSocket socket =
+ (NIOServerSocket) ((ServerSocketChannelImpl) ch).socket();
+ return socket.getPlainSocketImpl().getNativeFD();
}
}
diff --git a/gnu/java/nio/SocketChannelImpl.java b/gnu/java/nio/SocketChannelImpl.java
index ff4b63c45..9fb71c1ae 100644
--- a/gnu/java/nio/SocketChannelImpl.java
+++ b/gnu/java/nio/SocketChannelImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -103,11 +103,6 @@ public final class SocketChannelImpl extends SocketChannel
return impl;
}
- int getNativeFD()
- {
- return socket.getPlainSocketImpl().getNativeFD();
- }
-
protected void implCloseSelectableChannel () throws IOException
{
socket.close();
diff --git a/gnu/java/nio/SocketChannelSelectionKey.java b/gnu/java/nio/SocketChannelSelectionKey.java
index dcbc7bd37..75b4dfd87 100644
--- a/gnu/java/nio/SocketChannelSelectionKey.java
+++ b/gnu/java/nio/SocketChannelSelectionKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,6 +51,8 @@ public final class SocketChannelSelectionKey
public int getNativeFD()
{
- return ((SocketChannelImpl) ch).getNativeFD();
+ NIOSocket socket =
+ (NIOSocket) ((SocketChannelImpl) ch).socket();
+ return socket.getPlainSocketImpl().getNativeFD();
}
}
diff --git a/gnu/java/nio/channels/FileChannelImpl.java b/gnu/java/nio/channels/FileChannelImpl.java
index 664e93c87..0ee5d3fc2 100644
--- a/gnu/java/nio/channels/FileChannelImpl.java
+++ b/gnu/java/nio/channels/FileChannelImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -73,6 +73,10 @@ public final class FileChannelImpl extends FileChannel
public static final int SYNC = 16;
public static final int DSYNC = 32;
+ public static FileChannelImpl in;
+ public static FileChannelImpl out;
+ public static FileChannelImpl err;
+
private static native void init();
static
@@ -83,6 +87,10 @@ public final class FileChannelImpl extends FileChannel
}
init();
+
+ in = new FileChannelImpl(0, READ);
+ out = new FileChannelImpl(1, WRITE);
+ err = new FileChannelImpl(2, WRITE);
}
/**
@@ -97,6 +105,8 @@ public final class FileChannelImpl extends FileChannel
private int mode;
+ final String description;
+
/* Open a file. MODE is a combination of the above mode flags. */
/* This is a static factory method, so that VM implementors can decide
* substitute subclasses of FileChannelImpl. */
@@ -109,7 +119,8 @@ public final class FileChannelImpl extends FileChannel
private FileChannelImpl(File file, int mode)
throws FileNotFoundException
{
- final String path = file.getPath();
+ String path = file.getPath();
+ description = path;
fd = open (path, mode);
this.mode = mode;
@@ -126,21 +137,26 @@ public final class FileChannelImpl extends FileChannel
/* ignore it */
}
- throw new FileNotFoundException(path + " is a directory");
+ throw new FileNotFoundException(description + " is a directory");
}
}
- /* Used by init() (native code) */
+ /**
+ * Constructor for default channels in, out and err.
+ *
+ * Used by init() (native code).
+ *
+ * @param fd the file descriptor (0, 1, 2 for stdin, stdout, stderr).
+ *
+ * @param mode READ or WRITE
+ */
FileChannelImpl (int fd, int mode)
{
this.fd = fd;
this.mode = mode;
+ this.description = "descriptor(" + fd + ")";
}
- public static FileChannelImpl in;
- public static FileChannelImpl out;
- public static FileChannelImpl err;
-
private native int open (String path, int mode) throws FileNotFoundException;
public native int available () throws IOException;
@@ -179,7 +195,7 @@ public final class FileChannelImpl extends FileChannel
throws IOException
{
if (position < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position);
long oldPosition = implPosition ();
position (position);
int result = read(dst);
@@ -230,7 +246,7 @@ public final class FileChannelImpl extends FileChannel
throws IOException
{
if (position < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -288,10 +304,11 @@ public final class FileChannelImpl extends FileChannel
throw new NonWritableChannelException();
}
else
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("mode: " + mode);
if (position < 0 || size < 0 || size > Integer.MAX_VALUE)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position
+ + ", size: " + size);
return mapImpl(nmode, position, (int) size);
}
@@ -302,8 +319,12 @@ public final class FileChannelImpl extends FileChannel
{
if (!isOpen ())
throw new ClosedChannelException ();
+
+ force ();
}
+ private native void force ();
+
// like transferTo, but with a count of less than 2Gbytes
private int smallTransferTo (long position, int count,
WritableByteChannel target)
@@ -332,7 +353,8 @@ public final class FileChannelImpl extends FileChannel
{
if (position < 0
|| count < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position
+ + ", count: " + count);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -395,7 +417,8 @@ public final class FileChannelImpl extends FileChannel
{
if (position < 0
|| count < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position
+ + ", count: " + count);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -420,24 +443,31 @@ public final class FileChannelImpl extends FileChannel
return total;
}
- public FileLock tryLock (long position, long size, boolean shared)
+ // Shared sanity checks between lock and tryLock methods.
+ private void lockCheck(long position, long size, boolean shared)
throws IOException
{
if (position < 0
|| size < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position
+ + ", size: " + size);
if (!isOpen ())
- throw new ClosedChannelException ();
+ throw new ClosedChannelException();
- if (shared && (mode & READ) == 0)
- throw new NonReadableChannelException ();
-
- if (!shared && (mode & WRITE) == 0)
- throw new NonWritableChannelException ();
+ if (shared && ((mode & READ) == 0))
+ throw new NonReadableChannelException();
+ if (!shared && ((mode & WRITE) == 0))
+ throw new NonWritableChannelException();
+ }
+
+ public FileLock tryLock (long position, long size, boolean shared)
+ throws IOException
+ {
+ lockCheck(position, size, shared);
+
boolean completed = false;
-
try
{
begin();
@@ -464,15 +494,9 @@ public final class FileChannelImpl extends FileChannel
public FileLock lock (long position, long size, boolean shared)
throws IOException
{
- if (position < 0
- || size < 0)
- throw new IllegalArgumentException ();
-
- if (!isOpen ())
- throw new ClosedChannelException ();
+ lockCheck(position, size, shared);
boolean completed = false;
-
try
{
boolean lockable = lock(position, size, shared, true);
@@ -500,7 +524,7 @@ public final class FileChannelImpl extends FileChannel
throws IOException
{
if (newPosition < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("newPostition: " + newPosition);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -515,7 +539,7 @@ public final class FileChannelImpl extends FileChannel
throws IOException
{
if (size < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("size: " + size);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -528,4 +552,12 @@ public final class FileChannelImpl extends FileChannel
return this;
}
+
+ public String toString()
+ {
+ return (this.getClass()
+ + "[fd=" + fd
+ + ",mode=" + mode + ","
+ + description + "]");
+ }
}
diff --git a/gnu/java/nio/channels/package.html b/gnu/java/nio/channels/package.html
index 006f630d7..0c3821bea 100644
--- a/gnu/java/nio/channels/package.html
+++ b/gnu/java/nio/channels/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ByteCharset.java b/gnu/java/nio/charset/ByteCharset.java
index f8cf197a9..2cc91b850 100644
--- a/gnu/java/nio/charset/ByteCharset.java
+++ b/gnu/java/nio/charset/ByteCharset.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp424.java b/gnu/java/nio/charset/Cp424.java
index 3bfed9221..9733a76a4 100644
--- a/gnu/java/nio/charset/Cp424.java
+++ b/gnu/java/nio/charset/Cp424.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp437.java b/gnu/java/nio/charset/Cp437.java
index 0fb5dfa76..d6083579d 100644
--- a/gnu/java/nio/charset/Cp437.java
+++ b/gnu/java/nio/charset/Cp437.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp737.java b/gnu/java/nio/charset/Cp737.java
index a69473a34..548da2191 100644
--- a/gnu/java/nio/charset/Cp737.java
+++ b/gnu/java/nio/charset/Cp737.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp775.java b/gnu/java/nio/charset/Cp775.java
index dc3fb67c6..4d3f1c36c 100644
--- a/gnu/java/nio/charset/Cp775.java
+++ b/gnu/java/nio/charset/Cp775.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp850.java b/gnu/java/nio/charset/Cp850.java
index 62e08b8de..9122105ad 100644
--- a/gnu/java/nio/charset/Cp850.java
+++ b/gnu/java/nio/charset/Cp850.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp852.java b/gnu/java/nio/charset/Cp852.java
index baef5262f..a859530a8 100644
--- a/gnu/java/nio/charset/Cp852.java
+++ b/gnu/java/nio/charset/Cp852.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp855.java b/gnu/java/nio/charset/Cp855.java
index 7c26da68e..fbec999c7 100644
--- a/gnu/java/nio/charset/Cp855.java
+++ b/gnu/java/nio/charset/Cp855.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp857.java b/gnu/java/nio/charset/Cp857.java
index cee3ca374..78f8dbd2d 100644
--- a/gnu/java/nio/charset/Cp857.java
+++ b/gnu/java/nio/charset/Cp857.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp860.java b/gnu/java/nio/charset/Cp860.java
index 314155b46..e3c7f46b8 100644
--- a/gnu/java/nio/charset/Cp860.java
+++ b/gnu/java/nio/charset/Cp860.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp861.java b/gnu/java/nio/charset/Cp861.java
index 3a3570618..6e17ea2e8 100644
--- a/gnu/java/nio/charset/Cp861.java
+++ b/gnu/java/nio/charset/Cp861.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp862.java b/gnu/java/nio/charset/Cp862.java
index 35d473aad..ccd74fa9d 100644
--- a/gnu/java/nio/charset/Cp862.java
+++ b/gnu/java/nio/charset/Cp862.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp863.java b/gnu/java/nio/charset/Cp863.java
index d7221403d..97812a6f6 100644
--- a/gnu/java/nio/charset/Cp863.java
+++ b/gnu/java/nio/charset/Cp863.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp864.java b/gnu/java/nio/charset/Cp864.java
index 35cfbe7ab..f136f43ec 100644
--- a/gnu/java/nio/charset/Cp864.java
+++ b/gnu/java/nio/charset/Cp864.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp865.java b/gnu/java/nio/charset/Cp865.java
index 20e0c9289..a1332a74f 100644
--- a/gnu/java/nio/charset/Cp865.java
+++ b/gnu/java/nio/charset/Cp865.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp866.java b/gnu/java/nio/charset/Cp866.java
index 8b12ca3a4..ca6958949 100644
--- a/gnu/java/nio/charset/Cp866.java
+++ b/gnu/java/nio/charset/Cp866.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp869.java b/gnu/java/nio/charset/Cp869.java
index 98a0155f6..f5e052984 100644
--- a/gnu/java/nio/charset/Cp869.java
+++ b/gnu/java/nio/charset/Cp869.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp874.java b/gnu/java/nio/charset/Cp874.java
index c1139267a..d81755c1e 100644
--- a/gnu/java/nio/charset/Cp874.java
+++ b/gnu/java/nio/charset/Cp874.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/EncodingHelper.java b/gnu/java/nio/charset/EncodingHelper.java
index d08caa34d..033440d5d 100644
--- a/gnu/java/nio/charset/EncodingHelper.java
+++ b/gnu/java/nio/charset/EncodingHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_1.java b/gnu/java/nio/charset/ISO_8859_1.java
index 45fe5cc6f..cc06ecd5a 100644
--- a/gnu/java/nio/charset/ISO_8859_1.java
+++ b/gnu/java/nio/charset/ISO_8859_1.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_13.java b/gnu/java/nio/charset/ISO_8859_13.java
index 41bb99d3f..c10eef305 100644
--- a/gnu/java/nio/charset/ISO_8859_13.java
+++ b/gnu/java/nio/charset/ISO_8859_13.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_15.java b/gnu/java/nio/charset/ISO_8859_15.java
index 977be3b9c..973fe1c94 100644
--- a/gnu/java/nio/charset/ISO_8859_15.java
+++ b/gnu/java/nio/charset/ISO_8859_15.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_2.java b/gnu/java/nio/charset/ISO_8859_2.java
index 11b2c4671..2de96df9b 100644
--- a/gnu/java/nio/charset/ISO_8859_2.java
+++ b/gnu/java/nio/charset/ISO_8859_2.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_3.java b/gnu/java/nio/charset/ISO_8859_3.java
index 70739c10b..6e718719a 100644
--- a/gnu/java/nio/charset/ISO_8859_3.java
+++ b/gnu/java/nio/charset/ISO_8859_3.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_4.java b/gnu/java/nio/charset/ISO_8859_4.java
index 057698393..96dc46754 100644
--- a/gnu/java/nio/charset/ISO_8859_4.java
+++ b/gnu/java/nio/charset/ISO_8859_4.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_5.java b/gnu/java/nio/charset/ISO_8859_5.java
index 6360d7354..ad208729c 100644
--- a/gnu/java/nio/charset/ISO_8859_5.java
+++ b/gnu/java/nio/charset/ISO_8859_5.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_6.java b/gnu/java/nio/charset/ISO_8859_6.java
index 167e8a1b9..5600e7923 100644
--- a/gnu/java/nio/charset/ISO_8859_6.java
+++ b/gnu/java/nio/charset/ISO_8859_6.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_7.java b/gnu/java/nio/charset/ISO_8859_7.java
index 6c71268b2..9262a6077 100644
--- a/gnu/java/nio/charset/ISO_8859_7.java
+++ b/gnu/java/nio/charset/ISO_8859_7.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_8.java b/gnu/java/nio/charset/ISO_8859_8.java
index 40aafd599..96fb0f48b 100644
--- a/gnu/java/nio/charset/ISO_8859_8.java
+++ b/gnu/java/nio/charset/ISO_8859_8.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_9.java b/gnu/java/nio/charset/ISO_8859_9.java
index 9af9aee46..28be34cf8 100644
--- a/gnu/java/nio/charset/ISO_8859_9.java
+++ b/gnu/java/nio/charset/ISO_8859_9.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/KOI_8.java b/gnu/java/nio/charset/KOI_8.java
index 0f996538a..c67065607 100644
--- a/gnu/java/nio/charset/KOI_8.java
+++ b/gnu/java/nio/charset/KOI_8.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MS874.java b/gnu/java/nio/charset/MS874.java
index 84f8795c8..b16e53f42 100644
--- a/gnu/java/nio/charset/MS874.java
+++ b/gnu/java/nio/charset/MS874.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacCentralEurope.java b/gnu/java/nio/charset/MacCentralEurope.java
index 76a111d73..5496db2b5 100644
--- a/gnu/java/nio/charset/MacCentralEurope.java
+++ b/gnu/java/nio/charset/MacCentralEurope.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacCroatian.java b/gnu/java/nio/charset/MacCroatian.java
index a055c6837..f71ac5199 100644
--- a/gnu/java/nio/charset/MacCroatian.java
+++ b/gnu/java/nio/charset/MacCroatian.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacCyrillic.java b/gnu/java/nio/charset/MacCyrillic.java
index 105ce596c..f152f6b1c 100644
--- a/gnu/java/nio/charset/MacCyrillic.java
+++ b/gnu/java/nio/charset/MacCyrillic.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacDingbat.java b/gnu/java/nio/charset/MacDingbat.java
index bee18e91c..84102d56f 100644
--- a/gnu/java/nio/charset/MacDingbat.java
+++ b/gnu/java/nio/charset/MacDingbat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacGreek.java b/gnu/java/nio/charset/MacGreek.java
index 8be6ade4d..07624d59e 100644
--- a/gnu/java/nio/charset/MacGreek.java
+++ b/gnu/java/nio/charset/MacGreek.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacIceland.java b/gnu/java/nio/charset/MacIceland.java
index 3dbd1d3f1..7918e0266 100644
--- a/gnu/java/nio/charset/MacIceland.java
+++ b/gnu/java/nio/charset/MacIceland.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacRoman.java b/gnu/java/nio/charset/MacRoman.java
index c769d69e2..b413caf2b 100644
--- a/gnu/java/nio/charset/MacRoman.java
+++ b/gnu/java/nio/charset/MacRoman.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacRomania.java b/gnu/java/nio/charset/MacRomania.java
index d1f9e0034..d1779a40e 100644
--- a/gnu/java/nio/charset/MacRomania.java
+++ b/gnu/java/nio/charset/MacRomania.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacSymbol.java b/gnu/java/nio/charset/MacSymbol.java
index d85e4ef98..869de1947 100644
--- a/gnu/java/nio/charset/MacSymbol.java
+++ b/gnu/java/nio/charset/MacSymbol.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacThai.java b/gnu/java/nio/charset/MacThai.java
index 1a85869ee..498b9e6bb 100644
--- a/gnu/java/nio/charset/MacThai.java
+++ b/gnu/java/nio/charset/MacThai.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacTurkish.java b/gnu/java/nio/charset/MacTurkish.java
index 1f9f9563c..68ea27b8c 100644
--- a/gnu/java/nio/charset/MacTurkish.java
+++ b/gnu/java/nio/charset/MacTurkish.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Provider.java b/gnu/java/nio/charset/Provider.java
index 91d1335ed..3f25c5988 100644
--- a/gnu/java/nio/charset/Provider.java
+++ b/gnu/java/nio/charset/Provider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/US_ASCII.java b/gnu/java/nio/charset/US_ASCII.java
index f2c66960b..d26f7ffc9 100644
--- a/gnu/java/nio/charset/US_ASCII.java
+++ b/gnu/java/nio/charset/US_ASCII.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16.java b/gnu/java/nio/charset/UTF_16.java
index 2ba226d80..b1d7705d4 100644
--- a/gnu/java/nio/charset/UTF_16.java
+++ b/gnu/java/nio/charset/UTF_16.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16BE.java b/gnu/java/nio/charset/UTF_16BE.java
index 0f38e4346..1fe3b5d7c 100644
--- a/gnu/java/nio/charset/UTF_16BE.java
+++ b/gnu/java/nio/charset/UTF_16BE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16Decoder.java b/gnu/java/nio/charset/UTF_16Decoder.java
index c5644fe44..302c83e62 100644
--- a/gnu/java/nio/charset/UTF_16Decoder.java
+++ b/gnu/java/nio/charset/UTF_16Decoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16Encoder.java b/gnu/java/nio/charset/UTF_16Encoder.java
index a71673037..d5ab744e0 100644
--- a/gnu/java/nio/charset/UTF_16Encoder.java
+++ b/gnu/java/nio/charset/UTF_16Encoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16LE.java b/gnu/java/nio/charset/UTF_16LE.java
index 0a042ed29..6d72a324c 100644
--- a/gnu/java/nio/charset/UTF_16LE.java
+++ b/gnu/java/nio/charset/UTF_16LE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_8.java b/gnu/java/nio/charset/UTF_8.java
index fafb3cbf8..0e0730eec 100644
--- a/gnu/java/nio/charset/UTF_8.java
+++ b/gnu/java/nio/charset/UTF_8.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UnicodeLittle.java b/gnu/java/nio/charset/UnicodeLittle.java
index e82e9c5c8..d354e04e5 100644
--- a/gnu/java/nio/charset/UnicodeLittle.java
+++ b/gnu/java/nio/charset/UnicodeLittle.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Windows1250.java b/gnu/java/nio/charset/Windows1250.java
index b755f4e99..9d7ab8edd 100644
--- a/gnu/java/nio/charset/Windows1250.java
+++ b/gnu/java/nio/charset/Windows1250.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1250 extends ByteCharset
public Windows1250()
{
- super("Windows-1250", new String[] {
+ super("windows-1250", new String[] {
"Windows1250",
"ibm-5346_P100-1998",
"ibm-5346",
diff --git a/gnu/java/nio/charset/Windows1251.java b/gnu/java/nio/charset/Windows1251.java
index be8fdab69..bf3227e87 100644
--- a/gnu/java/nio/charset/Windows1251.java
+++ b/gnu/java/nio/charset/Windows1251.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1251 extends ByteCharset
public Windows1251()
{
- super("Windows-1251", new String[] {
+ super("windows-1251", new String[] {
"Windows1251",
"cp1251",
"cp-1251",
diff --git a/gnu/java/nio/charset/Windows1252.java b/gnu/java/nio/charset/Windows1252.java
index 8c98f9e89..9391c87d4 100644
--- a/gnu/java/nio/charset/Windows1252.java
+++ b/gnu/java/nio/charset/Windows1252.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -85,7 +85,7 @@ public class Windows1252 extends ByteCharset
public Windows1252()
{
- super("Windows-1252", new String[] {
+ super("windows-1252", new String[] {
"Windows1252",
"ibm-5348_P100-1997",
"ibm-5348",
diff --git a/gnu/java/nio/charset/Windows1253.java b/gnu/java/nio/charset/Windows1253.java
index a4abff929..02150b4af 100644
--- a/gnu/java/nio/charset/Windows1253.java
+++ b/gnu/java/nio/charset/Windows1253.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1253 extends ByteCharset
public Windows1253()
{
- super("Windows-1253", new String[] {
+ super("windows-1253", new String[] {
"Windows1253",
"cp1253",
"cp-1253",
diff --git a/gnu/java/nio/charset/Windows1254.java b/gnu/java/nio/charset/Windows1254.java
index 57ecc9d3b..7cdad3c46 100644
--- a/gnu/java/nio/charset/Windows1254.java
+++ b/gnu/java/nio/charset/Windows1254.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1254 extends ByteCharset
public Windows1254()
{
- super("Windows-1254", new String[] {
+ super("windows-1254", new String[] {
"Windows1254",
"cp1254",
"cp-1254",
diff --git a/gnu/java/nio/charset/Windows1255.java b/gnu/java/nio/charset/Windows1255.java
index 33c2f3d51..b706d1930 100644
--- a/gnu/java/nio/charset/Windows1255.java
+++ b/gnu/java/nio/charset/Windows1255.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1255 extends ByteCharset
public Windows1255()
{
- super("Windows-1255", new String[] {
+ super("windows-1255", new String[] {
"Windows1255",
"cp1255",
"cp-1255",
diff --git a/gnu/java/nio/charset/Windows1256.java b/gnu/java/nio/charset/Windows1256.java
index cf448a892..6924420e1 100644
--- a/gnu/java/nio/charset/Windows1256.java
+++ b/gnu/java/nio/charset/Windows1256.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1256 extends ByteCharset
public Windows1256()
{
- super("Windows-1256", new String[] {
+ super("windows-1256", new String[] {
"Windows1256",
"cp1256",
"cp-1256",
diff --git a/gnu/java/nio/charset/Windows1257.java b/gnu/java/nio/charset/Windows1257.java
index f2e258d9c..2f95d64ac 100644
--- a/gnu/java/nio/charset/Windows1257.java
+++ b/gnu/java/nio/charset/Windows1257.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1257 extends ByteCharset
public Windows1257()
{
- super("Windows-1257", new String[] {
+ super("windows-1257", new String[] {
"Windows1257",
"cp1257",
"cp-1257",
diff --git a/gnu/java/nio/charset/Windows1258.java b/gnu/java/nio/charset/Windows1258.java
index 06e03ef1d..7d653b497 100644
--- a/gnu/java/nio/charset/Windows1258.java
+++ b/gnu/java/nio/charset/Windows1258.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1258 extends ByteCharset
public Windows1258()
{
- super("Windows-1258", new String[] {
+ super("windows-1258", new String[] {
"Windows1258",
"cp1258",
"cp-1258",
diff --git a/gnu/java/nio/charset/iconv/IconvCharset.java b/gnu/java/nio/charset/iconv/IconvCharset.java
index 19fcda93d..ffd2a103f 100644
--- a/gnu/java/nio/charset/iconv/IconvCharset.java
+++ b/gnu/java/nio/charset/iconv/IconvCharset.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/iconv/IconvDecoder.java b/gnu/java/nio/charset/iconv/IconvDecoder.java
index 533418c9c..fa265a923 100644
--- a/gnu/java/nio/charset/iconv/IconvDecoder.java
+++ b/gnu/java/nio/charset/iconv/IconvDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/iconv/IconvEncoder.java b/gnu/java/nio/charset/iconv/IconvEncoder.java
index acca24455..bb10c9b63 100644
--- a/gnu/java/nio/charset/iconv/IconvEncoder.java
+++ b/gnu/java/nio/charset/iconv/IconvEncoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/iconv/IconvMetaData.java b/gnu/java/nio/charset/iconv/IconvMetaData.java
index b1e3044dd..c4686a25a 100644
--- a/gnu/java/nio/charset/iconv/IconvMetaData.java
+++ b/gnu/java/nio/charset/iconv/IconvMetaData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/iconv/IconvProvider.java b/gnu/java/nio/charset/iconv/IconvProvider.java
index b1f9f9b0c..58eaa85ba 100644
--- a/gnu/java/nio/charset/iconv/IconvProvider.java
+++ b/gnu/java/nio/charset/iconv/IconvProvider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/package.html b/gnu/java/nio/charset/package.html
index 15418f74c..002516da3 100644
--- a/gnu/java/nio/charset/package.html
+++ b/gnu/java/nio/charset/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/package.html b/gnu/java/nio/package.html
index 7a023af6d..87f0d9bf3 100644
--- a/gnu/java/nio/package.html
+++ b/gnu/java/nio/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/RMIMarshalledObjectInputStream.java b/gnu/java/rmi/RMIMarshalledObjectInputStream.java
index e20dda8eb..140069379 100644
--- a/gnu/java/rmi/RMIMarshalledObjectInputStream.java
+++ b/gnu/java/rmi/RMIMarshalledObjectInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/RMIMarshalledObjectOutputStream.java b/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
index 931116a22..2bbbaacb4 100644
--- a/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
+++ b/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/dgc/DGCImpl.java b/gnu/java/rmi/dgc/DGCImpl.java
index a41dabded..a32445c34 100644
--- a/gnu/java/rmi/dgc/DGCImpl.java
+++ b/gnu/java/rmi/dgc/DGCImpl.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/dgc/DGCImpl_Skel.java b/gnu/java/rmi/dgc/DGCImpl_Skel.java
index 545ebc7bd..5f032e72f 100644
--- a/gnu/java/rmi/dgc/DGCImpl_Skel.java
+++ b/gnu/java/rmi/dgc/DGCImpl_Skel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/dgc/DGCImpl_Stub.java b/gnu/java/rmi/dgc/DGCImpl_Stub.java
index bffde5280..b1e086a73 100644
--- a/gnu/java/rmi/dgc/DGCImpl_Stub.java
+++ b/gnu/java/rmi/dgc/DGCImpl_Stub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/dgc/package.html b/gnu/java/rmi/dgc/package.html
index cb06ca8ba..3ed81cfdd 100644
--- a/gnu/java/rmi/dgc/package.html
+++ b/gnu/java/rmi/dgc/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/package.html b/gnu/java/rmi/package.html
index 3e220144b..53b5f5e57 100644
--- a/gnu/java/rmi/package.html
+++ b/gnu/java/rmi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/registry/RegistryImpl.java b/gnu/java/rmi/registry/RegistryImpl.java
index 056ab804c..0c94434d8 100644
--- a/gnu/java/rmi/registry/RegistryImpl.java
+++ b/gnu/java/rmi/registry/RegistryImpl.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/registry/RegistryImpl_Skel.java b/gnu/java/rmi/registry/RegistryImpl_Skel.java
index de6b9e426..8cf14ccc0 100644
--- a/gnu/java/rmi/registry/RegistryImpl_Skel.java
+++ b/gnu/java/rmi/registry/RegistryImpl_Skel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/registry/RegistryImpl_Stub.java b/gnu/java/rmi/registry/RegistryImpl_Stub.java
index 45e10c490..b289426b4 100644
--- a/gnu/java/rmi/registry/RegistryImpl_Stub.java
+++ b/gnu/java/rmi/registry/RegistryImpl_Stub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/registry/package.html b/gnu/java/rmi/registry/package.html
index dd2df7c4c..3750359d6 100644
--- a/gnu/java/rmi/registry/package.html
+++ b/gnu/java/rmi/registry/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/ConnectionRunnerPool.java b/gnu/java/rmi/server/ConnectionRunnerPool.java
index b917315cb..9cc57b228 100644
--- a/gnu/java/rmi/server/ConnectionRunnerPool.java
+++ b/gnu/java/rmi/server/ConnectionRunnerPool.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/ProtocolConstants.java b/gnu/java/rmi/server/ProtocolConstants.java
index 9f214c96a..30fb5e89b 100644
--- a/gnu/java/rmi/server/ProtocolConstants.java
+++ b/gnu/java/rmi/server/ProtocolConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIDefaultSocketFactory.java b/gnu/java/rmi/server/RMIDefaultSocketFactory.java
index b58be1ade..628e1cc87 100644
--- a/gnu/java/rmi/server/RMIDefaultSocketFactory.java
+++ b/gnu/java/rmi/server/RMIDefaultSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIHashes.java b/gnu/java/rmi/server/RMIHashes.java
index bb15733f8..5a414404d 100644
--- a/gnu/java/rmi/server/RMIHashes.java
+++ b/gnu/java/rmi/server/RMIHashes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIIncomingThread.java b/gnu/java/rmi/server/RMIIncomingThread.java
index a6e2fee83..990d37bc5 100644
--- a/gnu/java/rmi/server/RMIIncomingThread.java
+++ b/gnu/java/rmi/server/RMIIncomingThread.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIObjectInputStream.java b/gnu/java/rmi/server/RMIObjectInputStream.java
index c890a1433..888b30bf6 100644
--- a/gnu/java/rmi/server/RMIObjectInputStream.java
+++ b/gnu/java/rmi/server/RMIObjectInputStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIObjectOutputStream.java b/gnu/java/rmi/server/RMIObjectOutputStream.java
index 32aa5314e..d42908a41 100644
--- a/gnu/java/rmi/server/RMIObjectOutputStream.java
+++ b/gnu/java/rmi/server/RMIObjectOutputStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIVoidValue.java b/gnu/java/rmi/server/RMIVoidValue.java
index bad8b9652..8e5546d35 100644
--- a/gnu/java/rmi/server/RMIVoidValue.java
+++ b/gnu/java/rmi/server/RMIVoidValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastConnection.java b/gnu/java/rmi/server/UnicastConnection.java
index ce7b75bda..216e453e7 100644
--- a/gnu/java/rmi/server/UnicastConnection.java
+++ b/gnu/java/rmi/server/UnicastConnection.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastConnectionManager.java b/gnu/java/rmi/server/UnicastConnectionManager.java
index c8c1d57ca..08f6a9bc3 100644
--- a/gnu/java/rmi/server/UnicastConnectionManager.java
+++ b/gnu/java/rmi/server/UnicastConnectionManager.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastRef.java b/gnu/java/rmi/server/UnicastRef.java
index 77042d724..c1b871fb8 100644
--- a/gnu/java/rmi/server/UnicastRef.java
+++ b/gnu/java/rmi/server/UnicastRef.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastRemoteCall.java b/gnu/java/rmi/server/UnicastRemoteCall.java
index e38f0f92b..c5206e76d 100644
--- a/gnu/java/rmi/server/UnicastRemoteCall.java
+++ b/gnu/java/rmi/server/UnicastRemoteCall.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastRemoteStub.java b/gnu/java/rmi/server/UnicastRemoteStub.java
index f19ecccb9..87e932de5 100644
--- a/gnu/java/rmi/server/UnicastRemoteStub.java
+++ b/gnu/java/rmi/server/UnicastRemoteStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastServer.java b/gnu/java/rmi/server/UnicastServer.java
index 99aef483f..065ef8c77 100644
--- a/gnu/java/rmi/server/UnicastServer.java
+++ b/gnu/java/rmi/server/UnicastServer.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastServerRef.java b/gnu/java/rmi/server/UnicastServerRef.java
index 71c84a58a..1f6eedec6 100644
--- a/gnu/java/rmi/server/UnicastServerRef.java
+++ b/gnu/java/rmi/server/UnicastServerRef.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/package.html b/gnu/java/rmi/server/package.html
index fc209823b..08c105b49 100644
--- a/gnu/java/rmi/server/package.html
+++ b/gnu/java/rmi/server/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/Engine.java b/gnu/java/security/Engine.java
index 9f6568cdd..b75de5caa 100644
--- a/gnu/java/security/Engine.java
+++ b/gnu/java/security/Engine.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/OID.java b/gnu/java/security/OID.java
index 918435108..473b6ba5a 100644
--- a/gnu/java/security/OID.java
+++ b/gnu/java/security/OID.java
@@ -1,5 +1,5 @@
/* OID.java -- numeric representation of an object identifier
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,7 +48,7 @@ import java.util.StringTokenizer;
/**
* This immutable class represents an object identifier, or OID.
*
- * <p>OIDs are represented as a series of hierarcical tokens, each of
+ * <p>OIDs are represented as a series of hierarchical tokens, each of
* which is usually represented as a single, unsigned integer. The
* hierarchy works so that later tokens are considered within the group
* of earlier tokens. Thus, the OID for the Serpent block cipher,
diff --git a/gnu/java/security/PolicyFile.java b/gnu/java/security/PolicyFile.java
index c939dda47..dd3a4dec4 100644
--- a/gnu/java/security/PolicyFile.java
+++ b/gnu/java/security/PolicyFile.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/action/GetPropertyAction.java b/gnu/java/security/action/GetPropertyAction.java
index 3657254d0..2886deb34 100644
--- a/gnu/java/security/action/GetPropertyAction.java
+++ b/gnu/java/security/action/GetPropertyAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/action/GetSecurityPropertyAction.java b/gnu/java/security/action/GetSecurityPropertyAction.java
index b61e9c836..97fa15d03 100644
--- a/gnu/java/security/action/GetSecurityPropertyAction.java
+++ b/gnu/java/security/action/GetSecurityPropertyAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/action/SetAccessibleAction.java b/gnu/java/security/action/SetAccessibleAction.java
index 2827a3a6f..77e5fc988 100644
--- a/gnu/java/security/action/SetAccessibleAction.java
+++ b/gnu/java/security/action/SetAccessibleAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/action/package.html b/gnu/java/security/action/package.html
index c971a78cc..fc3dfa229 100644
--- a/gnu/java/security/action/package.html
+++ b/gnu/java/security/action/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/BER.java b/gnu/java/security/ber/BER.java
index ff666bfe1..7efb1bf90 100644
--- a/gnu/java/security/ber/BER.java
+++ b/gnu/java/security/ber/BER.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/BEREncodingException.java b/gnu/java/security/ber/BEREncodingException.java
index 5c3ed243b..aad10932c 100644
--- a/gnu/java/security/ber/BEREncodingException.java
+++ b/gnu/java/security/ber/BEREncodingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/BERReader.java b/gnu/java/security/ber/BERReader.java
index 600d46b4d..53a3f3ee9 100644
--- a/gnu/java/security/ber/BERReader.java
+++ b/gnu/java/security/ber/BERReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/BERValue.java b/gnu/java/security/ber/BERValue.java
index dd4364a6d..aeaef39bf 100644
--- a/gnu/java/security/ber/BERValue.java
+++ b/gnu/java/security/ber/BERValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/package.html b/gnu/java/security/ber/package.html
index c7ff170f5..348a83c20 100644
--- a/gnu/java/security/ber/package.html
+++ b/gnu/java/security/ber/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/BitString.java b/gnu/java/security/der/BitString.java
index 67e34d7bd..b88b14541 100644
--- a/gnu/java/security/der/BitString.java
+++ b/gnu/java/security/der/BitString.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DER.java b/gnu/java/security/der/DER.java
index 585c6800a..a7eb4a689 100644
--- a/gnu/java/security/der/DER.java
+++ b/gnu/java/security/der/DER.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DEREncodingException.java b/gnu/java/security/der/DEREncodingException.java
index 3162b45d2..90042a3fc 100644
--- a/gnu/java/security/der/DEREncodingException.java
+++ b/gnu/java/security/der/DEREncodingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DERReader.java b/gnu/java/security/der/DERReader.java
index aab3a2fc8..cb07f1432 100644
--- a/gnu/java/security/der/DERReader.java
+++ b/gnu/java/security/der/DERReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DERValue.java b/gnu/java/security/der/DERValue.java
index 9c3431e0b..9a597d724 100644
--- a/gnu/java/security/der/DERValue.java
+++ b/gnu/java/security/der/DERValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DERWriter.java b/gnu/java/security/der/DERWriter.java
index 5568b69bb..78524fc94 100644
--- a/gnu/java/security/der/DERWriter.java
+++ b/gnu/java/security/der/DERWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/package.html b/gnu/java/security/der/package.html
index 06d55182d..e74b0db4e 100644
--- a/gnu/java/security/der/package.html
+++ b/gnu/java/security/der/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/package.html b/gnu/java/security/package.html
index d87340849..bb6e91d61 100644
--- a/gnu/java/security/package.html
+++ b/gnu/java/security/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/pkcs/PKCS7SignedData.java b/gnu/java/security/pkcs/PKCS7SignedData.java
index 869febebd..ba5efc722 100644
--- a/gnu/java/security/pkcs/PKCS7SignedData.java
+++ b/gnu/java/security/pkcs/PKCS7SignedData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/pkcs/SignerInfo.java b/gnu/java/security/pkcs/SignerInfo.java
index d6b747dea..c976799bb 100644
--- a/gnu/java/security/pkcs/SignerInfo.java
+++ b/gnu/java/security/pkcs/SignerInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/pkcs/package.html b/gnu/java/security/pkcs/package.html
index 945fb5d75..60d658f8e 100644
--- a/gnu/java/security/pkcs/package.html
+++ b/gnu/java/security/pkcs/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/CollectionCertStoreImpl.java b/gnu/java/security/provider/CollectionCertStoreImpl.java
index b67a4332c..4bf3d5434 100644
--- a/gnu/java/security/provider/CollectionCertStoreImpl.java
+++ b/gnu/java/security/provider/CollectionCertStoreImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSAKeyFactory.java b/gnu/java/security/provider/DSAKeyFactory.java
index 3414f423c..7e154e274 100644
--- a/gnu/java/security/provider/DSAKeyFactory.java
+++ b/gnu/java/security/provider/DSAKeyFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSAKeyPairGenerator.java b/gnu/java/security/provider/DSAKeyPairGenerator.java
index d4dff1671..2c643d5c3 100644
--- a/gnu/java/security/provider/DSAKeyPairGenerator.java
+++ b/gnu/java/security/provider/DSAKeyPairGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSAParameterGenerator.java b/gnu/java/security/provider/DSAParameterGenerator.java
index 92032fa94..ccec1136c 100644
--- a/gnu/java/security/provider/DSAParameterGenerator.java
+++ b/gnu/java/security/provider/DSAParameterGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSAParameters.java b/gnu/java/security/provider/DSAParameters.java
index 08bb6a273..77d648956 100644
--- a/gnu/java/security/provider/DSAParameters.java
+++ b/gnu/java/security/provider/DSAParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSASignature.java b/gnu/java/security/provider/DSASignature.java
index 211cdb8cc..1d3875d28 100644
--- a/gnu/java/security/provider/DSASignature.java
+++ b/gnu/java/security/provider/DSASignature.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DefaultPolicy.java b/gnu/java/security/provider/DefaultPolicy.java
index f7ef782fc..d42be6c90 100644
--- a/gnu/java/security/provider/DefaultPolicy.java
+++ b/gnu/java/security/provider/DefaultPolicy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/EncodedKeyFactory.java b/gnu/java/security/provider/EncodedKeyFactory.java
index dd1a06a79..2bf0fff80 100644
--- a/gnu/java/security/provider/EncodedKeyFactory.java
+++ b/gnu/java/security/provider/EncodedKeyFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/Gnu.java b/gnu/java/security/provider/Gnu.java
index 34f86d8ba..849f63c16 100644
--- a/gnu/java/security/provider/Gnu.java
+++ b/gnu/java/security/provider/Gnu.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuDHPublicKey.java b/gnu/java/security/provider/GnuDHPublicKey.java
index d62fcc93a..6e13f6bf2 100644
--- a/gnu/java/security/provider/GnuDHPublicKey.java
+++ b/gnu/java/security/provider/GnuDHPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuDSAPrivateKey.java b/gnu/java/security/provider/GnuDSAPrivateKey.java
index 8cac9c351..aac2faab2 100644
--- a/gnu/java/security/provider/GnuDSAPrivateKey.java
+++ b/gnu/java/security/provider/GnuDSAPrivateKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuDSAPublicKey.java b/gnu/java/security/provider/GnuDSAPublicKey.java
index 6f3a29da9..41195fa99 100644
--- a/gnu/java/security/provider/GnuDSAPublicKey.java
+++ b/gnu/java/security/provider/GnuDSAPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuRSAPrivateKey.java b/gnu/java/security/provider/GnuRSAPrivateKey.java
index 45a212552..b09fc88bc 100644
--- a/gnu/java/security/provider/GnuRSAPrivateKey.java
+++ b/gnu/java/security/provider/GnuRSAPrivateKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuRSAPublicKey.java b/gnu/java/security/provider/GnuRSAPublicKey.java
index 053774467..a35e761c0 100644
--- a/gnu/java/security/provider/GnuRSAPublicKey.java
+++ b/gnu/java/security/provider/GnuRSAPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/MD2withRSA.java b/gnu/java/security/provider/MD2withRSA.java
index c43d07adb..a72ae5588 100644
--- a/gnu/java/security/provider/MD2withRSA.java
+++ b/gnu/java/security/provider/MD2withRSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/MD4withRSA.java b/gnu/java/security/provider/MD4withRSA.java
index 86cd2bed5..76a6a1ad0 100644
--- a/gnu/java/security/provider/MD4withRSA.java
+++ b/gnu/java/security/provider/MD4withRSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/MD5.java b/gnu/java/security/provider/MD5.java
index 41956fc87..1534eb910 100644
--- a/gnu/java/security/provider/MD5.java
+++ b/gnu/java/security/provider/MD5.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/MD5withRSA.java b/gnu/java/security/provider/MD5withRSA.java
index ec8370def..721d897ed 100644
--- a/gnu/java/security/provider/MD5withRSA.java
+++ b/gnu/java/security/provider/MD5withRSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/PKIXCertPathValidatorImpl.java b/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
index 3e493ee6d..ab8943443 100644
--- a/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
+++ b/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
@@ -1,5 +1,5 @@
/* PKIXCertPathValidatorImpl.java -- PKIX certificate path validator.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -331,7 +331,7 @@ public class PKIXCertPathValidatorImpl extends CertPathValidatorSpi
continue;
try
{
- if (anchorCert == null)
+ if (anchorCert != null)
anchorCert.checkValidity(now);
p[p.length-1].verify(anchorKey);
if (anchorCert != null && anchorCert.getBasicConstraints() >= 0
diff --git a/gnu/java/security/provider/RSA.java b/gnu/java/security/provider/RSA.java
index 4fd463378..c3cfbbf79 100644
--- a/gnu/java/security/provider/RSA.java
+++ b/gnu/java/security/provider/RSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/RSAKeyFactory.java b/gnu/java/security/provider/RSAKeyFactory.java
index 33c8c2287..d13cbe510 100644
--- a/gnu/java/security/provider/RSAKeyFactory.java
+++ b/gnu/java/security/provider/RSAKeyFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/SHA.java b/gnu/java/security/provider/SHA.java
index 6b8d3ba5c..e3b09bc56 100644
--- a/gnu/java/security/provider/SHA.java
+++ b/gnu/java/security/provider/SHA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/SHA1PRNG.java b/gnu/java/security/provider/SHA1PRNG.java
index 5b77aae80..e4058e307 100644
--- a/gnu/java/security/provider/SHA1PRNG.java
+++ b/gnu/java/security/provider/SHA1PRNG.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/SHA1withRSA.java b/gnu/java/security/provider/SHA1withRSA.java
index 7e1061929..0e63fdeeb 100644
--- a/gnu/java/security/provider/SHA1withRSA.java
+++ b/gnu/java/security/provider/SHA1withRSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/X509CertificateFactory.java b/gnu/java/security/provider/X509CertificateFactory.java
index 7cfa1f610..1a415eabb 100644
--- a/gnu/java/security/provider/X509CertificateFactory.java
+++ b/gnu/java/security/provider/X509CertificateFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/package.html b/gnu/java/security/provider/package.html
index d5a0a2ece..641a22aff 100644
--- a/gnu/java/security/provider/package.html
+++ b/gnu/java/security/provider/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/util/Prime.java b/gnu/java/security/util/Prime.java
index 2184602f6..e493ce675 100644
--- a/gnu/java/security/util/Prime.java
+++ b/gnu/java/security/util/Prime.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/util/package.html b/gnu/java/security/util/package.html
index ea91cb5df..36dd33b79 100644
--- a/gnu/java/security/util/package.html
+++ b/gnu/java/security/util/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/GnuPKIExtension.java b/gnu/java/security/x509/GnuPKIExtension.java
index 36ce84db0..8e74b8b24 100644
--- a/gnu/java/security/x509/GnuPKIExtension.java
+++ b/gnu/java/security/x509/GnuPKIExtension.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/PolicyNodeImpl.java b/gnu/java/security/x509/PolicyNodeImpl.java
index d3d4bd9a4..72cb4a9ea 100644
--- a/gnu/java/security/x509/PolicyNodeImpl.java
+++ b/gnu/java/security/x509/PolicyNodeImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/Util.java b/gnu/java/security/x509/Util.java
index 3bbbff25b..d27392026 100644
--- a/gnu/java/security/x509/Util.java
+++ b/gnu/java/security/x509/Util.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X500DistinguishedName.java b/gnu/java/security/x509/X500DistinguishedName.java
index 6c34f0579..daf746f5d 100644
--- a/gnu/java/security/x509/X500DistinguishedName.java
+++ b/gnu/java/security/x509/X500DistinguishedName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CRL.java b/gnu/java/security/x509/X509CRL.java
index 5fe255c2a..5b2d3b141 100644
--- a/gnu/java/security/x509/X509CRL.java
+++ b/gnu/java/security/x509/X509CRL.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CRLEntry.java b/gnu/java/security/x509/X509CRLEntry.java
index 4f7e1c258..a3bcfdea8 100644
--- a/gnu/java/security/x509/X509CRLEntry.java
+++ b/gnu/java/security/x509/X509CRLEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CRLSelectorImpl.java b/gnu/java/security/x509/X509CRLSelectorImpl.java
index c409779ec..0ada55016 100644
--- a/gnu/java/security/x509/X509CRLSelectorImpl.java
+++ b/gnu/java/security/x509/X509CRLSelectorImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CertPath.java b/gnu/java/security/x509/X509CertPath.java
index 598dbeb94..e8ed6bf35 100644
--- a/gnu/java/security/x509/X509CertPath.java
+++ b/gnu/java/security/x509/X509CertPath.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CertSelectorImpl.java b/gnu/java/security/x509/X509CertSelectorImpl.java
index c355dc176..36187ad8e 100644
--- a/gnu/java/security/x509/X509CertSelectorImpl.java
+++ b/gnu/java/security/x509/X509CertSelectorImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509Certificate.java b/gnu/java/security/x509/X509Certificate.java
index 5d8f1d91c..14ac43a25 100644
--- a/gnu/java/security/x509/X509Certificate.java
+++ b/gnu/java/security/x509/X509Certificate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,9 @@ exception statement from your version. */
package gnu.java.security.x509;
+import gnu.classpath.debug.Component;
+import gnu.classpath.debug.SystemLogger;
+
import gnu.java.security.OID;
import gnu.java.security.der.BitString;
import gnu.java.security.der.DER;
@@ -86,6 +89,9 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
import javax.security.auth.x500.X500Principal;
/**
@@ -100,23 +106,7 @@ public class X509Certificate extends java.security.cert.X509Certificate
// Constants and fields.
// ------------------------------------------------------------------------
- private static final boolean DEBUG = false;
- private static void debug(String msg)
- {
- if (DEBUG)
- {
- System.err.print(">> X509Certificate: ");
- System.err.println(msg);
- }
- }
- private static void debug(Throwable t)
- {
- if (DEBUG)
- {
- System.err.print(">> X509Certificate: ");
- t.printStackTrace();
- }
- }
+ private static final Logger logger = SystemLogger.SYSTEM;
protected static final OID ID_DSA = new OID ("1.2.840.10040.4.1");
protected static final OID ID_DSA_WITH_SHA1 = new OID ("1.2.840.10040.4.3");
@@ -177,12 +167,12 @@ public class X509Certificate extends java.security.cert.X509Certificate
}
catch (IOException ioe)
{
- debug(ioe);
+ logger.log (Component.X509, "", ioe);
throw ioe;
}
catch (Exception e)
{
- debug(e);
+ logger.log (Component.X509, "", e);
CertificateException ce = new CertificateException(e.getMessage());
ce.initCause (e);
throw ce;
@@ -543,7 +533,8 @@ public class X509Certificate extends java.security.cert.X509Certificate
private void doVerify(Signature sig, PublicKey key)
throws CertificateException, InvalidKeyException, SignatureException
{
- debug("verifying sig=" + sig + " key=" + key);
+ logger.log (Component.X509, "verifying sig={0} key={1}",
+ new Object[] { sig, key });
sig.initVerify(key);
sig.update(tbsCertBytes);
if (!sig.verify(signature))
@@ -563,7 +554,8 @@ public class X509Certificate extends java.security.cert.X509Certificate
// Certificate ::= SEQUENCE {
DERValue cert = der.read();
- debug("start Certificate len == " + cert.getLength());
+ logger.log (Component.X509, "start Certificate len == {0}",
+ new Integer (cert.getLength()));
this.encoded = cert.getEncoded();
if (!cert.isConstructed())
@@ -578,7 +570,8 @@ public class X509Certificate extends java.security.cert.X509Certificate
throw new IOException("malformed TBSCertificate");
}
tbsCertBytes = tbsCert.getEncoded();
- debug("start TBSCertificate len == " + tbsCert.getLength());
+ logger.log (Component.X509, "start TBSCertificate len == {0}",
+ new Integer (tbsCert.getLength()));
// Version ::= INTEGER [0] { v1(0), v2(1), v3(2) }
DERValue val = der.read();
@@ -591,11 +584,12 @@ public class X509Certificate extends java.security.cert.X509Certificate
{
version = 1;
}
- debug("read version == " + version);
+ logger.log (Component.X509, "read version == {0}",
+ new Integer (version));
// SerialNumber ::= INTEGER
serialNo = (BigInteger) val.getValue();
- debug("read serial number == " + serialNo);
+ logger.log (Component.X509, "read serial number == {0}", serialNo);
// AlgorithmIdentifier ::= SEQUENCE {
val = der.read();
@@ -604,12 +598,13 @@ public class X509Certificate extends java.security.cert.X509Certificate
throw new IOException("malformed AlgorithmIdentifier");
}
int certAlgLen = val.getLength();
- debug("start AlgorithmIdentifier len == " + certAlgLen);
+ logger.log (Component.X509, "start AlgorithmIdentifier len == {0}",
+ new Integer (certAlgLen));
val = der.read();
// algorithm OBJECT IDENTIFIER,
algId = (OID) val.getValue();
- debug("read algorithm ID == " + algId);
+ logger.log (Component.X509, "read algorithm ID == {0}", algId);
// parameters ANY DEFINED BY algorithm OPTIONAL }
if (certAlgLen > val.getEncodedLength())
@@ -622,18 +617,18 @@ public class X509Certificate extends java.security.cert.X509Certificate
else
{
algVal = val.getEncoded();
-
- if (val.isConstructed())
- encoded.skip(val.getLength());
+
+ if (val.isConstructed())
+ encoded.skip(val.getLength());
}
- debug("read algorithm parameters == " + algVal);
+ logger.log (Component.X509, "read algorithm parameters == {0}", algVal);
}
// issuer Name,
val = der.read();
issuer = new X500DistinguishedName(val.getEncoded());
der.skip(val.getLength());
- debug("read issuer == " + issuer);
+ logger.log (Component.X509, "read issuer == {0}", issuer);
// Validity ::= SEQUENCE {
// notBefore Time,
@@ -643,15 +638,15 @@ public class X509Certificate extends java.security.cert.X509Certificate
throw new IOException("malformed Validity");
}
notBefore = (Date) der.read().getValue();
+ logger.log (Component.X509, "read notBefore == {0}", notBefore);
notAfter = (Date) der.read().getValue();
- debug("read notBefore == " + notBefore);
- debug("read notAfter == " + notAfter);
+ logger.log (Component.X509, "read notAfter == {0}", notAfter);
// subject Name,
val = der.read();
subject = new X500DistinguishedName(val.getEncoded());
der.skip(val.getLength());
- debug("read subject == " + subject);
+ logger.log (Component.X509, "read subject == {0}", subject);
// SubjectPublicKeyInfo ::= SEQUENCE {
// algorithm AlgorithmIdentifier,
@@ -664,7 +659,7 @@ public class X509Certificate extends java.security.cert.X509Certificate
KeyFactory spkFac = KeyFactory.getInstance("X.509");
subjectKey = spkFac.generatePublic(new X509EncodedKeySpec(spki.getEncoded()));
der.skip(spki.getLength());
- debug("read subjectPublicKey == " + subjectKey);
+ logger.log (Component.X509, "read subjectPublicKey == {0}", subjectKey);
if (version > 1)
{
@@ -674,43 +669,50 @@ public class X509Certificate extends java.security.cert.X509Certificate
{
byte[] b = (byte[]) val.getValue();
issuerUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF);
- debug("read issuerUniqueId == " + issuerUniqueId);
+ logger.log (Component.X509, "read issuerUniqueId == {0}", issuerUniqueId);
val = der.read();
}
if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 2)
{
byte[] b = (byte[]) val.getValue();
subjectUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF);
- debug("read subjectUniqueId == " + subjectUniqueId);
+ logger.log (Component.X509, "read subjectUniqueId == {0}", subjectUniqueId);
val = der.read();
}
if (version >= 3 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 3)
{
val = der.read();
- debug("start Extensions len == " + val.getLength());
+ logger.log (Component.X509, "start Extensions len == {0}",
+ new Integer (val.getLength()));
int len = 0;
while (len < val.getLength())
{
DERValue ext = der.read();
- debug("start extension len == " + ext.getLength());
+ logger.log (Component.X509, "start extension len == {0}",
+ new Integer (ext.getLength()));
Extension e = new Extension(ext.getEncoded());
extensions.put(e.getOid(), e);
der.skip(ext.getLength());
len += ext.getEncodedLength();
- debug("count == " + len);
+ logger.log (Component.X509, "read extension {0} == {1}",
+ new Object[] { e.getOid (), e });
+ logger.log (Component.X509, "count == {0}", new Integer (len));
}
+
+ val = der.read ();
}
- val = der.read();
+ logger.log (Component.X509, "read value {0}", val);
if (!val.isConstructed())
{
- throw new IOException("malformed AlgorithmIdentifier");
+ throw new CertificateException ("malformed AlgorithmIdentifier");
}
int sigAlgLen = val.getLength();
- debug("start AlgorithmIdentifier len == " + sigAlgLen);
+ logger.log (Component.X509, "start AlgorithmIdentifier len == {0}",
+ new Integer (sigAlgLen));
val = der.read();
sigAlgId = (OID) val.getValue();
- debug("read algorithm id == " + sigAlgId);
+ logger.log (Component.X509, "read algorithm id == {0}", sigAlgId);
if (sigAlgLen > val.getEncodedLength())
{
val = der.read();
@@ -735,9 +737,9 @@ public class X509Certificate extends java.security.cert.X509Certificate
{
encoded.skip(val.getLength());
}
- debug("read parameters == " + sigAlgVal);
+ logger.log (Component.X509, "read parameters == {0}", sigAlgVal);
}
signature = ((BitString) der.read().getValue()).toByteArray();
- debug("read signature ==\n" + Util.hexDump(signature, ">>>> "));
+ logger.log (Component.X509, "read signature ==\n{0}", Util.hexDump(signature, ">>>> "));
}
}
diff --git a/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java b/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
index dafb3ba23..a94b76f09 100644
--- a/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
+++ b/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/BasicConstraints.java b/gnu/java/security/x509/ext/BasicConstraints.java
index a51e7a8f0..00f7a6ed2 100644
--- a/gnu/java/security/x509/ext/BasicConstraints.java
+++ b/gnu/java/security/x509/ext/BasicConstraints.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/CRLNumber.java b/gnu/java/security/x509/ext/CRLNumber.java
index 1c3e01e36..36b1c7b5f 100644
--- a/gnu/java/security/x509/ext/CRLNumber.java
+++ b/gnu/java/security/x509/ext/CRLNumber.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/CertificatePolicies.java b/gnu/java/security/x509/ext/CertificatePolicies.java
index 266a4c3c6..50bc6d367 100644
--- a/gnu/java/security/x509/ext/CertificatePolicies.java
+++ b/gnu/java/security/x509/ext/CertificatePolicies.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/ExtendedKeyUsage.java b/gnu/java/security/x509/ext/ExtendedKeyUsage.java
index cd551a99e..37b08acf4 100644
--- a/gnu/java/security/x509/ext/ExtendedKeyUsage.java
+++ b/gnu/java/security/x509/ext/ExtendedKeyUsage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/Extension.java b/gnu/java/security/x509/ext/Extension.java
index 28a32fecc..5ca9ac3a9 100644
--- a/gnu/java/security/x509/ext/Extension.java
+++ b/gnu/java/security/x509/ext/Extension.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/GeneralNames.java b/gnu/java/security/x509/ext/GeneralNames.java
index 66473ee60..e92aedaef 100644
--- a/gnu/java/security/x509/ext/GeneralNames.java
+++ b/gnu/java/security/x509/ext/GeneralNames.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/IssuerAlternativeNames.java b/gnu/java/security/x509/ext/IssuerAlternativeNames.java
index 7576b6d34..8b017dc62 100644
--- a/gnu/java/security/x509/ext/IssuerAlternativeNames.java
+++ b/gnu/java/security/x509/ext/IssuerAlternativeNames.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/KeyUsage.java b/gnu/java/security/x509/ext/KeyUsage.java
index a6fd77573..dcd98181e 100644
--- a/gnu/java/security/x509/ext/KeyUsage.java
+++ b/gnu/java/security/x509/ext/KeyUsage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/PolicyConstraint.java b/gnu/java/security/x509/ext/PolicyConstraint.java
index 866f015cd..20cf552a0 100644
--- a/gnu/java/security/x509/ext/PolicyConstraint.java
+++ b/gnu/java/security/x509/ext/PolicyConstraint.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/PolicyMappings.java b/gnu/java/security/x509/ext/PolicyMappings.java
index 81cb88c13..0493ed89d 100644
--- a/gnu/java/security/x509/ext/PolicyMappings.java
+++ b/gnu/java/security/x509/ext/PolicyMappings.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java b/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java
index c56cd27cf..3b531c055 100644
--- a/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java
+++ b/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/ReasonCode.java b/gnu/java/security/x509/ext/ReasonCode.java
index d9651652c..a6d59e43a 100644
--- a/gnu/java/security/x509/ext/ReasonCode.java
+++ b/gnu/java/security/x509/ext/ReasonCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/SubjectAlternativeNames.java b/gnu/java/security/x509/ext/SubjectAlternativeNames.java
index 73f36b1e3..f88e85496 100644
--- a/gnu/java/security/x509/ext/SubjectAlternativeNames.java
+++ b/gnu/java/security/x509/ext/SubjectAlternativeNames.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/SubjectKeyIdentifier.java b/gnu/java/security/x509/ext/SubjectKeyIdentifier.java
index 910decc79..fc65abe21 100644
--- a/gnu/java/security/x509/ext/SubjectKeyIdentifier.java
+++ b/gnu/java/security/x509/ext/SubjectKeyIdentifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/package.html b/gnu/java/security/x509/ext/package.html
index 468cf97d6..cc44e55c9 100644
--- a/gnu/java/security/x509/ext/package.html
+++ b/gnu/java/security/x509/ext/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/package.html b/gnu/java/security/x509/package.html
index ca04ca9ab..8b0ba0084 100644
--- a/gnu/java/security/x509/package.html
+++ b/gnu/java/security/x509/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/AttributedFormatBuffer.java b/gnu/java/text/AttributedFormatBuffer.java
index a02f8a1bc..8cfc8f56d 100644
--- a/gnu/java/text/AttributedFormatBuffer.java
+++ b/gnu/java/text/AttributedFormatBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/BaseBreakIterator.java b/gnu/java/text/BaseBreakIterator.java
index 40a698f7c..c28a2089a 100644
--- a/gnu/java/text/BaseBreakIterator.java
+++ b/gnu/java/text/BaseBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/CharacterBreakIterator.java b/gnu/java/text/CharacterBreakIterator.java
index c973f7b87..5274543a9 100644
--- a/gnu/java/text/CharacterBreakIterator.java
+++ b/gnu/java/text/CharacterBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/FormatBuffer.java b/gnu/java/text/FormatBuffer.java
index addfcbe5c..e6b682087 100644
--- a/gnu/java/text/FormatBuffer.java
+++ b/gnu/java/text/FormatBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/FormatCharacterIterator.java b/gnu/java/text/FormatCharacterIterator.java
index 942641a08..60773aa1e 100644
--- a/gnu/java/text/FormatCharacterIterator.java
+++ b/gnu/java/text/FormatCharacterIterator.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,8 +37,6 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package gnu.java.text;
-import gnu.classpath.Configuration;
-
import java.text.AttributedCharacterIterator;
import java.util.HashMap;
import java.util.HashSet;
@@ -65,7 +63,8 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
private int attributeIndex;
private int[] ranges;
private HashMap[] attributes;
-
+ private static final boolean DEBUG = false;
+
/**
* This constructor builds an empty iterated strings. The attributes
* are empty and so is the string. However you may append strings
@@ -496,7 +495,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
private void debug(String s)
{
- if (Configuration.DEBUG)
+ if (DEBUG)
System.out.println(s);
}
@@ -504,7 +503,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
{
int start_range = 0;
- if (!Configuration.DEBUG)
+ if (!DEBUG)
return;
System.out.println("Dumping internal table:");
diff --git a/gnu/java/text/LineBreakIterator.java b/gnu/java/text/LineBreakIterator.java
index 7f00a95df..ad07479fb 100644
--- a/gnu/java/text/LineBreakIterator.java
+++ b/gnu/java/text/LineBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/SentenceBreakIterator.java b/gnu/java/text/SentenceBreakIterator.java
index 3d3958728..f91d269bb 100644
--- a/gnu/java/text/SentenceBreakIterator.java
+++ b/gnu/java/text/SentenceBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/StringFormatBuffer.java b/gnu/java/text/StringFormatBuffer.java
index ec0ed8641..5772186b4 100644
--- a/gnu/java/text/StringFormatBuffer.java
+++ b/gnu/java/text/StringFormatBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/WordBreakIterator.java b/gnu/java/text/WordBreakIterator.java
index 85c44da45..f140369f8 100644
--- a/gnu/java/text/WordBreakIterator.java
+++ b/gnu/java/text/WordBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/package.html b/gnu/java/text/package.html
index b379b9b3b..a1025a8e9 100644
--- a/gnu/java/text/package.html
+++ b/gnu/java/text/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/DoubleEnumeration.java b/gnu/java/util/DoubleEnumeration.java
index a7da80156..94efb923d 100644
--- a/gnu/java/util/DoubleEnumeration.java
+++ b/gnu/java/util/DoubleEnumeration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/EmptyEnumeration.java b/gnu/java/util/EmptyEnumeration.java
index 4e80499c8..46a82d6cb 100644
--- a/gnu/java/util/EmptyEnumeration.java
+++ b/gnu/java/util/EmptyEnumeration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/package.html b/gnu/java/util/package.html
index 446a9c823..d90fa59d4 100644
--- a/gnu/java/util/package.html
+++ b/gnu/java/util/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/FileBasedFactory.java b/gnu/java/util/prefs/FileBasedFactory.java
index fc6085fee..70f3558fc 100644
--- a/gnu/java/util/prefs/FileBasedFactory.java
+++ b/gnu/java/util/prefs/FileBasedFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/MemoryBasedFactory.java b/gnu/java/util/prefs/MemoryBasedFactory.java
index ff21066d3..abaf0016f 100644
--- a/gnu/java/util/prefs/MemoryBasedFactory.java
+++ b/gnu/java/util/prefs/MemoryBasedFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/MemoryBasedPreferences.java b/gnu/java/util/prefs/MemoryBasedPreferences.java
index c1d59c7b1..b2f321c9c 100644
--- a/gnu/java/util/prefs/MemoryBasedPreferences.java
+++ b/gnu/java/util/prefs/MemoryBasedPreferences.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/NodeReader.java b/gnu/java/util/prefs/NodeReader.java
index e343b6b2b..4cd52e5db 100644
--- a/gnu/java/util/prefs/NodeReader.java
+++ b/gnu/java/util/prefs/NodeReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/NodeWriter.java b/gnu/java/util/prefs/NodeWriter.java
index d570d99af..1eed9e66e 100644
--- a/gnu/java/util/prefs/NodeWriter.java
+++ b/gnu/java/util/prefs/NodeWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/package.html b/gnu/java/util/prefs/package.html
index b8ed83588..ee5d67f72 100644
--- a/gnu/java/util/prefs/package.html
+++ b/gnu/java/util/prefs/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/DelegateFactory.java b/gnu/javax/rmi/CORBA/DelegateFactory.java
index abd4df040..d71546d75 100644
--- a/gnu/javax/rmi/CORBA/DelegateFactory.java
+++ b/gnu/javax/rmi/CORBA/DelegateFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java b/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
index c97e36ab9..7d98bb57b 100644
--- a/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
+++ b/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java b/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
index 82681c18d..6a7e6b746 100644
--- a/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/StubDelegateImpl.java b/gnu/javax/rmi/CORBA/StubDelegateImpl.java
index bc2d1f9ce..998d59e33 100644
--- a/gnu/javax/rmi/CORBA/StubDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/StubDelegateImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/UtilDelegateImpl.java b/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
index 70b2e60c6..7bed2aa22 100644
--- a/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/ValueHandlerImpl.java b/gnu/javax/rmi/CORBA/ValueHandlerImpl.java
index 6935aa68c..906381fe4 100644
--- a/gnu/javax/rmi/CORBA/ValueHandlerImpl.java
+++ b/gnu/javax/rmi/CORBA/ValueHandlerImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/PortableServer.java b/gnu/javax/rmi/PortableServer.java
index 0f307aff8..4a841387d 100644
--- a/gnu/javax/rmi/PortableServer.java
+++ b/gnu/javax/rmi/PortableServer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/plaf/gtk/GtkBorders.java b/gnu/javax/swing/plaf/gtk/GtkBorders.java
deleted file mode 100644
index 4c5c72a74..000000000
--- a/gnu/javax/swing/plaf/gtk/GtkBorders.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/* GtkBorders.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.plaf.*;
-
-/**
- * Optional class, can be used to define nifty borders.
- *
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
- */
-public class GtkBorders
-{
- public static class ButtonBorder extends AbstractBorder
- implements UIResource
- {
- private Border raised; // use by default
- private Border lowered; // use this one when pressed
-
- // creat the border
- public ButtonBorder()
- {
- raised = BorderFactory.createRaisedBevelBorder();
- lowered = BorderFactory.createLoweredBevelBorder();
- }
-
- // define the insets (in terms of one of the others)
- public Insets getBorderInsets(Component c)
- {
- return raised.getBorderInsets(c);
- }
-
- public void paintBorder(Component c, Graphics g, int x, int y,
- int width, int height)
- {
- AbstractButton b = (AbstractButton)c;
- ButtonModel model = b.getModel();
-
- if (model.isPressed() && model.isArmed())
- lowered.paintBorder(c, g, x, y, width, height);
- else
- raised.paintBorder(c, g, x, y, width, height);
- }
- }
-}
diff --git a/gnu/javax/swing/plaf/gtk/GtkIconFactory.java b/gnu/javax/swing/plaf/gtk/GtkIconFactory.java
deleted file mode 100644
index a86eb1346..000000000
--- a/gnu/javax/swing/plaf/gtk/GtkIconFactory.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/* GtkIconFactory.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.plaf.*;
-import java.io.Serializable;
-
-/**
- *
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
- */
-public class GtkIconFactory implements Serializable
-{
- private static Icon radioButtonIcon;
- private static Icon checkBoxIcon;
-
- public static Icon getRadioButtonIcon()
- {
- if (radioButtonIcon == null)
- radioButtonIcon = new RadioButtonIcon();
- return radioButtonIcon;
- }
-
- private static class RadioButtonIcon
- implements Icon, UIResource, Serializable
- {
- private static final int size = 15;
-
- public int getIconWidth() { return size; }
- public int getIconHeight() { return size; }
-
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- System.out.println("radiobuttonicon: paintIcon()");
- // get the button and model containing the state we are
- // supposed to show
- AbstractButton b = (AbstractButton)c;
- ButtonModel model = b.getModel();
-
- // If the button is being pressed (& armed), change the
- // background color
- // Note: could also do something different if the button is
- // disabled
-
- if (model.isPressed() && model.isArmed())
- {
- System.out.println("radiobuttonicon: pressed & armed");
- g.setColor(UIManager.getColor("RadioButton.pressed"));
- g.fillOval(x,y,size-1, size-1);
- }
- // draw an outer circle
- g.setColor(UIManager.getColor("RadioButton.foreground"));
- g.drawOval(x,y,size-1, size-1);
-
- // fill a small circle inside if the button is selected
- if (model.isSelected()) {
- g.fillOval(x+4, y+4, size-8, size-8);
- System.out.println("radiobuttonicon: is selected");
- }
- }
- }
-}
diff --git a/gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java b/gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java
deleted file mode 100644
index 6a8025e39..000000000
--- a/gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/* GtkLookAndFeel.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
-
-/**
- *
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
- */
-public class GtkLookAndFeel extends BasicLookAndFeel
-{
- private UIDefaults uiDefaults;
-
- /**
- */
- public GtkLookAndFeel()
- {
- super();
- }
-
- /**
- * A short string to identify this look and feel, for example in a
- * drop down list to choose between several look and feels.
- */
- public String getName() { return "GIMP Toolkit"; }
-
- /**
- * A much longer description of the look and feel.
- */
- public String getDescription()
- {
- return new String("The GIMP Toolkit Look and Feel for Java, " +
- "written by Brian Jones (cbj@gnu.org), " +
- "(c) 1999 by Free Software Foundation, Inc. " +
- "http://www.classpath.org");
- }
-
- /**
- * Return a unique string identifying this look and feel as different
- * from and not a subclass of any other look and feel. Usually, a
- * subclass will return the same <code>String</code> here as the
- * original look and feel if only a few changes are being made rather
- * than something completely new and different.
- */
- public String getID()
- {
- return "Gtk";
- }
-
- public boolean isNativeLookAndFeel()
- {
- return false;
- }
-
- public boolean isSupportedLookAndFeel()
- {
- return true;
- }
-
- protected void initClassDefaults(UIDefaults table)
- {
- super.initClassDefaults(table);
-
- String gtkPkgName = "gnu.javax.swing.plaf.gtk.";
-
-
- Object[] defaults = {
- "SliderUI", gtkPkgName + "GtkSliderUI"
- };
- /*
- "CheckBoxUI", gtkPkgName + "GtkCheckBoxUI",
- "ButtonUI", gtkPkgName + "GtkButtonUI"
- "ColorChooserUI", "MetalColorChooserUI",
- "MenuBarUI", "MetalMenuBarUI",
- "MenuUI", "MetalMenuUI",
- "MenuItemUI", "MetalMenuItemUI",
- "CheckBoxMenuItemUI", "MetalCheckBoxMenuItemUI",
- "RadioButtonMenuItemUI", "MetalRadioButtonMenuItemUI",
- "RadioButtonUI", "MetalRadioButtonUI",
- "ToggleButtonUI", "MetalToggleButtonUI",
- "PopupMenuUI", "MetalPopupMenuUI",
- "ProgressBarUI", "MetalProgressBarUI",
- "ScrollBarUI", "MetalScrollBarUI",
- "ScrollPaneUI", "MetalScrollPaneUI",
- "SplitPaneUI", "MetalSplitPaneUI",
- "SeparatorUI", "MetalSeparatorUI",
- "ToolBarSeparatorUI", "MetalToolBarSeparatorUI",
- "PopupMenuSeparatorUI", "MetalPopupMenuSeparatorUI",
- "TabbedPaneUI", "MetalTabbedPaneUI",
- "TextAreaUI", "MetalTextAreaUI",
- "TextFieldUI", "MetalTextFieldUI",
- "PasswordFieldUI", "MetalPasswordFieldUI",
- "TextPaneUI", "MetalTextPaneUI",
- "EditorPaneUI", "MetalEditorPaneUI",
- "TreeUI", "MetalTreeUI",
- "LabelUI", "MetalLabelUI",
- "ListUI", "MetalListUI",
- "ToolBarUI", "MetalToolBarUI",
- "ToolTipUI", "MetalToolTipUI",
- "ComboBoxUI", "MetalComboBoxUI",
- "TableUI", "MetalTableUI",
- "TableHeaderUI", "MetalTableHeaderUI",
- "InternalFrameUI", "GtkInternalFrameUI",
- "StandardDialogUI", "GtkStandardDialogUI",
- "DesktopPaneUI", "GtkDesktopPaneUI",
- "DesktopIconUI", "GtkDesktopIconUI",
- "DirectoryPaneUI", "GtkDirectoryPaneUI",
- "FileChooserUI", "GtkFileChooserUI",
- "OptionPaneUI", "GtkOptionPaneUI" }
- */
- table.putDefaults(defaults);
-
- }
-
- protected void initSystemColorDefaults(UIDefaults table)
- {
- String[] colors = {
- "desktop", "#000000",
- "activeCaption", "#163555",
- "activeCaptionText", "#FFFFFF",
- "activeCaptionBorder", "#000000",
- "inactiveCaption", "#375676",
- "inactiveCaptionText", "#999999",
- "inactiveCaptionBorder", "#000000",
- "window", "#FFFFFF",
- "windowBorder", "#969696",
- "windowText", "#000000",
- "menu", "#d6d6d6",
- "menuText", "#000000",
- "text", "#FFFFFF",
- "textText", "#000000",
- "textHighlight", "#00009c",
- "textHighlightText", "#FFFFFF",
- "textInactiveText", "#999999",
- "control", "#d6d6d6",
- "controlText", "#000000",
- "controlHighlight", "#eaeaea",
- "controlLtHighlight", "#eaeaea",
- "controlShadow", "#c3c3c3",
- "controlDkShadow", "#888888",
- "scrollbar", "#c3c3c3",
- "info", "#d6d6d6",
- "infoText", "#000000"
- };
-
- loadSystemColors(table, colors, false);
- }
-
- protected void initComponentDefaults(UIDefaults table)
- {
- super.initComponentDefaults(table);
-
- // define common resources
- // fonts
- FontUIResource sansSerifPlain10 =
- new FontUIResource("SansSerif", Font.PLAIN, 10);
- FontUIResource serifPlain10 =
- new FontUIResource("Serif", Font.PLAIN, 10);
- // insets
- // borders
- // colors
- ColorUIResource controlDkShadow = new ColorUIResource(table.getColor("controlDkShadow"));
- ColorUIResource controlShadow = new ColorUIResource(table.getColor("controlShadow"));
- ColorUIResource control = new ColorUIResource(table.getColor("control"));
- ColorUIResource scrollbar = new ColorUIResource(table.getColor("scrollbar"));
- ColorUIResource controlHighlight = new ColorUIResource(table.getColor("controlHighlight"));
- if (scrollbar == null)
- System.out.println("scrollbar is null");
-
- ColorUIResource white = new ColorUIResource(Color.white);
- ColorUIResource black = new ColorUIResource(Color.black);
- ColorUIResource blue = new ColorUIResource(Color.blue);
-
- // icons
- Object errorIcon = LookAndFeel.makeIcon(getClass(), "icons/error.gif");
- // any other resources like dimensions and integer values
-
- // define defaults
- Object[] defaults =
- {
- "Button.font", sansSerifPlain10,
- "CheckBox.font", sansSerifPlain10,
- "RadioButton.pressed", black,
- "Slider.focus", blue,
- "Slider.foreground", control,
- "Slider.highlight", controlHighlight,
- "Slider.shadow", controlShadow,
- "Slider.background", controlDkShadow
-
-// "Slider.background", "#888888",
-// "Slider.focus", "#c3c3c3",
-// "Slider.foreground", "#d6d6d6",
-// "Slider.highlight", "#ffffff",
-// "Slider.shadow", "#000000"
-
-
- };
-
- table.putDefaults(defaults);
- }
-}
diff --git a/gnu/javax/swing/plaf/gtk/GtkSliderUI.java b/gnu/javax/swing/plaf/gtk/GtkSliderUI.java
deleted file mode 100644
index ade7e380a..000000000
--- a/gnu/javax/swing/plaf/gtk/GtkSliderUI.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/* GtkSliderUI.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
-
-/**
- * Gtk-like slider
- *
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
- */
-public class GtkSliderUI extends BasicSliderUI
-{
- private static Color thumbFgColor;
- private static Color thumbBgColor;
- private static Color thumbHighlight;
- private static Color thumbFocus;
-
- private static Color bgColor;
- private static Color fgColor;
- private static Color focusColor;
- private static Color highlight;
- private static Color shadow;
-
- private static final Dimension PREF_HORIZ = new Dimension(250, 15);
- private static final Dimension PREF_VERT = new Dimension(15, 250);
- private static final Dimension MIN_HORIZ = new Dimension(25, 15);
- private static final Dimension MIN_VERT = new Dimension(15, 25);
-
- public GtkSliderUI()
- {
- super(null);
- bgColor = UIManager.getColor("Slider.background");
- fgColor = UIManager.getColor("Slider.foreground");
- focusColor = UIManager.getColor("Slider.focus");
- highlight = UIManager.getColor("Slider.highlight");
- shadow = UIManager.getColor("Slider.shadow");
-
- System.out.println("bgColor: " + bgColor);
- System.out.println("fgColor: " + fgColor);
- System.out.println("focusColor: " + focusColor);
- System.out.println("highlight: " + highlight);
- System.out.println("shadow: " + shadow);
- }
-
- public static ComponentUI createUI(JComponent c)
- {
- return new GtkSliderUI();
- }
-
- // methods not overridden here, using Basic defaults
- // installUI()
- // uninstall()
-
- public Dimension getPreferredHorizontalSize()
- {
- /*
- Dimension thumbSize = getThumbSize();
- Dimenstion labelSize = getLabelSize();
- // getTickLength()
- int width = thumbSize.width +
- getWidthOfWidestLabel
- */
- return PREF_HORIZ;
- }
-
- public Dimension getPreferredVerticalSize()
- {
- return PREF_VERT;
- }
-
- public Dimension getMinimumHorizontalSize()
- {
- return MIN_HORIZ;
- }
-
- public Dimension getMinimumVerticalSize()
- {
- return MIN_VERT;
- }
-
- /**
- * Returns thumb size based on slider orientation
- */
- protected Dimension getThumbSize()
- {
- Dimension size = new Dimension();
-
- if (slider.getOrientation() == JSlider.VERTICAL) {
- size.width = 15;
- size.height = 33;
- }
- else {
- size.width = 33;
- size.height = 15;
- }
- return size;
- }
-
- /**
- * Reserved width or height for ticks, as appropriate to the slider
- * orientation.
- */
- protected int getTickLength()
- {
- return 10;
- }
-
- public void paintFocus(Graphics g)
- {
- super.paintFocus(g);
- System.err.println("focus " + focusRect);
- }
-
- /**
- * Must account for Unicode when drawing text.
- */
- public void paintLabels(Graphics g)
- {
- super.paintLabels(g);
- System.err.println("label " + labelRect);
- }
-
- /**
- * A drawRect() generated slider has ghosting when moving left on
- * a horizontal slider and the bottom is not painted when moving
- * right.
- */
- public void paintThumb(Graphics g)
- {
- int x = thumbRect.x;
- int y = thumbRect.y;
- int h = thumbRect.height;
- int w = thumbRect.width;
-
-// "Slider.background", "#888888",
-// "Slider.focus", "#c3c3c3",
-// "Slider.foreground", "#d6d6d6",
-// "Slider.highlight", "#ffffff",
-// "Slider.shadow", "#000000"
-
- g.setColor(fgColor);
- g.fillRect(x,y,w,h);
- g.setColor(bgColor);
-
- if (slider.getOrientation() == JSlider.HORIZONTAL) {
- g.drawRect(x, y, w, h);
- g.setColor(highlight);
- g.drawLine(x+1, y+h-1, x+w, y+h-1);
- g.setColor(focusColor);
- g.drawLine(x+2, y+h-2, x+w, y+h-2);
- g.setColor(Color.black);
- g.drawLine(x+1, y+h-2, x+1, y+h-2);
- g.drawRect(x+1, y+1, w-1, 12);
- }
- else
- g.drawRect(x, y, w, h);
-
- System.err.println("thumb " + thumbRect);
- }
-
- // public void paintTicks(Graphics g)
-
- public void paintTrack(Graphics g)
- {
-// super.paintTrack(g);
- int x = trackRect.x;
- int y = trackRect.y;
- int h = trackRect.height;
- int w = trackRect.width;
-
- System.err.println("track " + trackRect);
-
- g.setColor(Color.black);
- g.fillRect(x,y,w,h);
-
-// if (slider.getOrientation() == JSlider.HORIZONTAL)
-// g.drawLine(x, y+h-1, x+w-1, y+h-1);
-// else
-// g.drawLine(x+w-1, y, x+w-1, y+h-1);
-
-// System.err.println("track " + trackRect);
-// System.err.println("content " + contentRect);
- }
-
- // the four methods below allow you to control tick painting without
- // worrying about what paintTicks does, look for in other UI delegates
- // protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
- // protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
- // protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
- // protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
-}
diff --git a/gnu/javax/swing/plaf/gtk/README b/gnu/javax/swing/plaf/gtk/README
deleted file mode 100644
index 2b3f001dd..000000000
--- a/gnu/javax/swing/plaf/gtk/README
+++ /dev/null
@@ -1,37 +0,0 @@
-This is a start at a GTK look and feel for Java.
-It is usable already, but it mainly just defaults back to Basic Look and
-Feel for everything.
-
-Sliders are currently broken. I haven't figured out why yet.
-
-A bunch of system colors defined in GtkLookandFeel though I have a feeling
-I'll be defining more ColorUIResources shortly.
-
-Based on Gnome File Manager colors... or my Window Manager setup
-
-desktop #000000 (gtk)
-activeCaption #163555 (window manager)
-activeCaptionText #FFFFFF (window manager)
-activeCaptionBorder #000000 (unsure of this)
-inactiveCaption #375676 (window manager)
-inactiveCaptionText #999999 (window manager)
-inactiveCaptionBorder #000000 (unsure of this)
-window #FFFFFF (gtk)
-windowBorder #969696 (gtk)
-windowText #000000 (gtk)
-menu #d6d6d6 (gtk)
-menuText #000000 (gtk)
-text #FFFFFF (gtk)
-textText #000000 (gtk)
-textHighlight #00009c (gtk)
-textHighlightText #FFFFFF (gtk)
-textInactiveText #999999 (unsure of this)
-control #d6d6d6 (gtk)
-controlText #000000 (gtk)
-controlHighlight #eaeaea (gtk)
-controlLtHighlight #eaeaea (unsure of this)
-controlShadow #c3c3c3 (gtk)
-controlDkShadow #888888 (unsure of this)
-scrollbar #c3c3c3 (gtk)
-info #d6d6d6 (gtk)
-infoText #000000 (gtk)
diff --git a/gnu/javax/swing/plaf/gtk/SliderTest.java b/gnu/javax/swing/plaf/gtk/SliderTest.java
deleted file mode 100644
index a83844492..000000000
--- a/gnu/javax/swing/plaf/gtk/SliderTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-import javax.swing.*;
-import javax.swing.event.*;
-import java.awt.*;
-import java.awt.event.*;
-import gnu.javax.swing.plaf.gtk.*;
-
-public class SliderTest extends JFrame
-{
- public SliderTest()
- {
- super("JSlider Test");
- Container c = getContentPane();
- c.setLayout(new BorderLayout());
- this.addWindowListener(new WindowAdapter() {
- public void windowClosing(WindowEvent e) { System.exit(0); }
- });
-
- JSlider s = new JSlider();
- s.createStandardLabels(10);
- s.setMinorTickSpacing(10);
- s.setMajorTickSpacing(20);
- s.setPaintTicks(true);
- s.setPaintTrack(true);
- s.setPaintLabels(true);
- s.setRequestFocusEnabled(true);
-
- // turning off double buffering in repaint manager
- // in order to use debug graphics
- RepaintManager repaintManager = RepaintManager.currentManager(s);
- repaintManager.setDoubleBufferingEnabled(false);
-
- s.setDebugGraphicsOptions(DebugGraphics.BUFFERED_OPTION | DebugGraphics.FLASH_OPTION);
- DebugGraphics.setFlashColor(Color.red); // color of flash
- DebugGraphics.setFlashTime(4); // time delay of drawing operation flashing
- DebugGraphics.setFlashCount(3); // number of time to draw
-
- this.setSize(250, 100);
- c.add(new JLabel("Default Slider"), "North");
- c.add(s, "Center");
-
- try {
- UIManager.setLookAndFeel("gnu.javax.swing.plaf.gtk.GtkLookAndFeel");
- SwingUtilities.updateComponentTreeUI(this);
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- center();
- }
-
- public void actionPerformed(ActionEvent e) {
- System.exit(0);
- }
-
- public void center()
- {
- // Centering the frame
- Toolkit t = this.getToolkit();
- Dimension framesize = this.getSize();
- Dimension screensize = t.getScreenSize();
-
- // Calculate point for frame (main)
- Point pframe = new Point();
- pframe.x = (screensize.width - framesize.width) / 2;
- pframe.y = (screensize.height - framesize.height) / 2;
-
- // Set the location of each to be centered
- this.setLocation(pframe);
- }
-
- public static void main(String [] argv)
- {
- SliderTest t = new SliderTest();
- t.show();
- }
-
-}
-
-
-
-
diff --git a/gnu/javax/swing/text/html/package.html b/gnu/javax/swing/text/html/package.html
index 622c4fcc1..c7e774428 100644
--- a/gnu/javax/swing/text/html/package.html
+++ b/gnu/javax/swing/text/html/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/HTML_401F.java b/gnu/javax/swing/text/html/parser/HTML_401F.java
index bd2f9f9f8..1ed42a2ab 100644
--- a/gnu/javax/swing/text/html/parser/HTML_401F.java
+++ b/gnu/javax/swing/text/html/parser/HTML_401F.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/gnuDTD.java b/gnu/javax/swing/text/html/parser/gnuDTD.java
index 24d800af2..1f4b3ec6a 100644
--- a/gnu/javax/swing/text/html/parser/gnuDTD.java
+++ b/gnu/javax/swing/text/html/parser/gnuDTD.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/htmlAttributeSet.java b/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
index f42b46328..a4e6f73c5 100644
--- a/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
+++ b/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/htmlValidator.java b/gnu/javax/swing/text/html/parser/htmlValidator.java
index 456e008a0..b70f15ded 100644
--- a/gnu/javax/swing/text/html/parser/htmlValidator.java
+++ b/gnu/javax/swing/text/html/parser/htmlValidator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java b/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java
index 4bfc3b960..5a19a1bc1 100644
--- a/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java
+++ b/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java b/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java
index 1a803d547..14514d584 100644
--- a/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java
+++ b/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/list.java b/gnu/javax/swing/text/html/parser/models/list.java
index 1fa16d965..b77ef7fd8 100644
--- a/gnu/javax/swing/text/html/parser/models/list.java
+++ b/gnu/javax/swing/text/html/parser/models/list.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/noTagModel.java b/gnu/javax/swing/text/html/parser/models/noTagModel.java
index 7ac58f050..8aac14d8e 100644
--- a/gnu/javax/swing/text/html/parser/models/noTagModel.java
+++ b/gnu/javax/swing/text/html/parser/models/noTagModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/node.java b/gnu/javax/swing/text/html/parser/models/node.java
index 42505d0be..c615ddff3 100644
--- a/gnu/javax/swing/text/html/parser/models/node.java
+++ b/gnu/javax/swing/text/html/parser/models/node.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/package.html b/gnu/javax/swing/text/html/parser/models/package.html
index 60719d0cc..18e61aede 100644
--- a/gnu/javax/swing/text/html/parser/models/package.html
+++ b/gnu/javax/swing/text/html/parser/models/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/transformer.java b/gnu/javax/swing/text/html/parser/models/transformer.java
index c8c4a2544..22ae3c3fa 100644
--- a/gnu/javax/swing/text/html/parser/models/transformer.java
+++ b/gnu/javax/swing/text/html/parser/models/transformer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/package.html b/gnu/javax/swing/text/html/parser/package.html
index 7fa699530..cd050f9c2 100644
--- a/gnu/javax/swing/text/html/parser/package.html
+++ b/gnu/javax/swing/text/html/parser/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/Parser.java b/gnu/javax/swing/text/html/parser/support/Parser.java
index 1e5147a47..cef94942e 100644
--- a/gnu/javax/swing/text/html/parser/support/Parser.java
+++ b/gnu/javax/swing/text/html/parser/support/Parser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java b/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java
index 2887bac0a..9cdf810dd 100644
--- a/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java
+++ b/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Buffer.java b/gnu/javax/swing/text/html/parser/support/low/Buffer.java
index b9e8edc13..a39330af8 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Buffer.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Buffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Constants.java b/gnu/javax/swing/text/html/parser/support/low/Constants.java
index 367dd0396..283d32385 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Constants.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Constants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Location.java b/gnu/javax/swing/text/html/parser/support/low/Location.java
index 5a0f2046f..8a1cde1c8 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Location.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Location.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/ParseException.java b/gnu/javax/swing/text/html/parser/support/low/ParseException.java
index 9f1094e62..e71c0c1f6 100644
--- a/gnu/javax/swing/text/html/parser/support/low/ParseException.java
+++ b/gnu/javax/swing/text/html/parser/support/low/ParseException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Queue.java b/gnu/javax/swing/text/html/parser/support/low/Queue.java
index 30890e4eb..31cf4bb4d 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Queue.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Queue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java b/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
index f354bec6e..0ffc6c8b7 100644
--- a/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
+++ b/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Token.java b/gnu/javax/swing/text/html/parser/support/low/Token.java
index c298d7817..d91adf47a 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Token.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Token.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/node.java b/gnu/javax/swing/text/html/parser/support/low/node.java
index 981166562..b54ed86a3 100644
--- a/gnu/javax/swing/text/html/parser/support/low/node.java
+++ b/gnu/javax/swing/text/html/parser/support/low/node.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/package.html b/gnu/javax/swing/text/html/parser/support/low/package.html
index a4ae57bff..173583015 100644
--- a/gnu/javax/swing/text/html/parser/support/low/package.html
+++ b/gnu/javax/swing/text/html/parser/support/low/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/pattern.java b/gnu/javax/swing/text/html/parser/support/low/pattern.java
index ac82a2050..0fe03fdbe 100644
--- a/gnu/javax/swing/text/html/parser/support/low/pattern.java
+++ b/gnu/javax/swing/text/html/parser/support/low/pattern.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/package.html b/gnu/javax/swing/text/html/parser/support/package.html
index 35071ed00..97c6439b3 100644
--- a/gnu/javax/swing/text/html/parser/support/package.html
+++ b/gnu/javax/swing/text/html/parser/support/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java b/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java
index 4b4878a79..654acbbb5 100644
--- a/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java
+++ b/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/textPreProcessor.java b/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
index 20af8f635..cc1610585 100644
--- a/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
+++ b/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexed.java b/gnu/regexp/CharIndexed.java
index eb1be13fd..a0d7106ae 100644
--- a/gnu/regexp/CharIndexed.java
+++ b/gnu/regexp/CharIndexed.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexedCharArray.java b/gnu/regexp/CharIndexedCharArray.java
index dc488ba44..63d858c87 100644
--- a/gnu/regexp/CharIndexedCharArray.java
+++ b/gnu/regexp/CharIndexedCharArray.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexedInputStream.java b/gnu/regexp/CharIndexedInputStream.java
index 7faeb3810..145fe11b1 100644
--- a/gnu/regexp/CharIndexedInputStream.java
+++ b/gnu/regexp/CharIndexedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexedString.java b/gnu/regexp/CharIndexedString.java
index adff7ac71..05be07ac6 100644
--- a/gnu/regexp/CharIndexedString.java
+++ b/gnu/regexp/CharIndexedString.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexedStringBuffer.java b/gnu/regexp/CharIndexedStringBuffer.java
index 2eb8c23f3..1b88e3985 100644
--- a/gnu/regexp/CharIndexedStringBuffer.java
+++ b/gnu/regexp/CharIndexedStringBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RE.java b/gnu/regexp/RE.java
index b845fc88a..16427c756 100644
--- a/gnu/regexp/RE.java
+++ b/gnu/regexp/RE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -629,20 +629,29 @@ public class RE extends REToken {
currentToken = setRepeated(currentToken,0,Integer.MAX_VALUE,index);
}
- // ONE-OR-MORE REPEAT OPERATOR
+ // ONE-OR-MORE REPEAT OPERATOR / POSSESSIVE MATCHING OPERATOR
// + | \+ depending on RE_BK_PLUS_QM
// not available if RE_LIMITED_OPS is set
else if ((unit.ch == '+') && !syntax.get(RESyntax.RE_LIMITED_OPS) && (!syntax.get(RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot))) {
if (currentToken == null)
throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index);
- if (currentToken instanceof RETokenRepeated)
- throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
- if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
+
+ // Check for possessive matching on RETokenRepeated
+ if (currentToken instanceof RETokenRepeated) {
+ RETokenRepeated tokenRep = (RETokenRepeated)currentToken;
+ if (syntax.get(RESyntax.RE_POSSESSIVE_OPS) && !tokenRep.isPossessive() && !tokenRep.isStingy())
+ tokenRep.makePossessive();
+ else
+ throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
+
+ }
+ else if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
- if (currentToken.getMinimumLength() == 0)
+ else if (currentToken.getMinimumLength() == 0)
throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index);
- currentToken = setRepeated(currentToken,1,Integer.MAX_VALUE,index);
+ else
+ currentToken = setRepeated(currentToken,1,Integer.MAX_VALUE,index);
}
// ZERO-OR-ONE REPEAT OPERATOR / STINGY MATCHING OPERATOR
@@ -655,13 +664,14 @@ public class RE extends REToken {
// Check for stingy matching on RETokenRepeated
if (currentToken instanceof RETokenRepeated) {
- if (syntax.get(RESyntax.RE_STINGY_OPS) && !((RETokenRepeated)currentToken).isStingy())
- ((RETokenRepeated)currentToken).makeStingy();
- else
- throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
- }
- else if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
- throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
+ RETokenRepeated tokenRep = (RETokenRepeated)currentToken;
+ if (syntax.get(RESyntax.RE_STINGY_OPS) && !tokenRep.isStingy() && !tokenRep.isPossessive())
+ tokenRep.makeStingy();
+ else
+ throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
+ }
+ else if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
+ throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
else
currentToken = setRepeated(currentToken,0,1,index);
}
diff --git a/gnu/regexp/REException.java b/gnu/regexp/REException.java
index a10d2fc71..73f86fa8a 100644
--- a/gnu/regexp/REException.java
+++ b/gnu/regexp/REException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/REFilterInputStream.java b/gnu/regexp/REFilterInputStream.java
index f56a9a2a9..485de5660 100644
--- a/gnu/regexp/REFilterInputStream.java
+++ b/gnu/regexp/REFilterInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/REMatch.java b/gnu/regexp/REMatch.java
index ac6c80e91..cf25bb331 100644
--- a/gnu/regexp/REMatch.java
+++ b/gnu/regexp/REMatch.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/REMatchEnumeration.java b/gnu/regexp/REMatchEnumeration.java
index c8e208a94..f164a69af 100644
--- a/gnu/regexp/REMatchEnumeration.java
+++ b/gnu/regexp/REMatchEnumeration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RESyntax.java b/gnu/regexp/RESyntax.java
index 649bd0df5..7272b0348 100644
--- a/gnu/regexp/RESyntax.java
+++ b/gnu/regexp/RESyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -197,7 +197,12 @@ public final class RESyntax implements Serializable {
*/
public static final int RE_CHAR_CLASS_ESC_IN_LISTS = 24;
- private static final int BIT_TOTAL = 25;
+ /**
+ * Syntax bit. Possessive matching is allowed (++, *+, ?+, {x,y}+).
+ */
+ public static final int RE_POSSESSIVE_OPS = 25;
+
+ private static final int BIT_TOTAL = 26;
/**
* Predefined syntax.
@@ -425,6 +430,7 @@ public final class RESyntax implements Serializable {
RE_SYNTAX_JAVA_1_4 = new RESyntax(RE_SYNTAX_PERL5)
// XXX
+ .set(RE_POSSESSIVE_OPS) // *+,?+,++,{}+
.makeFinal();
}
diff --git a/gnu/regexp/REToken.java b/gnu/regexp/REToken.java
index aa576a5ad..4eae9ec47 100644
--- a/gnu/regexp/REToken.java
+++ b/gnu/regexp/REToken.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenAny.java b/gnu/regexp/RETokenAny.java
index 42fdd9e28..ac032dcb3 100644
--- a/gnu/regexp/RETokenAny.java
+++ b/gnu/regexp/RETokenAny.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenBackRef.java b/gnu/regexp/RETokenBackRef.java
index a811e16a7..674822abd 100644
--- a/gnu/regexp/RETokenBackRef.java
+++ b/gnu/regexp/RETokenBackRef.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenChar.java b/gnu/regexp/RETokenChar.java
index 17712e347..a15449b2d 100644
--- a/gnu/regexp/RETokenChar.java
+++ b/gnu/regexp/RETokenChar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenEnd.java b/gnu/regexp/RETokenEnd.java
index 08e57084d..70483b746 100644
--- a/gnu/regexp/RETokenEnd.java
+++ b/gnu/regexp/RETokenEnd.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenEndSub.java b/gnu/regexp/RETokenEndSub.java
index 913d3f85c..f3bb4f2e1 100644
--- a/gnu/regexp/RETokenEndSub.java
+++ b/gnu/regexp/RETokenEndSub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenLookAhead.java b/gnu/regexp/RETokenLookAhead.java
index 650bb351b..33eaec9fa 100644
--- a/gnu/regexp/RETokenLookAhead.java
+++ b/gnu/regexp/RETokenLookAhead.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenOneOf.java b/gnu/regexp/RETokenOneOf.java
index 7752b2577..3f6e89e21 100644
--- a/gnu/regexp/RETokenOneOf.java
+++ b/gnu/regexp/RETokenOneOf.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenPOSIX.java b/gnu/regexp/RETokenPOSIX.java
index 00fcf301a..bbb8066bc 100644
--- a/gnu/regexp/RETokenPOSIX.java
+++ b/gnu/regexp/RETokenPOSIX.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenRange.java b/gnu/regexp/RETokenRange.java
index 9ce3be926..dadaf2d80 100644
--- a/gnu/regexp/RETokenRange.java
+++ b/gnu/regexp/RETokenRange.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenRepeated.java b/gnu/regexp/RETokenRepeated.java
index 8c7892712..3165a6f16 100644
--- a/gnu/regexp/RETokenRepeated.java
+++ b/gnu/regexp/RETokenRepeated.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -44,6 +44,7 @@ final class RETokenRepeated extends REToken {
private REToken token;
private int min,max;
private boolean stingy;
+ private boolean possessive;
RETokenRepeated(int subIndex, REToken token, int min, int max) {
super(subIndex);
@@ -61,6 +62,16 @@ final class RETokenRepeated extends REToken {
boolean isStingy() {
return stingy;
}
+
+ /** Sets possessive matching mode to true. */
+ void makePossessive() {
+ possessive = true;
+ }
+
+ /** Queries if this token has possessive matching enabled. */
+ boolean isPossessive() {
+ return possessive;
+ }
/**
* The minimum length of a repeated token is the minimum length
@@ -172,6 +183,8 @@ final class RETokenRepeated extends REToken {
}
}
// else did not match rest of the tokens, try again on smaller sample
+ // or break out when performing possessive matching
+ if (possessive) break;
}
if (allResults != null) {
mymatch.assignFrom(allResults); // does this get all?
diff --git a/gnu/regexp/RETokenStart.java b/gnu/regexp/RETokenStart.java
index 8adb8c89c..8f7198237 100644
--- a/gnu/regexp/RETokenStart.java
+++ b/gnu/regexp/RETokenStart.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenWordBoundary.java b/gnu/regexp/RETokenWordBoundary.java
index 38baaec13..6804151e2 100644
--- a/gnu/regexp/RETokenWordBoundary.java
+++ b/gnu/regexp/RETokenWordBoundary.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/UncheckedRE.java b/gnu/regexp/UncheckedRE.java
index 660466eab..e67121138 100644
--- a/gnu/regexp/UncheckedRE.java
+++ b/gnu/regexp/UncheckedRE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Fail.java b/gnu/test/Fail.java
index e3f181491..f1c4a0cd2 100644
--- a/gnu/test/Fail.java
+++ b/gnu/test/Fail.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Pass.java b/gnu/test/Pass.java
index 0afc35e4b..abec54ef6 100644
--- a/gnu/test/Pass.java
+++ b/gnu/test/Pass.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Result.java b/gnu/test/Result.java
index ec80f8e76..908d4b485 100644
--- a/gnu/test/Result.java
+++ b/gnu/test/Result.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Test.java b/gnu/test/Test.java
index bc58f546f..6b2e18df1 100644
--- a/gnu/test/Test.java
+++ b/gnu/test/Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Unresolved.java b/gnu/test/Unresolved.java
index 35d507d5c..280d8b699 100644
--- a/gnu/test/Unresolved.java
+++ b/gnu/test/Unresolved.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Unsupported.java b/gnu/test/Unsupported.java
index 5e31e5553..c6dabb09a 100644
--- a/gnu/test/Unsupported.java
+++ b/gnu/test/Unsupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Untested.java b/gnu/test/Untested.java
index e56937856..5627fa8ca 100644
--- a/gnu/test/Untested.java
+++ b/gnu/test/Untested.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/XFail.java b/gnu/test/XFail.java
index c784095e3..793ff117f 100644
--- a/gnu/test/XFail.java
+++ b/gnu/test/XFail.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/XPass.java b/gnu/test/XPass.java
index 7e8d2bc04..b41dd1c37 100644
--- a/gnu/test/XPass.java
+++ b/gnu/test/XPass.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/aelfred2/ContentHandler2.java b/gnu/xml/aelfred2/ContentHandler2.java
index 7bb1e7dcd..151613835 100644
--- a/gnu/xml/aelfred2/ContentHandler2.java
+++ b/gnu/xml/aelfred2/ContentHandler2.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/aelfred2/JAXPFactory.java b/gnu/xml/aelfred2/JAXPFactory.java
index ff585a82a..37e8cc9c1 100644
--- a/gnu/xml/aelfred2/JAXPFactory.java
+++ b/gnu/xml/aelfred2/JAXPFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/aelfred2/SAXDriver.java b/gnu/xml/aelfred2/SAXDriver.java
index 003a73620..7e950ce04 100644
--- a/gnu/xml/aelfred2/SAXDriver.java
+++ b/gnu/xml/aelfred2/SAXDriver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/aelfred2/XmlParser.java b/gnu/xml/aelfred2/XmlParser.java
index b29849217..f2abb8896 100644
--- a/gnu/xml/aelfred2/XmlParser.java
+++ b/gnu/xml/aelfred2/XmlParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -1437,7 +1437,7 @@ loop:
}
else
{
- if (type.equals("CDATA") || type == null)
+ if (type == null || type.equals("CDATA"))
{
value = readLiteral(flags);
}
@@ -4559,7 +4559,7 @@ loop:
encoding.substring(temp + 1,
encoding.indexOf('"', temp + 2));
}
- encoding.trim();
+ encoding = encoding.trim();
}
else
{
diff --git a/gnu/xml/aelfred2/XmlReader.java b/gnu/xml/aelfred2/XmlReader.java
index dacf8b103..a3bd03a86 100644
--- a/gnu/xml/aelfred2/XmlReader.java
+++ b/gnu/xml/aelfred2/XmlReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/Consumer.java b/gnu/xml/dom/Consumer.java
index 426b1e5da..f99e221e9 100644
--- a/gnu/xml/dom/Consumer.java
+++ b/gnu/xml/dom/Consumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DTDAttributeTypeInfo.java b/gnu/xml/dom/DTDAttributeTypeInfo.java
index 53e5fbdde..e3c69c43e 100644
--- a/gnu/xml/dom/DTDAttributeTypeInfo.java
+++ b/gnu/xml/dom/DTDAttributeTypeInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DTDElementTypeInfo.java b/gnu/xml/dom/DTDElementTypeInfo.java
index 535ea3ca5..c5553e20e 100644
--- a/gnu/xml/dom/DTDElementTypeInfo.java
+++ b/gnu/xml/dom/DTDElementTypeInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomAttr.java b/gnu/xml/dom/DomAttr.java
index 555902e3e..8673a7961 100644
--- a/gnu/xml/dom/DomAttr.java
+++ b/gnu/xml/dom/DomAttr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomCDATASection.java b/gnu/xml/dom/DomCDATASection.java
index 4b4dcb571..e34359e71 100644
--- a/gnu/xml/dom/DomCDATASection.java
+++ b/gnu/xml/dom/DomCDATASection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomCharacterData.java b/gnu/xml/dom/DomCharacterData.java
index e5cc23189..e94dcc4ec 100644
--- a/gnu/xml/dom/DomCharacterData.java
+++ b/gnu/xml/dom/DomCharacterData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomComment.java b/gnu/xml/dom/DomComment.java
index d1d84d1a0..71c816048 100644
--- a/gnu/xml/dom/DomComment.java
+++ b/gnu/xml/dom/DomComment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDOMException.java b/gnu/xml/dom/DomDOMException.java
index a56814cff..cf93fcf97 100644
--- a/gnu/xml/dom/DomDOMException.java
+++ b/gnu/xml/dom/DomDOMException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDoctype.java b/gnu/xml/dom/DomDoctype.java
index 8c760a531..d35eedc7f 100644
--- a/gnu/xml/dom/DomDoctype.java
+++ b/gnu/xml/dom/DomDoctype.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDocument.java b/gnu/xml/dom/DomDocument.java
index d8ccc9d82..dc476b582 100644
--- a/gnu/xml/dom/DomDocument.java
+++ b/gnu/xml/dom/DomDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -581,7 +581,9 @@ public class DomDocument
}
else
{
- element = new DomElement(this, null, name);
+ DomElement domElement = new DomElement(this, null, name);
+ domElement.localName = null;
+ element = domElement;
}
defaultAttributes(element, name);
return element;
@@ -776,7 +778,9 @@ public class DomDocument
}
else
{
- return new DomAttr(this, null, name);
+ DomAttr ret = new DomAttr(this, null, name);
+ ret.localName = null;
+ return ret;
}
}
@@ -1155,7 +1159,8 @@ public class DomDocument
public Node adoptNode(Node source)
{
- switch (source.getNodeType())
+ int sourceNodeType = source.getNodeType();
+ switch (sourceNodeType)
{
case DOCUMENT_NODE:
case DOCUMENT_TYPE_NODE:
@@ -1166,6 +1171,7 @@ public class DomDocument
}
if (source instanceof DomNode)
{
+ // GNU native
DomNode src = (DomNode) source;
DomNode dst = src;
if (dst.parent != null)
@@ -1176,7 +1182,110 @@ public class DomDocument
src.notifyUserDataHandlers(UserDataHandler.NODE_ADOPTED, src, dst);
return dst;
}
- return null;
+ else
+ {
+ // Some other implementation
+ Node dst = null;
+ switch (sourceNodeType)
+ {
+ case Node.ATTRIBUTE_NODE:
+ {
+ Attr src = (Attr) source;
+ String nodeName = src.getNodeName();
+ String localName = src.getLocalName();
+ String namespaceUri = src.getNamespaceURI();
+ dst = (localName == null) ?
+ createAttribute(nodeName) :
+ createAttributeNS(namespaceUri, nodeName);
+ adoptChildren(src, dst);
+ break;
+ }
+ case Node.CDATA_SECTION_NODE:
+ {
+ CDATASection src = (CDATASection) source;
+ dst = createCDATASection(src.getData());
+ break;
+ }
+ case Node.COMMENT_NODE:
+ {
+ Comment src = (Comment) source;
+ dst = createComment(src.getData());
+ break;
+ }
+ case Node.DOCUMENT_FRAGMENT_NODE:
+ {
+ DocumentFragment src = (DocumentFragment) source;
+ dst = createDocumentFragment();
+ adoptChildren(src, dst);
+ break;
+ }
+ case Node.ELEMENT_NODE:
+ {
+ Element src = (Element) source;
+ String nodeName = src.getNodeName();
+ String localName = src.getLocalName();
+ String namespaceUri = src.getNamespaceURI();
+ dst = (localName == null) ?
+ createElement(nodeName) :
+ createElementNS(namespaceUri, nodeName);
+ adoptAttributes(src, dst);
+ adoptChildren(src, dst);
+ break;
+ }
+ case Node.ENTITY_REFERENCE_NODE:
+ {
+ EntityReference src = (EntityReference) source;
+ dst = createEntityReference(src.getNodeName());
+ adoptChildren(src, dst);
+ break;
+ }
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ {
+ ProcessingInstruction src = (ProcessingInstruction) source;
+ dst = createProcessingInstruction(src.getTarget(),
+ src.getData());
+ break;
+ }
+ case Node.TEXT_NODE:
+ {
+ Text src = (Text) source;
+ dst = createTextNode(src.getData());
+ break;
+ }
+ }
+ return dst;
+ }
+ }
+
+ void adoptChildren(Node src, Node dst)
+ {
+ Node node = src.getFirstChild();
+ while (node != null)
+ {
+ Node next = node.getNextSibling();
+ dst.appendChild(adoptNode(node));
+ node = next;
+ }
+ }
+
+ void adoptAttributes(Node src, Node dst)
+ {
+ NamedNodeMap srcAttrs = src.getAttributes();
+ NamedNodeMap dstAttrs = dst.getAttributes();
+ int len = srcAttrs.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ Node node = srcAttrs.item(i);
+ String localName = node.getLocalName();
+ if (localName == null)
+ {
+ dstAttrs.setNamedItem(adoptNode(node));
+ }
+ else
+ {
+ dstAttrs.setNamedItemNS(adoptNode(node));
+ }
+ }
}
public DOMConfiguration getDomConfig()
diff --git a/gnu/xml/dom/DomDocumentBuilder.java b/gnu/xml/dom/DomDocumentBuilder.java
index 223bcd3d1..42444e865 100644
--- a/gnu/xml/dom/DomDocumentBuilder.java
+++ b/gnu/xml/dom/DomDocumentBuilder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDocumentBuilderFactory.java b/gnu/xml/dom/DomDocumentBuilderFactory.java
index 2d049bdec..814141c94 100644
--- a/gnu/xml/dom/DomDocumentBuilderFactory.java
+++ b/gnu/xml/dom/DomDocumentBuilderFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDocumentConfiguration.java b/gnu/xml/dom/DomDocumentConfiguration.java
index 38d6e6d7b..5c589f82f 100644
--- a/gnu/xml/dom/DomDocumentConfiguration.java
+++ b/gnu/xml/dom/DomDocumentConfiguration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDocumentFragment.java b/gnu/xml/dom/DomDocumentFragment.java
index f54b2a7eb..8d2603778 100644
--- a/gnu/xml/dom/DomDocumentFragment.java
+++ b/gnu/xml/dom/DomDocumentFragment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomElement.java b/gnu/xml/dom/DomElement.java
index 535608343..34509f647 100644
--- a/gnu/xml/dom/DomElement.java
+++ b/gnu/xml/dom/DomElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomEntity.java b/gnu/xml/dom/DomEntity.java
index 5432bbc32..3a76479a3 100644
--- a/gnu/xml/dom/DomEntity.java
+++ b/gnu/xml/dom/DomEntity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomEntityReference.java b/gnu/xml/dom/DomEntityReference.java
index 65efcfcba..d4596b405 100644
--- a/gnu/xml/dom/DomEntityReference.java
+++ b/gnu/xml/dom/DomEntityReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomEvent.java b/gnu/xml/dom/DomEvent.java
index 4a524922f..d57eac0e4 100644
--- a/gnu/xml/dom/DomEvent.java
+++ b/gnu/xml/dom/DomEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomExtern.java b/gnu/xml/dom/DomExtern.java
index afd5301f5..87a6909f7 100644
--- a/gnu/xml/dom/DomExtern.java
+++ b/gnu/xml/dom/DomExtern.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomImpl.java b/gnu/xml/dom/DomImpl.java
index a23f57d93..cabe741c9 100644
--- a/gnu/xml/dom/DomImpl.java
+++ b/gnu/xml/dom/DomImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomIterator.java b/gnu/xml/dom/DomIterator.java
index bb1f2cff2..472c6e805 100644
--- a/gnu/xml/dom/DomIterator.java
+++ b/gnu/xml/dom/DomIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomNSResolverContext.java b/gnu/xml/dom/DomNSResolverContext.java
index cf75ec1af..4cf57772e 100644
--- a/gnu/xml/dom/DomNSResolverContext.java
+++ b/gnu/xml/dom/DomNSResolverContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomNamedNodeMap.java b/gnu/xml/dom/DomNamedNodeMap.java
index 2b1106e64..6f224029a 100644
--- a/gnu/xml/dom/DomNamedNodeMap.java
+++ b/gnu/xml/dom/DomNamedNodeMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -206,6 +206,10 @@ public class DomNamedNodeMap
if (ns)
{
String tln = ctx.getLocalName();
+ if (tln == null)
+ {
+ tln = ctx.getNodeName();
+ }
if (tln.equals(localName))
{
String tu = ctx.getNamespaceURI();
diff --git a/gnu/xml/dom/DomNode.java b/gnu/xml/dom/DomNode.java
index f763adf99..3f29fb128 100644
--- a/gnu/xml/dom/DomNode.java
+++ b/gnu/xml/dom/DomNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -1840,7 +1840,7 @@ public abstract class DomNode
if (ns1 != null && ns2 != null)
{
return ns1.equals(ns2) &&
- getLocalName().equals(other.getLocalName());
+ equal(getLocalName(), other.getLocalName());
}
// if neither has a namespace, this is a "no-namespace" name.
diff --git a/gnu/xml/dom/DomNodeIterator.java b/gnu/xml/dom/DomNodeIterator.java
index c08e90ad6..6079f7a12 100644
--- a/gnu/xml/dom/DomNodeIterator.java
+++ b/gnu/xml/dom/DomNodeIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomNotation.java b/gnu/xml/dom/DomNotation.java
index d666699bb..26e78724f 100644
--- a/gnu/xml/dom/DomNotation.java
+++ b/gnu/xml/dom/DomNotation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomNsNode.java b/gnu/xml/dom/DomNsNode.java
index 15b2fb542..b27514ecb 100644
--- a/gnu/xml/dom/DomNsNode.java
+++ b/gnu/xml/dom/DomNsNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,7 +54,7 @@ public abstract class DomNsNode
private String name;
private String namespace;
private String prefix;
- private String localName;
+ String localName;
/**
* Constructs a node associated with the specified document, and
diff --git a/gnu/xml/dom/DomProcessingInstruction.java b/gnu/xml/dom/DomProcessingInstruction.java
index 9697f33f7..2c90967d0 100644
--- a/gnu/xml/dom/DomProcessingInstruction.java
+++ b/gnu/xml/dom/DomProcessingInstruction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomText.java b/gnu/xml/dom/DomText.java
index dc2d50a8e..3ca17dc9b 100644
--- a/gnu/xml/dom/DomText.java
+++ b/gnu/xml/dom/DomText.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomXPathExpression.java b/gnu/xml/dom/DomXPathExpression.java
index c22f29413..25187520c 100644
--- a/gnu/xml/dom/DomXPathExpression.java
+++ b/gnu/xml/dom/DomXPathExpression.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomXPathNSResolver.java b/gnu/xml/dom/DomXPathNSResolver.java
index 467327f21..96dfd97d4 100644
--- a/gnu/xml/dom/DomXPathNSResolver.java
+++ b/gnu/xml/dom/DomXPathNSResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomXPathResult.java b/gnu/xml/dom/DomXPathResult.java
index 5c57e25e2..bed249624 100644
--- a/gnu/xml/dom/DomXPathResult.java
+++ b/gnu/xml/dom/DomXPathResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ImplementationList.java b/gnu/xml/dom/ImplementationList.java
index 0f996ba9d..8c0f44916 100644
--- a/gnu/xml/dom/ImplementationList.java
+++ b/gnu/xml/dom/ImplementationList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ImplementationSource.java b/gnu/xml/dom/ImplementationSource.java
index f0c4bb553..913079cd0 100644
--- a/gnu/xml/dom/ImplementationSource.java
+++ b/gnu/xml/dom/ImplementationSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/JAXPFactory.java b/gnu/xml/dom/JAXPFactory.java
index 3602ef6b9..8f481fad6 100644
--- a/gnu/xml/dom/JAXPFactory.java
+++ b/gnu/xml/dom/JAXPFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLAnchorElement.java b/gnu/xml/dom/html2/DomHTMLAnchorElement.java
index 625fa6c93..5da913306 100644
--- a/gnu/xml/dom/html2/DomHTMLAnchorElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAnchorElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLAppletElement.java b/gnu/xml/dom/html2/DomHTMLAppletElement.java
index 39bc4061a..8ec4d3c83 100644
--- a/gnu/xml/dom/html2/DomHTMLAppletElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAppletElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLAreaElement.java b/gnu/xml/dom/html2/DomHTMLAreaElement.java
index 10229fe2c..d7eed07dd 100644
--- a/gnu/xml/dom/html2/DomHTMLAreaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAreaElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLBRElement.java b/gnu/xml/dom/html2/DomHTMLBRElement.java
index d02ad22ca..673699d52 100644
--- a/gnu/xml/dom/html2/DomHTMLBRElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBRElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLBaseElement.java b/gnu/xml/dom/html2/DomHTMLBaseElement.java
index a7b241aad..ddc805307 100644
--- a/gnu/xml/dom/html2/DomHTMLBaseElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBaseElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLBaseFontElement.java b/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
index 0d64f445e..73172d3bf 100644
--- a/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLBodyElement.java b/gnu/xml/dom/html2/DomHTMLBodyElement.java
index efcd855b3..44fbcf23c 100644
--- a/gnu/xml/dom/html2/DomHTMLBodyElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBodyElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLButtonElement.java b/gnu/xml/dom/html2/DomHTMLButtonElement.java
index 996750ea6..5aff5f8c1 100644
--- a/gnu/xml/dom/html2/DomHTMLButtonElement.java
+++ b/gnu/xml/dom/html2/DomHTMLButtonElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLCollection.java b/gnu/xml/dom/html2/DomHTMLCollection.java
index da9d0142e..577337a3c 100644
--- a/gnu/xml/dom/html2/DomHTMLCollection.java
+++ b/gnu/xml/dom/html2/DomHTMLCollection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -99,7 +99,12 @@ class DomHTMLCollection
{
return NodeFilter.FILTER_SKIP;
}
- if (nodeNames != null && !acceptName(n.getLocalName()))
+ String localName = n.getLocalName();
+ if (localName == null)
+ {
+ localName = n.getNodeName();
+ }
+ if (nodeNames != null && !acceptName(localName))
{
return NodeFilter.FILTER_SKIP;
}
@@ -152,6 +157,10 @@ class DomHTMLCollection
{
Node attr = attrs.item(i);
String attrName = attr.getLocalName();
+ if (attrName == null)
+ {
+ attrName = attr.getNodeName();
+ }
if (name.equalsIgnoreCase(attrName))
{
return attr;
diff --git a/gnu/xml/dom/html2/DomHTMLDListElement.java b/gnu/xml/dom/html2/DomHTMLDListElement.java
index 790e3081a..2b9dbf236 100644
--- a/gnu/xml/dom/html2/DomHTMLDListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDListElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLDirectoryElement.java b/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
index 0f71f960b..26af97e78 100644
--- a/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLDivElement.java b/gnu/xml/dom/html2/DomHTMLDivElement.java
index a35a5fb93..462069dcf 100644
--- a/gnu/xml/dom/html2/DomHTMLDivElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDivElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLDocument.java b/gnu/xml/dom/html2/DomHTMLDocument.java
index 1ff0a27ed..10ee9e747 100644
--- a/gnu/xml/dom/html2/DomHTMLDocument.java
+++ b/gnu/xml/dom/html2/DomHTMLDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLElement.java b/gnu/xml/dom/html2/DomHTMLElement.java
index b2952e8b4..b957083d6 100644
--- a/gnu/xml/dom/html2/DomHTMLElement.java
+++ b/gnu/xml/dom/html2/DomHTMLElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -76,6 +76,10 @@ public abstract class DomHTMLElement
{
Node attr = attrs.item(i);
String attrName = attr.getLocalName();
+ if (attrName == null)
+ {
+ attrName = attr.getNodeName();
+ }
if (attrName.equalsIgnoreCase(name))
{
return attr.getNodeValue();
@@ -121,6 +125,10 @@ public abstract class DomHTMLElement
{
attr = attrs.item(i);
String attrName = attr.getLocalName();
+ if (attrName == null)
+ {
+ attrName = attr.getNodeName();
+ }
if (attrName.equalsIgnoreCase(name))
{
if (value != null)
@@ -162,7 +170,12 @@ public abstract class DomHTMLElement
for (Node parent = getParentNode(); parent != null;
parent = parent.getParentNode())
{
- if (name.equalsIgnoreCase(parent.getLocalName()))
+ String parentName = parent.getLocalName();
+ if (parentName == null)
+ {
+ parentName = parent.getNodeName();
+ }
+ if (name.equalsIgnoreCase(parentName))
{
return parent;
}
@@ -178,7 +191,12 @@ public abstract class DomHTMLElement
for (Node child = getFirstChild(); child != null;
child = child.getNextSibling())
{
- if (name.equalsIgnoreCase(child.getLocalName()))
+ String childName = child.getLocalName();
+ if (childName == null)
+ {
+ childName = child.getLocalName();
+ }
+ if (name.equalsIgnoreCase(childName))
{
return child;
}
diff --git a/gnu/xml/dom/html2/DomHTMLFieldSetElement.java b/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
index 2e49fe474..2c8577219 100644
--- a/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLFontElement.java b/gnu/xml/dom/html2/DomHTMLFontElement.java
index 3fd1d98e7..08bd349fa 100644
--- a/gnu/xml/dom/html2/DomHTMLFontElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFontElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLFormElement.java b/gnu/xml/dom/html2/DomHTMLFormElement.java
index 0785cc989..119d97eb8 100644
--- a/gnu/xml/dom/html2/DomHTMLFormElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFormElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLFrameElement.java b/gnu/xml/dom/html2/DomHTMLFrameElement.java
index db3cbfe00..124f35268 100644
--- a/gnu/xml/dom/html2/DomHTMLFrameElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFrameElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLFrameSetElement.java b/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
index 8e5eb3312..44d317f64 100644
--- a/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLHRElement.java b/gnu/xml/dom/html2/DomHTMLHRElement.java
index 850907b8e..d1b480121 100644
--- a/gnu/xml/dom/html2/DomHTMLHRElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHRElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLHeadElement.java b/gnu/xml/dom/html2/DomHTMLHeadElement.java
index d6072a070..f68e8c7fa 100644
--- a/gnu/xml/dom/html2/DomHTMLHeadElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHeadElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLHeadingElement.java b/gnu/xml/dom/html2/DomHTMLHeadingElement.java
index a336e31e9..f1427ad89 100644
--- a/gnu/xml/dom/html2/DomHTMLHeadingElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHeadingElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLHtmlElement.java b/gnu/xml/dom/html2/DomHTMLHtmlElement.java
index 6a4e195f6..95d45264e 100644
--- a/gnu/xml/dom/html2/DomHTMLHtmlElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHtmlElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLIFrameElement.java b/gnu/xml/dom/html2/DomHTMLIFrameElement.java
index def7b967d..c5ca75d8c 100644
--- a/gnu/xml/dom/html2/DomHTMLIFrameElement.java
+++ b/gnu/xml/dom/html2/DomHTMLIFrameElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLImageElement.java b/gnu/xml/dom/html2/DomHTMLImageElement.java
index 7a621a6db..c96e5fede 100644
--- a/gnu/xml/dom/html2/DomHTMLImageElement.java
+++ b/gnu/xml/dom/html2/DomHTMLImageElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLImpl.java b/gnu/xml/dom/html2/DomHTMLImpl.java
index 6f5538e71..9f0db0850 100644
--- a/gnu/xml/dom/html2/DomHTMLImpl.java
+++ b/gnu/xml/dom/html2/DomHTMLImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLInputElement.java b/gnu/xml/dom/html2/DomHTMLInputElement.java
index 787be536a..1dbc9c28d 100644
--- a/gnu/xml/dom/html2/DomHTMLInputElement.java
+++ b/gnu/xml/dom/html2/DomHTMLInputElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLIsIndexElement.java b/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
index 02d5a9886..087f4a0cd 100644
--- a/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
+++ b/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLLIElement.java b/gnu/xml/dom/html2/DomHTMLLIElement.java
index ea99ee171..11eccdf5d 100644
--- a/gnu/xml/dom/html2/DomHTMLLIElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLIElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLLabelElement.java b/gnu/xml/dom/html2/DomHTMLLabelElement.java
index 0dd2f833f..c0cc39f8e 100644
--- a/gnu/xml/dom/html2/DomHTMLLabelElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLabelElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLLegendElement.java b/gnu/xml/dom/html2/DomHTMLLegendElement.java
index 663e67c7d..a500f8fa1 100644
--- a/gnu/xml/dom/html2/DomHTMLLegendElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLegendElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLLinkElement.java b/gnu/xml/dom/html2/DomHTMLLinkElement.java
index c81486a8a..127726ef7 100644
--- a/gnu/xml/dom/html2/DomHTMLLinkElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLinkElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLMapElement.java b/gnu/xml/dom/html2/DomHTMLMapElement.java
index d078f70f0..1f7182f4f 100644
--- a/gnu/xml/dom/html2/DomHTMLMapElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMapElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLMenuElement.java b/gnu/xml/dom/html2/DomHTMLMenuElement.java
index e674f3e7e..17f6f589f 100644
--- a/gnu/xml/dom/html2/DomHTMLMenuElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMenuElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLMetaElement.java b/gnu/xml/dom/html2/DomHTMLMetaElement.java
index d8bd43509..1a0440504 100644
--- a/gnu/xml/dom/html2/DomHTMLMetaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMetaElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLModElement.java b/gnu/xml/dom/html2/DomHTMLModElement.java
index 78f94011c..493f7242b 100644
--- a/gnu/xml/dom/html2/DomHTMLModElement.java
+++ b/gnu/xml/dom/html2/DomHTMLModElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLOListElement.java b/gnu/xml/dom/html2/DomHTMLOListElement.java
index 85d1b3fcd..fb98cf40d 100644
--- a/gnu/xml/dom/html2/DomHTMLOListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOListElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLObjectElement.java b/gnu/xml/dom/html2/DomHTMLObjectElement.java
index 8b8abe7ed..fdea9b153 100644
--- a/gnu/xml/dom/html2/DomHTMLObjectElement.java
+++ b/gnu/xml/dom/html2/DomHTMLObjectElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLOptGroupElement.java b/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
index 782deb216..76545e130 100644
--- a/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLOptionElement.java b/gnu/xml/dom/html2/DomHTMLOptionElement.java
index 21952e6de..69c059d9d 100644
--- a/gnu/xml/dom/html2/DomHTMLOptionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOptionElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLParagraphElement.java b/gnu/xml/dom/html2/DomHTMLParagraphElement.java
index 573ddc9db..2a8c4f6fb 100644
--- a/gnu/xml/dom/html2/DomHTMLParagraphElement.java
+++ b/gnu/xml/dom/html2/DomHTMLParagraphElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLParamElement.java b/gnu/xml/dom/html2/DomHTMLParamElement.java
index c8e565d15..81c655952 100644
--- a/gnu/xml/dom/html2/DomHTMLParamElement.java
+++ b/gnu/xml/dom/html2/DomHTMLParamElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLParser.java b/gnu/xml/dom/html2/DomHTMLParser.java
index f1b970e12..7b4456225 100644
--- a/gnu/xml/dom/html2/DomHTMLParser.java
+++ b/gnu/xml/dom/html2/DomHTMLParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLPreElement.java b/gnu/xml/dom/html2/DomHTMLPreElement.java
index c8f306fff..9b36a2887 100644
--- a/gnu/xml/dom/html2/DomHTMLPreElement.java
+++ b/gnu/xml/dom/html2/DomHTMLPreElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLQuoteElement.java b/gnu/xml/dom/html2/DomHTMLQuoteElement.java
index 0424ebf3b..678a5ada6 100644
--- a/gnu/xml/dom/html2/DomHTMLQuoteElement.java
+++ b/gnu/xml/dom/html2/DomHTMLQuoteElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLScriptElement.java b/gnu/xml/dom/html2/DomHTMLScriptElement.java
index 2bf6a5579..8f8fff58a 100644
--- a/gnu/xml/dom/html2/DomHTMLScriptElement.java
+++ b/gnu/xml/dom/html2/DomHTMLScriptElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLSelectElement.java b/gnu/xml/dom/html2/DomHTMLSelectElement.java
index b888b57e6..09752e1ff 100644
--- a/gnu/xml/dom/html2/DomHTMLSelectElement.java
+++ b/gnu/xml/dom/html2/DomHTMLSelectElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLStyleElement.java b/gnu/xml/dom/html2/DomHTMLStyleElement.java
index 4d2de8c6b..f6f1fcc68 100644
--- a/gnu/xml/dom/html2/DomHTMLStyleElement.java
+++ b/gnu/xml/dom/html2/DomHTMLStyleElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java b/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
index a481f47fa..28ea34188 100644
--- a/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTableCellElement.java b/gnu/xml/dom/html2/DomHTMLTableCellElement.java
index 6338b88d0..41d33af26 100644
--- a/gnu/xml/dom/html2/DomHTMLTableCellElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableCellElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTableColElement.java b/gnu/xml/dom/html2/DomHTMLTableColElement.java
index 0ed20a07a..799447dc8 100644
--- a/gnu/xml/dom/html2/DomHTMLTableColElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableColElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTableElement.java b/gnu/xml/dom/html2/DomHTMLTableElement.java
index 95e295733..ea925400e 100644
--- a/gnu/xml/dom/html2/DomHTMLTableElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -330,7 +330,12 @@ public class DomHTMLTableElement
for (Node ctx = thead.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ String ctxName = ctx.getLocalName();
+ if (ctxName == null)
+ {
+ ctxName = ctx.getNodeName();
+ }
+ if (!"tr".equalsIgnoreCase(ctxName))
{
continue;
}
@@ -349,7 +354,12 @@ public class DomHTMLTableElement
for (Node ctx = tbody.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ String ctxName = ctx.getLocalName();
+ if (ctxName == null)
+ {
+ ctxName = ctx.getNodeName();
+ }
+ if (!"tr".equalsIgnoreCase(ctxName))
{
continue;
}
@@ -365,7 +375,12 @@ public class DomHTMLTableElement
for (Node ctx = tfoot.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ String ctxName = ctx.getLocalName();
+ if (ctxName == null)
+ {
+ ctxName = ctx.getNodeName();
+ }
+ if (!"tr".equalsIgnoreCase(ctxName))
{
continue;
}
diff --git a/gnu/xml/dom/html2/DomHTMLTableRowElement.java b/gnu/xml/dom/html2/DomHTMLTableRowElement.java
index e21e158b4..ecd07a743 100644
--- a/gnu/xml/dom/html2/DomHTMLTableRowElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableRowElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -207,6 +207,10 @@ public class DomHTMLTableRowElement
ctx = ctx.getNextSibling())
{
String name = ctx.getLocalName();
+ if (name == null)
+ {
+ name = ctx.getNodeName();
+ }
if (!"td".equalsIgnoreCase(name) &&
!"th".equalsIgnoreCase(name))
{
diff --git a/gnu/xml/dom/html2/DomHTMLTableSectionElement.java b/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
index 45dd67110..da015f1f6 100644
--- a/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -141,7 +141,12 @@ public class DomHTMLTableSectionElement
for (Node ctx = getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ String name = ctx.getLocalName();
+ if (name == null)
+ {
+ name = ctx.getNodeName();
+ }
+ if (!"tr".equalsIgnoreCase(name))
{
continue;
}
diff --git a/gnu/xml/dom/html2/DomHTMLTextAreaElement.java b/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
index 93a918ab9..22d610569 100644
--- a/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTitleElement.java b/gnu/xml/dom/html2/DomHTMLTitleElement.java
index 1c1105528..f62342d6f 100644
--- a/gnu/xml/dom/html2/DomHTMLTitleElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTitleElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLUListElement.java b/gnu/xml/dom/html2/DomHTMLUListElement.java
index 9f6b69249..c07adeabf 100644
--- a/gnu/xml/dom/html2/DomHTMLUListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLUListElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSException.java b/gnu/xml/dom/ls/DomLSException.java
index 6701b3e49..6ac49e669 100644
--- a/gnu/xml/dom/ls/DomLSException.java
+++ b/gnu/xml/dom/ls/DomLSException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSInput.java b/gnu/xml/dom/ls/DomLSInput.java
index 9b30b4f4e..44274ec47 100644
--- a/gnu/xml/dom/ls/DomLSInput.java
+++ b/gnu/xml/dom/ls/DomLSInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSOutput.java b/gnu/xml/dom/ls/DomLSOutput.java
index 643ae7d65..c2f4d4132 100644
--- a/gnu/xml/dom/ls/DomLSOutput.java
+++ b/gnu/xml/dom/ls/DomLSOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSParser.java b/gnu/xml/dom/ls/DomLSParser.java
index 489777fc9..eb7c1c49f 100644
--- a/gnu/xml/dom/ls/DomLSParser.java
+++ b/gnu/xml/dom/ls/DomLSParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSSerializer.java b/gnu/xml/dom/ls/DomLSSerializer.java
index ec27c5de6..cedaf151e 100644
--- a/gnu/xml/dom/ls/DomLSSerializer.java
+++ b/gnu/xml/dom/ls/DomLSSerializer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/FilteredSAXEventSink.java b/gnu/xml/dom/ls/FilteredSAXEventSink.java
index 63f32a8c7..1c99ee524 100644
--- a/gnu/xml/dom/ls/FilteredSAXEventSink.java
+++ b/gnu/xml/dom/ls/FilteredSAXEventSink.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/ReaderInputStream.java b/gnu/xml/dom/ls/ReaderInputStream.java
index 633b96817..5b41abd3d 100644
--- a/gnu/xml/dom/ls/ReaderInputStream.java
+++ b/gnu/xml/dom/ls/ReaderInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/SAXEventSink.java b/gnu/xml/dom/ls/SAXEventSink.java
index 2ff41910d..a850460b1 100644
--- a/gnu/xml/dom/ls/SAXEventSink.java
+++ b/gnu/xml/dom/ls/SAXEventSink.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/WriterOutputStream.java b/gnu/xml/dom/ls/WriterOutputStream.java
index 7eddb2e44..2fb206147 100644
--- a/gnu/xml/dom/ls/WriterOutputStream.java
+++ b/gnu/xml/dom/ls/WriterOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeAttr.java b/gnu/xml/libxmlj/dom/GnomeAttr.java
index 332b757dd..24088fb81 100644
--- a/gnu/xml/libxmlj/dom/GnomeAttr.java
+++ b/gnu/xml/libxmlj/dom/GnomeAttr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeCDATASection.java b/gnu/xml/libxmlj/dom/GnomeCDATASection.java
index 9730cada6..8fb89ff4d 100644
--- a/gnu/xml/libxmlj/dom/GnomeCDATASection.java
+++ b/gnu/xml/libxmlj/dom/GnomeCDATASection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeCharacterData.java b/gnu/xml/libxmlj/dom/GnomeCharacterData.java
index 40d43bd8d..a3200921d 100644
--- a/gnu/xml/libxmlj/dom/GnomeCharacterData.java
+++ b/gnu/xml/libxmlj/dom/GnomeCharacterData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeComment.java b/gnu/xml/libxmlj/dom/GnomeComment.java
index 00ed6e3f2..a0cad5b3e 100644
--- a/gnu/xml/libxmlj/dom/GnomeComment.java
+++ b/gnu/xml/libxmlj/dom/GnomeComment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDOMException.java b/gnu/xml/libxmlj/dom/GnomeDOMException.java
index 8fa9b0f03..eae07876f 100644
--- a/gnu/xml/libxmlj/dom/GnomeDOMException.java
+++ b/gnu/xml/libxmlj/dom/GnomeDOMException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDOMStringList.java b/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
index 2149e3651..3456acd99 100644
--- a/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
+++ b/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocument.java b/gnu/xml/libxmlj/dom/GnomeDocument.java
index 17961ea46..3706fba84 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocument.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java b/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
index e46cc5389..4decee0d8 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java b/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
index 85693a5b9..c4f0ce201 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java b/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
index f32c573cb..e5b355e42 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentType.java b/gnu/xml/libxmlj/dom/GnomeDocumentType.java
index 81afcabf5..257fbbceb 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentType.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeElement.java b/gnu/xml/libxmlj/dom/GnomeElement.java
index 8fd985d5e..2770cbbfd 100644
--- a/gnu/xml/libxmlj/dom/GnomeElement.java
+++ b/gnu/xml/libxmlj/dom/GnomeElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeEntity.java b/gnu/xml/libxmlj/dom/GnomeEntity.java
index 81940efb1..76367f8bd 100644
--- a/gnu/xml/libxmlj/dom/GnomeEntity.java
+++ b/gnu/xml/libxmlj/dom/GnomeEntity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeEntityReference.java b/gnu/xml/libxmlj/dom/GnomeEntityReference.java
index 1c494edf6..136b3a69d 100644
--- a/gnu/xml/libxmlj/dom/GnomeEntityReference.java
+++ b/gnu/xml/libxmlj/dom/GnomeEntityReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java b/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
index e38d329fb..8ca892128 100644
--- a/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
+++ b/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeNode.java b/gnu/xml/libxmlj/dom/GnomeNode.java
index fb5509ee6..4a2e9ff48 100644
--- a/gnu/xml/libxmlj/dom/GnomeNode.java
+++ b/gnu/xml/libxmlj/dom/GnomeNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeNodeList.java b/gnu/xml/libxmlj/dom/GnomeNodeList.java
index 302051012..efd07acb0 100644
--- a/gnu/xml/libxmlj/dom/GnomeNodeList.java
+++ b/gnu/xml/libxmlj/dom/GnomeNodeList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeNotation.java b/gnu/xml/libxmlj/dom/GnomeNotation.java
index 0d2ff1cc0..ca1560e21 100644
--- a/gnu/xml/libxmlj/dom/GnomeNotation.java
+++ b/gnu/xml/libxmlj/dom/GnomeNotation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java b/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
index b5e79ac90..a6c47b2e1 100644
--- a/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
+++ b/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeText.java b/gnu/xml/libxmlj/dom/GnomeText.java
index 60a14ed6d..77677a562 100644
--- a/gnu/xml/libxmlj/dom/GnomeText.java
+++ b/gnu/xml/libxmlj/dom/GnomeText.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeTypeInfo.java b/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
index 56ea6e1b9..d365f0d9f 100644
--- a/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
+++ b/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathExpression.java b/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
index 0847bfa77..815804799 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java b/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
index 48d292fe5..a9ba85509 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java b/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
index b38a7d6eb..dde3be2d9 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathResult.java b/gnu/xml/libxmlj/dom/GnomeXPathResult.java
index 59a3a568f..b384e4ac8 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathResult.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/GnomeLocator.java b/gnu/xml/libxmlj/sax/GnomeLocator.java
index d55fec0fd..0c812f683 100644
--- a/gnu/xml/libxmlj/sax/GnomeLocator.java
+++ b/gnu/xml/libxmlj/sax/GnomeLocator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/GnomeSAXParser.java b/gnu/xml/libxmlj/sax/GnomeSAXParser.java
index 0026bd397..a5cdc42b7 100644
--- a/gnu/xml/libxmlj/sax/GnomeSAXParser.java
+++ b/gnu/xml/libxmlj/sax/GnomeSAXParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java b/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
index ca5460dbd..5152d540f 100644
--- a/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
+++ b/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/GnomeXMLReader.java b/gnu/xml/libxmlj/sax/GnomeXMLReader.java
index 66da030f1..846015a1c 100644
--- a/gnu/xml/libxmlj/sax/GnomeXMLReader.java
+++ b/gnu/xml/libxmlj/sax/GnomeXMLReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/Namespaces.java b/gnu/xml/libxmlj/sax/Namespaces.java
index 9796566e7..646d7b408 100644
--- a/gnu/xml/libxmlj/sax/Namespaces.java
+++ b/gnu/xml/libxmlj/sax/Namespaces.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/StringArrayAttributes.java b/gnu/xml/libxmlj/sax/StringArrayAttributes.java
index e3ba8726f..f534efbcf 100644
--- a/gnu/xml/libxmlj/sax/StringArrayAttributes.java
+++ b/gnu/xml/libxmlj/sax/StringArrayAttributes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/XMLName.java b/gnu/xml/libxmlj/sax/XMLName.java
index f81c4b7c7..5950a7996 100644
--- a/gnu/xml/libxmlj/sax/XMLName.java
+++ b/gnu/xml/libxmlj/sax/XMLName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java b/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
index 1a7368f1d..0601e5e89 100644
--- a/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
+++ b/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/transform/GnomeTransformer.java b/gnu/xml/libxmlj/transform/GnomeTransformer.java
index c153cdae6..37aa05b93 100755
--- a/gnu/xml/libxmlj/transform/GnomeTransformer.java
+++ b/gnu/xml/libxmlj/transform/GnomeTransformer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java b/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
index cd3fd5beb..78dfe2148 100755
--- a/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
+++ b/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java b/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
index 8036e86ab..88a58e1a2 100644
--- a/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
+++ b/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/EmptyNodeList.java b/gnu/xml/libxmlj/util/EmptyNodeList.java
index 527a3c61b..24a08229c 100644
--- a/gnu/xml/libxmlj/util/EmptyNodeList.java
+++ b/gnu/xml/libxmlj/util/EmptyNodeList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/NamedInputStream.java b/gnu/xml/libxmlj/util/NamedInputStream.java
index 5db77d7de..8d20ec4e5 100644
--- a/gnu/xml/libxmlj/util/NamedInputStream.java
+++ b/gnu/xml/libxmlj/util/NamedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/StandaloneDocumentType.java b/gnu/xml/libxmlj/util/StandaloneDocumentType.java
index 32ff98357..d47cdb05d 100644
--- a/gnu/xml/libxmlj/util/StandaloneDocumentType.java
+++ b/gnu/xml/libxmlj/util/StandaloneDocumentType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/StandaloneLocator.java b/gnu/xml/libxmlj/util/StandaloneLocator.java
index 559b31fa4..5430330cc 100644
--- a/gnu/xml/libxmlj/util/StandaloneLocator.java
+++ b/gnu/xml/libxmlj/util/StandaloneLocator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/XMLJ.java b/gnu/xml/libxmlj/util/XMLJ.java
index c01bd5bc6..0d5f9f689 100644
--- a/gnu/xml/libxmlj/util/XMLJ.java
+++ b/gnu/xml/libxmlj/util/XMLJ.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/CallFilter.java b/gnu/xml/pipeline/CallFilter.java
index da1a2e9c1..3b3375173 100644
--- a/gnu/xml/pipeline/CallFilter.java
+++ b/gnu/xml/pipeline/CallFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/DomConsumer.java b/gnu/xml/pipeline/DomConsumer.java
index e3136093c..389e02bb3 100644
--- a/gnu/xml/pipeline/DomConsumer.java
+++ b/gnu/xml/pipeline/DomConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/EventConsumer.java b/gnu/xml/pipeline/EventConsumer.java
index 5f9737314..017bc7f74 100644
--- a/gnu/xml/pipeline/EventConsumer.java
+++ b/gnu/xml/pipeline/EventConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/EventFilter.java b/gnu/xml/pipeline/EventFilter.java
index 8587808f3..660027171 100644
--- a/gnu/xml/pipeline/EventFilter.java
+++ b/gnu/xml/pipeline/EventFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/LinkFilter.java b/gnu/xml/pipeline/LinkFilter.java
index 465103b22..ddb9fda2e 100644
--- a/gnu/xml/pipeline/LinkFilter.java
+++ b/gnu/xml/pipeline/LinkFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/NSFilter.java b/gnu/xml/pipeline/NSFilter.java
index 63e167361..db875e1de 100644
--- a/gnu/xml/pipeline/NSFilter.java
+++ b/gnu/xml/pipeline/NSFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/PipelineFactory.java b/gnu/xml/pipeline/PipelineFactory.java
index 5edca73e6..f88ab1643 100644
--- a/gnu/xml/pipeline/PipelineFactory.java
+++ b/gnu/xml/pipeline/PipelineFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/TeeConsumer.java b/gnu/xml/pipeline/TeeConsumer.java
index 922e79cf2..8186de4df 100644
--- a/gnu/xml/pipeline/TeeConsumer.java
+++ b/gnu/xml/pipeline/TeeConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/TextConsumer.java b/gnu/xml/pipeline/TextConsumer.java
index 1039b3b8c..67bd23b00 100644
--- a/gnu/xml/pipeline/TextConsumer.java
+++ b/gnu/xml/pipeline/TextConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/ValidationConsumer.java b/gnu/xml/pipeline/ValidationConsumer.java
index 719270e07..0fbfa9264 100644
--- a/gnu/xml/pipeline/ValidationConsumer.java
+++ b/gnu/xml/pipeline/ValidationConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/WellFormednessFilter.java b/gnu/xml/pipeline/WellFormednessFilter.java
index 4f3f200c0..ef4301652 100644
--- a/gnu/xml/pipeline/WellFormednessFilter.java
+++ b/gnu/xml/pipeline/WellFormednessFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/XIncludeFilter.java b/gnu/xml/pipeline/XIncludeFilter.java
index 042cadda6..02607a4e0 100644
--- a/gnu/xml/pipeline/XIncludeFilter.java
+++ b/gnu/xml/pipeline/XIncludeFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/XsltFilter.java b/gnu/xml/pipeline/XsltFilter.java
index 9f77f9937..0a1872c5a 100644
--- a/gnu/xml/pipeline/XsltFilter.java
+++ b/gnu/xml/pipeline/XsltFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/AbstractNumberNode.java b/gnu/xml/transform/AbstractNumberNode.java
index 097637e6c..91029d6d0 100644
--- a/gnu/xml/transform/AbstractNumberNode.java
+++ b/gnu/xml/transform/AbstractNumberNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -66,12 +66,10 @@ abstract class AbstractNumberNode
final String groupingSeparator;
final int groupingSize;
- AbstractNumberNode(TemplateNode children, TemplateNode next,
- TemplateNode format, String lang,
+ AbstractNumberNode(TemplateNode format, String lang,
int letterValue, String groupingSeparator,
int groupingSize)
{
- super(children, next);
this.format = format;
this.lang = lang;
this.letterValue = letterValue;
@@ -308,6 +306,15 @@ abstract class AbstractNumberNode
abstract int[] compute(Stylesheet stylesheet, Node context, int pos, int len)
throws TransformerException;
+ public boolean references(QName var)
+ {
+ if (format.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/ApplyImportsNode.java b/gnu/xml/transform/ApplyImportsNode.java
index 39d9dea9a..60dec85d3 100644
--- a/gnu/xml/transform/ApplyImportsNode.java
+++ b/gnu/xml/transform/ApplyImportsNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,17 +50,18 @@ final class ApplyImportsNode
extends TemplateNode
{
- ApplyImportsNode(TemplateNode children, TemplateNode next)
- {
- super(children, next);
- }
-
TemplateNode clone(Stylesheet stylesheet)
{
- return new ApplyImportsNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet));
+ TemplateNode ret = new ApplyImportsNode();
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -80,6 +81,6 @@ final class ApplyImportsNode
parent, nextSibling);
}
}
-
+
}
diff --git a/gnu/xml/transform/ApplyTemplatesNode.java b/gnu/xml/transform/ApplyTemplatesNode.java
index 83e7c559e..ab26058bc 100644
--- a/gnu/xml/transform/ApplyTemplatesNode.java
+++ b/gnu/xml/transform/ApplyTemplatesNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.transform.TransformerException;
@@ -63,11 +64,9 @@ final class ApplyTemplatesNode
final List withParams;
final boolean isDefault;
- ApplyTemplatesNode(TemplateNode children, TemplateNode next,
- Expr select, QName mode,
+ ApplyTemplatesNode(Expr select, QName mode,
List sortKeys, List withParams, boolean isDefault)
{
- super(children, next);
this.select = select;
this.mode = mode;
this.sortKeys = sortKeys;
@@ -89,12 +88,18 @@ final class ApplyTemplatesNode
{
withParams2.add(((WithParam) withParams.get(i)).clone(stylesheet));
}
- return new ApplyTemplatesNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- select.clone(stylesheet),
- mode, sortKeys2, withParams2, isDefault);
+ TemplateNode ret = new ApplyTemplatesNode(select.clone(stylesheet),
+ mode, sortKeys2, withParams2,
+ isDefault);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -107,14 +112,26 @@ final class ApplyTemplatesNode
{
if (withParams != null)
{
- // push the parameter context
- stylesheet.bindings.push(false);
- // set the parameters
+ // compute the parameter values
+ LinkedList values = new LinkedList();
for (Iterator i = withParams.iterator(); i.hasNext(); )
{
WithParam p = (WithParam) i.next();
Object value = p.getValue(stylesheet, mode, context, pos, len);
- stylesheet.bindings.set(p.name, value, false);
+ Object[] pair = new Object[2];
+ pair[0] = p.name;
+ pair[1] = value;
+ values.add(pair);
+ }
+ // push the parameter context
+ stylesheet.bindings.push(Bindings.WITH_PARAM);
+ // set the parameters
+ for (Iterator i = values.iterator(); i.hasNext(); )
+ {
+ Object[] pair = (Object[]) i.next();
+ QName name = (QName) pair[0];
+ Object value = pair[1];
+ stylesheet.bindings.set(name, value, Bindings.WITH_PARAM);
}
}
Collection ns = (Collection) ret;
@@ -142,10 +159,6 @@ final class ApplyTemplatesNode
false);
if (t != null)
{
- if (stylesheet.debug)
- {
- System.err.println("Applying " + t);
- }
stylesheet.current = node;
t.apply(stylesheet, effectiveMode, node, i + 1, l,
parent, nextSibling);
@@ -154,7 +167,7 @@ final class ApplyTemplatesNode
if (withParams != null)
{
// pop the variable context
- stylesheet.bindings.pop(false);
+ stylesheet.bindings.pop(Bindings.WITH_PARAM);
}
}
// apply-templates doesn't have processable children
@@ -165,6 +178,35 @@ final class ApplyTemplatesNode
parent, nextSibling);
}
}
+
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ if (withParams != null)
+ {
+ for (Iterator i = withParams.iterator(); i.hasNext(); )
+ {
+ if (((WithParam) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ }
+ if (sortKeys != null)
+ {
+ for (Iterator i = sortKeys.iterator(); i.hasNext(); )
+ {
+ if (((SortKey) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ }
+ return super.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/transform/AttributeNode.java b/gnu/xml/transform/AttributeNode.java
index c4409dbfc..1e0eb1e96 100644
--- a/gnu/xml/transform/AttributeNode.java
+++ b/gnu/xml/transform/AttributeNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,10 +60,9 @@ final class AttributeNode
final TemplateNode namespace;
final Node source;
- AttributeNode(TemplateNode children, TemplateNode next, TemplateNode name,
+ AttributeNode(TemplateNode name,
TemplateNode namespace, Node source)
{
- super(children, next);
this.name = name;
this.namespace = namespace;
this.source = source;
@@ -71,13 +70,19 @@ final class AttributeNode
TemplateNode clone(Stylesheet stylesheet)
{
- return new AttributeNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null : next.clone(stylesheet),
- name.clone(stylesheet),
- (namespace == null) ? null :
- namespace.clone(stylesheet),
- source);
+ TemplateNode ret = new AttributeNode(name.clone(stylesheet),
+ (namespace == null) ? null :
+ namespace.clone(stylesheet),
+ source);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -232,6 +237,19 @@ final class AttributeNode
}
return ret;
}
+
+ public boolean references(QName var)
+ {
+ if (name != null && name.references(var))
+ {
+ return true;
+ }
+ if (namespace != null && namespace.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/transform/AttributeSet.java b/gnu/xml/transform/AttributeSet.java
index 92869d192..3ece9c83f 100644
--- a/gnu/xml/transform/AttributeSet.java
+++ b/gnu/xml/transform/AttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/Bindings.java b/gnu/xml/transform/Bindings.java
index 75a8a1651..c372ea830 100644
--- a/gnu/xml/transform/Bindings.java
+++ b/gnu/xml/transform/Bindings.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -57,6 +57,10 @@ public class Bindings
implements XPathVariableResolver, Cloneable
{
+ static final int VARIABLE = 0;
+ static final int PARAM = 1;
+ static final int WITH_PARAM = 2;
+
final Stylesheet stylesheet;
/**
@@ -69,13 +73,21 @@ public class Bindings
*/
final LinkedList parameters;
+ /**
+ * Argument (with-param) value stack.
+ */
+ final LinkedList withParameters;
+
Bindings(Stylesheet stylesheet)
{
this.stylesheet = stylesheet;
variables = new LinkedList();
parameters = new LinkedList();
- push(true);
- push(false);
+ withParameters = new LinkedList();
+ for (int i = 0; i < 3; i++)
+ {
+ push(i);
+ }
}
public Object clone()
@@ -90,53 +102,87 @@ public class Bindings
}
}
- void push(boolean global)
+ void push(int type)
{
- if (global)
+ switch (type)
{
+ case VARIABLE:
variables.addFirst(new HashMap());
- }
- else
- {
+ break;
+ case PARAM:
parameters.addFirst(new HashMap());
+ break;
+ case WITH_PARAM:
+ withParameters.addFirst(new HashMap());
+ break;
}
}
- void pop(boolean global)
+ void pop(int type)
{
- if (global)
+ switch (type)
{
+ case VARIABLE:
variables.removeFirst();
- }
- else
- {
+ break;
+ case PARAM:
parameters.removeFirst();
+ break;
+ case WITH_PARAM:
+ withParameters.removeFirst();
+ break;
}
}
- public boolean containsKey(String name, boolean global)
+ public boolean containsKey(QName name, int type)
{
- Iterator i = global ? variables.iterator() : parameters.iterator();
- while (i.hasNext())
+ Iterator i = null;
+ switch (type)
{
- Map ctx = (Map) i.next();
- if (ctx.containsKey(name))
+ case VARIABLE:
+ i = variables.iterator();
+ break;
+ case PARAM:
+ i = parameters.iterator();
+ break;
+ case WITH_PARAM:
+ Map ctx = (Map) withParameters.getFirst();
+ return ctx.containsKey(name);
+ }
+ if (i != null)
+ {
+ while (i.hasNext())
{
- return true;
+ Map ctx = (Map) i.next();
+ if (ctx.containsKey(name))
+ {
+ return true;
+ }
}
}
return false;
}
- public Object get(String name, Node context, int pos, int len)
+ public Object get(QName name, Node context, int pos, int len)
{
//System.err.println("bindings.get: "+name);
//System.err.println("\t"+toString());
Object ret = null;
- for (Iterator i = variables.iterator(); i.hasNext() && ret == null; )
+ //if (parameters.size() > 1 && containsKey(name, PARAM))
+ // check that template defines parameter
{
- Map vctx = (Map) i.next();
- ret = vctx.get(name);
+ Map cwp = (Map) withParameters.getFirst();
+ ret = cwp.get(name);
+ //System.err.println("\twith-param: ret="+ret);
+ }
+ if (ret == null)
+ {
+ for (Iterator i = variables.iterator(); i.hasNext() && ret == null; )
+ {
+ Map vctx = (Map) i.next();
+ ret = vctx.get(name);
+ }
+ //System.err.println("\tvariable: ret="+ret);
}
if (ret == null)
{
@@ -145,6 +191,7 @@ public class Bindings
Map pctx = (Map) i.next();
ret = pctx.get(name);
}
+ //System.err.println("\tparam: ret="+ret);
}
/*if (ret instanceof Expr && context != null)
{
@@ -163,23 +210,29 @@ public class Bindings
return ret;
}
- void set(String name, Object value, boolean global)
+ void set(QName name, Object value, int type)
{
- if (global)
- {
- Map context = (Map) variables.getFirst();
- context.put(name, value);
- }
- else
+ switch (type)
{
- Map context = (Map) parameters.getFirst();
- context.put(name, value);
+ case VARIABLE:
+ Map vctx = (Map) variables.getFirst();
+ vctx.put(name, value);
+ break;
+ case PARAM:
+ Map pctx = (Map) parameters.getFirst();
+ pctx.put(name, value);
+ break;
+ case WITH_PARAM:
+ Map wctx = (Map) withParameters.getFirst();
+ wctx.put(name, value);
+ break;
}
+ //System.err.println("Set "+name+"="+value);
}
public Object resolveVariable(QName qName)
{
- return get(qName.toString(), null, 1, 1);
+ return get(qName, null, 1, 1);
}
public String toString()
@@ -187,6 +240,31 @@ public class Bindings
StringBuffer buf = new StringBuffer();
boolean next = false;
Collection seen = new HashSet();
+ Map wctx = (Map) withParameters.getFirst();
+ buf.append('(');
+ for (Iterator i = wctx.entrySet().iterator(); i.hasNext(); )
+ {
+ if (next)
+ {
+ buf.append(',');
+ }
+ else
+ {
+ next = true;
+ }
+ Map.Entry entry = (Map.Entry) i.next();
+ Object key = entry.getKey();
+ if (!seen.contains(key))
+ {
+ buf.append(key);
+ buf.append('=');
+ buf.append(entry.getValue());
+ seen.add(key);
+ }
+ }
+ buf.append(')');
+ next = false;
+ seen.clear();
buf.append('{');
for (Iterator i = variables.iterator(); i.hasNext(); )
{
@@ -212,6 +290,10 @@ public class Bindings
}
}
}
+ buf.append('}');
+ next = false;
+ seen.clear();
+ buf.append('[');
for (Iterator i = parameters.iterator(); i.hasNext(); )
{
Map ctx = (Map) i.next();
@@ -236,7 +318,8 @@ public class Bindings
}
}
}
- buf.append('}');
+ buf.append(']');
return buf.toString();
}
+
}
diff --git a/gnu/xml/transform/CallTemplateNode.java b/gnu/xml/transform/CallTemplateNode.java
index ee64e2eed..b678219d7 100644
--- a/gnu/xml/transform/CallTemplateNode.java
+++ b/gnu/xml/transform/CallTemplateNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.transform.TransformerException;
@@ -57,10 +58,8 @@ final class CallTemplateNode
final QName name;
final List withParams;
- CallTemplateNode(TemplateNode children, TemplateNode next,
- QName name, List withParams)
+ CallTemplateNode(QName name, List withParams)
{
- super(children, next);
this.name = name;
this.withParams = withParams;
}
@@ -73,11 +72,16 @@ final class CallTemplateNode
{
withParams2.add(((WithParam) withParams.get(i)).clone(stylesheet));
}
- return new CallTemplateNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- name, withParams2);
+ TemplateNode ret = new CallTemplateNode(name, withParams2);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -87,14 +91,30 @@ final class CallTemplateNode
{
if (withParams != null)
{
- // push the parameter context
- stylesheet.bindings.push(false);
- // set the parameters
+ // compute the parameter values
+ LinkedList values = new LinkedList();
for (Iterator i = withParams.iterator(); i.hasNext(); )
{
WithParam p = (WithParam) i.next();
Object value = p.getValue(stylesheet, mode, context, pos, len);
- stylesheet.bindings.set(p.name, value, false);
+ Object[] pair = new Object[2];
+ pair[0] = p.name;
+ pair[1] = value;
+ values.add(pair);
+ }
+ // push the parameter context
+ stylesheet.bindings.push(Bindings.WITH_PARAM);
+ // set the parameters
+ for (Iterator i = values.iterator(); i.hasNext(); )
+ {
+ Object[] pair = (Object[]) i.next();
+ QName name = (QName) pair[0];
+ Object value = pair[1];
+ stylesheet.bindings.set(name, value, Bindings.WITH_PARAM);
+ if (stylesheet.debug)
+ {
+ System.err.println("with-param: " + name + " = " + value);
+ }
}
}
TemplateNode t = stylesheet.getTemplate(mode, name);
@@ -106,7 +126,7 @@ final class CallTemplateNode
if (withParams != null)
{
// pop the variable context
- stylesheet.bindings.pop(false);
+ stylesheet.bindings.pop(Bindings.WITH_PARAM);
}
// call-template doesn't have processable children
if (next != null)
@@ -117,6 +137,21 @@ final class CallTemplateNode
}
}
+ public boolean references(QName var)
+ {
+ if (withParams != null)
+ {
+ for (Iterator i = withParams.iterator(); i.hasNext(); )
+ {
+ if (((WithParam) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/ChooseNode.java b/gnu/xml/transform/ChooseNode.java
index 76b0d8dd5..fb1f2c45e 100644
--- a/gnu/xml/transform/ChooseNode.java
+++ b/gnu/xml/transform/ChooseNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,17 +50,18 @@ final class ChooseNode
extends TemplateNode
{
- ChooseNode(TemplateNode children, TemplateNode next)
- {
- super(children, next);
- }
-
TemplateNode clone(Stylesheet stylesheet)
{
- return new ChooseNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet));
+ TemplateNode ret = new ChooseNode();
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/CommentNode.java b/gnu/xml/transform/CommentNode.java
index 99870cd59..1428a46fc 100644
--- a/gnu/xml/transform/CommentNode.java
+++ b/gnu/xml/transform/CommentNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,17 +54,18 @@ final class CommentNode
extends TemplateNode
{
- CommentNode(TemplateNode children, TemplateNode next)
- {
- super(children, next);
- }
-
TemplateNode clone(Stylesheet stylesheet)
{
- return new CommentNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet));
+ TemplateNode ret = new CommentNode();
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/CopyNode.java b/gnu/xml/transform/CopyNode.java
index d06a0af30..3e019445a 100644
--- a/gnu/xml/transform/CopyNode.java
+++ b/gnu/xml/transform/CopyNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,19 +56,23 @@ final class CopyNode
final String uas;
- CopyNode(TemplateNode children, TemplateNode next, String uas)
+ CopyNode(String uas)
{
- super(children, next);
this.uas = uas;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new CopyNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- uas);
+ TemplateNode ret = new CopyNode(uas);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/CopyOfNode.java b/gnu/xml/transform/CopyOfNode.java
index 7ca1006ad..a43e3ba84 100644
--- a/gnu/xml/transform/CopyOfNode.java
+++ b/gnu/xml/transform/CopyOfNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -61,19 +61,23 @@ final class CopyOfNode
final Expr select;
- CopyOfNode(TemplateNode children, TemplateNode next, Expr select)
+ CopyOfNode(Expr select)
{
- super(children, next);
this.select = select;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new CopyOfNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- select.clone(stylesheet));
+ TemplateNode ret = new CopyOfNode(select.clone(stylesheet));
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -166,6 +170,15 @@ final class CopyOfNode
}
}
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/CurrentFunction.java b/gnu/xml/transform/CurrentFunction.java
index 0c901be7f..0395396bc 100644
--- a/gnu/xml/transform/CurrentFunction.java
+++ b/gnu/xml/transform/CurrentFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.transform;
import java.util.Collections;
import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.Node;
@@ -89,6 +90,11 @@ final class CurrentFunction
return new CurrentFunction(s);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "current()";
diff --git a/gnu/xml/transform/DOMSourceLocator.java b/gnu/xml/transform/DOMSourceLocator.java
index b9ef7050a..9bc8fb1b6 100644
--- a/gnu/xml/transform/DOMSourceLocator.java
+++ b/gnu/xml/transform/DOMSourceLocator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/DocumentFunction.java b/gnu/xml/transform/DocumentFunction.java
index 78862dc9e..d8f6090be 100644
--- a/gnu/xml/transform/DocumentFunction.java
+++ b/gnu/xml/transform/DocumentFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,6 +43,7 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;
+import javax.xml.namespace.QName;
import javax.xml.transform.TransformerException;
import javax.xml.transform.dom.DOMSource;
import javax.xml.xpath.XPathFunction;
@@ -239,5 +240,17 @@ final class DocumentFunction
f.setArguments(args2);
return f;
}
+
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
}
diff --git a/gnu/xml/transform/ElementAvailableFunction.java b/gnu/xml/transform/ElementAvailableFunction.java
index 0c9ce4450..84cb6207a 100644
--- a/gnu/xml/transform/ElementAvailableFunction.java
+++ b/gnu/xml/transform/ElementAvailableFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,8 +40,10 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;
+import javax.xml.namespace.QName;
import javax.xml.namespace.NamespaceContext;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
@@ -165,5 +167,17 @@ class ElementAvailableFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/ElementNode.java b/gnu/xml/transform/ElementNode.java
index 305989c02..d8f7f6db6 100644
--- a/gnu/xml/transform/ElementNode.java
+++ b/gnu/xml/transform/ElementNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -67,10 +67,9 @@ final class ElementNode
final Node source;
final Collection elementExcludeResultPrefixes;
- ElementNode(TemplateNode children, TemplateNode next, TemplateNode name,
+ ElementNode(TemplateNode name,
TemplateNode namespace, String uas, Node source)
{
- super(children, next);
this.name = name;
this.namespace = namespace;
this.uas = uas;
@@ -95,14 +94,19 @@ final class ElementNode
TemplateNode clone(Stylesheet stylesheet)
{
- return new ElementNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- name.clone(stylesheet),
- (namespace == null) ? null :
- namespace.clone(stylesheet),
- uas, source);
+ TemplateNode ret = new ElementNode(name.clone(stylesheet),
+ (namespace == null) ? null :
+ namespace.clone(stylesheet),
+ uas, source);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -261,6 +265,19 @@ final class ElementNode
}
}
+ public boolean references(QName var)
+ {
+ if (name != null && name.references(var))
+ {
+ return true;
+ }
+ if (namespace != null && namespace.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/ErrorListenerErrorHandler.java b/gnu/xml/transform/ErrorListenerErrorHandler.java
index 929f7f076..d79bb1546 100644
--- a/gnu/xml/transform/ErrorListenerErrorHandler.java
+++ b/gnu/xml/transform/ErrorListenerErrorHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/ForEachNode.java b/gnu/xml/transform/ForEachNode.java
index af96628ca..8f9220f67 100644
--- a/gnu/xml/transform/ForEachNode.java
+++ b/gnu/xml/transform/ForEachNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -59,10 +59,8 @@ final class ForEachNode
final Expr select;
final List sortKeys;
- ForEachNode(TemplateNode children, TemplateNode next, Expr select,
- List sortKeys)
+ ForEachNode(Expr select, List sortKeys)
{
- super(children, next);
this.select = select;
this.sortKeys = sortKeys;
}
@@ -75,12 +73,17 @@ final class ForEachNode
{
sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet));
}
- return new ForEachNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- select.clone(stylesheet),
- sortKeys2);
+ TemplateNode ret = new ForEachNode(select.clone(stylesheet),
+ sortKeys2);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -136,6 +139,25 @@ final class ForEachNode
}
}
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ if (sortKeys != null)
+ {
+ for (Iterator i = sortKeys.iterator(); i.hasNext(); )
+ {
+ if (((SortKey) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/FormatNumberFunction.java b/gnu/xml/transform/FormatNumberFunction.java
index 393cb99ff..34717b39c 100644
--- a/gnu/xml/transform/FormatNumberFunction.java
+++ b/gnu/xml/transform/FormatNumberFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,9 @@ package gnu.xml.transform;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.Node;
@@ -128,5 +130,17 @@ final class FormatNumberFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/FunctionAvailableFunction.java b/gnu/xml/transform/FunctionAvailableFunction.java
index 29310821c..7daf7ea3f 100644
--- a/gnu/xml/transform/FunctionAvailableFunction.java
+++ b/gnu/xml/transform/FunctionAvailableFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,9 +40,11 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;
import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.Node;
@@ -171,5 +173,17 @@ class FunctionAvailableFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/GenerateIdFunction.java b/gnu/xml/transform/GenerateIdFunction.java
index 9e48f79b4..f0d3e6dd9 100644
--- a/gnu/xml/transform/GenerateIdFunction.java
+++ b/gnu/xml/transform/GenerateIdFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,9 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.Node;
@@ -122,5 +124,17 @@ final class GenerateIdFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/IfNode.java b/gnu/xml/transform/IfNode.java
index c977348df..17e2486fe 100644
--- a/gnu/xml/transform/IfNode.java
+++ b/gnu/xml/transform/IfNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,19 +53,23 @@ final class IfNode
final Expr test;
- IfNode(TemplateNode children, TemplateNode next, Expr test)
+ IfNode(Expr test)
{
- super(children, next);
this.test = test;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new IfNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- test.clone(stylesheet));
+ TemplateNode ret = new IfNode(test.clone(stylesheet));
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -94,6 +98,15 @@ final class IfNode
}
}
+ public boolean references(QName var)
+ {
+ if (test != null && test.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/Key.java b/gnu/xml/transform/Key.java
index 008400f3c..72bd90aed 100644
--- a/gnu/xml/transform/Key.java
+++ b/gnu/xml/transform/Key.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/KeyFunction.java b/gnu/xml/transform/KeyFunction.java
index 233c12f92..a705dc6b0 100644
--- a/gnu/xml/transform/KeyFunction.java
+++ b/gnu/xml/transform/KeyFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -212,5 +212,17 @@ final class KeyFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/LiteralNode.java b/gnu/xml/transform/LiteralNode.java
index 1b5af1a28..0be2b35c8 100644
--- a/gnu/xml/transform/LiteralNode.java
+++ b/gnu/xml/transform/LiteralNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -64,9 +64,8 @@ final class LiteralNode
final Collection elementExcludeResultPrefixes;
- LiteralNode(TemplateNode children, TemplateNode next, Node source)
+ LiteralNode(Node source)
{
- super(children, next);
this.source = source;
if (source.getNodeType() == Node.ELEMENT_NODE)
{
@@ -95,11 +94,16 @@ final class LiteralNode
TemplateNode clone(Stylesheet stylesheet)
{
- return new LiteralNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- source);
+ TemplateNode ret = new LiteralNode(source);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -174,13 +178,15 @@ final class LiteralNode
}
}
}
- result = doc.adoptNode(result);
- if (result == null)
+ Node result2 = doc.adoptNode(result);
+ if (result2 == null)
{
- String msg = "Error adopting node to result tree";
+ String msg = "Error adopting node to result tree: " +
+ result + " (" + result.getClass().getName() + ")";
DOMSourceLocator l = new DOMSourceLocator(context);
throw new TransformerException(msg, l);
}
+ result = result2;
}
if (nextSibling != null)
{
diff --git a/gnu/xml/transform/MessageNode.java b/gnu/xml/transform/MessageNode.java
index c79060a06..1df716836 100644
--- a/gnu/xml/transform/MessageNode.java
+++ b/gnu/xml/transform/MessageNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,19 +55,23 @@ final class MessageNode
final boolean terminate;
- MessageNode(TemplateNode children, TemplateNode next, boolean terminate)
+ MessageNode(boolean terminate)
{
- super(children, next);
this.terminate = terminate;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new MessageNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- terminate);
+ TemplateNode ret = new MessageNode(terminate);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/NodeNumberNode.java b/gnu/xml/transform/NodeNumberNode.java
index aae86c6f2..0427686de 100644
--- a/gnu/xml/transform/NodeNumberNode.java
+++ b/gnu/xml/transform/NodeNumberNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -68,13 +68,11 @@ final class NodeNumberNode
final Pattern count;
final Pattern from;
- NodeNumberNode(TemplateNode children, TemplateNode next,
- int level, Pattern count, Pattern from,
+ NodeNumberNode(int level, Pattern count, Pattern from,
TemplateNode format, String lang,
int letterValue, String groupingSeparator, int groupingSize)
{
- super(children, next, format, lang, letterValue, groupingSeparator,
- groupingSize);
+ super(format, lang, letterValue, groupingSeparator, groupingSize);
this.level = level;
this.count = count;
this.from = from;
@@ -82,17 +80,22 @@ final class NodeNumberNode
TemplateNode clone(Stylesheet stylesheet)
{
- return new NodeNumberNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- level,
- (count == null) ? null :
- (Pattern) count.clone(stylesheet),
- (from == null) ? from :
- (Pattern) from.clone(stylesheet),
- format, lang, letterValue,
- groupingSeparator, groupingSize);
+ TemplateNode ret = new NodeNumberNode(level,
+ (count == null) ? null :
+ (Pattern) count.clone(stylesheet),
+ (from == null) ? from :
+ (Pattern) from.clone(stylesheet),
+ format, lang, letterValue,
+ groupingSeparator, groupingSize);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
int[] compute(Stylesheet stylesheet, Node context, int pos, int len)
@@ -212,7 +215,15 @@ final class NodeNumberNode
return false;
}
String cn = current.getLocalName();
- String nn = current.getLocalName();
+ if (cn == null)
+ {
+ cn = current.getNodeName();
+ }
+ String nn = node.getLocalName();
+ if (nn == null)
+ {
+ nn = node.getNodeName();
+ }
if (!cn.equals(nn))
{
return false;
diff --git a/gnu/xml/transform/NumberNode.java b/gnu/xml/transform/NumberNode.java
index b01b983df..b19a7b5e9 100644
--- a/gnu/xml/transform/NumberNode.java
+++ b/gnu/xml/transform/NumberNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,24 +53,27 @@ final class NumberNode
final Expr value;
- NumberNode(TemplateNode children, TemplateNode next,
- Expr value, TemplateNode format, String lang,
+ NumberNode(Expr value, TemplateNode format, String lang,
int letterValue, String groupingSeparator, int groupingSize)
{
- super(children, next, format, lang, letterValue, groupingSeparator,
- groupingSize);
+ super(format, lang, letterValue, groupingSeparator, groupingSize);
this.value = value;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new NumberNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- value.clone(stylesheet),
- format, lang, letterValue,
- groupingSeparator, groupingSize);
+ TemplateNode ret = new NumberNode(value.clone(stylesheet),
+ format, lang, letterValue,
+ groupingSeparator, groupingSize);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
int[] compute(Stylesheet stylesheet, Node context, int pos, int len)
diff --git a/gnu/xml/transform/OtherwiseNode.java b/gnu/xml/transform/OtherwiseNode.java
index 1d9590e51..570310f6b 100644
--- a/gnu/xml/transform/OtherwiseNode.java
+++ b/gnu/xml/transform/OtherwiseNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,17 +50,18 @@ final class OtherwiseNode
extends TemplateNode
{
- OtherwiseNode(TemplateNode children, TemplateNode next)
- {
- super(children, next);
- }
-
TemplateNode clone(Stylesheet stylesheet)
{
- return new OtherwiseNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet));
+ TemplateNode ret = new OtherwiseNode();
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/ParameterNode.java b/gnu/xml/transform/ParameterNode.java
index 5b766d5dc..ef09ea5f9 100644
--- a/gnu/xml/transform/ParameterNode.java
+++ b/gnu/xml/transform/ParameterNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,47 +53,51 @@ import gnu.xml.xpath.Expr;
*/
final class ParameterNode
extends TemplateNode
+ implements Comparable
{
- final String name;
+ final QName name;
final Expr select;
- final boolean global;
+ final int type;
- ParameterNode(TemplateNode children, TemplateNode next,
- String name, Expr select, boolean global)
+ ParameterNode(QName name, Expr select, int type)
{
- super(children, next);
this.name = name;
this.select = select;
- this.global = global;
+ this.type = type;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new ParameterNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- name,
- select.clone(stylesheet),
- global);
+ TemplateNode ret = new ParameterNode(name,
+ select.clone(stylesheet),
+ type);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
- Node context, int pos, int len,
- Node parent, Node nextSibling)
+ Node context, int pos, int len,
+ Node parent, Node nextSibling)
throws TransformerException
{
- boolean apply = global || !stylesheet.bindings.containsKey(name, global);
- if (apply)
+ // push the variable context
+ stylesheet.bindings.push(type);
+ // set the variable
+ Object value = getValue(stylesheet, mode, context, pos, len);
+ if (value != null)
{
- // push the variable context
- stylesheet.bindings.push(global);
- // set the variable
- Object value = getValue(stylesheet, mode, context, pos, len);
- if (value != null)
+ stylesheet.bindings.set(name, value, type);
+ if (stylesheet.debug)
{
- stylesheet.bindings.set(name, value, global);
+ System.err.println(this + ": set to " + value);
}
}
// variable and param don't process children as such
@@ -104,11 +108,8 @@ final class ParameterNode
context, pos, len,
parent, nextSibling);
}
- if (apply)
- {
- // pop the variable context
- stylesheet.bindings.pop(global);
- }
+ // pop the variable context
+ stylesheet.bindings.pop(type);
}
Object getValue(Stylesheet stylesheet, QName mode,
@@ -133,6 +134,38 @@ final class ParameterNode
}
}
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
+ public int compareTo(Object other)
+ {
+ if (other instanceof ParameterNode)
+ {
+ ParameterNode pn = (ParameterNode) other;
+ boolean r1 = references(pn.name);
+ boolean r2 = pn.references(name);
+ if (r1 && r2)
+ {
+ throw new IllegalArgumentException("circular definitions");
+ }
+ if (r1)
+ {
+ return 1;
+ }
+ if (r2)
+ {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
@@ -144,9 +177,18 @@ final class ParameterNode
buf.append(",select=");
buf.append(select);
}
- if (global)
+ buf.append(",type=");
+ switch (type)
{
- buf.append(",global");
+ case Bindings.VARIABLE:
+ buf.append("variable");
+ break;
+ case Bindings.PARAM:
+ buf.append("param");
+ break;
+ case Bindings.WITH_PARAM:
+ buf.append("with-param");
+ break;
}
buf.append(']');
return buf.toString();
diff --git a/gnu/xml/transform/ProcessingInstructionNode.java b/gnu/xml/transform/ProcessingInstructionNode.java
index 1eb2bd605..d75f69366 100644
--- a/gnu/xml/transform/ProcessingInstructionNode.java
+++ b/gnu/xml/transform/ProcessingInstructionNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -57,20 +57,23 @@ final class ProcessingInstructionNode
final String name;
- ProcessingInstructionNode(TemplateNode children, TemplateNode next,
- String name)
+ ProcessingInstructionNode(String name)
{
- super(children, next);
this.name = name;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new ProcessingInstructionNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- name);
+ TemplateNode ret = new ProcessingInstructionNode(name);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/SAXSerializer.java b/gnu/xml/transform/SAXSerializer.java
index c5e382038..9650e3e05 100644
--- a/gnu/xml/transform/SAXSerializer.java
+++ b/gnu/xml/transform/SAXSerializer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/SortKey.java b/gnu/xml/transform/SortKey.java
index 9ecc91934..d4ffb05e2 100644
--- a/gnu/xml/transform/SortKey.java
+++ b/gnu/xml/transform/SortKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -151,4 +151,29 @@ final class SortKey
}
}
+ boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ if (langTemplate != null && langTemplate.references(var))
+ {
+ return true;
+ }
+ if (dataTypeTemplate != null && dataTypeTemplate.references(var))
+ {
+ return true;
+ }
+ if (orderTemplate != null && orderTemplate.references(var))
+ {
+ return true;
+ }
+ if (caseOrderTemplate != null && caseOrderTemplate.references(var))
+ {
+ return true;
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/StreamSerializer.java b/gnu/xml/transform/StreamSerializer.java
index 46bded37c..eb045393d 100644
--- a/gnu/xml/transform/StreamSerializer.java
+++ b/gnu/xml/transform/StreamSerializer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,6 +48,7 @@ import java.nio.charset.CharsetEncoder;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import javax.xml.XMLConstants;
import org.w3c.dom.Attr;
@@ -72,6 +73,82 @@ public class StreamSerializer
static final int KET = 0x3e; // >
static final int EQ = 0x3d; // =
+ /**
+ * HTML 4.01 boolean attributes
+ */
+ static final Map HTML_BOOLEAN_ATTRIBUTES = new HashMap();
+ static
+ {
+ HashSet set;
+
+ set = new HashSet();
+ set.add("nohref");
+ HTML_BOOLEAN_ATTRIBUTES.put("area", set);
+
+ set = new HashSet();
+ set.add("ismap");
+ HTML_BOOLEAN_ATTRIBUTES.put("img", set);
+
+ set = new HashSet();
+ set.add("declare");
+ HTML_BOOLEAN_ATTRIBUTES.put("object", set);
+
+ set = new HashSet();
+ set.add("noshade");
+ HTML_BOOLEAN_ATTRIBUTES.put("hr", set);
+
+ set = new HashSet();
+ set.add("compact");
+ HTML_BOOLEAN_ATTRIBUTES.put("dl", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("ol", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("ul", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("dir", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("menu", set);
+
+ set = new HashSet();
+ set.add("checked");
+ set.add("disabled");
+ set.add("readonly");
+ set.add("ismap");
+ HTML_BOOLEAN_ATTRIBUTES.put("input", set);
+
+ set = new HashSet();
+ set.add("multiple");
+ set.add("disabled");
+ HTML_BOOLEAN_ATTRIBUTES.put("select", set);
+
+ set = new HashSet();
+ set.add("disabled");
+ HTML_BOOLEAN_ATTRIBUTES.put("optgroup", set);
+
+ set = new HashSet();
+ set.add("selected");
+ set.add("disabled");
+ HTML_BOOLEAN_ATTRIBUTES.put("option", set);
+
+ set = new HashSet();
+ set.add("disabled");
+ set.add("readonly");
+ HTML_BOOLEAN_ATTRIBUTES.put("textarea", set);
+
+ set = new HashSet();
+ set.add("disabled");
+ HTML_BOOLEAN_ATTRIBUTES.put("button", set);
+
+ set = new HashSet();
+ set.add("nowrap");
+ HTML_BOOLEAN_ATTRIBUTES.put("th", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("td", set);
+
+ set = new HashSet();
+ set.add("noresize");
+ HTML_BOOLEAN_ATTRIBUTES.put("frame", set);
+
+ set = new HashSet();
+ set.add("defer");
+ HTML_BOOLEAN_ATTRIBUTES.put("script", set);
+ }
+
protected final String encoding;
final Charset charset;
final CharsetEncoder encoder;
@@ -118,17 +195,28 @@ public class StreamSerializer
serialize(node, out, false);
}
- void serialize(final Node node, final OutputStream out,
+ void serialize(Node node, final OutputStream out,
boolean convertToCdata)
throws IOException
{
+ while (node != null)
+ {
+ Node next = node.getNextSibling();
+ doSerialize(node, out, convertToCdata);
+ node = next;
+ }
+ }
+
+ private void doSerialize(final Node node, final OutputStream out,
+ boolean convertToCdata)
+ throws IOException
+ {
if (out == null)
{
throw new NullPointerException("no output stream");
}
String value, prefix;
Node children;
- Node next = node.getNextSibling();
String uri = node.getNamespaceURI();
boolean defined = false;
short nt = node.getNodeType();
@@ -149,7 +237,12 @@ public class StreamSerializer
{
break;
}
- define(nsuri, node.getLocalName());
+ String name = node.getLocalName();
+ if (name == null)
+ {
+ name = node.getNodeName();
+ }
+ define(nsuri, name);
}
else if (uri != null && !isDefined(uri))
{
@@ -167,7 +260,8 @@ public class StreamSerializer
out.write(encodeText(a_nodeName));
String a_nodeValue = node.getNodeValue();
if (mode == Stylesheet.OUTPUT_HTML &&
- a_nodeName.equals(a_nodeValue))
+ a_nodeName.equals(a_nodeValue) &&
+ isHTMLBoolean((Attr) node, a_nodeName))
{
break;
}
@@ -324,11 +418,18 @@ public class StreamSerializer
for (Node ctx = html.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (ctx.getNodeType() == Node.ELEMENT_NODE &&
- "head".equalsIgnoreCase(ctx.getLocalName()))
+ if (ctx.getNodeType() == Node.ELEMENT_NODE)
{
- head = ctx;
- break;
+ String name = ctx.getLocalName();
+ if (name == null)
+ {
+ name = ctx.getNodeName();
+ }
+ if ("head".equalsIgnoreCase(name))
+ {
+ head = ctx;
+ break;
+ }
}
}
if (head == null)
@@ -358,32 +459,39 @@ public class StreamSerializer
for (Node ctx = head.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (ctx.getNodeType() == Node.ELEMENT_NODE &&
- "meta".equalsIgnoreCase(ctx.getLocalName()))
+ if (ctx.getNodeType() == Node.ELEMENT_NODE)
{
- NamedNodeMap metaAttrs = ctx.getAttributes();
- int len = metaAttrs.getLength();
- String httpEquiv = null;
- Node content = null;
- for (int i = 0; i < len; i++)
+ String name = ctx.getLocalName();
+ if (name == null)
{
- Node attr = metaAttrs.item(i);
- String attrName = attr.getNodeName();
- if ("http-equiv".equalsIgnoreCase(attrName))
+ name = ctx.getNodeName();
+ }
+ if ("meta".equalsIgnoreCase(name))
+ {
+ NamedNodeMap metaAttrs = ctx.getAttributes();
+ int len = metaAttrs.getLength();
+ String httpEquiv = null;
+ Node content = null;
+ for (int i = 0; i < len; i++)
{
- httpEquiv = attr.getNodeValue();
+ Node attr = metaAttrs.item(i);
+ String attrName = attr.getNodeName();
+ if ("http-equiv".equalsIgnoreCase(attrName))
+ {
+ httpEquiv = attr.getNodeValue();
+ }
+ else if ("content".equalsIgnoreCase(attrName))
+ {
+ content = attr;
+ }
}
- else if ("content".equalsIgnoreCase(attrName))
+ if ("Content-Type".equalsIgnoreCase(httpEquiv))
{
- content = attr;
+ meta = ctx;
+ metaContent = content;
+ break;
}
}
- if ("Content-Type".equalsIgnoreCase(httpEquiv))
- {
- meta = ctx;
- metaContent = content;
- break;
- }
}
}
if (meta == null)
@@ -466,10 +574,6 @@ public class StreamSerializer
{
undefine(uri);
}
- if (next != null)
- {
- serialize(next, out, convertToCdata);
- }
}
boolean isDefined(String uri)
@@ -523,12 +627,20 @@ public class StreamSerializer
text = buf.toString();
}
ByteBuffer encoded = encoder.encode(CharBuffer.wrap(text));
+ int len = encoded.limit() - encoded.position();
if (encoded.hasArray())
{
- return encoded.array();
+ byte[] ret = encoded.array();
+ if (ret.length > len)
+ {
+ // Why?
+ byte[] ret2 = new byte[len];
+ System.arraycopy(ret, 0, ret2, 0, len);
+ ret = ret2;
+ }
+ return ret;
}
encoded.flip();
- int len = encoded.limit() - encoded.position();
byte[] ret = new byte[len];
encoded.get(ret, 0, len);
return ret;
@@ -632,4 +744,19 @@ public class StreamSerializer
}
}
+ boolean isHTMLBoolean(Attr attr, String attrName)
+ {
+ attrName = attrName.toLowerCase();
+ Node element = attr.getOwnerElement();
+ String elementName = element.getLocalName();
+ if (elementName == null)
+ {
+ elementName = element.getNodeName();
+ }
+ elementName = elementName.toLowerCase();
+ Collection attributes =
+ (Collection) HTML_BOOLEAN_ATTRIBUTES.get(elementName);
+ return (attributes != null && attributes.contains(attrName));
+ }
+
}
diff --git a/gnu/xml/transform/Stylesheet.java b/gnu/xml/transform/Stylesheet.java
index 6250fd542..99431b699 100644
--- a/gnu/xml/transform/Stylesheet.java
+++ b/gnu/xml/transform/Stylesheet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -123,6 +123,7 @@ class Stylesheet
/**
* Output options.
*/
+ Node output;
int outputMethod;
String outputVersion;
String outputEncoding;
@@ -248,12 +249,10 @@ class Stylesheet
Test anyNode = new NodeTypeTest((short) 0);
List tests = Collections.singletonList(anyNode);
builtInNodeTemplate =
- new ApplyTemplatesNode(null, null,
- new Selector(Selector.CHILD, tests),
+ new ApplyTemplatesNode(new Selector(Selector.CHILD, tests),
null, null, null, true);
builtInTextTemplate =
- new ValueOfNode(null, null,
- new Selector(Selector.SELF, tests),
+ new ValueOfNode(new Selector(Selector.SELF, tests),
false);
parse(doc.getDocumentElement(), true);
@@ -355,13 +354,21 @@ class Stylesheet
void initTopLevelVariables(Node context)
throws TransformerException
{
- for (Iterator i = variables.iterator(); i.hasNext(); )
+ current = context;
+ // Sort the variables into order
+ // See XSLT 11.4: "If the template or expression specifying the value of
+ // a global variable x references a global variable y, then the value
+ // for y must be computed before the value of x."
+ List topLevel = new ArrayList(variables);
+ Collections.sort(topLevel);
+ for (Iterator i = topLevel.iterator(); i.hasNext(); )
{
ParameterNode var = (ParameterNode) i.next();
bindings.set(var.name,
var.getValue(this, null, context, 1, 1),
- var.global);
+ var.type);
}
+ current = null;
}
// -- NamespaceContext --
@@ -381,13 +388,29 @@ class Stylesheet
// TODO
return Collections.singleton(getPrefix(namespaceURI)).iterator();
}
+
+ final QName getQName(String name)
+ {
+ String localName = name, uri = null, prefix = null;
+ int ci = name.indexOf(':');
+ if (ci != -1)
+ {
+ prefix = name.substring(0, ci);
+ localName = name.substring(ci + 1);
+ uri = getNamespaceURI(prefix);
+ }
+ return new QName(uri, localName, prefix);
+ }
// -- Template selection --
TemplateNode getTemplate(QName mode, Node context, boolean applyImports)
throws TransformerException
{
- //System.err.println("getTemplate: mode="+mode+" context="+context);
+ if (debug)
+ {
+ System.err.println("getTemplate: mode="+mode+" context="+context);
+ }
Set candidates = new TreeSet();
for (Iterator j = templates.iterator(); j.hasNext(); )
{
@@ -417,7 +440,10 @@ class Stylesheet
{
// Apply built-in template
// Current template is unchanged
- //System.err.println("\tbuiltInTemplate context="+context);
+ if (debug)
+ {
+ System.err.println("\tbuiltInTemplate context="+context);
+ }
switch (context.getNodeType())
{
case Node.ELEMENT_NODE:
@@ -438,7 +464,10 @@ class Stylesheet
Template t = (Template) candidates.iterator().next();
// Set current template
currentTemplate = t;
- //System.err.println("\ttemplate="+t+" context="+context);
+ if (debug)
+ {
+ System.err.println("\ttemplate="+t+" context="+context);
+ }
return t.node;
}
}
@@ -495,7 +524,8 @@ class Stylesheet
QName mode = (mm == null) ? null : getQName(mm);
double priority = (p == null) ? Template.DEFAULT_PRIORITY :
Double.parseDouble(p);
- return new Template(this, name, match, parse(node.getFirstChild()),
+ Node children = node.getFirstChild();
+ return new Template(this, name, match, parse(children),
precedence, priority, mode);
}
@@ -505,6 +535,7 @@ class Stylesheet
final void parseOutput(Node node, NamedNodeMap attrs)
throws TransformerConfigurationException
{
+ output = node;
String method = getAttribute(attrs, "method");
if ("xml".equals(method) || method == null)
{
@@ -654,11 +685,17 @@ class Stylesheet
void parse(Node node, boolean root)
throws TransformerConfigurationException
{
- if (node == null)
+ while (node != null)
{
- return;
+ current = node;
+ doParse(node, root);
+ node = node.getNextSibling();
}
- current = node;
+ }
+
+ void doParse(Node node, boolean root)
+ throws TransformerConfigurationException
+ {
try
{
String namespaceUri = node.getNamespaceURI();
@@ -689,19 +726,21 @@ class Stylesheet
}
}
parse(node.getFirstChild(), false);
- return;
}
else if ("template".equals(name))
{
- templates.addFirst(parseTemplate(node, attrs));
+ templates.add(parseTemplate(node, attrs));
}
else if ("param".equals(name) ||
"variable".equals(name))
{
- boolean global = "variable".equals(name);
+ int type = "variable".equals(name) ?
+ Bindings.VARIABLE : Bindings.PARAM;
TemplateNode content = parse(node.getFirstChild());
- String paramName = getRequiredAttribute(attrs, "name", node);
+ QName paramName =
+ getQName(getRequiredAttribute(attrs, "name", node));
String select = getAttribute(attrs, "select");
+ ParameterNode param;
if (select != null && select.length() > 0)
{
if (content != null)
@@ -712,17 +751,14 @@ class Stylesheet
throw new TransformerConfigurationException(msg, l);
}
Expr expr = (Expr) xpath.compile(select);
- variables.add(new ParameterNode(null, null,
- paramName,
- expr, global));
+ param = new ParameterNode(paramName, expr, type);
}
else
{
- variables.add(new ParameterNode(content, null,
- paramName,
- null, global));
+ param = new ParameterNode(paramName, null, type);
+ param.children = content;
}
- bindings.set(paramName, content, global);
+ variables.add(param);
}
else if ("include".equals(name) || "import".equals(name))
{
@@ -784,7 +820,6 @@ class Stylesheet
{
parseAttributeSet(node, attrs);
}
- parse(node.getNextSibling(), false);
}
else if (root)
{
@@ -810,7 +845,6 @@ class Stylesheet
else
{
// Skip unknown elements, text, comments, etc
- parse(node.getNextSibling(), false);
}
}
catch (TransformerException e)
@@ -848,20 +882,6 @@ class Stylesheet
}
}
- final QName getQName(String name)
- {
- QName qName = QName.valueOf(name);
- String prefix = qName.getPrefix();
- String uri = qName.getNamespaceURI();
- if (prefix != null && (uri == null || uri.length() == 0))
- {
- uri = getNamespaceURI(prefix);
- String localName = qName.getLocalPart();
- qName = new QName(uri, localName, prefix);
- }
- return qName;
- }
-
final TemplateNode parseAttributeValueTemplate(String value, Node source)
throws TransformerConfigurationException, XPathExpressionException
{
@@ -949,12 +969,16 @@ class Stylesheet
{
// Expression text
Expr select = (Expr) xpath.compile(token);
- ret = new ValueOfNode(null, ret, select, false);
+ TemplateNode ret2 = new ValueOfNode(select, false);
+ ret2.next = ret;
+ ret = ret2;
}
else
{
// Verbatim text
- ret = new LiteralNode(null, ret, doc.createTextNode(token));
+ TemplateNode ret2 = new LiteralNode(doc.createTextNode(token));
+ ret2.next = ret;
+ ret = ret2;
}
}
return ret;
@@ -1095,7 +1119,7 @@ class Stylesheet
/**
* apply-templates
*/
- final TemplateNode parseApplyTemplates(Node node, Node children, Node next)
+ final TemplateNode parseApplyTemplates(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1106,32 +1130,32 @@ class Stylesheet
{
s = "child::node()";
}
+ Node children = node.getFirstChild();
List sortKeys = parseSortKeys(children);
List withParams = parseWithParams(children);
Expr select = (Expr) xpath.compile(s);
- return new ApplyTemplatesNode(null, parse(next),
- select, mode,
+ return new ApplyTemplatesNode(select, mode,
sortKeys, withParams, false);
}
/**
* call-template
*/
- final TemplateNode parseCallTemplate(Node node, Node children, Node next)
+ final TemplateNode parseCallTemplate(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String n = getRequiredAttribute(attrs, "name", node);
QName name = getQName(n);
+ Node children = node.getFirstChild();
List withParams = parseWithParams(children);
- return new CallTemplateNode(null, parse(next), name,
- withParams);
+ return new CallTemplateNode(name, withParams);
}
/**
* value-of
*/
- final TemplateNode parseValueOf(Node node, Node children, Node next)
+ final TemplateNode parseValueOf(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1139,50 +1163,59 @@ class Stylesheet
String doe = getAttribute(attrs, "disable-output-escaping");
boolean d = "yes".equals(doe);
Expr select = (Expr) xpath.compile(s);
- return new ValueOfNode(null, parse(next), select, d);
+ return new ValueOfNode(select, d);
}
/**
* for-each
*/
- final TemplateNode parseForEach(Node node, Node children, Node next)
+ final TemplateNode parseForEach(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String s = getRequiredAttribute(attrs, "select", node);
+ Node children = node.getFirstChild();
List sortKeys = parseSortKeys(children);
Expr select = (Expr) xpath.compile(s);
- return new ForEachNode(parse(children), parse(next), select, sortKeys);
+ ForEachNode ret = new ForEachNode(select, sortKeys);
+ ret.children = parse(children);
+ return ret;
}
/**
* if
*/
- final TemplateNode parseIf(Node node, Node children, Node next)
+ final TemplateNode parseIf(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String t = getRequiredAttribute(attrs, "test", node);
Expr test = (Expr) xpath.compile(t);
- return new IfNode(parse(children), parse(next), test);
+ Node children = node.getFirstChild();
+ IfNode ret = new IfNode(test);
+ ret.children = parse(children);
+ return ret;
}
/**
* when
*/
- final TemplateNode parseWhen(Node node, Node children, Node next)
+ final TemplateNode parseWhen(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String t = getRequiredAttribute(attrs, "test", node);
Expr test = (Expr) xpath.compile(t);
- return new WhenNode(parse(children), parse(next), test);
+ Node children = node.getFirstChild();
+ WhenNode ret = new WhenNode(test);
+ ret.children = parse(children);
+ return ret;
}
/**
* element
*/
- final TemplateNode parseElement(Node node, Node children, Node next)
+ final TemplateNode parseElement(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1192,13 +1225,16 @@ class Stylesheet
TemplateNode n = parseAttributeValueTemplate(name, node);
TemplateNode ns = (namespace == null) ? null :
parseAttributeValueTemplate(namespace, node);
- return new ElementNode(parse(children), parse(next), n, ns, uas, node);
+ Node children = node.getFirstChild();
+ ElementNode ret = new ElementNode(n, ns, uas, node);
+ ret.children = parse(children);
+ return ret;
}
/**
* attribute
*/
- final TemplateNode parseAttribute(Node node, Node children, Node next)
+ final TemplateNode parseAttribute(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1207,49 +1243,59 @@ class Stylesheet
TemplateNode n = parseAttributeValueTemplate(name, node);
TemplateNode ns = (namespace == null) ? null :
parseAttributeValueTemplate(namespace, node);
- return new AttributeNode(parse(children), parse(next), n, ns, node);
+ Node children = node.getFirstChild();
+ AttributeNode ret = new AttributeNode(n, ns, node);
+ ret.children = parse(children);
+ return ret;
}
/**
* text
*/
- final TemplateNode parseText(Node node, Node children, Node next)
+ final TemplateNode parseText(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String doe = getAttribute(attrs, "disable-output-escaping");
boolean d = "yes".equals(doe);
- return new TextNode(parse(children), parse(next), d);
+ Node children = node.getFirstChild();
+ TextNode ret = new TextNode(d);
+ ret.children = parse(children);
+ return ret;
}
/**
* copy
*/
- final TemplateNode parseCopy(Node node, Node children, Node next)
+ final TemplateNode parseCopy(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String uas = getAttribute(attrs, "use-attribute-sets");
- return new CopyNode(parse(children), parse(next), uas);
+ Node children = node.getFirstChild();
+ CopyNode ret = new CopyNode(uas);
+ ret.children = parse(children);
+ return ret;
}
/**
* processing-instruction
*/
- final TemplateNode parseProcessingInstruction(Node node, Node children,
- Node next)
+ final TemplateNode parseProcessingInstruction(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String name = getRequiredAttribute(attrs, "name", node);
- return new ProcessingInstructionNode(parse(children),
- parse(next), name);
+ Node children = node.getFirstChild();
+ ProcessingInstructionNode ret = new ProcessingInstructionNode(name);
+ ret.children = parse(children);
+ return ret;
}
/**
* number
*/
- final TemplateNode parseNumber(Node node, Node children, Node next)
+ final TemplateNode parseNumber(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1269,12 +1315,13 @@ class Stylesheet
String gz = getAttribute(attrs, "grouping-size");
int gz2 = (gz != null && gz.length() > 0) ?
Integer.parseInt(gz) : 1;
+ Node children = node.getFirstChild();
+ TemplateNode ret;
if (v != null && v.length() > 0)
{
Expr value = (Expr) xpath.compile(v);
- return new NumberNode(parse(children), parse(next),
- value, format, lang,
- letterValue, gs, gz2);
+ ret = new NumberNode(value, format, lang,
+ letterValue, gs, gz2);
}
else
{
@@ -1311,35 +1358,42 @@ class Stylesheet
throw new TransformerConfigurationException(msg);
}
}
- return new NodeNumberNode(parse(children), parse(next),
- level, count, from,
- format, lang,
- letterValue, gs, gz2);
+ ret = new NodeNumberNode(level, count, from,
+ format, lang,
+ letterValue, gs, gz2);
}
+ ret.children = parse(children);
+ return ret;
}
/**
* copy-of
*/
- final TemplateNode parseCopyOf(Node node, Node children, Node next)
+ final TemplateNode parseCopyOf(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String s = getRequiredAttribute(attrs, "select", node);
Expr select = (Expr) xpath.compile(s);
- return new CopyOfNode(parse(children), parse(next), select);
+ Node children = node.getFirstChild();
+ CopyOfNode ret = new CopyOfNode(select);
+ ret.children = parse(children);
+ return ret;
}
/**
* message
*/
- final TemplateNode parseMessage(Node node, Node children, Node next)
+ final TemplateNode parseMessage(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String t = getAttribute(attrs, "terminate");
boolean terminate = "yes".equals(t);
- return new MessageNode(parse(children), parse(next), terminate);
+ Node children = node.getFirstChild();
+ MessageNode ret = new MessageNode(terminate);
+ ret.children = parse(children);
+ return ret;
}
/**
@@ -1348,14 +1402,34 @@ class Stylesheet
final TemplateNode parse(Node node)
throws TransformerConfigurationException
{
- if (node == null)
+ TemplateNode first = null;
+ TemplateNode previous = null;
+ while (node != null)
{
- return null;
+ Node next = node.getNextSibling();
+ TemplateNode tnode = doParse(node);
+ if (tnode != null)
+ {
+ if (first == null)
+ {
+ first = tnode;
+ }
+ if (previous != null)
+ {
+ previous.next = tnode;
+ }
+ previous = tnode;
+ }
+ node = next;
}
+ return first;
+ }
+
+ private final TemplateNode doParse(Node node)
+ throws TransformerConfigurationException
+ {
// Hack to associate the document function with its declaring node
current = node;
- Node children = node.getFirstChild();
- Node next = node.getNextSibling();
try
{
String namespaceUri = node.getNamespaceURI();
@@ -1365,72 +1439,85 @@ class Stylesheet
String name = node.getLocalName();
if ("apply-templates".equals(name))
{
- return parseApplyTemplates(node, children, next);
+ return parseApplyTemplates(node);
}
else if ("call-template".equals(name))
{
- return parseCallTemplate(node, children, next);
+ return parseCallTemplate(node);
}
else if ("value-of".equals(name))
{
- return parseValueOf(node, children, next);
+ return parseValueOf(node);
}
else if ("for-each".equals(name))
{
- return parseForEach(node, children, next);
+ return parseForEach(node);
}
else if ("if".equals(name))
{
- return parseIf(node, children, next);
+ return parseIf(node);
}
else if ("choose".equals(name))
{
- return new ChooseNode(parse(children), parse(next));
+ Node children = node.getFirstChild();
+ ChooseNode ret = new ChooseNode();
+ ret.children = parse(children);
+ return ret;
}
else if ("when".equals(name))
{
- return parseWhen(node, children, next);
+ return parseWhen(node);
}
else if ("otherwise".equals(name))
{
- return new OtherwiseNode(parse(children), parse(next));
+ Node children = node.getFirstChild();
+ OtherwiseNode ret = new OtherwiseNode();
+ ret.children = parse(children);
+ return ret;
}
else if ("element".equals(name))
{
- return parseElement(node, children, next);
+ return parseElement(node);
}
else if ("attribute".equals(name))
{
- return parseAttribute(node, children, next);
+ return parseAttribute(node);
}
else if ("text".equals(name))
{
- return parseText(node, children, next);
+ return parseText(node);
}
else if ("copy".equals(name))
{
- return parseCopy(node, children, next);
+ return parseCopy(node);
}
else if ("processing-instruction".equals(name))
{
- return parseProcessingInstruction(node, children, next);
+ return parseProcessingInstruction(node);
}
else if ("comment".equals(name))
{
- return new CommentNode(parse(children), parse(next));
+ Node children = node.getFirstChild();
+ CommentNode ret = new CommentNode();
+ ret.children = parse(children);
+ return ret;
}
else if ("number".equals(name))
{
- return parseNumber(node, children, next);
+ return parseNumber(node);
}
else if ("param".equals(name) ||
"variable".equals(name))
{
- boolean global = "variable".equals(name);
+ int type = "variable".equals(name) ?
+ Bindings.VARIABLE : Bindings.PARAM;
NamedNodeMap attrs = node.getAttributes();
+ Node children = node.getFirstChild();
TemplateNode content = parse(children);
- String paramName = getRequiredAttribute(attrs, "name", node);
+ QName paramName =
+ getQName(getRequiredAttribute(attrs, "name", node));
String select = getAttribute(attrs, "select");
+ ParameterNode ret;
if (select != null)
{
if (content != null)
@@ -1441,39 +1528,42 @@ class Stylesheet
throw new TransformerConfigurationException(msg, l);
}
Expr expr = (Expr) xpath.compile(select);
- return new ParameterNode(null, parse(next),
- paramName, expr, global);
+ ret = new ParameterNode(paramName, expr, type);
}
else
{
- return new ParameterNode(content, parse(next),
- paramName, null, global);
+ ret = new ParameterNode(paramName, null, type);
+ ret.children = content;
}
+ return ret;
}
else if ("copy-of".equals(name))
{
- return parseCopyOf(node, children, next);
+ return parseCopyOf(node);
}
else if ("message".equals(name))
{
- return parseMessage(node, children, next);
+ return parseMessage(node);
}
else if ("apply-imports".equals(name))
{
- return new ApplyImportsNode(parse(children), parse(next));
+ Node children = node.getFirstChild();
+ ApplyImportsNode ret = new ApplyImportsNode();
+ ret.children = parse(children);
+ return ret;
}
else
{
// xsl:fallback
// Pass over any other XSLT nodes
- return parse(next);
+ return null;
}
}
String prefix = node.getPrefix();
if (extensionElementPrefixes.contains(prefix))
{
// Pass over extension elements
- return parse(next);
+ return null;
}
switch (node.getNodeType())
{
@@ -1483,13 +1573,18 @@ class Stylesheet
if (!isPreserved(text))
{
// Strip
+ /*String data = text.getData().trim();
+ if (data.length() > 0)
+ {
+ text.setData(data);
+ } // else */
text.getParentNode().removeChild(text);
- return parse(next);
+ return null;
}
break;
case Node.COMMENT_NODE:
// Ignore comments
- return parse(next);
+ return null;
case Node.ELEMENT_NODE:
// Check for attribute value templates and use-attribute-sets
NamedNodeMap attrs = node.getAttributes();
@@ -1519,6 +1614,7 @@ class Stylesheet
{
// Create an element-producing template node instead
// with appropriate attribute-producing child template nodes
+ Node children = node.getFirstChild();
TemplateNode child = parse(children);
for (int i = 0; i < len; i++)
{
@@ -1537,15 +1633,19 @@ class Stylesheet
parseAttributeValueTemplate(aname, node);
TemplateNode ns = (ans == null) ? null :
parseAttributeValueTemplate(ans, node);
- child = new AttributeNode(grandchild, child, n, ns, attr);
+ TemplateNode newChild = new AttributeNode(n, ns, attr);
+ newChild.children = grandchild;
+ newChild.next = child;
+ child = newChild;
}
String ename = node.getNodeName();
TemplateNode n = parseAttributeValueTemplate(ename, node);
TemplateNode ns = (namespaceUri == null) ? null :
parseAttributeValueTemplate(namespaceUri, node);
- return new ElementNode(child, parse(next),
- n, ns, useAttributeSets,
- node);
+ ElementNode ret = new ElementNode(n, ns, useAttributeSets,
+ node);
+ ret.children = child;
+ return ret;
}
// Otherwise fall through
break;
@@ -1556,7 +1656,10 @@ class Stylesheet
DOMSourceLocator l = new DOMSourceLocator(node);
throw new TransformerConfigurationException(e.getMessage(), l, e);
}
- return new LiteralNode(parse(children), parse(next), node);
+ Node children = node.getFirstChild();
+ LiteralNode ret = new LiteralNode(node);
+ ret.children = parse(children);
+ return ret;
}
final List parseSortKeys(Node node)
@@ -1609,7 +1712,8 @@ class Stylesheet
{
NamedNodeMap attrs = node.getAttributes();
TemplateNode content = parse(node.getFirstChild());
- String name = getRequiredAttribute(attrs, "name", node);
+ QName name =
+ getQName(getRequiredAttribute(attrs, "name", node));
String select = getAttribute(attrs, "select");
if (select != null)
{
diff --git a/gnu/xml/transform/SystemPropertyFunction.java b/gnu/xml/transform/SystemPropertyFunction.java
index 03518e9cb..038df0169 100644
--- a/gnu/xml/transform/SystemPropertyFunction.java
+++ b/gnu/xml/transform/SystemPropertyFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.transform;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
@@ -124,5 +125,17 @@ final class SystemPropertyFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/Template.java b/gnu/xml/transform/Template.java
index 0e7c67a7e..e3c172fb5 100644
--- a/gnu/xml/transform/Template.java
+++ b/gnu/xml/transform/Template.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -206,7 +206,7 @@ class Template
Node parent, Node nextSibling)
throws TransformerException
{
- //System.err.println("...applying " + toString() + " to " + context);
+ System.err.println("...applying " + toString() + " to " + context);
if (node != null)
{
node.apply(stylesheet, mode,
diff --git a/gnu/xml/transform/TemplateNode.java b/gnu/xml/transform/TemplateNode.java
index 1fe37c272..36b25cf52 100644
--- a/gnu/xml/transform/TemplateNode.java
+++ b/gnu/xml/transform/TemplateNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,14 +55,8 @@ abstract class TemplateNode
static final Comparator documentOrderComparator =
new DocumentOrderComparator();
- final TemplateNode children;
- final TemplateNode next;
-
- TemplateNode(TemplateNode children, TemplateNode next)
- {
- this.children = children;
- this.next = next;
- }
+ TemplateNode children;
+ TemplateNode next;
final void apply(Stylesheet stylesheet, QName mode,
Node context, int pos, int len,
@@ -81,6 +75,8 @@ abstract class TemplateNode
if (stylesheet.debug)
{
System.err.println("Applying " + toString());
+ System.err.println("\twith context=" + context + ", pos=" + pos +
+ ", len=" + len);
}
doApply(stylesheet, mode, context, pos, len, parent, nextSibling);
}
@@ -92,6 +88,19 @@ abstract class TemplateNode
abstract TemplateNode clone(Stylesheet stylesheet);
+ public boolean references(QName var)
+ {
+ if (children != null && children.references(var))
+ {
+ return true;
+ }
+ if (next != null && next.references(var))
+ {
+ return true;
+ }
+ return false;
+ }
+
/**
* Debugging
*/
diff --git a/gnu/xml/transform/TemplatesImpl.java b/gnu/xml/transform/TemplatesImpl.java
index 173fb036f..527bd979d 100644
--- a/gnu/xml/transform/TemplatesImpl.java
+++ b/gnu/xml/transform/TemplatesImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/TextNode.java b/gnu/xml/transform/TextNode.java
index 70a8ce40a..1b581e5ac 100644
--- a/gnu/xml/transform/TextNode.java
+++ b/gnu/xml/transform/TextNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,20 +56,23 @@ final class TextNode
final boolean disableOutputEscaping;
- TextNode(TemplateNode children, TemplateNode next,
- boolean disableOutputEscaping)
+ TextNode(boolean disableOutputEscaping)
{
- super(children, next);
this.disableOutputEscaping = disableOutputEscaping;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new TextNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- disableOutputEscaping);
+ TemplateNode ret = new TextNode(disableOutputEscaping);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/TransformerFactoryImpl.java b/gnu/xml/transform/TransformerFactoryImpl.java
index 9c4d9da8a..dde2017ff 100644
--- a/gnu/xml/transform/TransformerFactoryImpl.java
+++ b/gnu/xml/transform/TransformerFactoryImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/TransformerImpl.java b/gnu/xml/transform/TransformerImpl.java
index c0af0fca4..a36aa6173 100644
--- a/gnu/xml/transform/TransformerImpl.java
+++ b/gnu/xml/transform/TransformerImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,7 +48,12 @@ import java.net.UnknownServiceException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Properties;
+import java.util.StringTokenizer;
+import javax.xml.namespace.QName;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Result;
@@ -101,7 +106,7 @@ class TransformerImpl
if (stylesheet != null)
{
// Set up parameter context for this transformer
- stylesheet.bindings.push(false);
+ stylesheet.bindings.push(Bindings.PARAM);
}
}
@@ -241,8 +246,10 @@ class TransformerImpl
boolean standalone =
"yes".equals(outputProperties.getProperty(OutputKeys.STANDALONE));
String mediaType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
- // TODO cdata-section-elements
- // TODO indent
+ String cdataSectionElements =
+ outputProperties.getProperty(OutputKeys.CDATA_SECTION_ELEMENTS);
+ boolean indent =
+ "yes".equals(outputProperties.getProperty(OutputKeys.INDENT));
if (created)
{
// Discover document element
@@ -309,6 +316,44 @@ class TransformerImpl
{
parent.setUserData("media-type", mediaType, stylesheet);
}
+ if (cdataSectionElements != null)
+ {
+ List list = new LinkedList();
+ StringTokenizer st = new StringTokenizer(cdataSectionElements);
+ while (st.hasMoreTokens())
+ {
+ String name = st.nextToken();
+ String localName = name;
+ String uri = null;
+ String prefix = null;
+ int ci = name.indexOf(':');
+ if (ci != -1)
+ {
+ // Use namespaces defined on xsl:output node to resolve
+ // namespaces for QName
+ prefix = name.substring(0, ci);
+ localName = name.substring(ci + 1);
+ uri = stylesheet.output.lookupNamespaceURI(prefix);
+ }
+ list.add(new QName(uri, localName, prefix));
+ }
+ if (!list.isEmpty())
+ {
+ Document resultDoc = (parent instanceof Document) ?
+ (Document) parent :
+ parent.getOwnerDocument();
+ convertCdataSectionElements(resultDoc, parent, list);
+ }
+ }
+ if (indent)
+ {
+ parent.normalize();
+ strip(parent);
+ Document resultDoc = (parent instanceof Document) ?
+ (Document) parent :
+ parent.getOwnerDocument();
+ reindent(resultDoc, parent, 0);
+ }
// Render result to the target device
if (outputTarget instanceof DOMResult)
{
@@ -407,12 +452,21 @@ class TransformerImpl
}
parent.removeChild(node);
}
- if (nt == Node.TEXT_NODE) // CDATA sections ?
+ if (nt == Node.TEXT_NODE || nt == Node.CDATA_SECTION_NODE)
{
if (!stylesheet.isPreserved((Text) node))
{
node.getParentNode().removeChild(node);
}
+ else
+ {
+ String text = node.getNodeValue();
+ String stripped = text.trim();
+ if (!text.equals(stripped))
+ {
+ node.setNodeValue(stripped);
+ }
+ }
}
else
{
@@ -505,7 +559,7 @@ class TransformerImpl
{
if (stylesheet != null)
{
- stylesheet.bindings.set(name, value, false);
+ stylesheet.bindings.set(new QName(null, name), value, Bindings.PARAM);
}
}
@@ -513,7 +567,7 @@ class TransformerImpl
{
if (stylesheet != null)
{
- return stylesheet.bindings.get(name, null, 1, 1);
+ return stylesheet.bindings.get(new QName(null, name), null, 1, 1);
}
return null;
}
@@ -522,8 +576,8 @@ class TransformerImpl
{
if (stylesheet != null)
{
- stylesheet.bindings.pop(false);
- stylesheet.bindings.push(false);
+ stylesheet.bindings.pop(Bindings.PARAM);
+ stylesheet.bindings.push(Bindings.PARAM);
}
}
@@ -577,4 +631,139 @@ class TransformerImpl
return errorListener;
}
+ static final String INDENT_WHITESPACE = " ";
+
+ /*
+ * Apply indent formatting to the given tree.
+ */
+ void reindent(Document doc, Node node, int offset)
+ {
+ if (node.hasChildNodes())
+ {
+ boolean markupContent = false;
+ boolean textContent = false;
+ List children = new LinkedList();
+ Node ctx = node.getFirstChild();
+ while (ctx != null)
+ {
+ switch (ctx.getNodeType())
+ {
+ case Node.ELEMENT_NODE:
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ case Node.DOCUMENT_TYPE_NODE:
+ markupContent = true;
+ break;
+ case Node.TEXT_NODE:
+ case Node.CDATA_SECTION_NODE:
+ case Node.ENTITY_REFERENCE_NODE:
+ case Node.COMMENT_NODE:
+ textContent = true;
+ break;
+ }
+ children.add(ctx);
+ ctx = ctx.getNextSibling();
+ }
+ if (markupContent)
+ {
+ if (textContent)
+ {
+ // XXX handle mixed content differently?
+ }
+ int nodeType = node.getNodeType();
+ if (nodeType == Node.DOCUMENT_NODE)
+ {
+ for (Iterator i = children.iterator(); i.hasNext(); )
+ {
+ ctx = (Node) i.next();
+ reindent(doc, ctx, offset + 1);
+ }
+ }
+ else
+ {
+ StringBuffer buf = new StringBuffer();
+ buf.append('\n');
+ for (int i = 0; i < offset + 1; i++)
+ {
+ buf.append(INDENT_WHITESPACE);
+ }
+ String ws = buf.toString();
+ for (Iterator i = children.iterator(); i.hasNext(); )
+ {
+ ctx = (Node) i.next();
+ node.insertBefore(doc.createTextNode(ws), ctx);
+ reindent(doc, ctx, offset + 1);
+ }
+ buf = new StringBuffer();
+ buf.append('\n');
+ ws = buf.toString();
+ for (int i = 0; i < offset; i++)
+ {
+ buf.append(INDENT_WHITESPACE);
+ }
+ node.appendChild(doc.createTextNode(ws));
+ }
+ }
+ }
+ }
+
+ /**
+ * Converts the text node children of any cdata-section-elements in the
+ * tree to CDATA section nodes.
+ */
+ void convertCdataSectionElements(Document doc, Node node, List list)
+ {
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ boolean match = false;
+ for (Iterator i = list.iterator(); i.hasNext(); )
+ {
+ QName qname = (QName) i.next();
+ if (match(qname, node))
+ {
+ match = true;
+ break;
+ }
+ }
+ if (match)
+ {
+ Node ctx = node.getFirstChild();
+ while (ctx != null)
+ {
+ if (ctx.getNodeType() == Node.TEXT_NODE)
+ {
+ Node cdata = doc.createCDATASection(ctx.getNodeValue());
+ node.replaceChild(cdata, ctx);
+ ctx = cdata;
+ }
+ ctx = ctx.getNextSibling();
+ }
+ }
+ }
+ Node ctx = node.getFirstChild();
+ while (ctx != null)
+ {
+ if (ctx.hasChildNodes())
+ {
+ convertCdataSectionElements(doc, ctx, list);
+ }
+ ctx = ctx.getNextSibling();
+ }
+ }
+
+ boolean match(QName qname, Node node)
+ {
+ String ln1 = qname.getLocalPart();
+ String ln2 = node.getLocalName();
+ if (ln2 == null)
+ {
+ return ln1.equals(node.getNodeName());
+ }
+ else
+ {
+ String uri1 = qname.getNamespaceURI();
+ String uri2 = node.getNamespaceURI();
+ return (uri1.equals(uri2) && ln1.equals(ln2));
+ }
+ }
+
}
diff --git a/gnu/xml/transform/TransformerOutputProperties.java b/gnu/xml/transform/TransformerOutputProperties.java
index d56e795f7..cc8593c46 100644
--- a/gnu/xml/transform/TransformerOutputProperties.java
+++ b/gnu/xml/transform/TransformerOutputProperties.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/URIResolverEntityResolver.java b/gnu/xml/transform/URIResolverEntityResolver.java
index ef2901524..762416fde 100644
--- a/gnu/xml/transform/URIResolverEntityResolver.java
+++ b/gnu/xml/transform/URIResolverEntityResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/UnparsedEntityUriFunction.java b/gnu/xml/transform/UnparsedEntityUriFunction.java
index 41a606e6e..92002f1f5 100644
--- a/gnu/xml/transform/UnparsedEntityUriFunction.java
+++ b/gnu/xml/transform/UnparsedEntityUriFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,7 +39,9 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.DocumentType;
@@ -114,5 +116,17 @@ final class UnparsedEntityUriFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/ValueOfNode.java b/gnu/xml/transform/ValueOfNode.java
index 9eb2fde5d..430598a94 100644
--- a/gnu/xml/transform/ValueOfNode.java
+++ b/gnu/xml/transform/ValueOfNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,8 @@ exception statement from your version. */
package gnu.xml.transform;
+import java.util.Collection;
+import java.util.Iterator;
import javax.xml.namespace.QName;
import javax.xml.transform.TransformerException;
import org.w3c.dom.Document;
@@ -56,22 +58,25 @@ final class ValueOfNode
final Expr select;
final boolean disableOutputEscaping;
- ValueOfNode(TemplateNode children, TemplateNode next, Expr select,
- boolean disableOutputEscaping)
+ ValueOfNode(Expr select, boolean disableOutputEscaping)
{
- super(children, next);
this.select = select;
this.disableOutputEscaping = disableOutputEscaping;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new ValueOfNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- select.clone(stylesheet),
- disableOutputEscaping);
+ TemplateNode ret = new ValueOfNode(select.clone(stylesheet),
+ disableOutputEscaping);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -80,8 +85,29 @@ final class ValueOfNode
throws TransformerException
{
Object ret = select.evaluate(context, pos, len);
- String value = Expr._string(context, ret);
- //System.err.println("value-of: "+context+" "+ select + " -> "+ value);
+ /*if (stylesheet.debug)
+ {
+ System.err.println("value-of: " + select + " -> " + ret);
+ }*/
+ String value;
+ if (ret instanceof Collection)
+ {
+ StringBuffer buf = new StringBuffer();
+ for (Iterator i = ((Collection) ret).iterator(); i.hasNext(); )
+ {
+ Node node = (Node) i.next();
+ buf.append(Expr.stringValue(node));
+ }
+ value = buf.toString();
+ }
+ else
+ {
+ value = Expr._string(context, ret);
+ }
+ if (stylesheet.debug)
+ {
+ System.err.println("value-of: "+context+" "+ select + " -> "+ value);
+ }
if (value != null && value.length() > 0)
{
Document doc = (parent instanceof Document) ?
@@ -109,6 +135,15 @@ final class ValueOfNode
}
}
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/WhenNode.java b/gnu/xml/transform/WhenNode.java
index f2204660a..231f2693b 100644
--- a/gnu/xml/transform/WhenNode.java
+++ b/gnu/xml/transform/WhenNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,19 +53,23 @@ final class WhenNode
final Expr test;
- WhenNode(TemplateNode children, TemplateNode next, Expr test)
+ WhenNode(Expr test)
{
- super(children, next);
this.test = test;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new WhenNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- test.clone(stylesheet));
+ TemplateNode ret = new WhenNode(test.clone(stylesheet));
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -97,6 +101,15 @@ final class WhenNode
}
}
+ public boolean references(QName var)
+ {
+ if (test != null && test.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/WithParam.java b/gnu/xml/transform/WithParam.java
index c8804f8b3..0fb09d61e 100644
--- a/gnu/xml/transform/WithParam.java
+++ b/gnu/xml/transform/WithParam.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,18 +55,18 @@ import gnu.xml.xpath.Expr;
final class WithParam
{
- final String name;
+ final QName name;
final Expr select;
final TemplateNode content;
- WithParam(String name, Expr select)
+ WithParam(QName name, Expr select)
{
this.name = name;
this.select = select;
content = null;
}
- WithParam(String name, TemplateNode content)
+ WithParam(QName name, TemplateNode content)
{
this.name = name;
this.content = content;
@@ -107,4 +107,17 @@ final class WithParam
}
}
+ boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ if (content != null && content.references(var))
+ {
+ return true;
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/XSLComparator.java b/gnu/xml/transform/XSLComparator.java
index 1b76ed6c3..222f370c8 100644
--- a/gnu/xml/transform/XSLComparator.java
+++ b/gnu/xml/transform/XSLComparator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/XSLURIResolver.java b/gnu/xml/transform/XSLURIResolver.java
index b8b7c71d0..6a49caab4 100644
--- a/gnu/xml/transform/XSLURIResolver.java
+++ b/gnu/xml/transform/XSLURIResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/DoParse.java b/gnu/xml/util/DoParse.java
index 6f255c804..5da086ed8 100644
--- a/gnu/xml/util/DoParse.java
+++ b/gnu/xml/util/DoParse.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/DomParser.java b/gnu/xml/util/DomParser.java
index 0a75d5498..b28b6103b 100644
--- a/gnu/xml/util/DomParser.java
+++ b/gnu/xml/util/DomParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/Resolver.java b/gnu/xml/util/Resolver.java
index 97256c3c8..e84b5ade1 100644
--- a/gnu/xml/util/Resolver.java
+++ b/gnu/xml/util/Resolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/SAXNullTransformerFactory.java b/gnu/xml/util/SAXNullTransformerFactory.java
index ef03d42fc..81ad82312 100644
--- a/gnu/xml/util/SAXNullTransformerFactory.java
+++ b/gnu/xml/util/SAXNullTransformerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/XCat.java b/gnu/xml/util/XCat.java
index 269c97bd6..0f1633870 100644
--- a/gnu/xml/util/XCat.java
+++ b/gnu/xml/util/XCat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/XHTMLWriter.java b/gnu/xml/util/XHTMLWriter.java
index c1502b701..272c66cd3 100644
--- a/gnu/xml/util/XHTMLWriter.java
+++ b/gnu/xml/util/XHTMLWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/XMLWriter.java b/gnu/xml/util/XMLWriter.java
index feb9e4f0a..fd36b7153 100644
--- a/gnu/xml/util/XMLWriter.java
+++ b/gnu/xml/util/XMLWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/AndExpr.java b/gnu/xml/xpath/AndExpr.java
index 91fb3bc72..dd2e1c9a1 100644
--- a/gnu/xml/xpath/AndExpr.java
+++ b/gnu/xml/xpath/AndExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -73,6 +74,11 @@ public final class AndExpr
return new AndExpr(lhs.clone(context), rhs.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
return lhs + " and " + rhs;
diff --git a/gnu/xml/xpath/ArithmeticExpr.java b/gnu/xml/xpath/ArithmeticExpr.java
index ad9da1ee7..3cef4adf3 100644
--- a/gnu/xml/xpath/ArithmeticExpr.java
+++ b/gnu/xml/xpath/ArithmeticExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -117,6 +118,11 @@ final class ArithmeticExpr
return new ArithmeticExpr(lhs.clone(context), rhs.clone(context), op);
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer();
diff --git a/gnu/xml/xpath/BooleanFunction.java b/gnu/xml/xpath/BooleanFunction.java
index df54ff52b..256de0382 100644
--- a/gnu/xml/xpath/BooleanFunction.java
+++ b/gnu/xml/xpath/BooleanFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -80,6 +81,11 @@ final class BooleanFunction
{
return new BooleanFunction(arg.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/CeilingFunction.java b/gnu/xml/xpath/CeilingFunction.java
index 8c0b8b13b..7db08fc5d 100644
--- a/gnu/xml/xpath/CeilingFunction.java
+++ b/gnu/xml/xpath/CeilingFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -74,6 +75,11 @@ final class CeilingFunction
{
return new CeilingFunction(arg.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/ConcatFunction.java b/gnu/xml/xpath/ConcatFunction.java
index 7c51f9d1c..fddd7ae25 100644
--- a/gnu/xml/xpath/ConcatFunction.java
+++ b/gnu/xml/xpath/ConcatFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,6 +40,7 @@ package gnu.xml.xpath;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -81,6 +82,18 @@ final class ConcatFunction
return new ConcatFunction(args2);
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer("concat(");
diff --git a/gnu/xml/xpath/Constant.java b/gnu/xml/xpath/Constant.java
index d38f7ea37..d5ca764a1 100644
--- a/gnu/xml/xpath/Constant.java
+++ b/gnu/xml/xpath/Constant.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -65,6 +66,11 @@ public final class Constant
return new Constant(value);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
String ret = value.toString();
diff --git a/gnu/xml/xpath/ContainsFunction.java b/gnu/xml/xpath/ContainsFunction.java
index 2a0d76da5..fc2f33faf 100644
--- a/gnu/xml/xpath/ContainsFunction.java
+++ b/gnu/xml/xpath/ContainsFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -78,6 +79,11 @@ final class ContainsFunction
return new ContainsFunction(arg1.clone(context), arg2.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var));
+ }
+
public String toString()
{
return "contains(" + arg1 + "," + arg2 + ")";
diff --git a/gnu/xml/xpath/CountFunction.java b/gnu/xml/xpath/CountFunction.java
index 33663c95e..cb534bffc 100644
--- a/gnu/xml/xpath/CountFunction.java
+++ b/gnu/xml/xpath/CountFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -74,6 +75,11 @@ final class CountFunction
return new CountFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "count(" + arg + ")";
diff --git a/gnu/xml/xpath/DocumentOrderComparator.java b/gnu/xml/xpath/DocumentOrderComparator.java
index 28d97eb84..c7d7de9f7 100644
--- a/gnu/xml/xpath/DocumentOrderComparator.java
+++ b/gnu/xml/xpath/DocumentOrderComparator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/EqualityExpr.java b/gnu/xml/xpath/EqualityExpr.java
index bedf1e974..6d00cee89 100644
--- a/gnu/xml/xpath/EqualityExpr.java
+++ b/gnu/xml/xpath/EqualityExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.Iterator;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -91,6 +92,10 @@ final class EqualityExpr
{
Collection lns = (Collection) left;
Collection rns = (Collection) right;
+ if (lns.isEmpty())
+ {
+ return false;
+ }
boolean all = true;
for (Iterator i = lns.iterator(); i.hasNext(); )
{
@@ -119,7 +124,7 @@ final class EqualityExpr
}
}
}
- return false;
+ return all;
}
/*
* If one object to be compared is a node-set and the other is a number,
@@ -243,6 +248,11 @@ final class EqualityExpr
return new EqualityExpr(lhs.clone(context), rhs.clone(context), invert);
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
if (invert)
diff --git a/gnu/xml/xpath/Expr.java b/gnu/xml/xpath/Expr.java
index fcfae52ad..b4b55dcf9 100644
--- a/gnu/xml/xpath/Expr.java
+++ b/gnu/xml/xpath/Expr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -177,6 +177,8 @@ public abstract class Expr
public abstract Object evaluate(Node context, int pos, int len);
public abstract Expr clone(Object context);
+
+ public abstract boolean references(QName var);
/* -- 4.1 Node Set Functions -- */
diff --git a/gnu/xml/xpath/FalseFunction.java b/gnu/xml/xpath/FalseFunction.java
index 85417a105..87660ec81 100644
--- a/gnu/xml/xpath/FalseFunction.java
+++ b/gnu/xml/xpath/FalseFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -58,6 +59,11 @@ final class FalseFunction
return new FalseFunction();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "false()";
diff --git a/gnu/xml/xpath/FloorFunction.java b/gnu/xml/xpath/FloorFunction.java
index dd9cd84c6..c03c0e7ed 100644
--- a/gnu/xml/xpath/FloorFunction.java
+++ b/gnu/xml/xpath/FloorFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -75,6 +76,11 @@ final class FloorFunction
return new FloorFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "floor(" + arg + ")";
diff --git a/gnu/xml/xpath/Function.java b/gnu/xml/xpath/Function.java
index d40dff610..aecd49d9c 100644
--- a/gnu/xml/xpath/Function.java
+++ b/gnu/xml/xpath/Function.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/FunctionCall.java b/gnu/xml/xpath/FunctionCall.java
index 35eacb516..669efbf18 100644
--- a/gnu/xml/xpath/FunctionCall.java
+++ b/gnu/xml/xpath/FunctionCall.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
@@ -129,6 +130,18 @@ public final class FunctionCall
return new FunctionCall(r, name, args2);
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer();
diff --git a/gnu/xml/xpath/IdFunction.java b/gnu/xml/xpath/IdFunction.java
index a32cb8903..749795419 100644
--- a/gnu/xml/xpath/IdFunction.java
+++ b/gnu/xml/xpath/IdFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -88,6 +89,11 @@ public final class IdFunction
return new IdFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "id(" + arg + ")";
diff --git a/gnu/xml/xpath/LangFunction.java b/gnu/xml/xpath/LangFunction.java
index d44c72c06..2c2506d1b 100644
--- a/gnu/xml/xpath/LangFunction.java
+++ b/gnu/xml/xpath/LangFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -102,6 +103,11 @@ final class LangFunction
return new IdFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "lang(" + arg + ")";
diff --git a/gnu/xml/xpath/LastFunction.java b/gnu/xml/xpath/LastFunction.java
index a7458a34a..751a0a9c1 100644
--- a/gnu/xml/xpath/LastFunction.java
+++ b/gnu/xml/xpath/LastFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -59,6 +60,11 @@ final class LastFunction
return new LastFunction();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "last()";
diff --git a/gnu/xml/xpath/LocalNameFunction.java b/gnu/xml/xpath/LocalNameFunction.java
index d91f97331..f8ace9cd5 100644
--- a/gnu/xml/xpath/LocalNameFunction.java
+++ b/gnu/xml/xpath/LocalNameFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -79,6 +80,11 @@ final class LocalNameFunction
arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
+
public String toString()
{
return (arg == null) ? "local-name()" : "local-name(" + arg + ")";
diff --git a/gnu/xml/xpath/NameFunction.java b/gnu/xml/xpath/NameFunction.java
index a42681dbd..dc5e61203 100644
--- a/gnu/xml/xpath/NameFunction.java
+++ b/gnu/xml/xpath/NameFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -86,6 +87,11 @@ final class NameFunction
return new NameFunction((arg == null) ? null :
arg.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/NameTest.java b/gnu/xml/xpath/NameTest.java
index ececc9297..c89ba4dd1 100644
--- a/gnu/xml/xpath/NameTest.java
+++ b/gnu/xml/xpath/NameTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -95,7 +95,9 @@ public final class NameTest
return true;
}
String uri = qName.getNamespaceURI();
- if (!equal(uri, node.getNamespaceURI()))
+ String nodeUri = node.getNamespaceURI();
+ String nodeLocalName = node.getLocalName();
+ if (nodeLocalName != null && !equal(uri, nodeUri))
{
return false;
}
@@ -104,7 +106,11 @@ public final class NameTest
return true;
}
String localName = qName.getLocalPart();
- return (localName.equals(node.getLocalName()));
+ if (nodeLocalName != null)
+ {
+ nodeLocalName = node.getNodeName();
+ }
+ return (localName.equals(nodeLocalName));
}
final boolean equal(String s1, String s2)
@@ -119,6 +125,11 @@ public final class NameTest
return new NameTest(qName, anyLocalName, any);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString ()
{
if (any)
diff --git a/gnu/xml/xpath/NamespaceTest.java b/gnu/xml/xpath/NamespaceTest.java
index bdfe96150..6d41166bc 100644
--- a/gnu/xml/xpath/NamespaceTest.java
+++ b/gnu/xml/xpath/NamespaceTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -98,7 +98,12 @@ public final class NamespaceTest
return true;
}
String localName = qName.getLocalPart();
- return (localName.equals(node.getLocalName()));
+ String nodeLocalName = node.getLocalName();
+ if (nodeLocalName == null)
+ {
+ nodeLocalName = node.getNodeName();
+ }
+ return (localName.equals(nodeLocalName));
}
public Test clone(Object context)
@@ -106,6 +111,11 @@ public final class NamespaceTest
return new NamespaceTest(qName, anyLocalName, any);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString ()
{
if (any)
diff --git a/gnu/xml/xpath/NamespaceUriFunction.java b/gnu/xml/xpath/NamespaceUriFunction.java
index ee8978ec7..e67ec4206 100644
--- a/gnu/xml/xpath/NamespaceUriFunction.java
+++ b/gnu/xml/xpath/NamespaceUriFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -78,6 +79,11 @@ final class NamespaceUriFunction
return new NamespaceUriFunction((arg == null) ? null :
arg.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/NegativeExpr.java b/gnu/xml/xpath/NegativeExpr.java
index 5d7c00d4d..9e24aff81 100644
--- a/gnu/xml/xpath/NegativeExpr.java
+++ b/gnu/xml/xpath/NegativeExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -67,6 +68,11 @@ final class NegativeExpr
return new NegativeExpr(expr.clone(context));
}
+ public boolean references(QName var)
+ {
+ return expr.references(var);
+ }
+
public String toString()
{
return "-" + expr;
diff --git a/gnu/xml/xpath/NodeTypeTest.java b/gnu/xml/xpath/NodeTypeTest.java
index d7798a266..807374132 100644
--- a/gnu/xml/xpath/NodeTypeTest.java
+++ b/gnu/xml/xpath/NodeTypeTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -106,6 +107,11 @@ public final class NodeTypeTest
return new NodeTypeTest(type, data);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
switch (type)
diff --git a/gnu/xml/xpath/NormalizeSpaceFunction.java b/gnu/xml/xpath/NormalizeSpaceFunction.java
index 2dabe1e5e..b7358e8d8 100644
--- a/gnu/xml/xpath/NormalizeSpaceFunction.java
+++ b/gnu/xml/xpath/NormalizeSpaceFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.List;
import java.util.StringTokenizer;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -91,6 +92,11 @@ final class NormalizeSpaceFunction
return new NormalizeSpaceFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
+
public String toString()
{
return (arg == null) ? "normalize-space()" : "normalize-space(" + arg + ")";
diff --git a/gnu/xml/xpath/NotFunction.java b/gnu/xml/xpath/NotFunction.java
index d7d1ad1a7..bbed66a73 100644
--- a/gnu/xml/xpath/NotFunction.java
+++ b/gnu/xml/xpath/NotFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -73,6 +74,11 @@ final class NotFunction
return new NotFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "not(" + arg + ")";
diff --git a/gnu/xml/xpath/NumberFunction.java b/gnu/xml/xpath/NumberFunction.java
index 943653381..79553ce81 100644
--- a/gnu/xml/xpath/NumberFunction.java
+++ b/gnu/xml/xpath/NumberFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -88,6 +89,11 @@ final class NumberFunction
return new NumberFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "number(" + arg + ")";
diff --git a/gnu/xml/xpath/OrExpr.java b/gnu/xml/xpath/OrExpr.java
index 4cfda4aad..1085f5112 100644
--- a/gnu/xml/xpath/OrExpr.java
+++ b/gnu/xml/xpath/OrExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -73,6 +74,11 @@ public final class OrExpr
return new OrExpr(lhs.clone(context), rhs.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
return lhs + " or " + rhs;
diff --git a/gnu/xml/xpath/ParenthesizedExpr.java b/gnu/xml/xpath/ParenthesizedExpr.java
index 6c2d5718a..f343857c3 100644
--- a/gnu/xml/xpath/ParenthesizedExpr.java
+++ b/gnu/xml/xpath/ParenthesizedExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -76,6 +77,11 @@ final class ParenthesizedExpr
return new ParenthesizedExpr(expr.clone(context));
}
+ public boolean references(QName var)
+ {
+ return expr.references(var);
+ }
+
public String toString()
{
return "(" + expr + ")";
diff --git a/gnu/xml/xpath/Path.java b/gnu/xml/xpath/Path.java
index 488215e51..4b01f0918 100644
--- a/gnu/xml/xpath/Path.java
+++ b/gnu/xml/xpath/Path.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/Pattern.java b/gnu/xml/xpath/Pattern.java
index dcce68f52..859ab5692 100644
--- a/gnu/xml/xpath/Pattern.java
+++ b/gnu/xml/xpath/Pattern.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,7 @@ package gnu.xml.xpath;
import org.w3c.dom.Node;
/**
- * Interface implemented by expressions that can for part of XSL patterns.
+ * Interface implemented by expressions that can form part of XSL patterns.
*
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
diff --git a/gnu/xml/xpath/PositionFunction.java b/gnu/xml/xpath/PositionFunction.java
index 6d6f7ad54..3060eeaed 100644
--- a/gnu/xml/xpath/PositionFunction.java
+++ b/gnu/xml/xpath/PositionFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -59,6 +60,11 @@ final class PositionFunction
return new PositionFunction();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "position()";
diff --git a/gnu/xml/xpath/Predicate.java b/gnu/xml/xpath/Predicate.java
index a857c16bb..5538c55aa 100644
--- a/gnu/xml/xpath/Predicate.java
+++ b/gnu/xml/xpath/Predicate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -70,6 +71,11 @@ class Predicate
{
return new Predicate(expr.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return expr.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/RelationalExpr.java b/gnu/xml/xpath/RelationalExpr.java
index fcdc932ab..5cbb6bb22 100644
--- a/gnu/xml/xpath/RelationalExpr.java
+++ b/gnu/xml/xpath/RelationalExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -93,6 +94,11 @@ final class RelationalExpr
return new RelationalExpr(lhs.clone(context), rhs.clone(context), lt, eq);
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
return lhs + " " + (lt ? "<" : ">") + (eq ? "=" : "") + " " + rhs;
diff --git a/gnu/xml/xpath/Root.java b/gnu/xml/xpath/Root.java
index b8fe5df29..1f79b3958 100644
--- a/gnu/xml/xpath/Root.java
+++ b/gnu/xml/xpath/Root.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.Collections;
+import javax.xml.namespace.QName;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -73,6 +74,11 @@ public final class Root
return new Root();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "/";
diff --git a/gnu/xml/xpath/RoundFunction.java b/gnu/xml/xpath/RoundFunction.java
index 76f5d8a80..bfbfd357d 100644
--- a/gnu/xml/xpath/RoundFunction.java
+++ b/gnu/xml/xpath/RoundFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -82,6 +83,11 @@ final class RoundFunction
return new RoundFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "round(" + arg + ")";
diff --git a/gnu/xml/xpath/Selector.java b/gnu/xml/xpath/Selector.java
index 5fd45b911..598038064 100644
--- a/gnu/xml/xpath/Selector.java
+++ b/gnu/xml/xpath/Selector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -44,6 +44,7 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
import org.w3c.dom.Attr;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -424,6 +425,18 @@ public final class Selector
return new Selector(axis, tests2);
}
+ public boolean references(QName var)
+ {
+ for (int i = 0; i < tests.length; i++)
+ {
+ if (tests[i].references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer();
@@ -436,7 +449,15 @@ public final class Selector
buf.append("ancestor-or-self::");
break;
case ATTRIBUTE:
- buf.append("attribute::");
+ if (tests.length == 0 ||
+ (tests[0] instanceof NameTest))
+ {
+ buf.append('@');
+ }
+ else
+ {
+ buf.append("attribute::");
+ }
break;
case CHILD:
//buf.append("child::");
diff --git a/gnu/xml/xpath/StartsWithFunction.java b/gnu/xml/xpath/StartsWithFunction.java
index c748295db..ec021551e 100644
--- a/gnu/xml/xpath/StartsWithFunction.java
+++ b/gnu/xml/xpath/StartsWithFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -78,6 +79,11 @@ final class StartsWithFunction
return new StartsWithFunction(arg1.clone(context), arg2.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var));
+ }
+
public String toString()
{
return "starts-with(" + arg1 + "," + arg2 + ")";
diff --git a/gnu/xml/xpath/Steps.java b/gnu/xml/xpath/Steps.java
index abd30e449..9ef6cd35f 100644
--- a/gnu/xml/xpath/Steps.java
+++ b/gnu/xml/xpath/Steps.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,6 +43,7 @@ import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.Set;
+import javax.xml.namespace.QName;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
@@ -219,6 +220,18 @@ public final class Steps
return new Steps(path2);
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = path.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer();
diff --git a/gnu/xml/xpath/StringFunction.java b/gnu/xml/xpath/StringFunction.java
index 658995c05..0a4c681d1 100644
--- a/gnu/xml/xpath/StringFunction.java
+++ b/gnu/xml/xpath/StringFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -105,6 +106,11 @@ final class StringFunction
arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
+
public String toString()
{
return (arg == null) ? "string()" : "string(" + arg + ")";
diff --git a/gnu/xml/xpath/StringLengthFunction.java b/gnu/xml/xpath/StringLengthFunction.java
index 7ed0463ae..7f5ceafee 100644
--- a/gnu/xml/xpath/StringLengthFunction.java
+++ b/gnu/xml/xpath/StringLengthFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -77,6 +78,11 @@ final class StringLengthFunction
arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
+
public String toString()
{
return (arg == null) ? "string-length()" : "string-length(" + arg + ")";
diff --git a/gnu/xml/xpath/SubstringAfterFunction.java b/gnu/xml/xpath/SubstringAfterFunction.java
index 90b6060b0..8144cf844 100644
--- a/gnu/xml/xpath/SubstringAfterFunction.java
+++ b/gnu/xml/xpath/SubstringAfterFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -84,6 +85,11 @@ final class SubstringAfterFunction
arg2.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var));
+ }
+
public String toString()
{
return "substring-after(" + arg1 + "," + arg2 + ")";
diff --git a/gnu/xml/xpath/SubstringBeforeFunction.java b/gnu/xml/xpath/SubstringBeforeFunction.java
index cadb77cad..2d92a3e03 100644
--- a/gnu/xml/xpath/SubstringBeforeFunction.java
+++ b/gnu/xml/xpath/SubstringBeforeFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -83,6 +84,11 @@ final class SubstringBeforeFunction
arg2.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var));
+ }
+
public String toString()
{
return "substring-before(" + arg1 + "," + arg2 + ")";
diff --git a/gnu/xml/xpath/SubstringFunction.java b/gnu/xml/xpath/SubstringFunction.java
index fdbbd06dd..d65c4facb 100644
--- a/gnu/xml/xpath/SubstringFunction.java
+++ b/gnu/xml/xpath/SubstringFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -113,6 +114,12 @@ final class SubstringFunction
(arg3 == null) ? null : arg3.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var) ||
+ (arg3 == null) ? false : arg3.references(var));
+ }
+
public String toString()
{
return (arg3 == null) ? "substring(" + arg1 + "," + arg2 + ")" :
diff --git a/gnu/xml/xpath/SumFunction.java b/gnu/xml/xpath/SumFunction.java
index 1501b46a0..93c2e806d 100644
--- a/gnu/xml/xpath/SumFunction.java
+++ b/gnu/xml/xpath/SumFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,6 +40,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -86,6 +87,11 @@ final class SumFunction
return new SumFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "sum(" + arg + ")";
diff --git a/gnu/xml/xpath/Test.java b/gnu/xml/xpath/Test.java
index 865461c72..94837ffac 100644
--- a/gnu/xml/xpath/Test.java
+++ b/gnu/xml/xpath/Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -52,4 +53,6 @@ public abstract class Test
public abstract Test clone(Object context);
+ public abstract boolean references(QName var);
+
}
diff --git a/gnu/xml/xpath/TranslateFunction.java b/gnu/xml/xpath/TranslateFunction.java
index b92ec3137..54e8b9c37 100644
--- a/gnu/xml/xpath/TranslateFunction.java
+++ b/gnu/xml/xpath/TranslateFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -117,6 +118,12 @@ final class TranslateFunction
return new TranslateFunction(arg1.clone(context), arg2.clone(context),
arg3.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var) ||
+ arg3.references(var));
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/TrueFunction.java b/gnu/xml/xpath/TrueFunction.java
index 2d47ed37a..6ad42d726 100644
--- a/gnu/xml/xpath/TrueFunction.java
+++ b/gnu/xml/xpath/TrueFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -58,6 +59,11 @@ final class TrueFunction
return new TrueFunction();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "true()";
diff --git a/gnu/xml/xpath/UnionExpr.java b/gnu/xml/xpath/UnionExpr.java
index 1b1344e1e..5078713b6 100644
--- a/gnu/xml/xpath/UnionExpr.java
+++ b/gnu/xml/xpath/UnionExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,6 +43,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -94,6 +95,11 @@ public final class UnionExpr
return new UnionExpr(lhs.clone(context), rhs.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
return lhs + " | " + rhs;
diff --git a/gnu/xml/xpath/VariableReference.java b/gnu/xml/xpath/VariableReference.java
index faa5bfa26..813a37f96 100644
--- a/gnu/xml/xpath/VariableReference.java
+++ b/gnu/xml/xpath/VariableReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,9 +47,9 @@ public class VariableReference
{
final XPathVariableResolver resolver;
- final String name;
+ final QName name;
- public VariableReference(XPathVariableResolver resolver, String name)
+ public VariableReference(XPathVariableResolver resolver, QName name)
{
this.resolver = resolver;
this.name = name;
@@ -64,8 +64,7 @@ public class VariableReference
// Needs context to operate properly
return ((Bindings) resolver).get(name, context, pos, len);
}
- QName qname = QName.valueOf(name);
- return resolver.resolveVariable(qname);
+ return resolver.resolveVariable(name);
}
throw new IllegalStateException("no variable resolver");
}
@@ -80,9 +79,22 @@ public class VariableReference
return new VariableReference(r, name);
}
+ public boolean references(QName var)
+ {
+ return name.equals(var);
+ }
+
public String toString()
{
- return "$" + name;
+ StringBuffer buf = new StringBuffer("$");
+ String prefix = name.getPrefix();
+ if (prefix != null && !"".equals(prefix))
+ {
+ buf.append(prefix);
+ buf.append(':');
+ }
+ buf.append(name.getLocalPart());
+ return buf.toString();
}
}
diff --git a/gnu/xml/xpath/XPathFactoryImpl.java b/gnu/xml/xpath/XPathFactoryImpl.java
index f9f70a3b7..45dc57ed1 100644
--- a/gnu/xml/xpath/XPathFactoryImpl.java
+++ b/gnu/xml/xpath/XPathFactoryImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/XPathImpl.java b/gnu/xml/xpath/XPathImpl.java
index 218936417..3511834ca 100644
--- a/gnu/xml/xpath/XPathImpl.java
+++ b/gnu/xml/xpath/XPathImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/XPathParser.java b/gnu/xml/xpath/XPathParser.java
index 188cfb5bf..624dcd8d4 100644
--- a/gnu/xml/xpath/XPathParser.java
+++ b/gnu/xml/xpath/XPathParser.java
@@ -1,48 +1,50 @@
// created by jay 0.8 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de
// line 2 "XPathParser.y"
-/* XPathParser.java -- An XPath 1.0 parser.
- Copyright (C) 2004 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
+/*
+ * XPathParser.java
+ * Copyright (C) 2004 The Free Software Foundation
+ *
+ * This file is part of GNU JAXP, a library.
+ *
+ * GNU JAXP is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GNU JAXP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under
+ * terms of your choice, provided that you also meet, for each linked
+ * independent module, the terms and conditions of the license of that
+ * module. An independent module is a module which is not derived from
+ * or based on this library. If you modify this library, you may extend
+ * this exception to your version of the library, but you are not
+ * obliged to do so. If you do not wish to do so, delete this
+ * exception statement from your version.
+ */
package gnu.xml.xpath;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunctionResolver;
@@ -205,7 +207,7 @@ public class XPathParser
return new FunctionCall(functionResolver, name, args);
}
- // line 210 "-"
+ // line 211 "-"
// %token constants
public static final int LITERAL = 257;
@@ -474,13 +476,13 @@ public class XPathParser
yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
switch (yyN) {
case 4:
- // line 276 "XPathParser.y"
+ // line 277 "XPathParser.y"
{
yyVal = new Root();
}
break;
case 5:
- // line 280 "XPathParser.y"
+ // line 281 "XPathParser.y"
{
Steps steps;
if (yyVals[0+yyTop] instanceof Steps)
@@ -498,7 +500,7 @@ case 5:
}
break;
case 6:
- // line 296 "XPathParser.y"
+ // line 297 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -521,7 +523,7 @@ case 6:
}
break;
case 8:
- // line 321 "XPathParser.y"
+ // line 322 "XPathParser.y"
{
Steps steps;
if (yyVals[-2+yyTop] instanceof Steps)
@@ -539,7 +541,7 @@ case 8:
}
break;
case 9:
- // line 337 "XPathParser.y"
+ // line 338 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -562,37 +564,37 @@ case 9:
}
break;
case 10:
- // line 361 "XPathParser.y"
+ // line 362 "XPathParser.y"
{
yyVal = new Selector (Selector.CHILD, (List) yyVals[0+yyTop]);
}
break;
case 11:
- // line 365 "XPathParser.y"
+ // line 366 "XPathParser.y"
{
yyVal = new Selector (Selector.ATTRIBUTE, (List) yyVals[0+yyTop]);
}
break;
case 12:
- // line 369 "XPathParser.y"
+ // line 370 "XPathParser.y"
{
yyVal = new Selector (((Integer) yyVals[-2+yyTop]).intValue (), (List) yyVals[0+yyTop]);
}
break;
case 13:
- // line 373 "XPathParser.y"
+ // line 374 "XPathParser.y"
{
yyVal = new Selector (Selector.SELF, Collections.EMPTY_LIST);
}
break;
case 14:
- // line 377 "XPathParser.y"
+ // line 378 "XPathParser.y"
{
yyVal = new Selector (Selector.PARENT, Collections.EMPTY_LIST);
}
break;
case 15:
- // line 384 "XPathParser.y"
+ // line 385 "XPathParser.y"
{
List list = new ArrayList();
list.add(yyVals[0+yyTop]);
@@ -600,7 +602,7 @@ case 15:
}
break;
case 16:
- // line 390 "XPathParser.y"
+ // line 391 "XPathParser.y"
{
List list = (List)yyVals[-1+yyTop];
list.add(yyVals[0+yyTop]);
@@ -608,133 +610,133 @@ case 16:
}
break;
case 17:
- // line 414 "XPathParser.y"
+ // line 415 "XPathParser.y"
{
yyVal = new Integer(Selector.ANCESTOR);
}
break;
case 18:
- // line 418 "XPathParser.y"
+ // line 419 "XPathParser.y"
{
yyVal = new Integer(Selector.ANCESTOR_OR_SELF);
}
break;
case 19:
- // line 422 "XPathParser.y"
+ // line 423 "XPathParser.y"
{
yyVal = new Integer(Selector.ATTRIBUTE);
}
break;
case 20:
- // line 426 "XPathParser.y"
+ // line 427 "XPathParser.y"
{
yyVal = new Integer(Selector.CHILD);
}
break;
case 21:
- // line 430 "XPathParser.y"
+ // line 431 "XPathParser.y"
{
yyVal = new Integer(Selector.DESCENDANT);
}
break;
case 22:
- // line 434 "XPathParser.y"
+ // line 435 "XPathParser.y"
{
yyVal = new Integer(Selector.DESCENDANT_OR_SELF);
}
break;
case 23:
- // line 438 "XPathParser.y"
+ // line 439 "XPathParser.y"
{
yyVal = new Integer(Selector.FOLLOWING);
}
break;
case 24:
- // line 442 "XPathParser.y"
+ // line 443 "XPathParser.y"
{
yyVal = new Integer(Selector.FOLLOWING_SIBLING);
}
break;
case 25:
- // line 446 "XPathParser.y"
+ // line 447 "XPathParser.y"
{
yyVal = new Integer(Selector.NAMESPACE);
}
break;
case 26:
- // line 450 "XPathParser.y"
+ // line 451 "XPathParser.y"
{
yyVal = new Integer(Selector.PARENT);
}
break;
case 27:
- // line 454 "XPathParser.y"
+ // line 455 "XPathParser.y"
{
yyVal = new Integer(Selector.PRECEDING);
}
break;
case 28:
- // line 458 "XPathParser.y"
+ // line 459 "XPathParser.y"
{
yyVal = new Integer(Selector.PRECEDING_SIBLING);
}
break;
case 29:
- // line 462 "XPathParser.y"
+ // line 463 "XPathParser.y"
{
yyVal = new Integer(Selector.SELF);
}
break;
case 31:
- // line 471 "XPathParser.y"
+ // line 472 "XPathParser.y"
{
yyVal = new NodeTypeTest(Node.PROCESSING_INSTRUCTION_NODE, (String) yyVals[-1+yyTop]);
}
break;
case 32:
- // line 476 "XPathParser.y"
+ // line 477 "XPathParser.y"
{
yyVal = new NodeTypeTest(((Short) yyVals[-1+yyTop]).shortValue());
}
break;
case 33:
- // line 483 "XPathParser.y"
+ // line 484 "XPathParser.y"
{
yyVal = new Predicate((Expr) yyVals[-1+yyTop]);
}
break;
case 35:
- // line 491 "XPathParser.y"
+ // line 492 "XPathParser.y"
{
yyVal = new ParenthesizedExpr((Expr) yyVals[-1+yyTop]);
}
break;
case 36:
- // line 495 "XPathParser.y"
+ // line 496 "XPathParser.y"
{
yyVal = new Constant(yyVals[0+yyTop]);
}
break;
case 37:
- // line 499 "XPathParser.y"
+ // line 500 "XPathParser.y"
{
yyVal = new Constant(yyVals[0+yyTop]);
}
break;
case 39:
- // line 507 "XPathParser.y"
+ // line 508 "XPathParser.y"
{
yyVal = lookupFunction((String) yyVals[-2+yyTop], Collections.EMPTY_LIST);
}
break;
case 40:
- // line 511 "XPathParser.y"
+ // line 512 "XPathParser.y"
{
yyVal = lookupFunction((String) yyVals[-3+yyTop], (List) yyVals[-1+yyTop]);
}
break;
case 41:
- // line 518 "XPathParser.y"
+ // line 519 "XPathParser.y"
{
List list = new ArrayList();
list.add(yyVals[0+yyTop]);
@@ -742,7 +744,7 @@ case 41:
}
break;
case 42:
- // line 524 "XPathParser.y"
+ // line 525 "XPathParser.y"
{
List list = (List) yyVals[0+yyTop];
list.add(0, yyVals[-2+yyTop]);
@@ -750,13 +752,13 @@ case 42:
}
break;
case 44:
- // line 534 "XPathParser.y"
+ // line 535 "XPathParser.y"
{
yyVal = new UnionExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 47:
- // line 543 "XPathParser.y"
+ // line 544 "XPathParser.y"
{
Steps steps;
if (yyVals[0+yyTop] instanceof Steps)
@@ -774,7 +776,7 @@ case 47:
}
break;
case 48:
- // line 559 "XPathParser.y"
+ // line 560 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -797,7 +799,7 @@ case 48:
}
break;
case 50:
- // line 584 "XPathParser.y"
+ // line 585 "XPathParser.y"
{
Predicate filter = (Predicate) yyVals[0+yyTop];
Selector s = new Selector(Selector.SELF,
@@ -818,170 +820,171 @@ case 50:
}
break;
case 52:
- // line 607 "XPathParser.y"
+ // line 608 "XPathParser.y"
{
yyVal = new OrExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 54:
- // line 615 "XPathParser.y"
+ // line 616 "XPathParser.y"
{
yyVal = new AndExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 56:
- // line 623 "XPathParser.y"
+ // line 624 "XPathParser.y"
{
yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false);
}
break;
case 57:
- // line 627 "XPathParser.y"
+ // line 628 "XPathParser.y"
{
yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true);
}
break;
case 59:
- // line 635 "XPathParser.y"
+ // line 636 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, false);
}
break;
case 60:
- // line 639 "XPathParser.y"
+ // line 640 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, false);
}
break;
case 61:
- // line 643 "XPathParser.y"
+ // line 644 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, true);
}
break;
case 62:
- // line 647 "XPathParser.y"
+ // line 648 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, true);
}
break;
case 64:
- // line 655 "XPathParser.y"
+ // line 656 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.ADD);
}
break;
case 65:
- // line 659 "XPathParser.y"
+ // line 660 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.SUBTRACT);
}
break;
case 67:
- // line 667 "XPathParser.y"
+ // line 668 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MULTIPLY);
}
break;
case 68:
- // line 671 "XPathParser.y"
+ // line 672 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.DIVIDE);
}
break;
case 69:
- // line 675 "XPathParser.y"
+ // line 676 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MODULO);
}
break;
case 71:
- // line 683 "XPathParser.y"
+ // line 684 "XPathParser.y"
{
yyVal = new NegativeExpr((Expr) yyVals[0+yyTop]);
}
break;
case 72:
- // line 690 "XPathParser.y"
+ // line 691 "XPathParser.y"
{
yyVal = new Double((String) yyVals[0+yyTop] + ".0");
}
break;
case 73:
- // line 694 "XPathParser.y"
+ // line 695 "XPathParser.y"
{
yyVal = new Double((String) yyVals[-1+yyTop] + ".0");
}
break;
case 74:
- // line 698 "XPathParser.y"
+ // line 699 "XPathParser.y"
{
yyVal = new Double((String) yyVals[-2+yyTop] + "." + (String) yyVals[0+yyTop]);
}
break;
case 75:
- // line 702 "XPathParser.y"
+ // line 703 "XPathParser.y"
{
yyVal = new Double("0." + (String) yyVals[0+yyTop]);
}
break;
case 77:
- // line 731 "XPathParser.y"
+ // line 732 "XPathParser.y"
{
- yyVal = new VariableReference(variableResolver, (String) yyVals[0+yyTop]);
+ String name = (String) yyVals[0+yyTop];
+ yyVal = new VariableReference(variableResolver, getQName(name));
}
break;
case 78:
- // line 738 "XPathParser.y"
+ // line 740 "XPathParser.y"
{
yyVal = new NameTest(null, true, true);
}
break;
case 79:
- // line 742 "XPathParser.y"
+ // line 744 "XPathParser.y"
{
QName qName = getQName((String) yyVals[-2+yyTop]);
yyVal = new NameTest(qName, true, false);
}
break;
case 80:
- // line 747 "XPathParser.y"
+ // line 749 "XPathParser.y"
{
QName qName = getQName((String) yyVals[0+yyTop]);
yyVal = new NameTest(qName, false, false);
}
break;
case 82:
- // line 756 "XPathParser.y"
+ // line 758 "XPathParser.y"
{
yyVal = (String) yyVals[-2+yyTop] + ':' + (String) yyVals[0+yyTop];
}
break;
case 83:
- // line 763 "XPathParser.y"
+ // line 765 "XPathParser.y"
{
yyVal = new Short(Node.COMMENT_NODE);
}
break;
case 84:
- // line 767 "XPathParser.y"
+ // line 769 "XPathParser.y"
{
yyVal = new Short(Node.TEXT_NODE);
}
break;
case 85:
- // line 771 "XPathParser.y"
+ // line 773 "XPathParser.y"
{
yyVal = new Short(Node.PROCESSING_INSTRUCTION_NODE);
}
break;
case 86:
- // line 775 "XPathParser.y"
+ // line 777 "XPathParser.y"
{
yyVal = new Short((short) 0);
}
break;
- // line 986 "-"
+ // line 988 "-"
}
yyTop -= YyLenClass.yyLen[yyN];
yyState = yyStates[yyTop];
@@ -1455,7 +1458,7 @@ case 86:
} /* End of class YyNameClass */
- // line 781 "XPathParser.y"
+ // line 783 "XPathParser.y"
}
- // line 1461 "-"
+ // line 1463 "-"
diff --git a/gnu/xml/xpath/XPathParser.y b/gnu/xml/xpath/XPathParser.y
index 8af7cb83d..d7dc4f1e8 100644
--- a/gnu/xml/xpath/XPathParser.y
+++ b/gnu/xml/xpath/XPathParser.y
@@ -1,40 +1,41 @@
%{
-/* XPathParser.java -- An XPath 1.0 parser.
- Copyright (C) 2004 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
+/*
+ * XPathParser.java
+ * Copyright (C) 2004 The Free Software Foundation
+ *
+ * This file is part of GNU JAXP, a library.
+ *
+ * GNU JAXP is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GNU JAXP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under
+ * terms of your choice, provided that you also meet, for each linked
+ * independent module, the terms and conditions of the license of that
+ * module. An independent module is a module which is not derived from
+ * or based on this library. If you modify this library, you may extend
+ * this exception to your version of the library, but you are not
+ * obliged to do so. If you do not wish to do so, delete this
+ * exception statement from your version.
+ */
package gnu.xml.xpath;
@@ -729,7 +730,8 @@ function_name:
variable_reference:
DOLLAR qname
{
- $$ = new VariableReference(variableResolver, (String) $2);
+ String name = (String) $2;
+ $$ = new VariableReference(variableResolver, getQName(name));
}
;
diff --git a/gnu/xml/xpath/XPathTokenizer.java b/gnu/xml/xpath/XPathTokenizer.java
index 6bf31fdbc..a28713782 100644
--- a/gnu/xml/xpath/XPathTokenizer.java
+++ b/gnu/xml/xpath/XPathTokenizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/include/.cvsignore b/include/.cvsignore
index d2930d2c2..c16eccb69 100644
--- a/include/.cvsignore
+++ b/include/.cvsignore
@@ -4,6 +4,5 @@ stamp-h
config.h
stamp-h.in
config.h.in
-jni.h
jni_md.h
stamp-h1
diff --git a/include/Makefile.am b/include/Makefile.am
index 512b038c3..7b698e63b 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -58,7 +58,6 @@ $(top_srcdir)/include/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.h \
$(top_srcdir)/include/gnu_java_awt_peer_gtk_GtkScrollPanePeer.h \
$(top_srcdir)/include/gnu_java_awt_peer_gtk_GtkScrollbarPeer.h \
$(top_srcdir)/include/gnu_java_awt_peer_gtk_GtkTextAreaPeer.h \
-$(top_srcdir)/include/gnu_java_awt_peer_gtk_GtkTextComponentPeer.h \
$(top_srcdir)/include/gnu_java_awt_peer_gtk_GtkTextFieldPeer.h \
$(top_srcdir)/include/gnu_java_awt_peer_gtk_GtkToolkit.h \
$(top_srcdir)/include/gnu_java_awt_peer_gtk_GtkWindowPeer.h \
diff --git a/include/gnu_java_awt_peer_gtk_GdkGraphics.h b/include/gnu_java_awt_peer_gtk_GdkGraphics.h
index aa2a29873..009fa3fc9 100644
--- a/include/gnu_java_awt_peer_gtk_GdkGraphics.h
+++ b/include/gnu_java_awt_peer_gtk_GdkGraphics.h
@@ -10,6 +10,7 @@ extern "C"
{
#endif
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_initStaticState (JNIEnv *env, jclass);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__Lgnu_java_awt_peer_gtk_GtkComponentPeer_2 (JNIEnv *env, jobject, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__II (JNIEnv *env, jobject, jint, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics_initFromImage (JNIEnv *env, jobject, jobject);
diff --git a/include/gnu_java_awt_peer_gtk_GdkGraphics2D.h b/include/gnu_java_awt_peer_gtk_GdkGraphics2D.h
index 9afe9366a..0f9d04fb7 100644
--- a/include/gnu_java_awt_peer_gtk_GdkGraphics2D.h
+++ b/include/gnu_java_awt_peer_gtk_GdkGraphics2D.h
@@ -26,8 +26,7 @@ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSave (JNIEn
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRestore (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetMatrix (JNIEnv *env, jobject, jdoubleArray);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetOperator (JNIEnv *env, jobject, jint);
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetRGBColor (JNIEnv *env, jobject, jdouble, jdouble, jdouble);
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetAlpha (JNIEnv *env, jobject, jdouble);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetRGBAColor (JNIEnv *env, jobject, jdouble, jdouble, jdouble, jdouble);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetFillRule (JNIEnv *env, jobject, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineWidth (JNIEnv *env, jobject, jdouble);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineCap (JNIEnv *env, jobject, jint);
diff --git a/include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h b/include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h
index 8006a36ba..6f30a3c5b 100644
--- a/include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h
+++ b/include/gnu_java_awt_peer_gtk_GdkPixbufDecoder.h
@@ -13,7 +13,8 @@ extern "C"
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_initStaticState (JNIEnv *env, jclass);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_initState (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_pumpBytes (JNIEnv *env, jobject, jbyteArray, jint);
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_finish (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_pumpDone (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_finish (JNIEnv *env, jobject, jboolean);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_streamImage (JNIEnv *env, jclass, jintArray, jstring, jint, jint, jboolean, jobject);
#ifdef __cplusplus
diff --git a/include/gnu_java_awt_peer_gtk_GtkChoicePeer.h b/include/gnu_java_awt_peer_gtk_GtkChoicePeer.h
index edccf6b46..5ca5aeaae 100644
--- a/include/gnu_java_awt_peer_gtk_GtkChoicePeer.h
+++ b/include/gnu_java_awt_peer_gtk_GtkChoicePeer.h
@@ -16,6 +16,7 @@ JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeGetSelecte
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeAdd (JNIEnv *env, jobject, jstring, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemove (JNIEnv *env, jobject, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemoveAll (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkChoicePeer_connectSignals (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkChoicePeer_select (JNIEnv *env, jobject, jint);
#ifdef __cplusplus
diff --git a/include/gnu_java_awt_peer_gtk_GtkComponentPeer.h b/include/gnu_java_awt_peer_gtk_GtkComponentPeer.h
index bc7672999..ea0e8224c 100644
--- a/include/gnu_java_awt_peer_gtk_GtkComponentPeer.h
+++ b/include/gnu_java_awt_peer_gtk_GtkComponentPeer.h
@@ -25,6 +25,7 @@ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetP
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetRequestFocus (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetDispatchKeyEvent (JNIEnv *env, jobject, jint, jlong, jint, jint, jint);
JNIEXPORT jboolean JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_isRealized (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeEventMask (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeBounds (JNIEnv *env, jobject, jint, jint, jint, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_hide (JNIEnv *env, jobject);
diff --git a/include/gnu_java_awt_peer_gtk_GtkImage.h b/include/gnu_java_awt_peer_gtk_GtkImage.h
index 5304ecda8..7aa1827c8 100644
--- a/include/gnu_java_awt_peer_gtk_GtkImage.h
+++ b/include/gnu_java_awt_peer_gtk_GtkImage.h
@@ -1,42 +1,26 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+
#ifndef __gnu_java_awt_peer_gtk_GtkImage__
#define __gnu_java_awt_peer_gtk_GtkImage__
+
#include <jni.h>
#ifdef __cplusplus
-
-extern "C" {
+extern "C"
+{
#endif
-JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_getPixels
- (JNIEnv *, jobject);
-
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_setPixels
- (JNIEnv *, jobject, jintArray);
-
-JNIEXPORT jboolean JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_loadPixbuf
- (JNIEnv *, jobject, jstring);
-
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_createPixmap
- (JNIEnv *, jobject);
-
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_freePixmap
- (JNIEnv *, jobject);
-
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_createScaledPixmap
- (JNIEnv *, jobject, jobject, jint);
-
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaled
- (JNIEnv *, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jboolean);
-
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaledFlipped
- (JNIEnv *, jobject, jobject, jint, jint, jint,
- jboolean, jboolean,
- jint, jint, jint, jint,
- jint, jint, jint, jint,
- jboolean);
+JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_getPixels (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_setPixels (JNIEnv *env, jobject, jintArray);
+JNIEXPORT jboolean JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_loadPixbuf (JNIEnv *env, jobject, jstring);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_createPixmap (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_freePixmap (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_createScaledPixmap (JNIEnv *env, jobject, jobject, jint);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaled (JNIEnv *env, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jboolean);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaledFlipped (JNIEnv *env, jobject, jobject, jint, jint, jint, jboolean, jboolean, jint, jint, jint, jint, jint, jint, jint, jint, jboolean);
#ifdef __cplusplus
}
#endif
-#endif
+#endif /* __gnu_java_awt_peer_gtk_GtkImage__ */
diff --git a/include/gnu_java_awt_peer_gtk_GtkPanelPeer.h b/include/gnu_java_awt_peer_gtk_GtkPanelPeer.h
index 19643a455..7498a97d9 100644
--- a/include/gnu_java_awt_peer_gtk_GtkPanelPeer.h
+++ b/include/gnu_java_awt_peer_gtk_GtkPanelPeer.h
@@ -11,6 +11,7 @@ extern "C"
#endif
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkPanelPeer_create (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkPanelPeer_connectSignals (JNIEnv *env, jobject);
#ifdef __cplusplus
}
diff --git a/include/gnu_java_awt_peer_gtk_GtkTextAreaPeer.h b/include/gnu_java_awt_peer_gtk_GtkTextAreaPeer.h
index 46252bd81..d5f300538 100644
--- a/include/gnu_java_awt_peer_gtk_GtkTextAreaPeer.h
+++ b/include/gnu_java_awt_peer_gtk_GtkTextAreaPeer.h
@@ -13,6 +13,15 @@ extern "C"
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_create (JNIEnv *env, jobject, jint, jint, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_gtkWidgetModifyFont (JNIEnv *env, jobject, jstring, jint, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_gtkWidgetRequestFocus (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_connectSignals (JNIEnv *env, jobject);
+JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getCaretPosition (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_setCaretPosition (JNIEnv *env, jobject, jint);
+JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getSelectionStart (JNIEnv *env, jobject);
+JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getSelectionEnd (JNIEnv *env, jobject);
+JNIEXPORT jstring JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getText (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_select (JNIEnv *env, jobject, jint, jint);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_setEditable (JNIEnv *env, jobject, jboolean);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_setText (JNIEnv *env, jobject, jstring);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_insert (JNIEnv *env, jobject, jstring, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_replaceRange (JNIEnv *env, jobject, jstring, jint, jint);
JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getHScrollbarHeight (JNIEnv *env, jobject);
diff --git a/include/gnu_java_awt_peer_gtk_GtkTextComponentPeer.h b/include/gnu_java_awt_peer_gtk_GtkTextComponentPeer.h
deleted file mode 100644
index 0972bf118..000000000
--- a/include/gnu_java_awt_peer_gtk_GtkTextComponentPeer.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-
-#ifndef __gnu_java_awt_peer_gtk_GtkTextComponentPeer__
-#define __gnu_java_awt_peer_gtk_GtkTextComponentPeer__
-
-#include <jni.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_connectSignals (JNIEnv *env, jobject);
-JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getCaretPosition (JNIEnv *env, jobject);
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setCaretPosition (JNIEnv *env, jobject, jint);
-JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionStart (JNIEnv *env, jobject);
-JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionEnd (JNIEnv *env, jobject);
-JNIEXPORT jstring JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getText (JNIEnv *env, jobject);
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_select (JNIEnv *env, jobject, jint, jint);
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setEditable (JNIEnv *env, jobject, jboolean);
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setText (JNIEnv *env, jobject, jstring);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gnu_java_awt_peer_gtk_GtkTextComponentPeer__ */
diff --git a/include/gnu_java_awt_peer_gtk_GtkTextFieldPeer.h b/include/gnu_java_awt_peer_gtk_GtkTextFieldPeer.h
index 04499564d..a3b3c4dcd 100644
--- a/include/gnu_java_awt_peer_gtk_GtkTextFieldPeer.h
+++ b/include/gnu_java_awt_peer_gtk_GtkTextFieldPeer.h
@@ -13,6 +13,15 @@ extern "C"
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_create (JNIEnv *env, jobject, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkWidgetSetBackground (JNIEnv *env, jobject, jint, jint, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkWidgetSetForeground (JNIEnv *env, jobject, jint, jint, jint);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_connectSignals (JNIEnv *env, jobject);
+JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_getCaretPosition (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setCaretPosition (JNIEnv *env, jobject, jint);
+JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_getSelectionStart (JNIEnv *env, jobject);
+JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_getSelectionEnd (JNIEnv *env, jobject);
+JNIEXPORT jstring JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_getText (JNIEnv *env, jobject);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_select (JNIEnv *env, jobject, jint, jint);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setEditable (JNIEnv *env, jobject, jboolean);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setText (JNIEnv *env, jobject, jstring);
JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkEntryGetBorderWidth (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkWidgetModifyFont (JNIEnv *env, jobject, jstring, jint, jint);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setEchoChar (JNIEnv *env, jobject, jchar);
diff --git a/include/gnu_java_awt_peer_gtk_GtkWindowPeer.h b/include/gnu_java_awt_peer_gtk_GtkWindowPeer.h
index d228bc8bb..56fa79c27 100644
--- a/include/gnu_java_awt_peer_gtk_GtkWindowPeer.h
+++ b/include/gnu_java_awt_peer_gtk_GtkWindowPeer.h
@@ -13,6 +13,7 @@ extern "C"
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkWindowPeer_gtkWindowSetTitle (JNIEnv *env, jobject, jstring);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkWindowPeer_gtkWindowSetResizable (JNIEnv *env, jobject, jboolean);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkWindowPeer_gtkWindowSetModal (JNIEnv *env, jobject, jboolean);
+JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkWindowPeer_realize (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkWindowPeer_create (JNIEnv *env, jobject, jint, jboolean, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkWindowPeer_toBack (JNIEnv *env, jobject);
diff --git a/include/gnu_java_nio_channels_FileChannelImpl.h b/include/gnu_java_nio_channels_FileChannelImpl.h
index 514c1b38b..1e09c09dd 100644
--- a/include/gnu_java_nio_channels_FileChannelImpl.h
+++ b/include/gnu_java_nio_channels_FileChannelImpl.h
@@ -24,6 +24,7 @@ JNIEXPORT jint JNICALL Java_gnu_java_nio_channels_FileChannelImpl_read___3BII (J
JNIEXPORT void JNICALL Java_gnu_java_nio_channels_FileChannelImpl_write___3BII (JNIEnv *env, jobject, jbyteArray, jint, jint);
JNIEXPORT void JNICALL Java_gnu_java_nio_channels_FileChannelImpl_write__I (JNIEnv *env, jobject, jint);
JNIEXPORT jobject JNICALL Java_gnu_java_nio_channels_FileChannelImpl_mapImpl (JNIEnv *env, jobject, jchar, jlong, jint);
+JNIEXPORT void JNICALL Java_gnu_java_nio_channels_FileChannelImpl_force (JNIEnv *env, jobject);
JNIEXPORT jboolean JNICALL Java_gnu_java_nio_channels_FileChannelImpl_lock (JNIEnv *env, jobject, jlong, jlong, jboolean, jboolean);
#undef gnu_java_nio_channels_FileChannelImpl_READ
#define gnu_java_nio_channels_FileChannelImpl_READ 1L
diff --git a/include/java_nio_VMDirectByteBuffer.h b/include/java_nio_VMDirectByteBuffer.h
index 4c52a9af7..408426a2d 100644
--- a/include/java_nio_VMDirectByteBuffer.h
+++ b/include/java_nio_VMDirectByteBuffer.h
@@ -15,7 +15,8 @@ JNIEXPORT jobject JNICALL Java_java_nio_VMDirectByteBuffer_allocate (JNIEnv *env
JNIEXPORT void JNICALL Java_java_nio_VMDirectByteBuffer_free (JNIEnv *env, jclass, jobject);
JNIEXPORT jbyte JNICALL Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_RawData_2I (JNIEnv *env, jclass, jobject, jint);
JNIEXPORT void JNICALL Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_RawData_2I_3BII (JNIEnv *env, jclass, jobject, jint, jbyteArray, jint, jint);
-JNIEXPORT void JNICALL Java_java_nio_VMDirectByteBuffer_put (JNIEnv *env, jclass, jobject, jint, jbyte);
+JNIEXPORT void JNICALL Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2IB (JNIEnv *env, jclass, jobject, jint, jbyte);
+JNIEXPORT void JNICALL Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2I_3BII (JNIEnv *env, jclass, jobject, jint, jbyteArray, jint, jint);
JNIEXPORT jobject JNICALL Java_java_nio_VMDirectByteBuffer_adjustAddress (JNIEnv *env, jclass, jobject, jint);
JNIEXPORT void JNICALL Java_java_nio_VMDirectByteBuffer_shiftDown (JNIEnv *env, jclass, jobject, jint, jint, jint);
diff --git a/include/jni.h b/include/jni.h
index 743f7df43..8ebf3f7f7 100644
--- a/include/jni.h
+++ b/include/jni.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/include/jni_md-x86-linux-gnu.h b/include/jni_md-x86-linux-gnu.h
index 47cef3eec..989dbfe92 100644
--- a/include/jni_md-x86-linux-gnu.h
+++ b/include/jni_md-x86-linux-gnu.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
diff --git a/java/applet/Applet.java b/java/applet/Applet.java
index 3adc5ce0a..d0610ba0e 100644
--- a/java/applet/Applet.java
+++ b/java/applet/Applet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package java.applet;
+import java.awt.Component;
import java.awt.Dimension;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
diff --git a/java/applet/AppletContext.java b/java/applet/AppletContext.java
index 1e7053754..5b6ce4524 100644
--- a/java/applet/AppletContext.java
+++ b/java/applet/AppletContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/applet/AppletStub.java b/java/applet/AppletStub.java
index 44722cc61..879a01638 100644
--- a/java/applet/AppletStub.java
+++ b/java/applet/AppletStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/applet/AudioClip.java b/java/applet/AudioClip.java
index 531ab1739..eeafa8aa7 100644
--- a/java/applet/AudioClip.java
+++ b/java/applet/AudioClip.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/applet/package.html b/java/applet/package.html
index 0f3c6db28..f2cbc5726 100644
--- a/java/applet/package.html
+++ b/java/applet/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/AWTError.java b/java/awt/AWTError.java
index e92bc01e6..80356eee4 100644
--- a/java/awt/AWTError.java
+++ b/java/awt/AWTError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/AWTEvent.java b/java/awt/AWTEvent.java
index 872feda58..ad9533f9c 100644
--- a/java/awt/AWTEvent.java
+++ b/java/awt/AWTEvent.java
@@ -1,3 +1,4 @@
+
/* AWTEvent.java -- the root event in AWT
Copyright (C) 1999, 2000, 2002, 2005 Free Software Foundation
@@ -15,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -238,16 +239,7 @@ public abstract class AWTEvent extends EventObject
*/
public String toString ()
{
- String string = null;
-
- if (source instanceof Component)
- string = getClass ().getName () + "[" + paramString () + "] on "
- + ((Component) source).getName ();
- else if (source instanceof MenuComponent)
- string = getClass ().getName () + "[" + paramString () + "] on "
- + ((MenuComponent) source).getName ();
- else
- string = getClass ().getName () + "[" + paramString () + "] on "
+ String string = getClass ().getName () + "[" + paramString () + "] on "
+ source;
return string;
diff --git a/java/awt/AWTEventMulticaster.java b/java/awt/AWTEventMulticaster.java
index 943ffacfa..f7b9163cf 100644
--- a/java/awt/AWTEventMulticaster.java
+++ b/java/awt/AWTEventMulticaster.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/AWTException.java b/java/awt/AWTException.java
index 49462a460..2df3dd801 100644
--- a/java/awt/AWTException.java
+++ b/java/awt/AWTException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/AWTKeyStroke.java b/java/awt/AWTKeyStroke.java
index 6f126fbd3..65689f828 100644
--- a/java/awt/AWTKeyStroke.java
+++ b/java/awt/AWTKeyStroke.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package java.awt;
+import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.io.ObjectStreamException;
import java.io.Serializable;
diff --git a/java/awt/AWTPermission.java b/java/awt/AWTPermission.java
index fc4ae08d5..3e50c059f 100644
--- a/java/awt/AWTPermission.java
+++ b/java/awt/AWTPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/ActiveEvent.java b/java/awt/ActiveEvent.java
index 5710b38c4..e42959fe3 100644
--- a/java/awt/ActiveEvent.java
+++ b/java/awt/ActiveEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Adjustable.java b/java/awt/Adjustable.java
index 053ddd1c1..8f633e91a 100644
--- a/java/awt/Adjustable.java
+++ b/java/awt/Adjustable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/AlphaComposite.java b/java/awt/AlphaComposite.java
index 3c7744ba5..435cfd054 100644
--- a/java/awt/AlphaComposite.java
+++ b/java/awt/AlphaComposite.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/AttributeValue.java b/java/awt/AttributeValue.java
index 10efab183..080e92e22 100644
--- a/java/awt/AttributeValue.java
+++ b/java/awt/AttributeValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/BasicStroke.java b/java/awt/BasicStroke.java
index b1772548a..bb008e4c7 100644
--- a/java/awt/BasicStroke.java
+++ b/java/awt/BasicStroke.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/BorderLayout.java b/java/awt/BorderLayout.java
index 284faf0f3..7bbcf797f 100644
--- a/java/awt/BorderLayout.java
+++ b/java/awt/BorderLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -591,25 +591,25 @@ layoutContainer(Container target)
*/
int x1 = i.left;
- int x2 = x1 + w.width + hgap;
+ int x2 = x1 + w.width + (w.width == 0 ? 0 : hgap);
int x3;
if (t.width <= i.right + e.width)
- x3 = x2 + w.width + hgap;
+ x3 = x2 + w.width + (w.width == 0 ? 0 : hgap);
else
x3 = t.width - i.right - e.width;
int ww = t.width - i.right - i.left;
int y1 = i.top;
- int y2 = y1 + n.height + vgap;
+ int y2 = y1 + n.height + (n.height == 0 ? 0 : vgap);
int midh = Math.max(e.height, Math.max(w.height, c.height));
int y3;
if (t.height <= i.bottom + s.height)
y3 = y2 + midh + vgap;
else
y3 = t.height - i.bottom - s.height;
- int hh = y3-y2-vgap;
+ int hh = y3-y2-(s.height == 0 ? 0 : vgap);
- setBounds(center, x2, y2, x3-x2-hgap, hh);
+ setBounds(center, x2, y2, x3-x2-(w.width == 0 ? 0 : hgap), hh);
setBounds(my_north, x1, y1, ww, n.height);
setBounds(my_south, x1, y3, ww, s.height);
setBounds(my_west, x1, y2, w.width, hh);
diff --git a/java/awt/BufferCapabilities.java b/java/awt/BufferCapabilities.java
index 35888b2dd..bba83dcb0 100644
--- a/java/awt/BufferCapabilities.java
+++ b/java/awt/BufferCapabilities.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package java.awt;
+import java.awt.image.BufferStrategy;
+
/**
* A double-buffering capability descriptor. This class exposes
* details about the double-buffering algorithms used by image
@@ -60,7 +62,7 @@ package java.awt;
* @author Eric Blake (ebb9@email.byu.edu)
*
* @see BufferStrategy#getCapabilities()
- * @see GraphicsConfiguration#getCapabilities()
+ * @see GraphicsConfiguration#getBufferCapabilities()
*
* @since 1.4
*/
diff --git a/java/awt/Button.java b/java/awt/Button.java
index a71a0d7eb..90be1e5b1 100644
--- a/java/awt/Button.java
+++ b/java/awt/Button.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Canvas.java b/java/awt/Canvas.java
index 6e74a43ff..fe2f85484 100644
--- a/java/awt/Canvas.java
+++ b/java/awt/Canvas.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/CardLayout.java b/java/awt/CardLayout.java
index e1f3831b3..8582c5f09 100644
--- a/java/awt/CardLayout.java
+++ b/java/awt/CardLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Checkbox.java b/java/awt/Checkbox.java
index a0c86c1c8..cd39ad436 100644
--- a/java/awt/Checkbox.java
+++ b/java/awt/Checkbox.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/CheckboxGroup.java b/java/awt/CheckboxGroup.java
index d5d22688e..31b573e65 100644
--- a/java/awt/CheckboxGroup.java
+++ b/java/awt/CheckboxGroup.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/CheckboxMenuItem.java b/java/awt/CheckboxMenuItem.java
index d5e4ef511..5e446b84c 100644
--- a/java/awt/CheckboxMenuItem.java
+++ b/java/awt/CheckboxMenuItem.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Choice.java b/java/awt/Choice.java
index cdfd7042e..5075ea92d 100644
--- a/java/awt/Choice.java
+++ b/java/awt/Choice.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Color.java b/java/awt/Color.java
index c00aa9da0..4ad46d0c0 100644
--- a/java/awt/Color.java
+++ b/java/awt/Color.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/ColorPaintContext.java b/java/awt/ColorPaintContext.java
index 3e3bac482..759ba9d87 100644
--- a/java/awt/ColorPaintContext.java
+++ b/java/awt/ColorPaintContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -105,8 +105,8 @@ class ColorPaintContext implements PaintContext
*
* @param x the x-coordinate, in device space
* @param y the y-coordinate, in device space
- * @param w the width, in device space
- * @param h the height, in device space
+ * @param width the width, in device space
+ * @param height the height, in device space
* @return a raster for the given area and color
*/
public Raster getRaster(int x, int y, int width, int height)
diff --git a/java/awt/Component.java b/java/awt/Component.java
index 77f53356d..8245eb49a 100644
--- a/java/awt/Component.java
+++ b/java/awt/Component.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -897,9 +897,21 @@ public abstract class Component
if(!isVisible())
{
this.visible = true;
- if (peer != null)
- peer.setVisible(true);
- invalidate();
+ // Avoid NullPointerExceptions by creating a local reference.
+ ComponentPeer currentPeer=peer;
+ if (currentPeer != null)
+ currentPeer.setVisible(true);
+
+ // Invalidate the parent if we have one. The component itself must
+ // not be invalidated. We also avoid NullPointerException with
+ // a local reference here.
+ Container currentParent = parent;
+ if (currentParent != null)
+ {
+ currentParent.invalidate();
+ currentParent.repaint();
+ }
+
ComponentEvent ce =
new ComponentEvent(this,ComponentEvent.COMPONENT_SHOWN);
getToolkit().getSystemEventQueue().postEvent(ce);
@@ -930,10 +942,23 @@ public abstract class Component
{
if (isVisible())
{
- if (peer != null)
- peer.setVisible(false);
+ // Avoid NullPointerExceptions by creating a local reference.
+ ComponentPeer currentPeer=peer;
+ if (currentPeer != null)
+ currentPeer.setVisible(false);
+
this.visible = false;
- invalidate();
+
+ // Invalidate the parent if we have one. The component itself must
+ // not be invalidated. We also avoid NullPointerException with
+ // a local reference here.
+ Container currentParent = parent;
+ if (currentParent != null)
+ {
+ currentParent.invalidate();
+ currentParent.repaint();
+ }
+
ComponentEvent ce =
new ComponentEvent(this,ComponentEvent.COMPONENT_HIDDEN);
getToolkit().getSystemEventQueue().postEvent(ce);
@@ -963,10 +988,12 @@ public abstract class Component
*/
public void setForeground(Color c)
{
- firePropertyChange("foreground", foreground, c);
if (peer != null)
peer.setForeground(c);
+
+ Color previous = foreground;
foreground = c;
+ firePropertyChange("foreground", previous, c);
}
/**
@@ -992,7 +1019,7 @@ public abstract class Component
{
if (background != null)
return background;
- return parent == null ? SystemColor.window : parent.getBackground();
+ return parent == null ? null : parent.getBackground();
}
/**
@@ -1006,16 +1033,18 @@ public abstract class Component
public void setBackground(Color c)
{
// return if the background is already set to that color.
- if (background != null && c != null)
- if (background.equals(c))
- return;
+ if ((c != null) && c.equals(background))
+ return;
+
// If c is null, inherit from closest ancestor whose bg is set.
if (c == null && parent != null)
c = parent.getBackground();
- firePropertyChange("background", background, c);
if (peer != null && c != null)
peer.setBackground(c);
+
+ Color previous = background;
background = c;
+ firePropertyChange("background", previous, c);
}
/**
@@ -1039,13 +1068,15 @@ public abstract class Component
*/
public Font getFont()
{
- if (font != null)
- return font;
+ Font f = font;
+ if (f != null)
+ return f;
- if (parent != null)
- return parent.getFont ();
+ Component p = parent;
+ if (p != null)
+ return p.getFont();
else
- return new Font ("Dialog", Font.PLAIN, 12);
+ return new Font("Dialog", Font.PLAIN, 12);
}
/**
@@ -1058,15 +1089,16 @@ public abstract class Component
*/
public void setFont(Font newFont)
{
- if (font == newFont)
- return;
-
- Font oldFont = font;
- font = newFont;
- if (peer != null)
- peer.setFont(font);
- firePropertyChange("font", oldFont, newFont);
- invalidate();
+ if((newFont != null && (font == null || !font.equals(newFont)))
+ || newFont == null)
+ {
+ Font oldFont = font;
+ font = newFont;
+ if (peer != null)
+ peer.setFont(font);
+ firePropertyChange("font", oldFont, newFont);
+ invalidate();
+ }
}
/**
@@ -3502,9 +3534,9 @@ public abstract class Component
/**
* Sets the focus traversal keys for one of the three focus
* traversal directions supported by Components:
- * {@link #KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS},
- * {@link #KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS}, or
- * {@link #KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS}. Normally, the
+ * {@link KeyboardFocusManager#FORWARD_TRAVERSAL_KEYS},
+ * {@link KeyboardFocusManager#BACKWARD_TRAVERSAL_KEYS}, or
+ * {@link KeyboardFocusManager#UP_CYCLE_TRAVERSAL_KEYS}. Normally, the
* default values should match the operating system's native
* choices. To disable a given traversal, use
* <code>Collections.EMPTY_SET</code>. The event dispatcher will
@@ -4184,6 +4216,10 @@ public abstract class Component
param.append(",translucent");
if (isDoubleBuffered())
param.append(",doublebuffered");
+ if (parent == null)
+ param.append(",parent==null");
+ else
+ param.append(",parent==").append(parent.getName());
return param.toString();
}
diff --git a/java/awt/ComponentOrientation.java b/java/awt/ComponentOrientation.java
index 8897470da..69b14c755 100644
--- a/java/awt/ComponentOrientation.java
+++ b/java/awt/ComponentOrientation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Composite.java b/java/awt/Composite.java
index c636921cc..ca3abe4d1 100644
--- a/java/awt/Composite.java
+++ b/java/awt/Composite.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/CompositeContext.java b/java/awt/CompositeContext.java
index 301e7cff9..018a27071 100644
--- a/java/awt/CompositeContext.java
+++ b/java/awt/CompositeContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Container.java b/java/awt/Container.java
index c682bffad..70567d586 100644
--- a/java/awt/Container.java
+++ b/java/awt/Container.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,7 +60,8 @@ import java.util.Iterator;
import java.util.Set;
import javax.accessibility.Accessible;
-import javax.swing.SwingUtilities;
+
+import gnu.java.awt.AWTUtilities;
/**
* A generic window toolkit object that acts as a container for other objects.
@@ -271,7 +272,7 @@ public class Container extends Component
*
* @return The same component that was added.
*
- * @throws ArrayIndexOutOfBounds If the specified index is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the specified index is invalid.
*/
public Component add(Component comp, int index)
{
@@ -302,7 +303,7 @@ public class Container extends Component
* @param index The index in the component list to insert this child
* at, or -1 to add at the end of the list.
*
- * @throws ArrayIndexOutOfBounds If the specified index is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the specified index is invalid.
*/
public void add(Component comp, Object constraints, int index)
{
@@ -322,7 +323,7 @@ public class Container extends Component
* @param index The index in the component list to insert this child
* at, or -1 to add at the end of the list.
*
- * @throws ArrayIndexOutOfBounds If the specified index is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the specified index is invalid.
*/
protected void addImpl(Component comp, Object constraints, int index)
{
@@ -340,6 +341,10 @@ public class Container extends Component
if (comp.parent != null)
comp.parent.remove(comp);
comp.parent = this;
+
+ // Notify the component that it has a new parent.
+ comp.addNotify();
+
if (peer != null)
{
if (comp.isLightweight ())
@@ -350,7 +355,8 @@ public class Container extends Component
}
}
- invalidate();
+ // Invalidate the layout of the added component and its ancestors.
+ comp.invalidate();
if (component == null)
component = new Component[4]; // FIXME, better initial size?
@@ -397,6 +403,9 @@ public class Container extends Component
comp);
getToolkit().getSystemEventQueue().postEvent(ce);
}
+
+ // Repaint this container.
+ repaint();
}
}
@@ -432,13 +441,16 @@ public class Container extends Component
r);
getToolkit().getSystemEventQueue().postEvent(ce);
}
+
+ // Repaint this container.
+ repaint();
}
}
/**
* Removes the specified component from this container.
*
- * @return component The component to remove from this container.
+ * @param comp The component to remove from this container.
*/
public void remove(Component comp)
{
@@ -515,6 +527,11 @@ public class Container extends Component
public void invalidate()
{
super.invalidate();
+ if (layoutMgr != null && layoutMgr instanceof LayoutManager2)
+ {
+ LayoutManager2 lm2 = (LayoutManager2) layoutMgr;
+ lm2.invalidateLayout(this);
+ }
}
/**
@@ -536,6 +553,7 @@ public class Container extends Component
*/
void invalidateTree()
{
+ super.invalidate(); // Clean cached layout state.
for (int i = 0; i < ncomponents; i++)
{
Component comp = component[i];
@@ -543,6 +561,12 @@ public class Container extends Component
if (comp instanceof Container)
((Container) comp).invalidateTree();
}
+
+ if (layoutMgr != null && layoutMgr instanceof LayoutManager2)
+ {
+ LayoutManager2 lm2 = (LayoutManager2) layoutMgr;
+ lm2.invalidateLayout(this);
+ }
}
/**
@@ -598,11 +622,15 @@ public class Container extends Component
public void setFont(Font f)
{
- super.setFont(f);
- // FIXME: Although it might make more sense to invalidate only
- // those children whose font == null, Sun invalidates all children.
- // So we'll do the same.
- invalidateTree();
+ if( (f != null && (font == null || !font.equals(f)))
+ || f == null)
+ {
+ super.setFont(f);
+ // FIXME: Although it might make more sense to invalidate only
+ // those children whose font == null, Sun invalidates all children.
+ // So we'll do the same.
+ invalidateTree();
+ }
}
/**
@@ -624,10 +652,21 @@ public class Container extends Component
*/
public Dimension preferredSize()
{
- if (layoutMgr != null)
- return layoutMgr.preferredLayoutSize (this);
- else
- return super.preferredSize ();
+ synchronized(treeLock)
+ {
+ if(valid && prefSize != null)
+ return new Dimension(prefSize);
+
+ if (layoutMgr != null)
+ {
+ Dimension layoutSize = layoutMgr.preferredLayoutSize (this);
+ if(valid)
+ prefSize = layoutSize;
+ return new Dimension(layoutSize);
+ }
+ else
+ return super.preferredSize ();
+ }
}
/**
@@ -680,13 +719,7 @@ public class Container extends Component
*/
public float getAlignmentX()
{
- if (layoutMgr instanceof LayoutManager2)
- {
- LayoutManager2 lm2 = (LayoutManager2) layoutMgr;
- return lm2.getLayoutAlignmentX(this);
- }
- else
- return super.getAlignmentX();
+ return super.getAlignmentX();
}
/**
@@ -698,13 +731,7 @@ public class Container extends Component
*/
public float getAlignmentY()
{
- if (layoutMgr instanceof LayoutManager2)
- {
- LayoutManager2 lm2 = (LayoutManager2) layoutMgr;
- return lm2.getLayoutAlignmentY(this);
- }
- else
- return super.getAlignmentY();
+ return super.getAlignmentY();
}
/**
@@ -1201,7 +1228,7 @@ public class Container extends Component
}
if (focusTraversalKeys == null)
- focusTraversalKeys = new Set[3];
+ focusTraversalKeys = new Set[4];
keystrokes =
Collections.unmodifiableSet(new HashSet<AWTKeyStroke>(keystrokes));
@@ -1371,7 +1398,7 @@ public class Container extends Component
* however, ContainerOrderFocusTraversalPolicy is in effect, and it
* supports implicit down-cycle traversal operations.
*
- * @return true if this is a focus cycle root, false otherwise
+ * @param focusCycleRoot true if this is a focus cycle root, false otherwise
*
* @since 1.4
*/
@@ -1529,11 +1556,9 @@ public class Container extends Component
void dispatchEventImpl(AWTEvent e)
{
// Give lightweight dispatcher a chance to handle it.
- if (eventTypeEnabled (e.id)
- && dispatcher != null
- && dispatcher.handleEvent (e))
+ if (dispatcher != null && dispatcher.handleEvent (e))
return;
-
+
if ((e.id <= ContainerEvent.CONTAINER_LAST
&& e.id >= ContainerEvent.CONTAINER_FIRST)
&& (containerListener != null
@@ -1543,6 +1568,26 @@ public class Container extends Component
super.dispatchEventImpl(e);
}
+ /**
+ * Tests if this container has an interest in the given event id.
+ *
+ * @param eventId The event id to check.
+ *
+ * @return <code>true</code> if a listener for the event id exists or
+ * if the eventMask is set for the event id.
+ *
+ * @see java.awt.Component#eventTypeEnabled(int)
+ */
+ boolean eventTypeEnabled(int eventId)
+ {
+ if(eventId <= ContainerEvent.CONTAINER_LAST
+ && eventId >= ContainerEvent.CONTAINER_FIRST)
+ return containerListener != null
+ || (eventMask & AWTEvent.CONTAINER_EVENT_MASK) != 0;
+ else
+ return super.eventTypeEnabled(eventId);
+ }
+
// This is used to implement Component.transferFocus.
Component findNextFocusComponent(Component child)
{
@@ -1607,12 +1652,11 @@ public class Container extends Component
// If we're not lightweight, and we just got a lightweight
// child, we need a lightweight dispatcher to feed it events.
- if (! this.isLightweight())
- {
- if (dispatcher == null)
- dispatcher = new LightweightDispatcher (this);
- }
-
+ if (!this.isLightweight() && dispatcher == null)
+ dispatcher = new LightweightDispatcher (this);
+
+ if (dispatcher != null)
+ dispatcher.enableEvents(component[i].eventMask);
enableEvents(component[i].eventMask);
if (peer != null && !isLightweight ())
@@ -1866,7 +1910,6 @@ public class Container extends Component
* rather than mimic it exactly we write something which does "roughly
* the same thing".
*/
-
class LightweightDispatcher implements Serializable
{
private static final long serialVersionUID = 5184291520170872969L;
@@ -1874,7 +1917,6 @@ class LightweightDispatcher implements Serializable
private Cursor nativeCursor;
private long eventMask;
- private transient Component mouseEventTarget;
private transient Component pressedComponent;
private transient Component lastComponentEntered;
private transient int pressCount;
@@ -1884,11 +1926,17 @@ class LightweightDispatcher implements Serializable
nativeContainer = c;
}
- void acquireComponentForMouseEvent(MouseEvent me)
+ void enableEvents(long l)
+ {
+ eventMask |= l;
+ }
+
+ Component acquireComponentForMouseEvent(MouseEvent me)
{
int x = me.getX ();
int y = me.getY ();
+ Component mouseEventTarget = null;
// Find the candidate which should receive this event.
Component parent = nativeContainer;
Component candidate = null;
@@ -1896,13 +1944,13 @@ class LightweightDispatcher implements Serializable
while (candidate == null && parent != null)
{
candidate =
- SwingUtilities.getDeepestComponentAt(parent, p.x, p.y);
+ AWTUtilities.getDeepestComponentAt(parent, p.x, p.y);
if (candidate == null || (candidate.eventMask & me.getID()) == 0)
- {
- candidate = null;
- p = SwingUtilities.convertPoint(parent, p.x, p.y, parent.parent);
- parent = parent.parent;
- }
+ {
+ candidate = null;
+ p = AWTUtilities.convertPoint(parent, p.x, p.y, parent.parent);
+ parent = parent.parent;
+ }
}
// If the only candidate we found was the native container itself,
@@ -1918,23 +1966,24 @@ class LightweightDispatcher implements Serializable
{
// Old candidate could have been removed from
// the nativeContainer so we check first.
- if (SwingUtilities.isDescendingFrom(lastComponentEntered, nativeContainer))
- {
- Point tp =
- SwingUtilities.convertPoint(nativeContainer,
- x, y, lastComponentEntered);
- MouseEvent exited = new MouseEvent (lastComponentEntered,
- MouseEvent.MOUSE_EXITED,
- me.getWhen (),
- me.getModifiersEx (),
- tp.x, tp.y,
- me.getClickCount (),
- me.isPopupTrigger (),
- me.getButton ());
- lastComponentEntered.dispatchEvent (exited);
- }
+ if (AWTUtilities.isDescendingFrom(lastComponentEntered,
+ nativeContainer))
+ {
+ Point tp = AWTUtilities.convertPoint(nativeContainer,
+ x, y, lastComponentEntered);
+ MouseEvent exited = new MouseEvent (lastComponentEntered,
+ MouseEvent.MOUSE_EXITED,
+ me.getWhen (),
+ me.getModifiersEx (),
+ tp.x, tp.y,
+ me.getClickCount (),
+ me.isPopupTrigger (),
+ me.getButton ());
+ lastComponentEntered.dispatchEvent (exited);
+ }
lastComponentEntered = null;
}
+
// If we have a candidate, maybe enter it.
if (candidate != null)
{
@@ -1943,10 +1992,10 @@ class LightweightDispatcher implements Serializable
&& candidate.isShowing()
&& candidate != nativeContainer
&& candidate != lastComponentEntered)
- {
+ {
lastComponentEntered = mouseEventTarget;
- Point cp = SwingUtilities.convertPoint(nativeContainer,
- x, y, lastComponentEntered);
+ Point cp = AWTUtilities.convertPoint(nativeContainer,
+ x, y, lastComponentEntered);
MouseEvent entered = new MouseEvent (lastComponentEntered,
MouseEvent.MOUSE_ENTERED,
me.getWhen (),
@@ -1959,17 +2008,38 @@ class LightweightDispatcher implements Serializable
}
}
+ // Check which buttons where pressed except the last button that
+ // changed state.
+ int modifiers = me.getModifiersEx() & (MouseEvent.BUTTON1_DOWN_MASK
+ | MouseEvent.BUTTON2_DOWN_MASK
+ | MouseEvent.BUTTON3_DOWN_MASK);
+ switch(me.getButton())
+ {
+ case MouseEvent.BUTTON1:
+ modifiers &= ~MouseEvent.BUTTON1_DOWN_MASK;
+ break;
+ case MouseEvent.BUTTON2:
+ modifiers &= ~MouseEvent.BUTTON2_DOWN_MASK;
+ break;
+ case MouseEvent.BUTTON3:
+ modifiers &= ~MouseEvent.BUTTON3_DOWN_MASK;
+ break;
+ }
+
if (me.getID() == MouseEvent.MOUSE_RELEASED
- || me.getID() == MouseEvent.MOUSE_PRESSED && pressCount > 0
+ || me.getID() == MouseEvent.MOUSE_PRESSED && modifiers > 0
|| me.getID() == MouseEvent.MOUSE_DRAGGED)
- // If any of the following events occur while a button is held down,
- // they should be dispatched to the same component to which the
- // original MOUSE_PRESSED event was dispatched:
- // - MOUSE_RELEASED
- // - MOUSE_PRESSED: another button pressed while the first is held down
- // - MOUSE_DRAGGED
- if (SwingUtilities.isDescendingFrom(pressedComponent, nativeContainer))
- mouseEventTarget = pressedComponent;
+ {
+ // If any of the following events occur while a button is held down,
+ // they should be dispatched to the same component to which the
+ // original MOUSE_PRESSED event was dispatched:
+ // - MOUSE_RELEASED
+ // - MOUSE_PRESSED: another button pressed while the first is held
+ // down
+ // - MOUSE_DRAGGED
+ if (AWTUtilities.isDescendingFrom(pressedComponent, nativeContainer))
+ mouseEventTarget = pressedComponent;
+ }
else if (me.getID() == MouseEvent.MOUSE_CLICKED)
{
// Don't dispatch CLICKED events whose target is not the same as the
@@ -1979,6 +2049,7 @@ class LightweightDispatcher implements Serializable
else if (pressCount == 0)
pressedComponent = null;
}
+ return mouseEventTarget;
}
boolean handleEvent(AWTEvent e)
@@ -1987,41 +2058,42 @@ class LightweightDispatcher implements Serializable
{
MouseEvent me = (MouseEvent) e;
- acquireComponentForMouseEvent(me);
-
+ // Make the LightWeightDispatcher reentrant. This is necessary when
+ // a lightweight component does its own modal event queue.
+ Component mouseEventTarget = acquireComponentForMouseEvent(me);
+
// Avoid dispatching ENTERED and EXITED events twice.
if (mouseEventTarget != null
&& mouseEventTarget.isShowing()
&& e.getID() != MouseEvent.MOUSE_ENTERED
&& e.getID() != MouseEvent.MOUSE_EXITED)
{
- MouseEvent newEvt =
- SwingUtilities.convertMouseEvent(nativeContainer, me,
- mouseEventTarget);
- mouseEventTarget.dispatchEvent(newEvt);
-
switch (e.getID())
{
- case MouseEvent.MOUSE_PRESSED:
- if (pressCount++ == 0)
- pressedComponent = mouseEventTarget;
- break;
-
- case MouseEvent.MOUSE_RELEASED:
- // Clear our memory of the original PRESSED event, only if
- // we're not expecting a CLICKED event after this. If
- // there is a CLICKED event after this, it will do clean up.
- if (--pressCount == 0
- && mouseEventTarget != pressedComponent)
- pressedComponent = null;
- break;
+ case MouseEvent.MOUSE_PRESSED:
+ if (pressCount++ == 0)
+ pressedComponent = mouseEventTarget;
+ break;
+ case MouseEvent.MOUSE_RELEASED:
+ // Clear our memory of the original PRESSED event, only if
+ // we're not expecting a CLICKED event after this. If
+ // there is a CLICKED event after this, it will do clean up.
+ if (--pressCount == 0
+ && mouseEventTarget != pressedComponent)
+ pressedComponent = null;
+ break;
}
- if (newEvt.isConsumed())
- e.consume();
+
+ MouseEvent newEvt =
+ AWTUtilities.convertMouseEvent(nativeContainer, me,
+ mouseEventTarget);
+ mouseEventTarget.dispatchEvent(newEvt);
+
+ if (newEvt.isConsumed())
+ e.consume();
}
}
-
+
return e.isConsumed();
}
-
-} // class LightweightDispatcher
+}
diff --git a/java/awt/ContainerOrderFocusTraversalPolicy.java b/java/awt/ContainerOrderFocusTraversalPolicy.java
index 91153e699..152482c88 100644
--- a/java/awt/ContainerOrderFocusTraversalPolicy.java
+++ b/java/awt/ContainerOrderFocusTraversalPolicy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Cursor.java b/java/awt/Cursor.java
index 8652a1e5e..48a63f06f 100644
--- a/java/awt/Cursor.java
+++ b/java/awt/Cursor.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/DefaultFocusTraversalPolicy.java b/java/awt/DefaultFocusTraversalPolicy.java
index f9bd647a0..46b56d3fc 100644
--- a/java/awt/DefaultFocusTraversalPolicy.java
+++ b/java/awt/DefaultFocusTraversalPolicy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/DefaultKeyboardFocusManager.java b/java/awt/DefaultKeyboardFocusManager.java
index 2632a8756..f53cc5ef0 100644
--- a/java/awt/DefaultKeyboardFocusManager.java
+++ b/java/awt/DefaultKeyboardFocusManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -187,20 +187,26 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager
// Keep track of this window's focus owner.
- // Find the target Component's top-level ancestor.
+ // Find the target Component's top-level ancestor. target
+ // may be a window.
Container parent = target.getParent ();
while (parent != null
&& !(parent instanceof Window))
parent = parent.getParent ();
- Window toplevel = parent == null ?
- (Window) target : (Window) parent;
+ // If the parent is null and target is not a window, then target is an
+ // unanchored component and so we don't want to set the focus owner.
+ if (! (parent == null && ! (target instanceof Window)))
+ {
+ Window toplevel = parent == null ?
+ (Window) target : (Window) parent;
- Component focusOwner = getFocusOwner ();
- if (focusOwner != null
- && ! (focusOwner instanceof Window))
- toplevel.setFocusOwner (focusOwner);
+ Component focusOwner = getFocusOwner ();
+ if (focusOwner != null
+ && ! (focusOwner instanceof Window))
+ toplevel.setFocusOwner (focusOwner);
+ }
}
else if (e.id == FocusEvent.FOCUS_LOST)
{
diff --git a/java/awt/Dialog.java b/java/awt/Dialog.java
index 8248df3c7..d3eb975a8 100644
--- a/java/awt/Dialog.java
+++ b/java/awt/Dialog.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Dimension.java b/java/awt/Dimension.java
index 270e04e70..4c1a07bf9 100644
--- a/java/awt/Dimension.java
+++ b/java/awt/Dimension.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/DisplayMode.java b/java/awt/DisplayMode.java
index a9fac604d..d41d4a87f 100644
--- a/java/awt/DisplayMode.java
+++ b/java/awt/DisplayMode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Event.java b/java/awt/Event.java
index 57e7c79f2..648139cc8 100644
--- a/java/awt/Event.java
+++ b/java/awt/Event.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/EventDispatchThread.java b/java/awt/EventDispatchThread.java
index d55f0f5ea..a64cdae85 100644
--- a/java/awt/EventDispatchThread.java
+++ b/java/awt/EventDispatchThread.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/EventQueue.java b/java/awt/EventQueue.java
index a2356cc63..a8b007813 100644
--- a/java/awt/EventQueue.java
+++ b/java/awt/EventQueue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,6 +42,7 @@ import gnu.java.awt.ClasspathToolkit;
import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
+import java.awt.event.InputMethodEvent;
import java.awt.event.InvocationEvent;
import java.awt.event.WindowEvent;
import java.lang.reflect.InvocationTargetException;
diff --git a/java/awt/FileDialog.java b/java/awt/FileDialog.java
index 3e22d02e5..7f2723e7e 100644
--- a/java/awt/FileDialog.java
+++ b/java/awt/FileDialog.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/FlowLayout.java b/java/awt/FlowLayout.java
index eb2bc98cb..4674990ac 100644
--- a/java/awt/FlowLayout.java
+++ b/java/awt/FlowLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/FocusTraversalPolicy.java b/java/awt/FocusTraversalPolicy.java
index 0354a7fe1..a7f1558dd 100644
--- a/java/awt/FocusTraversalPolicy.java
+++ b/java/awt/FocusTraversalPolicy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Font.java b/java/awt/Font.java
index ec74e14eb..30961ab2f 100644
--- a/java/awt/Font.java
+++ b/java/awt/Font.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -44,6 +44,7 @@ import gnu.java.awt.peer.ClasspathFontPeer;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
import java.awt.font.LineMetrics;
+import java.awt.font.TextLayout;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.peer.FontPeer;
@@ -377,8 +378,8 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @return The logical name of the font.
*
- * @see getFamily()
- * @see getFontName()
+ * @see #getFamily()
+ * @see #getFontName()
*/
public String getName ()
{
@@ -453,9 +454,9 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see getName()
- * @see getFontName()
- * @see GraphicsEnvironment.getAvailableFontFamilyNames()
+ * @see #getName()
+ * @see #getFontName()
+ * @see GraphicsEnvironment#getAvailableFontFamilyNames()
*/
public String getFamily ()
{
@@ -464,13 +465,13 @@ private static final long serialVersionUID = -4206021311591459213L;
/**
* Returns integer code representing the sum of style flags of this font, a
- * combination of either {@link PLAIN}, {@link BOLD}, or {@link ITALIC}.
+ * combination of either {@link #PLAIN}, {@link #BOLD}, or {@link #ITALIC}.
*
* @return code representing the style of this font.
*
- * @see isPlain()
- * @see isBold()
- * @see isItalic()
+ * @see #isPlain()
+ * @see #isBold()
+ * @see #isItalic()
*/
public int getStyle ()
{
@@ -555,13 +556,13 @@ private static final long serialVersionUID = -4206021311591459213L;
}
/**
- * Creates a new font with point size 1 and {@link PLAIN} style,
+ * Creates a new font with point size 1 and {@link #PLAIN} style,
* reading font data from the provided input stream. The resulting font
* can have further fonts derived from it using its
* <code>deriveFont</code> method.
*
* @param fontFormat Integer code indicating the format the font data is
- * in.Currently this can only be {@link TRUETYPE_FONT}.
+ * in.Currently this can only be {@link #TRUETYPE_FONT}.
* @param is {@link InputStream} from which font data will be read. This
* stream is not closed after font data is extracted.
*
@@ -594,7 +595,7 @@ private static final long serialVersionUID = -4206021311591459213L;
* @return A new {@link GlyphVector} containing glyphs mapped from str,
* through the font's cmap table.
*
- * @see layoutGlyphVector()
+ * @see #layoutGlyphVector(FontRenderContext, char[], int, int, int)
*/
public GlyphVector createGlyphVector (FontRenderContext ctx, String str)
{
@@ -614,7 +615,7 @@ private static final long serialVersionUID = -4206021311591459213L;
* @return A new {@link GlyphVector} containing glyphs mapped from str,
* through the font's cmap table.
*
- * @see layoutGlyphVector()
+ * @see #layoutGlyphVector(FontRenderContext, char[], int, int, int)
*/
public GlyphVector createGlyphVector (FontRenderContext ctx, CharacterIterator i)
{
@@ -634,7 +635,7 @@ private static final long serialVersionUID = -4206021311591459213L;
* @return A new {@link GlyphVector} containing glyphs mapped from str,
* through the font's cmap table.
*
- * @see layoutGlyphVector()
+ * @see #layoutGlyphVector(FontRenderContext, char[], int, int, int)
*/
public GlyphVector createGlyphVector (FontRenderContext ctx, char[] chars)
{
@@ -652,7 +653,7 @@ private static final long serialVersionUID = -4206021311591459213L;
* @return A new {@link GlyphVector} containing glyphs mapped from str,
* through the font's cmap table.
*
- * @see layoutGlyphVector()
+ * @see #layoutGlyphVector(FontRenderContext, char[], int, int, int)
*
* @specnote This method is documented to perform character-to-glyph
* conversions, in the Sun documentation, but its second parameter name is
@@ -776,7 +777,7 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @return A map of chracter attributes which this font currently has set.
*
- * @see getAvailableAttributes()
+ * @see #getAvailableAttributes()
* @see java.text.AttributedCharacterIterator.Attribute
* @see java.awt.font.TextAttribute
*/
@@ -790,7 +791,7 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @return An array of chracter attribute keys which this font understands.
*
- * @see getAttributes()
+ * @see #getAttributes()
* @see java.text.AttributedCharacterIterator.Attribute
* @see java.awt.font.TextAttribute
*/
@@ -800,8 +801,8 @@ private static final long serialVersionUID = -4206021311591459213L;
}
/**
- * Returns a baseline code (one of {@link ROMAN_BASELINE}, {@link
- * CENTER_BASELINE} or {@link HANGING_BASELINE}) indicating which baseline
+ * Returns a baseline code (one of {@link #ROMAN_BASELINE}, {@link
+ * #CENTER_BASELINE} or {@link #HANGING_BASELINE}) indicating which baseline
* this font will measure baseline offsets for, when presenting glyph
* metrics for a given character.
*
@@ -818,7 +819,7 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see LineMetrics.getBaselineOffsets()
+ * @see LineMetrics#getBaselineOffsets()
*/
public byte getBaselineFor (char c)
{
@@ -838,9 +839,9 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see getName()
- * @see getFontName()
- * @see GraphicsEnvironment.getAvailableFontFamilyNames()
+ * @see #getName()
+ * @see #getFontName()
+ * @see GraphicsEnvironment#getAvailableFontFamilyNames()
* @see Locale
*/
public String getFamily (Locale lc)
@@ -857,7 +858,7 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see TextAttribure
+ * @see java.awt.font.TextAttribute
*/
public static Font getFont (Map attributes)
{
@@ -874,8 +875,8 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see getName()
- * @see getFamily()
+ * @see #getName()
+ * @see #getFamily()
*/
public String getFontName ()
{
@@ -894,8 +895,8 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see getName()
- * @see getFamily()
+ * @see #getName()
+ * @see #getFamily()
*/
public String getFontName (Locale lc)
{
@@ -904,12 +905,12 @@ private static final long serialVersionUID = -4206021311591459213L;
/**
* Returns the italic angle of this font, a measurement of its slant when
- * style is {@link ITALIC}. The precise meaning is the inverse slope of a
+ * style is {@link #ITALIC}. The precise meaning is the inverse slope of a
* caret line which "best measures" the font's italic posture.
*
* @return The italic angle.
*
- * @see TextAttribute.POSTURE
+ * @see java.awt.font.TextAttribute#POSTURE
*/
public float getItalicAngle ()
{
@@ -1028,9 +1029,9 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see getName()
- * @see getFamily()
- * @see getFontName()
+ * @see #getName()
+ * @see #getFamily()
+ * @see #getFontName()
*/
public String getPSName ()
{
@@ -1042,7 +1043,7 @@ private static final long serialVersionUID = -4206021311591459213L;
* font in the specified {@link FontRenderContext}. This box will include the
* glyph origin, ascent, advance, height, and leading, but may not include all
* diacritics or accents. To get the complete visual bounding box of all the
- * glyphs in a run of text, use the {@link TextLayout#getBounds} method of
+ * glyphs in a run of text, use the {@link TextLayout#getBounds} method of
* {@link TextLayout}.
*
* @param str The string to measure.
@@ -1050,7 +1051,7 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @return A bounding box covering the logical bounds of the specified text.
*
- * @see createGlyphVector()
+ * @see #createGlyphVector(FontRenderContext, String)
*/
public Rectangle2D getStringBounds (String str, FontRenderContext frc)
{
@@ -1077,7 +1078,7 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see createGlyphVector()
+ * @see #createGlyphVector(FontRenderContext, String)
*/
public Rectangle2D getStringBounds (String str, int begin,
int limit, FontRenderContext frc)
@@ -1105,7 +1106,7 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see createGlyphVector()
+ * @see #createGlyphVector(FontRenderContext, CharacterIterator)
*/
public Rectangle2D getStringBounds (CharacterIterator ci, int begin,
int limit, FontRenderContext frc)
@@ -1133,7 +1134,7 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* @since 1.2
*
- * @see createGlyphVector()
+ * @see #createGlyphVector(FontRenderContext, char[])
*/
public Rectangle2D getStringBounds (char[] chars, int begin,
int limit, FontRenderContext frc)
@@ -1163,7 +1164,7 @@ private static final long serialVersionUID = -4206021311591459213L;
* @return Whether this font has uniform line metrics.
*
* @see LineMetrics
- * @see getLineMetrics()
+ * @see #getLineMetrics(String, FontRenderContext)
*/
public boolean hasUniformLineMetrics ()
{
@@ -1189,12 +1190,12 @@ private static final long serialVersionUID = -4206021311591459213L;
*
* Bidirectional (bidi) layout is not performed in this method; text
* should have its bidi direction specified with one of the flags {@link
- * LAYOUT_LEFT_TO_RIGHT} or {@link LAYOUT_RIGHT_TO_LEFT}.
+ * #LAYOUT_LEFT_TO_RIGHT} or {@link #LAYOUT_RIGHT_TO_LEFT}.
*
* Some types of layout (notably Arabic glyph shaping) may examine context
* characters beyond the bounds of the indicated range, in order to select
- * an appropriate shape. The flags {@link LAYOUT_NO_START_CONTEXT} and
- * {@link LAYOUT_NO_LIMIT_CONTEXT} can be provided to prevent these extra
+ * an appropriate shape. The flags {@link #LAYOUT_NO_START_CONTEXT} and
+ * {@link #LAYOUT_NO_LIMIT_CONTEXT} can be provided to prevent these extra
* context areas from being examined, for instance if they contain invalid
* characters.
*
diff --git a/java/awt/FontFormatException.java b/java/awt/FontFormatException.java
index 2971e1de8..6ec8757fb 100644
--- a/java/awt/FontFormatException.java
+++ b/java/awt/FontFormatException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/FontMetrics.java b/java/awt/FontMetrics.java
index c1d19846b..e702a6257 100644
--- a/java/awt/FontMetrics.java
+++ b/java/awt/FontMetrics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Frame.java b/java/awt/Frame.java
index 521119d1e..0cb97f8b5 100644
--- a/java/awt/Frame.java
+++ b/java/awt/Frame.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/GradientPaint.java b/java/awt/GradientPaint.java
index 8660dbb8d..74067f49e 100644
--- a/java/awt/GradientPaint.java
+++ b/java/awt/GradientPaint.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Graphics.java b/java/awt/Graphics.java
index c1dfbda2a..ff26190e5 100644
--- a/java/awt/Graphics.java
+++ b/java/awt/Graphics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Graphics2D.java b/java/awt/Graphics2D.java
index c845c4c1d..3faa9dc0c 100644
--- a/java/awt/Graphics2D.java
+++ b/java/awt/Graphics2D.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/GraphicsConfigTemplate.java b/java/awt/GraphicsConfigTemplate.java
index 76cf8b690..e46888378 100644
--- a/java/awt/GraphicsConfigTemplate.java
+++ b/java/awt/GraphicsConfigTemplate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/GraphicsConfiguration.java b/java/awt/GraphicsConfiguration.java
index 97f687e92..6dc27793d 100644
--- a/java/awt/GraphicsConfiguration.java
+++ b/java/awt/GraphicsConfiguration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/GraphicsDevice.java b/java/awt/GraphicsDevice.java
index 55a80f23e..95487a2a1 100644
--- a/java/awt/GraphicsDevice.java
+++ b/java/awt/GraphicsDevice.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package java.awt;
+import java.awt.image.VolatileImage;
+
/**
* This describes a graphics device available to the given environment. This
* includes screen and printer devices, and the different configurations for
@@ -163,8 +165,8 @@ public abstract class GraphicsDevice
*
* @param w the window to toggle
* @see #isFullScreenSupported()
- * @see getFullScreenWindow()
- * @see setDisplayMode(DisplayMode)
+ * @see #getFullScreenWindow()
+ * @see #setDisplayMode(DisplayMode)
* @see Component#enableInputMethods(boolean)
* @since 1.4
*/
diff --git a/java/awt/GraphicsEnvironment.java b/java/awt/GraphicsEnvironment.java
index f93e0f97e..a82e7a357 100644
--- a/java/awt/GraphicsEnvironment.java
+++ b/java/awt/GraphicsEnvironment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/GridBagConstraints.java b/java/awt/GridBagConstraints.java
index 2795b9ed9..8d8b4fae5 100644
--- a/java/awt/GridBagConstraints.java
+++ b/java/awt/GridBagConstraints.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/GridBagLayout.java b/java/awt/GridBagLayout.java
index 95f204abf..256de0940 100644
--- a/java/awt/GridBagLayout.java
+++ b/java/awt/GridBagLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -130,7 +130,9 @@ public class GridBagLayout
return;
if (!(constraints instanceof GridBagConstraints))
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("constraints "
+ + constraints
+ + " are not an instance of GridBagConstraints");
setConstraints (component, (GridBagConstraints) constraints);
}
@@ -915,7 +917,7 @@ public class GridBagLayout
sizes[start] = Math.max(sizes[start], size);
weights[start] = Math.max(weights[start], weight);
}
- else
+ else if (span > 1)
{
int numOccupied = span;
int lastOccupied = -1;
diff --git a/java/awt/GridBagLayoutInfo.java b/java/awt/GridBagLayoutInfo.java
index bb919b557..43ba09d72 100644
--- a/java/awt/GridBagLayoutInfo.java
+++ b/java/awt/GridBagLayoutInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/GridLayout.java b/java/awt/GridLayout.java
index 95980e6ca..80d964142 100644
--- a/java/awt/GridLayout.java
+++ b/java/awt/GridLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/HeadlessException.java b/java/awt/HeadlessException.java
index e88279aec..b180b1d86 100644
--- a/java/awt/HeadlessException.java
+++ b/java/awt/HeadlessException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/IllegalComponentStateException.java b/java/awt/IllegalComponentStateException.java
index daa9d17df..4a47f1da9 100644
--- a/java/awt/IllegalComponentStateException.java
+++ b/java/awt/IllegalComponentStateException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Image.java b/java/awt/Image.java
index 39ab06873..b657ad007 100644
--- a/java/awt/Image.java
+++ b/java/awt/Image.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -94,7 +94,7 @@ public abstract class Image
* Constant indicating that the area averaging scaling algorithm should be
* used.
*
- * @see AreaAveragingScaleFilter
+ * @see java.awt.image.AreaAveragingScaleFilter
* @since 1.1
*/
public static final int SCALE_AREA_AVERAGING = 16;
@@ -141,7 +141,7 @@ public abstract class Image
* This method is only valid for off-screen objects.
*
* @return a graphics context object for an off-screen object
- * @see Graphics#createImage(int, int)
+ * @see Graphics#getcreateImage(int, int)
*/
public abstract Graphics getGraphics();
diff --git a/java/awt/ImageCapabilities.java b/java/awt/ImageCapabilities.java
index df802c62b..2fe71d1e2 100644
--- a/java/awt/ImageCapabilities.java
+++ b/java/awt/ImageCapabilities.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Insets.java b/java/awt/Insets.java
index e818629a0..7238a34e2 100644
--- a/java/awt/Insets.java
+++ b/java/awt/Insets.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/ItemSelectable.java b/java/awt/ItemSelectable.java
index 74129fdda..f155f723e 100644
--- a/java/awt/ItemSelectable.java
+++ b/java/awt/ItemSelectable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/JobAttributes.java b/java/awt/JobAttributes.java
index fc4240d31..2acb3a01e 100644
--- a/java/awt/JobAttributes.java
+++ b/java/awt/JobAttributes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/KeyEventDispatcher.java b/java/awt/KeyEventDispatcher.java
index f9020e74b..30997278e 100644
--- a/java/awt/KeyEventDispatcher.java
+++ b/java/awt/KeyEventDispatcher.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/KeyEventPostProcessor.java b/java/awt/KeyEventPostProcessor.java
index 0bf6fe650..0b39dc250 100644
--- a/java/awt/KeyEventPostProcessor.java
+++ b/java/awt/KeyEventPostProcessor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/KeyboardFocusManager.java b/java/awt/KeyboardFocusManager.java
index d09ab2e3f..a73d31ff7 100644
--- a/java/awt/KeyboardFocusManager.java
+++ b/java/awt/KeyboardFocusManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,8 +38,10 @@ exception statement from your version. */
package java.awt;
+import java.applet.Applet;
import java.awt.event.FocusEvent;
import java.awt.event.KeyEvent;
+import java.awt.event.WindowEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyVetoException;
@@ -285,7 +287,7 @@ public abstract class KeyboardFocusManager
KeyboardFocusManager manager;
if (m == null)
- manager = new DefaultKeyboardFocusManager ();
+ manager = createFocusManager();
else
manager = m;
@@ -293,6 +295,46 @@ public abstract class KeyboardFocusManager
}
/**
+ * Creates a KeyboardFocusManager. The exact class is determined by the
+ * system property 'gnu.java.awt.FocusManager'. If this is not set,
+ * we default to DefaultKeyboardFocusManager.
+ */
+ private static KeyboardFocusManager createFocusManager()
+ {
+ String fmClassName = System.getProperty("gnu.java.awt.FocusManager",
+ "java.awt.DefaultKeyboardFocusManager");
+ try
+ {
+ Class fmClass = Class.forName(fmClassName);
+ KeyboardFocusManager fm = (KeyboardFocusManager) fmClass.newInstance();
+ return fm;
+ }
+ catch (ClassNotFoundException ex)
+ {
+ System.err.println("The class " + fmClassName + " cannot be found.");
+ System.err.println("Check the setting of the system property");
+ System.err.println("gnu.java.awt.FocusManager");
+ return null;
+ }
+ catch (InstantiationException ex)
+ {
+ System.err.println("The class " + fmClassName + " cannot be");
+ System.err.println("instantiated.");
+ System.err.println("Check the setting of the system property");
+ System.err.println("gnu.java.awt.FocusManager");
+ return null;
+ }
+ catch (IllegalAccessException ex)
+ {
+ System.err.println("The class " + fmClassName + " cannot be");
+ System.err.println("accessed.");
+ System.err.println("Check the setting of the system property");
+ System.err.println("gnu.java.awt.FocusManager");
+ return null;
+ }
+ }
+
+ /**
* Retrieve the {@link Component} that has the keyboard focus, or
* null if the focus owner was not set by a thread in the current
* {@link java.lang.ThreadGroup}.
@@ -335,8 +377,8 @@ public abstract class KeyboardFocusManager
* @param owner the Component to return from getFocusOwner and
* getGlobalFocusOwner
*
- * @see Component.requestFocus ()
- * @see Component.requestFocusInWindow ()
+ * @see Component#requestFocus()
+ * @see Component#requestFocusInWindow()
*/
protected void setGlobalFocusOwner (Component owner)
{
@@ -419,8 +461,8 @@ public abstract class KeyboardFocusManager
* @param focusOwner the Component to return from
* getPermanentFocusOwner and getGlobalPermanentFocusOwner
*
- * @see Component.requestFocus ()
- * @see Component.requestFocusInWindow ()
+ * @see Component#requestFocus()
+ * @see Component#requestFocusInWindow()
*/
protected void setGlobalPermanentFocusOwner (Component focusOwner)
{
diff --git a/java/awt/Label.java b/java/awt/Label.java
index e1a43c8d1..8867fa12e 100644
--- a/java/awt/Label.java
+++ b/java/awt/Label.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/LayoutManager.java b/java/awt/LayoutManager.java
index 62d5b9f6d..62ff8087e 100644
--- a/java/awt/LayoutManager.java
+++ b/java/awt/LayoutManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/LayoutManager2.java b/java/awt/LayoutManager2.java
index 4caa7f2cf..45fc5430f 100644
--- a/java/awt/LayoutManager2.java
+++ b/java/awt/LayoutManager2.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/List.java b/java/awt/List.java
index e10cbaeee..ab7d35963 100644
--- a/java/awt/List.java
+++ b/java/awt/List.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -163,6 +163,7 @@ List(int rows, boolean multipleMode)
{
this.rows = rows;
this.multipleMode = multipleMode;
+ selected = new int[0];
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
diff --git a/java/awt/MediaTracker.java b/java/awt/MediaTracker.java
index d36461ba1..9abfde6ef 100644
--- a/java/awt/MediaTracker.java
+++ b/java/awt/MediaTracker.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,7 +48,7 @@ import java.util.ArrayList;
* Media objects are tracked by assigning them an ID. It is possible
* to assign the same ID to mutliple objects, effectivly grouping them
* together. In this case the status flags ({@link #statusID}) and error flag
- * (@link #isErrorID} and {@link #getErrorId}) are ORed together. This
+ * (@link #isErrorID} and {@link #getErrorsID}) are ORed together. This
* means that you cannot say exactly which media object has which status,
* at most you can say that there <em>are</em> certain media objects with
* some certain status.
@@ -123,7 +123,7 @@ public class MediaTracker implements java.io.Serializable
* @return <code>true</code> if more data is needed, <code>false</code>
* otherwise
*
- * @see {@link java.awt.image.ImageObserver}
+ * @see java.awt.image.ImageObserver
*/
public boolean imageUpdate(Image img, int flags, int x, int y,
int width, int height)
@@ -241,15 +241,24 @@ public class MediaTracker implements java.io.Serializable
{
if (load && ((e.status & LOADING) == 0))
{
- e.status = LOADING;
- result = false;
- boolean complete = target.prepareImage(e.image, e);
- if (complete)
- {
- e.status = COMPLETE;
- result = true;
- }
- }
+ if (target.prepareImage(e.image, e))
+ e.status = COMPLETE;
+ else
+ {
+ e.status = LOADING;
+ int flags = target.checkImage(e.image, e);
+ if ((flags & ImageObserver.ABORT) != 0)
+ e.status = ABORTED;
+ else if ((flags & ImageObserver.ERROR) != 0)
+ e.status = ERRORED;
+ else if ((flags & ImageObserver.ALLBITS) != 0)
+ e.status = COMPLETE;
+ }
+ boolean complete = (e.status
+ & (COMPLETE | ABORTED | ERRORED)) != 0;
+ if (!complete)
+ result = false;
+ }
else
result = false;
}
@@ -373,11 +382,19 @@ public class MediaTracker implements java.io.Serializable
{
if (load && e.status == 0)
{
- boolean complete = target.prepareImage(e.image, e);
- if (complete)
+ if (target.prepareImage(e.image, e))
e.status = COMPLETE;
else
- e.status = LOADING;
+ {
+ e.status = LOADING;
+ int flags = target.checkImage(e.image, e);
+ if ((flags & ImageObserver.ABORT) != 0)
+ e.status = ABORTED;
+ else if ((flags & ImageObserver.ERROR) != 0)
+ e.status = ERRORED;
+ else if ((flags & ImageObserver.ALLBITS) != 0)
+ e.status = COMPLETE;
+ }
}
result |= e.status;
e = e.next;
@@ -422,13 +439,22 @@ public class MediaTracker implements java.io.Serializable
if (load && ((e.status & LOADING) == 0))
{
e.status = LOADING;
- result = false;
- boolean complete = target.prepareImage(e.image, e);
- if (complete)
- {
- e.status = COMPLETE;
- result = true;
- }
+ if (target.prepareImage(e.image, e))
+ e.status = COMPLETE;
+ else
+ {
+ int flags = target.checkImage(e.image, e);
+ if ((flags & ImageObserver.ABORT) != 0)
+ e.status = ABORTED;
+ else if ((flags & ImageObserver.ERROR) != 0)
+ e.status = ERRORED;
+ else if ((flags & ImageObserver.ALLBITS) != 0)
+ e.status = COMPLETE;
+ }
+ boolean complete = (e.status
+ & (COMPLETE | ABORTED | ERRORED)) != 0;
+ if (!complete)
+ result = false;
}
else
result = false;
@@ -567,11 +593,19 @@ public class MediaTracker implements java.io.Serializable
{
if (load && e.status == 0)
{
- boolean complete = target.prepareImage(e.image, e);
- if (complete)
+ if (target.prepareImage(e.image, e))
e.status = COMPLETE;
- else
- e.status = LOADING;
+ else
+ {
+ e.status = LOADING;
+ int flags = target.checkImage(e.image, e);
+ if ((flags & ImageObserver.ABORT) != 0)
+ e.status = ABORTED;
+ else if ((flags & ImageObserver.ERROR) != 0)
+ e.status = ERRORED;
+ else if ((flags & ImageObserver.ALLBITS) != 0)
+ e.status = COMPLETE;
+ }
}
result |= e.status;
}
diff --git a/java/awt/Menu.java b/java/awt/Menu.java
index 3cc9cc301..56ceccfc5 100644
--- a/java/awt/Menu.java
+++ b/java/awt/Menu.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/MenuBar.java b/java/awt/MenuBar.java
index ce5256fec..4089fe189 100644
--- a/java/awt/MenuBar.java
+++ b/java/awt/MenuBar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/MenuComponent.java b/java/awt/MenuComponent.java
index 3d41e4079..ec6980e10 100644
--- a/java/awt/MenuComponent.java
+++ b/java/awt/MenuComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/MenuContainer.java b/java/awt/MenuContainer.java
index 08d1cb09c..c76ec96c2 100644
--- a/java/awt/MenuContainer.java
+++ b/java/awt/MenuContainer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/MenuItem.java b/java/awt/MenuItem.java
index f40f4af11..58dcb6741 100644
--- a/java/awt/MenuItem.java
+++ b/java/awt/MenuItem.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -94,7 +94,7 @@ long eventMask;
* @serial This menu item's label
* This is package-private to avoid an accessor method.
*/
-String label;
+String label = "";
/**
* @serial The shortcut for this menu item, if any
@@ -179,14 +179,11 @@ private transient ActionListener action_listeners;
*/
public boolean setCurrentAccessibleValue(Number number)
{
- if (number.intValue() == 0)
- {
- setEnabled(false);
- return false;
- }
-
- setEnabled(true);
- return true;
+ boolean result = (number.intValue() != 0);
+ // this. is required by javac 1.3, otherwise it is confused with
+ // MenuItem.this.setEnabled.
+ this.setEnabled(result);
+ return result;
}
/* (non-Javadoc)
diff --git a/java/awt/MenuShortcut.java b/java/awt/MenuShortcut.java
index 4d9ef601b..adfd1d318 100644
--- a/java/awt/MenuShortcut.java
+++ b/java/awt/MenuShortcut.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/PageAttributes.java b/java/awt/PageAttributes.java
index c94f857dc..38fb696e3 100644
--- a/java/awt/PageAttributes.java
+++ b/java/awt/PageAttributes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Paint.java b/java/awt/Paint.java
index fa136ec3f..0f099cc0b 100644
--- a/java/awt/Paint.java
+++ b/java/awt/Paint.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/PaintContext.java b/java/awt/PaintContext.java
index 29003798d..3d5fdcdf0 100644
--- a/java/awt/PaintContext.java
+++ b/java/awt/PaintContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Panel.java b/java/awt/Panel.java
index 628e53e97..cc17eef22 100644
--- a/java/awt/Panel.java
+++ b/java/awt/Panel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Point.java b/java/awt/Point.java
index 48f5e3365..492749b8d 100644
--- a/java/awt/Point.java
+++ b/java/awt/Point.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Polygon.java b/java/awt/Polygon.java
index 4b1eda85c..a72522cb0 100644
--- a/java/awt/Polygon.java
+++ b/java/awt/Polygon.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/PopupMenu.java b/java/awt/PopupMenu.java
index 92840dfa0..90d48d903 100644
--- a/java/awt/PopupMenu.java
+++ b/java/awt/PopupMenu.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/PrintGraphics.java b/java/awt/PrintGraphics.java
index ae664044d..e7f857797 100644
--- a/java/awt/PrintGraphics.java
+++ b/java/awt/PrintGraphics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/PrintJob.java b/java/awt/PrintJob.java
index 7bf4534c7..62aa8b195 100644
--- a/java/awt/PrintJob.java
+++ b/java/awt/PrintJob.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package java.awt;
+import java.util.Properties;
+
/**
* This abstract class represents a print job.
*
diff --git a/java/awt/Rectangle.java b/java/awt/Rectangle.java
index df7cbbe6d..0f21d495c 100644
--- a/java/awt/Rectangle.java
+++ b/java/awt/Rectangle.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/RenderingHints.java b/java/awt/RenderingHints.java
index 86e0eb6f0..0e1db72b7 100644
--- a/java/awt/RenderingHints.java
+++ b/java/awt/RenderingHints.java
@@ -1,5 +1,5 @@
/* RenderingHints.java --
- Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation
+ Copyright (C) 2000, 2001, 2002, 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -592,14 +592,18 @@ public class RenderingHints implements Map, Cloneable
* Returns <code>true</code> if the collection of hints contains the
* specified key, and <code>false</code> otherwise.
*
- * @param key the key.
+ * @param key the key (<code>null</code> not permitted).
*
* @return A boolean.
+ *
+ * @throws NullPointerException if <code>key</code> is <code>null</code>.
+ * @throws ClassCastException if <code>key</code> is not a {@link Key}.
*/
public boolean containsKey(Object key)
{
if (key == null)
throw new NullPointerException();
+ // don't remove the cast, it is necessary to throw the required exception
return hintMap.containsKey((Key) key);
}
@@ -617,14 +621,20 @@ public class RenderingHints implements Map, Cloneable
}
/**
- * Returns the value associated with the specified key.
+ * Returns the value associated with the specified key, or <code>null</code>
+ * if there is no value defined for the key.
*
- * @param key the key.
+ * @param key the key (<code>null</code> permitted).
+ *
+ * @return The value (possibly <code>null</code>).
+ *
+ * @throws ClassCastException if <code>key</code> is not a {@link Key}.
*
- * @return The value.
+ * @see #containsKey(Object)
*/
public Object get(Object key)
{
+ // don't remove the cast, it is necessary to throw the required exception
return hintMap.get((Key) key);
}
diff --git a/java/awt/Robot.java b/java/awt/Robot.java
index 8741b89b4..485a14e1e 100644
--- a/java/awt/Robot.java
+++ b/java/awt/Robot.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,7 +53,7 @@ import java.awt.peer.RobotPeer;
* create self-running demo programs.
*
* Since Robot generates native windowing system events, rather than
- * simply inserting {@link AWTEvents} on the AWT event queue, its use
+ * simply inserting {@link AWTEvent}s on the AWT event queue, its use
* is not restricted to Java programs. It can be used to
* programatically drive any graphical application.
*
@@ -227,7 +227,7 @@ public class Robot
/**
* Press a key.
*
- * @param keycode key to press, a {@link KeyEvent} VK_ constant
+ * @param keycode key to press, a {@link java.awt.event.KeyEvent} VK_ constant
*
* @exception IllegalArgumentException if keycode is not a valid key
*/
@@ -245,7 +245,8 @@ public class Robot
/**
* Release a key.
*
- * @param keycode key to release, a {@link KeyEvent} VK_ constant
+ * @param keycode key to release, a {@link java.awt.event.KeyEvent} VK_
+ * constant
*
* @exception IllegalArgumentException if keycode is not a valid key
*/
@@ -312,7 +313,7 @@ public class Robot
}
/**
- * Check if this Robot automatically calls {@link waitForIdle} after
+ * Check if this Robot automatically calls {@link #waitForIdle()} after
* generating an event.
*
* @return true if waitForIdle is automatically called
@@ -324,7 +325,7 @@ public class Robot
/**
* Set whether or not this Robot automatically calls {@link
- * waitForIdle} after generating an event.
+ * #waitForIdle()} after generating an event.
*
* @param isOn true if waitForIdle should be called automatically
*/
diff --git a/java/awt/ScrollPane.java b/java/awt/ScrollPane.java
index c38feb339..b3ecc59fc 100644
--- a/java/awt/ScrollPane.java
+++ b/java/awt/ScrollPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/ScrollPaneAdjustable.java b/java/awt/ScrollPaneAdjustable.java
index 700d060a0..cfca19b44 100644
--- a/java/awt/ScrollPaneAdjustable.java
+++ b/java/awt/ScrollPaneAdjustable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Scrollbar.java b/java/awt/Scrollbar.java
index 9141ea53e..6e506c785 100644
--- a/java/awt/Scrollbar.java
+++ b/java/awt/Scrollbar.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Shape.java b/java/awt/Shape.java
index 1a0852b8d..bd8a43435 100644
--- a/java/awt/Shape.java
+++ b/java/awt/Shape.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Stroke.java b/java/awt/Stroke.java
index 1fe1568a4..1a4c61cfb 100644
--- a/java/awt/Stroke.java
+++ b/java/awt/Stroke.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/SystemColor.java b/java/awt/SystemColor.java
index 90aa57703..2ead74a0d 100644
--- a/java/awt/SystemColor.java
+++ b/java/awt/SystemColor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/TextArea.java b/java/awt/TextArea.java
index dda45f344..d422d3306 100644
--- a/java/awt/TextArea.java
+++ b/java/awt/TextArea.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/TextComponent.java b/java/awt/TextComponent.java
index 34ea698e3..9edbd88fe 100644
--- a/java/awt/TextComponent.java
+++ b/java/awt/TextComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/TextField.java b/java/awt/TextField.java
index 5c84aab09..4d62d024a 100644
--- a/java/awt/TextField.java
+++ b/java/awt/TextField.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/TexturePaint.java b/java/awt/TexturePaint.java
index 5ff0b57ec..a12e38463 100644
--- a/java/awt/TexturePaint.java
+++ b/java/awt/TexturePaint.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Toolkit.java b/java/awt/Toolkit.java
index c7f2de956..c7c6f9f0e 100644
--- a/java/awt/Toolkit.java
+++ b/java/awt/Toolkit.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Transparency.java b/java/awt/Transparency.java
index 0ad4efee8..888587176 100644
--- a/java/awt/Transparency.java
+++ b/java/awt/Transparency.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/Window.java b/java/awt/Window.java
index 06fe43479..e26c4e32f 100644
--- a/java/awt/Window.java
+++ b/java/awt/Window.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/color/CMMException.java b/java/awt/color/CMMException.java
index 04ef3e2c8..ab328ec84 100644
--- a/java/awt/color/CMMException.java
+++ b/java/awt/color/CMMException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/color/ColorSpace.java b/java/awt/color/ColorSpace.java
index dd7121ec0..79369da71 100644
--- a/java/awt/color/ColorSpace.java
+++ b/java/awt/color/ColorSpace.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/color/ICC_ColorSpace.java b/java/awt/color/ICC_ColorSpace.java
index d6771cd52..b50048cf9 100644
--- a/java/awt/color/ICC_ColorSpace.java
+++ b/java/awt/color/ICC_ColorSpace.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/color/ICC_Profile.java b/java/awt/color/ICC_Profile.java
index 791ea9f6c..75f55a1da 100644
--- a/java/awt/color/ICC_Profile.java
+++ b/java/awt/color/ICC_Profile.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/color/ICC_ProfileGray.java b/java/awt/color/ICC_ProfileGray.java
index 54c277133..3b5948dc8 100644
--- a/java/awt/color/ICC_ProfileGray.java
+++ b/java/awt/color/ICC_ProfileGray.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/color/ICC_ProfileRGB.java b/java/awt/color/ICC_ProfileRGB.java
index cb947f677..00393328b 100644
--- a/java/awt/color/ICC_ProfileRGB.java
+++ b/java/awt/color/ICC_ProfileRGB.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/color/ProfileDataException.java b/java/awt/color/ProfileDataException.java
index 53b6d28bc..1af23b183 100644
--- a/java/awt/color/ProfileDataException.java
+++ b/java/awt/color/ProfileDataException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/color/package.html b/java/awt/color/package.html
index 072de0e2d..9a08577c1 100644
--- a/java/awt/color/package.html
+++ b/java/awt/color/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/Clipboard.java b/java/awt/datatransfer/Clipboard.java
index ca9b6ebdb..9953a724d 100644
--- a/java/awt/datatransfer/Clipboard.java
+++ b/java/awt/datatransfer/Clipboard.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/ClipboardOwner.java b/java/awt/datatransfer/ClipboardOwner.java
index b5ca9e37d..df758254a 100644
--- a/java/awt/datatransfer/ClipboardOwner.java
+++ b/java/awt/datatransfer/ClipboardOwner.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/DataFlavor.java b/java/awt/datatransfer/DataFlavor.java
index 19f69d5c7..e5fbd2402 100644
--- a/java/awt/datatransfer/DataFlavor.java
+++ b/java/awt/datatransfer/DataFlavor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/FlavorMap.java b/java/awt/datatransfer/FlavorMap.java
index ea64facb1..59718c451 100644
--- a/java/awt/datatransfer/FlavorMap.java
+++ b/java/awt/datatransfer/FlavorMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/FlavorTable.java b/java/awt/datatransfer/FlavorTable.java
index 1275d924a..11cdda06c 100644
--- a/java/awt/datatransfer/FlavorTable.java
+++ b/java/awt/datatransfer/FlavorTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/MimeTypeParseException.java b/java/awt/datatransfer/MimeTypeParseException.java
index 85331c2b4..6113ab760 100644
--- a/java/awt/datatransfer/MimeTypeParseException.java
+++ b/java/awt/datatransfer/MimeTypeParseException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/StringSelection.java b/java/awt/datatransfer/StringSelection.java
index b41c93699..b74f2fa64 100644
--- a/java/awt/datatransfer/StringSelection.java
+++ b/java/awt/datatransfer/StringSelection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/SystemFlavorMap.java b/java/awt/datatransfer/SystemFlavorMap.java
index 826992b7c..f6530f511 100644
--- a/java/awt/datatransfer/SystemFlavorMap.java
+++ b/java/awt/datatransfer/SystemFlavorMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/Transferable.java b/java/awt/datatransfer/Transferable.java
index 8fa56e82d..807539236 100644
--- a/java/awt/datatransfer/Transferable.java
+++ b/java/awt/datatransfer/Transferable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/UnsupportedFlavorException.java b/java/awt/datatransfer/UnsupportedFlavorException.java
index 57ea8568f..1c1da0348 100644
--- a/java/awt/datatransfer/UnsupportedFlavorException.java
+++ b/java/awt/datatransfer/UnsupportedFlavorException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/datatransfer/package.html b/java/awt/datatransfer/package.html
index 5cd793a0a..5ab860cdc 100644
--- a/java/awt/datatransfer/package.html
+++ b/java/awt/datatransfer/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/Autoscroll.java b/java/awt/dnd/Autoscroll.java
index 054bba898..ba4d4476c 100644
--- a/java/awt/dnd/Autoscroll.java
+++ b/java/awt/dnd/Autoscroll.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DnDConstants.java b/java/awt/dnd/DnDConstants.java
index e00b0003c..85c9c0528 100644
--- a/java/awt/dnd/DnDConstants.java
+++ b/java/awt/dnd/DnDConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DnDEventMulticaster.java b/java/awt/dnd/DnDEventMulticaster.java
index 0241e371f..d9f5ec00f 100644
--- a/java/awt/dnd/DnDEventMulticaster.java
+++ b/java/awt/dnd/DnDEventMulticaster.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragGestureEvent.java b/java/awt/dnd/DragGestureEvent.java
index 3d268820b..9f2bc7c98 100644
--- a/java/awt/dnd/DragGestureEvent.java
+++ b/java/awt/dnd/DragGestureEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragGestureListener.java b/java/awt/dnd/DragGestureListener.java
index f8c7ab474..e8befe80f 100644
--- a/java/awt/dnd/DragGestureListener.java
+++ b/java/awt/dnd/DragGestureListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragGestureRecognizer.java b/java/awt/dnd/DragGestureRecognizer.java
index e018bc2be..776ea2919 100644
--- a/java/awt/dnd/DragGestureRecognizer.java
+++ b/java/awt/dnd/DragGestureRecognizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragSource.java b/java/awt/dnd/DragSource.java
index 6ce93be27..13ffc9615 100644
--- a/java/awt/dnd/DragSource.java
+++ b/java/awt/dnd/DragSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragSourceAdapter.java b/java/awt/dnd/DragSourceAdapter.java
index 8d65188f8..90d9a6983 100644
--- a/java/awt/dnd/DragSourceAdapter.java
+++ b/java/awt/dnd/DragSourceAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragSourceContext.java b/java/awt/dnd/DragSourceContext.java
index 02f4ac351..2cf0d6d0b 100644
--- a/java/awt/dnd/DragSourceContext.java
+++ b/java/awt/dnd/DragSourceContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragSourceDragEvent.java b/java/awt/dnd/DragSourceDragEvent.java
index 6417492f8..511700b61 100644
--- a/java/awt/dnd/DragSourceDragEvent.java
+++ b/java/awt/dnd/DragSourceDragEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragSourceDropEvent.java b/java/awt/dnd/DragSourceDropEvent.java
index 876b73d14..7621262d8 100644
--- a/java/awt/dnd/DragSourceDropEvent.java
+++ b/java/awt/dnd/DragSourceDropEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragSourceEvent.java b/java/awt/dnd/DragSourceEvent.java
index 60f6eb2f2..c5cd42a4e 100644
--- a/java/awt/dnd/DragSourceEvent.java
+++ b/java/awt/dnd/DragSourceEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragSourceListener.java b/java/awt/dnd/DragSourceListener.java
index c4a7bf210..aac6e94eb 100644
--- a/java/awt/dnd/DragSourceListener.java
+++ b/java/awt/dnd/DragSourceListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DragSourceMotionListener.java b/java/awt/dnd/DragSourceMotionListener.java
index d25684544..5d04c2271 100644
--- a/java/awt/dnd/DragSourceMotionListener.java
+++ b/java/awt/dnd/DragSourceMotionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DropTarget.java b/java/awt/dnd/DropTarget.java
index 2a8b79d84..9fd7ef896 100644
--- a/java/awt/dnd/DropTarget.java
+++ b/java/awt/dnd/DropTarget.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DropTargetAdapter.java b/java/awt/dnd/DropTargetAdapter.java
index a9a81ac56..13c6b9f4b 100644
--- a/java/awt/dnd/DropTargetAdapter.java
+++ b/java/awt/dnd/DropTargetAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DropTargetContext.java b/java/awt/dnd/DropTargetContext.java
index d59e459e7..b2e52405f 100644
--- a/java/awt/dnd/DropTargetContext.java
+++ b/java/awt/dnd/DropTargetContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DropTargetDragEvent.java b/java/awt/dnd/DropTargetDragEvent.java
index d4a13ea46..6cdc3a292 100644
--- a/java/awt/dnd/DropTargetDragEvent.java
+++ b/java/awt/dnd/DropTargetDragEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DropTargetDropEvent.java b/java/awt/dnd/DropTargetDropEvent.java
index bb57f23b0..0c0777f78 100644
--- a/java/awt/dnd/DropTargetDropEvent.java
+++ b/java/awt/dnd/DropTargetDropEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DropTargetEvent.java b/java/awt/dnd/DropTargetEvent.java
index 9d141c8b8..cb2aec640 100644
--- a/java/awt/dnd/DropTargetEvent.java
+++ b/java/awt/dnd/DropTargetEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/DropTargetListener.java b/java/awt/dnd/DropTargetListener.java
index 1eda1e348..ceb839bac 100644
--- a/java/awt/dnd/DropTargetListener.java
+++ b/java/awt/dnd/DropTargetListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/InvalidDnDOperationException.java b/java/awt/dnd/InvalidDnDOperationException.java
index d02c69b80..2fd9767e0 100644
--- a/java/awt/dnd/InvalidDnDOperationException.java
+++ b/java/awt/dnd/InvalidDnDOperationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/MouseDragGestureRecognizer.java b/java/awt/dnd/MouseDragGestureRecognizer.java
index 52e19b174..9a2a7bc4c 100644
--- a/java/awt/dnd/MouseDragGestureRecognizer.java
+++ b/java/awt/dnd/MouseDragGestureRecognizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/package.html b/java/awt/dnd/package.html
index 4b2341331..d1ae5215c 100644
--- a/java/awt/dnd/package.html
+++ b/java/awt/dnd/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/peer/DragSourceContextPeer.java b/java/awt/dnd/peer/DragSourceContextPeer.java
index 11c3d0c09..8c134b623 100644
--- a/java/awt/dnd/peer/DragSourceContextPeer.java
+++ b/java/awt/dnd/peer/DragSourceContextPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/peer/DropTargetContextPeer.java b/java/awt/dnd/peer/DropTargetContextPeer.java
index 6c3816f00..6eae29b38 100644
--- a/java/awt/dnd/peer/DropTargetContextPeer.java
+++ b/java/awt/dnd/peer/DropTargetContextPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/peer/DropTargetPeer.java b/java/awt/dnd/peer/DropTargetPeer.java
index b6fd97321..ec17cbe4b 100644
--- a/java/awt/dnd/peer/DropTargetPeer.java
+++ b/java/awt/dnd/peer/DropTargetPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/dnd/peer/package.html b/java/awt/dnd/peer/package.html
index 4eb99cc8c..52ec19cb4 100644
--- a/java/awt/dnd/peer/package.html
+++ b/java/awt/dnd/peer/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/AWTEventListener.java b/java/awt/event/AWTEventListener.java
index b9ce7dc66..079a91dd4 100644
--- a/java/awt/event/AWTEventListener.java
+++ b/java/awt/event/AWTEventListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ exception statement from your version. */
package java.awt.event;
import java.awt.AWTEvent;
+import java.awt.Toolkit;
import java.util.EventListener;
/**
diff --git a/java/awt/event/AWTEventListenerProxy.java b/java/awt/event/AWTEventListenerProxy.java
index fef8ae70c..3d9958b1a 100644
--- a/java/awt/event/AWTEventListenerProxy.java
+++ b/java/awt/event/AWTEventListenerProxy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ exception statement from your version. */
package java.awt.event;
import java.awt.AWTEvent;
+import java.awt.Toolkit;
import java.util.EventListenerProxy;
/**
diff --git a/java/awt/event/ActionEvent.java b/java/awt/event/ActionEvent.java
index 2b9763ee9..4bce7d45c 100644
--- a/java/awt/event/ActionEvent.java
+++ b/java/awt/event/ActionEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ActionListener.java b/java/awt/event/ActionListener.java
index 71fdd2fd9..4c302cca3 100644
--- a/java/awt/event/ActionListener.java
+++ b/java/awt/event/ActionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/AdjustmentEvent.java b/java/awt/event/AdjustmentEvent.java
index f7c7ae48e..867c577d3 100644
--- a/java/awt/event/AdjustmentEvent.java
+++ b/java/awt/event/AdjustmentEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/AdjustmentListener.java b/java/awt/event/AdjustmentListener.java
index d07663c54..1eb2e3bcf 100644
--- a/java/awt/event/AdjustmentListener.java
+++ b/java/awt/event/AdjustmentListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ComponentAdapter.java b/java/awt/event/ComponentAdapter.java
index 6ef784784..6b4893f0f 100644
--- a/java/awt/event/ComponentAdapter.java
+++ b/java/awt/event/ComponentAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ComponentEvent.java b/java/awt/event/ComponentEvent.java
index 08f0df793..ba9c2a5b3 100644
--- a/java/awt/event/ComponentEvent.java
+++ b/java/awt/event/ComponentEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ComponentListener.java b/java/awt/event/ComponentListener.java
index 7f601740b..b43faaed7 100644
--- a/java/awt/event/ComponentListener.java
+++ b/java/awt/event/ComponentListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ContainerAdapter.java b/java/awt/event/ContainerAdapter.java
index bad475ecf..c847adfa2 100644
--- a/java/awt/event/ContainerAdapter.java
+++ b/java/awt/event/ContainerAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ContainerEvent.java b/java/awt/event/ContainerEvent.java
index 08c55faf6..3c401fe1a 100644
--- a/java/awt/event/ContainerEvent.java
+++ b/java/awt/event/ContainerEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ContainerListener.java b/java/awt/event/ContainerListener.java
index 2ad00f0b5..b37d43408 100644
--- a/java/awt/event/ContainerListener.java
+++ b/java/awt/event/ContainerListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/FocusAdapter.java b/java/awt/event/FocusAdapter.java
index 471c7f25c..fb0532a3a 100644
--- a/java/awt/event/FocusAdapter.java
+++ b/java/awt/event/FocusAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/FocusEvent.java b/java/awt/event/FocusEvent.java
index 3bca6a7d4..a44284aea 100644
--- a/java/awt/event/FocusEvent.java
+++ b/java/awt/event/FocusEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/FocusListener.java b/java/awt/event/FocusListener.java
index d8ef5a81e..1f7201825 100644
--- a/java/awt/event/FocusListener.java
+++ b/java/awt/event/FocusListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/HierarchyBoundsAdapter.java b/java/awt/event/HierarchyBoundsAdapter.java
index 2f479fc23..340cf01ed 100644
--- a/java/awt/event/HierarchyBoundsAdapter.java
+++ b/java/awt/event/HierarchyBoundsAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/HierarchyBoundsListener.java b/java/awt/event/HierarchyBoundsListener.java
index 4d74f0d8d..689623744 100644
--- a/java/awt/event/HierarchyBoundsListener.java
+++ b/java/awt/event/HierarchyBoundsListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/HierarchyEvent.java b/java/awt/event/HierarchyEvent.java
index aadcc7170..e10cefbef 100644
--- a/java/awt/event/HierarchyEvent.java
+++ b/java/awt/event/HierarchyEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/HierarchyListener.java b/java/awt/event/HierarchyListener.java
index 4fdbdff97..f90414b86 100644
--- a/java/awt/event/HierarchyListener.java
+++ b/java/awt/event/HierarchyListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/InputEvent.java b/java/awt/event/InputEvent.java
index cd59afc29..8f9aed611 100644
--- a/java/awt/event/InputEvent.java
+++ b/java/awt/event/InputEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/InputMethodEvent.java b/java/awt/event/InputMethodEvent.java
index 98dc42633..f6711a8fa 100644
--- a/java/awt/event/InputMethodEvent.java
+++ b/java/awt/event/InputMethodEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/InputMethodListener.java b/java/awt/event/InputMethodListener.java
index 08de16f7d..e2f6a4e67 100644
--- a/java/awt/event/InputMethodListener.java
+++ b/java/awt/event/InputMethodListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package java.awt.event;
+import java.awt.im.InputMethodRequests;
import java.util.EventListener;
/**
diff --git a/java/awt/event/InvocationEvent.java b/java/awt/event/InvocationEvent.java
index 27546c010..75feb62bd 100644
--- a/java/awt/event/InvocationEvent.java
+++ b/java/awt/event/InvocationEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ItemEvent.java b/java/awt/event/ItemEvent.java
index f9c3ee2fc..467815b16 100644
--- a/java/awt/event/ItemEvent.java
+++ b/java/awt/event/ItemEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/ItemListener.java b/java/awt/event/ItemListener.java
index cc8f8c792..fa5f3aad3 100644
--- a/java/awt/event/ItemListener.java
+++ b/java/awt/event/ItemListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package java.awt.event;
+import java.awt.ItemSelectable;
import java.util.EventListener;
/**
diff --git a/java/awt/event/KeyAdapter.java b/java/awt/event/KeyAdapter.java
index d27786c43..c01d61ff3 100644
--- a/java/awt/event/KeyAdapter.java
+++ b/java/awt/event/KeyAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/KeyEvent.java b/java/awt/event/KeyEvent.java
index cef05ae62..a40a8e15c 100644
--- a/java/awt/event/KeyEvent.java
+++ b/java/awt/event/KeyEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/KeyListener.java b/java/awt/event/KeyListener.java
index d46edf4f4..5c0a640f6 100644
--- a/java/awt/event/KeyListener.java
+++ b/java/awt/event/KeyListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/MouseAdapter.java b/java/awt/event/MouseAdapter.java
index 5c8cbd0d5..9f40c285a 100644
--- a/java/awt/event/MouseAdapter.java
+++ b/java/awt/event/MouseAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/MouseEvent.java b/java/awt/event/MouseEvent.java
index 6e43183dd..249c3d112 100644
--- a/java/awt/event/MouseEvent.java
+++ b/java/awt/event/MouseEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/MouseListener.java b/java/awt/event/MouseListener.java
index 8b60ef704..4508019e1 100644
--- a/java/awt/event/MouseListener.java
+++ b/java/awt/event/MouseListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/MouseMotionAdapter.java b/java/awt/event/MouseMotionAdapter.java
index 0500cc5f5..8a295f66c 100644
--- a/java/awt/event/MouseMotionAdapter.java
+++ b/java/awt/event/MouseMotionAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/MouseMotionListener.java b/java/awt/event/MouseMotionListener.java
index 1a003eaca..ba2c5698b 100644
--- a/java/awt/event/MouseMotionListener.java
+++ b/java/awt/event/MouseMotionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/MouseWheelEvent.java b/java/awt/event/MouseWheelEvent.java
index c16705759..d1d22d218 100644
--- a/java/awt/event/MouseWheelEvent.java
+++ b/java/awt/event/MouseWheelEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,12 +38,18 @@ exception statement from your version. */
package java.awt.event;
+import java.awt.Adjustable;
import java.awt.Component;
+import java.awt.Rectangle;
+import java.awt.ScrollPane;
+
+import javax.swing.JScrollPane;
+import javax.swing.Scrollable;
/**
* This event is generated for a mouse wheel rotation. The wheel (the middle
* mouse button on most modern mice) can be rotated towards or away from the
- * user, and is ofteh used for scrolling.
+ * user, and is often used for scrolling.
*
* <p>Because of the special use for scrolling components, MouseWheelEvents
* often affect a different component than the one located at the point of
@@ -143,7 +149,7 @@ public class MouseWheelEvent extends MouseEvent
/**
* This method returns the scrolling pattern this event requests. Legal
- * values are WHEEL_UNIT_SCROLL and WHEEL_BLOCK_SCROLL.
+ * values are {@link #WHEEL_UNIT_SCROLL} and {@link #WHEEL_BLOCK_SCROLL}.
*
* @return the scroll type
* @see Adjustable#getUnitIncrement()
diff --git a/java/awt/event/MouseWheelListener.java b/java/awt/event/MouseWheelListener.java
index cfb5528f4..1125582e1 100644
--- a/java/awt/event/MouseWheelListener.java
+++ b/java/awt/event/MouseWheelListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/PaintEvent.java b/java/awt/event/PaintEvent.java
index c11e2b65f..bb89c3722 100644
--- a/java/awt/event/PaintEvent.java
+++ b/java/awt/event/PaintEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/TextEvent.java b/java/awt/event/TextEvent.java
index 7cf44b4c0..0288abbb7 100644
--- a/java/awt/event/TextEvent.java
+++ b/java/awt/event/TextEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ exception statement from your version. */
package java.awt.event;
import java.awt.AWTEvent;
+import java.awt.TextComponent;
/**
* This event is generated when a text box changes contents. This is an
diff --git a/java/awt/event/TextListener.java b/java/awt/event/TextListener.java
index f76478351..bcdd7fa7a 100644
--- a/java/awt/event/TextListener.java
+++ b/java/awt/event/TextListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/WindowAdapter.java b/java/awt/event/WindowAdapter.java
index 39292862d..708de588c 100644
--- a/java/awt/event/WindowAdapter.java
+++ b/java/awt/event/WindowAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/WindowEvent.java b/java/awt/event/WindowEvent.java
index 68a8c25d0..2186889e6 100644
--- a/java/awt/event/WindowEvent.java
+++ b/java/awt/event/WindowEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package java.awt.event;
+import java.awt.Frame;
import java.awt.Window;
/**
diff --git a/java/awt/event/WindowFocusListener.java b/java/awt/event/WindowFocusListener.java
index 42034b7c7..738425353 100644
--- a/java/awt/event/WindowFocusListener.java
+++ b/java/awt/event/WindowFocusListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/WindowListener.java b/java/awt/event/WindowListener.java
index 8bbcabaf6..52213eb3d 100644
--- a/java/awt/event/WindowListener.java
+++ b/java/awt/event/WindowListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package java.awt.event;
+import java.awt.Frame;
+import java.awt.Image;
import java.util.EventListener;
/**
diff --git a/java/awt/event/WindowStateListener.java b/java/awt/event/WindowStateListener.java
index dcf4496c7..9bc6174fd 100644
--- a/java/awt/event/WindowStateListener.java
+++ b/java/awt/event/WindowStateListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/event/package.html b/java/awt/event/package.html
index ba08e6262..77662a3fb 100644
--- a/java/awt/event/package.html
+++ b/java/awt/event/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/FontRenderContext.java b/java/awt/font/FontRenderContext.java
index 2bec38d7e..78564a647 100644
--- a/java/awt/font/FontRenderContext.java
+++ b/java/awt/font/FontRenderContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/GlyphJustificationInfo.java b/java/awt/font/GlyphJustificationInfo.java
index e95a2c932..5f45fd584 100644
--- a/java/awt/font/GlyphJustificationInfo.java
+++ b/java/awt/font/GlyphJustificationInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/GlyphMetrics.java b/java/awt/font/GlyphMetrics.java
index 975f0983b..28b2088cf 100644
--- a/java/awt/font/GlyphMetrics.java
+++ b/java/awt/font/GlyphMetrics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/GlyphVector.java b/java/awt/font/GlyphVector.java
index ae103b833..57e2581ed 100644
--- a/java/awt/font/GlyphVector.java
+++ b/java/awt/font/GlyphVector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/GraphicAttribute.java b/java/awt/font/GraphicAttribute.java
index b4a92168b..79eae9955 100644
--- a/java/awt/font/GraphicAttribute.java
+++ b/java/awt/font/GraphicAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/ImageGraphicAttribute.java b/java/awt/font/ImageGraphicAttribute.java
index 9f691078d..77413f95d 100644
--- a/java/awt/font/ImageGraphicAttribute.java
+++ b/java/awt/font/ImageGraphicAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/LineBreakMeasurer.java b/java/awt/font/LineBreakMeasurer.java
index 19f1525c4..0a6a96922 100644
--- a/java/awt/font/LineBreakMeasurer.java
+++ b/java/awt/font/LineBreakMeasurer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/LineMetrics.java b/java/awt/font/LineMetrics.java
index 580de8f92..3c45ad19a 100644
--- a/java/awt/font/LineMetrics.java
+++ b/java/awt/font/LineMetrics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/MultipleMaster.java b/java/awt/font/MultipleMaster.java
index 90d65f119..57417ea60 100644
--- a/java/awt/font/MultipleMaster.java
+++ b/java/awt/font/MultipleMaster.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/NumericShaper.java b/java/awt/font/NumericShaper.java
index de934f267..efbdcd49d 100644
--- a/java/awt/font/NumericShaper.java
+++ b/java/awt/font/NumericShaper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/OpenType.java b/java/awt/font/OpenType.java
index ec604e6de..ece3279cc 100644
--- a/java/awt/font/OpenType.java
+++ b/java/awt/font/OpenType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/ShapeGraphicAttribute.java b/java/awt/font/ShapeGraphicAttribute.java
index 12ae9cda0..6d64dece5 100644
--- a/java/awt/font/ShapeGraphicAttribute.java
+++ b/java/awt/font/ShapeGraphicAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/TextAttribute.java b/java/awt/font/TextAttribute.java
index e63d2955e..6f5ed59f9 100644
--- a/java/awt/font/TextAttribute.java
+++ b/java/awt/font/TextAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/TextHitInfo.java b/java/awt/font/TextHitInfo.java
index 2629ad2a5..2b23e1963 100644
--- a/java/awt/font/TextHitInfo.java
+++ b/java/awt/font/TextHitInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/TextLayout.java b/java/awt/font/TextLayout.java
index 7d6c4d8c6..bb641614a 100644
--- a/java/awt/font/TextLayout.java
+++ b/java/awt/font/TextLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/TextMeasurer.java b/java/awt/font/TextMeasurer.java
index 2aa5a0768..7fcdc87a8 100644
--- a/java/awt/font/TextMeasurer.java
+++ b/java/awt/font/TextMeasurer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/TransformAttribute.java b/java/awt/font/TransformAttribute.java
index 3bb3c3cf1..977cafa03 100644
--- a/java/awt/font/TransformAttribute.java
+++ b/java/awt/font/TransformAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/font/package.html b/java/awt/font/package.html
index 5cb050114..8c3c61a40 100644
--- a/java/awt/font/package.html
+++ b/java/awt/font/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/AffineTransform.java b/java/awt/geom/AffineTransform.java
index 21eacae74..4d1a4d6d5 100644
--- a/java/awt/geom/AffineTransform.java
+++ b/java/awt/geom/AffineTransform.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/Arc2D.java b/java/awt/geom/Arc2D.java
index 2cdc17080..eff34a081 100644
--- a/java/awt/geom/Arc2D.java
+++ b/java/awt/geom/Arc2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/Area.java b/java/awt/geom/Area.java
index 782552940..7a0fac43a 100644
--- a/java/awt/geom/Area.java
+++ b/java/awt/geom/Area.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/CubicCurve2D.java b/java/awt/geom/CubicCurve2D.java
index a3d9182f4..50c381194 100644
--- a/java/awt/geom/CubicCurve2D.java
+++ b/java/awt/geom/CubicCurve2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/Dimension2D.java b/java/awt/geom/Dimension2D.java
index 8654c745e..6b5ce8830 100644
--- a/java/awt/geom/Dimension2D.java
+++ b/java/awt/geom/Dimension2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/Ellipse2D.java b/java/awt/geom/Ellipse2D.java
index 85ba1d1e9..e8830770f 100644
--- a/java/awt/geom/Ellipse2D.java
+++ b/java/awt/geom/Ellipse2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/FlatteningPathIterator.java b/java/awt/geom/FlatteningPathIterator.java
index 94ff14562..b06e6cc47 100644
--- a/java/awt/geom/FlatteningPathIterator.java
+++ b/java/awt/geom/FlatteningPathIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/GeneralPath.java b/java/awt/geom/GeneralPath.java
index 70f7de7df..f54855874 100644
--- a/java/awt/geom/GeneralPath.java
+++ b/java/awt/geom/GeneralPath.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/IllegalPathStateException.java b/java/awt/geom/IllegalPathStateException.java
index 3aa432df1..4d190c748 100644
--- a/java/awt/geom/IllegalPathStateException.java
+++ b/java/awt/geom/IllegalPathStateException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/Line2D.java b/java/awt/geom/Line2D.java
index 3b64f4557..e15e7cfe3 100644
--- a/java/awt/geom/Line2D.java
+++ b/java/awt/geom/Line2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/NoninvertibleTransformException.java b/java/awt/geom/NoninvertibleTransformException.java
index 0fa36674d..7995a52eb 100644
--- a/java/awt/geom/NoninvertibleTransformException.java
+++ b/java/awt/geom/NoninvertibleTransformException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/PathIterator.java b/java/awt/geom/PathIterator.java
index 6d38911b7..2cd08b9b4 100644
--- a/java/awt/geom/PathIterator.java
+++ b/java/awt/geom/PathIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/Point2D.java b/java/awt/geom/Point2D.java
index e334ac780..9f22a5a67 100644
--- a/java/awt/geom/Point2D.java
+++ b/java/awt/geom/Point2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/QuadCurve2D.java b/java/awt/geom/QuadCurve2D.java
index 2d737270e..41021dbc6 100644
--- a/java/awt/geom/QuadCurve2D.java
+++ b/java/awt/geom/QuadCurve2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/Rectangle2D.java b/java/awt/geom/Rectangle2D.java
index d8217fecd..6a255f953 100644
--- a/java/awt/geom/Rectangle2D.java
+++ b/java/awt/geom/Rectangle2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/RectangularShape.java b/java/awt/geom/RectangularShape.java
index 8679d2e32..8f66dabf2 100644
--- a/java/awt/geom/RectangularShape.java
+++ b/java/awt/geom/RectangularShape.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/RoundRectangle2D.java b/java/awt/geom/RoundRectangle2D.java
index b9af7efc7..ac0e6f812 100644
--- a/java/awt/geom/RoundRectangle2D.java
+++ b/java/awt/geom/RoundRectangle2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/geom/package.html b/java/awt/geom/package.html
index 2ac620e53..c8ee8272f 100644
--- a/java/awt/geom/package.html
+++ b/java/awt/geom/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/InputContext.java b/java/awt/im/InputContext.java
index cc3c148da..981ffcc5b 100644
--- a/java/awt/im/InputContext.java
+++ b/java/awt/im/InputContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/InputMethodHighlight.java b/java/awt/im/InputMethodHighlight.java
index 92867624a..0d664b193 100644
--- a/java/awt/im/InputMethodHighlight.java
+++ b/java/awt/im/InputMethodHighlight.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/InputMethodRequests.java b/java/awt/im/InputMethodRequests.java
index d39efcb94..d50ec33c5 100644
--- a/java/awt/im/InputMethodRequests.java
+++ b/java/awt/im/InputMethodRequests.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/InputSubset.java b/java/awt/im/InputSubset.java
index 78c2164ff..5e7d58e7f 100644
--- a/java/awt/im/InputSubset.java
+++ b/java/awt/im/InputSubset.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/package.html b/java/awt/im/package.html
index 336d4ac95..895da66d5 100644
--- a/java/awt/im/package.html
+++ b/java/awt/im/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/spi/InputMethod.java b/java/awt/im/spi/InputMethod.java
index 18f7a7b17..840d193a8 100644
--- a/java/awt/im/spi/InputMethod.java
+++ b/java/awt/im/spi/InputMethod.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/spi/InputMethodContext.java b/java/awt/im/spi/InputMethodContext.java
index 73003f046..243bbc65b 100644
--- a/java/awt/im/spi/InputMethodContext.java
+++ b/java/awt/im/spi/InputMethodContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/spi/InputMethodDescriptor.java b/java/awt/im/spi/InputMethodDescriptor.java
index 57a1fda48..093d73192 100644
--- a/java/awt/im/spi/InputMethodDescriptor.java
+++ b/java/awt/im/spi/InputMethodDescriptor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/im/spi/package.html b/java/awt/im/spi/package.html
index 37f110b82..c526ee159 100644
--- a/java/awt/im/spi/package.html
+++ b/java/awt/im/spi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/AffineTransformOp.java b/java/awt/image/AffineTransformOp.java
index 1326a61c0..f11066e4e 100644
--- a/java/awt/image/AffineTransformOp.java
+++ b/java/awt/image/AffineTransformOp.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/AreaAveragingScaleFilter.java b/java/awt/image/AreaAveragingScaleFilter.java
index f2e6ea54c..b9ca1b707 100644
--- a/java/awt/image/AreaAveragingScaleFilter.java
+++ b/java/awt/image/AreaAveragingScaleFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/BandCombineOp.java b/java/awt/image/BandCombineOp.java
index 4c921ede9..79efb02e7 100644
--- a/java/awt/image/BandCombineOp.java
+++ b/java/awt/image/BandCombineOp.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/BandedSampleModel.java b/java/awt/image/BandedSampleModel.java
index 68a4466ee..24d315a1c 100644
--- a/java/awt/image/BandedSampleModel.java
+++ b/java/awt/image/BandedSampleModel.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation
+/* Copyright (C) 2004, 2005, Free Software Foundation
This file is part of GNU Classpath.
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,9 +53,17 @@ public final class BandedSampleModel extends ComponentSampleModel
private int numberOfBits;
private int numElems;
+ private static int[] createBankArray(int size)
+ {
+ int[] result = new int[size];
+ for (int i = 0; i < size; i++)
+ result[i] = i;
+ return result;
+ }
+
public BandedSampleModel(int dataType, int w, int h, int numBands)
{
- super(dataType, w, h, 1, w, new int[numBands]);
+ this(dataType, w, h, w, createBankArray(numBands), new int[numBands]);
}
public BandedSampleModel(int dataType, int w, int h, int scanlineStride,
@@ -103,6 +111,10 @@ public final class BandedSampleModel extends ComponentSampleModel
public SampleModel createSubsetSampleModel(int[] bands)
{
+ if (bands.length > bankIndices.length)
+ throw new
+ RasterFormatException("BandedSampleModel createSubsetSampleModel too"
+ +" many bands");
int[] newoff = new int[bands.length];
int[] newbanks = new int[bands.length];
for (int i=0; i < bands.length; i++)
@@ -112,11 +124,6 @@ public final class BandedSampleModel extends ComponentSampleModel
newbanks[i] = bankIndices[b];
}
- if (bands.length > bankIndices.length)
- throw new
- RasterFormatException("BandedSampleModel createSubsetSampleModel too"
- +" many bands");
-
return new BandedSampleModel(dataType, width, height, scanlineStride,
newbanks, newoff);
}
@@ -192,7 +199,7 @@ public final class BandedSampleModel extends ComponentSampleModel
{
if (iArray == null) iArray = new int[numBands];
for (int i=0; i < numBands; i++)
- iArray[i] = getSample(x, y, 0, data);
+ iArray[i] = getSample(x, y, i, data);
return iArray;
}
@@ -223,13 +230,15 @@ public final class BandedSampleModel extends ComponentSampleModel
{
if (iArray == null) iArray = new int[w*h*numBands];
int outOffset = 0;
- for (y=0; y<h; y++)
+ int maxX = x + w;
+ int maxY = y + h;
+ for (int yy = x; yy < maxY; yy++)
{
- for (x=0; x<w;)
+ for (int xx = x; xx < maxX; xx++)
{
- for (int b=0; b < numBands; b++)
+ for (int b = 0; b < numBands; b++)
{
- int offset = bandOffsets[b] + y * scanlineStride + x;
+ int offset = bandOffsets[b] + yy * scanlineStride + xx;
iArray[outOffset++] =
data.getElem(bankIndices[b], offset);
}
@@ -281,11 +290,13 @@ public final class BandedSampleModel extends ComponentSampleModel
{
if (iArray == null) iArray = new int[w*h];
int outOffset = 0;
- for (y=0; y<h; y++)
+ int maxX = x + w;
+ int maxY = y + h;
+ for (int yy = y; yy < maxY; yy++)
{
- for (x=0; x<w;)
+ for (int xx = x; xx < maxX; xx++)
{
- int offset = bandOffsets[b] + y * scanlineStride + x;
+ int offset = bandOffsets[b] + yy * scanlineStride + xx;
iArray[outOffset++] =
data.getElem(bankIndices[b], offset);
}
@@ -328,7 +339,7 @@ public final class BandedSampleModel extends ComponentSampleModel
DataBufferByte out = (DataBufferByte) data;
byte[] in = (byte[]) obj;
for (int i=0; i < numBands; i++)
- out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[0];
+ out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[i];
return;
}
case DataBuffer.TYPE_SHORT:
@@ -336,7 +347,7 @@ public final class BandedSampleModel extends ComponentSampleModel
DataBufferShort out = (DataBufferShort) data;
short[] in = (short[]) obj;
for (int i=0; i < numBands; i++)
- out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[0];
+ out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[i];
return;
}
case DataBuffer.TYPE_USHORT:
@@ -344,7 +355,7 @@ public final class BandedSampleModel extends ComponentSampleModel
DataBufferUShort out = (DataBufferUShort) data;
short[] in = (short[]) obj;
for (int i=0; i < numBands; i++)
- out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[0];
+ out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[i];
return;
}
case DataBuffer.TYPE_INT:
@@ -352,7 +363,7 @@ public final class BandedSampleModel extends ComponentSampleModel
DataBufferInt out = (DataBufferInt) data;
int[] in = (int[]) obj;
for (int i=0; i < numBands; i++)
- out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[0];
+ out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[i];
return;
}
case DataBuffer.TYPE_FLOAT:
@@ -360,7 +371,7 @@ public final class BandedSampleModel extends ComponentSampleModel
DataBufferFloat out = (DataBufferFloat) data;
float[] in = (float[]) obj;
for (int i=0; i < numBands; i++)
- out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[0];
+ out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[i];
return;
}
case DataBuffer.TYPE_DOUBLE:
@@ -368,7 +379,7 @@ public final class BandedSampleModel extends ComponentSampleModel
DataBufferDouble out = (DataBufferDouble) data;
double[] in = (double[]) obj;
for (int i=0; i < numBands; i++)
- out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[0];
+ out.getData(bankIndices[i])[offset + bandOffsets[i]] = in[i];
return;
}
default:
diff --git a/java/awt/image/BufferStrategy.java b/java/awt/image/BufferStrategy.java
index 3a92cdf2a..e86aad60f 100644
--- a/java/awt/image/BufferStrategy.java
+++ b/java/awt/image/BufferStrategy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/BufferedImage.java b/java/awt/image/BufferedImage.java
index b3ba12c8e..124b81368 100644
--- a/java/awt/image/BufferedImage.java
+++ b/java/awt/image/BufferedImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/BufferedImageFilter.java b/java/awt/image/BufferedImageFilter.java
index 8fa7d473f..50d627d66 100644
--- a/java/awt/image/BufferedImageFilter.java
+++ b/java/awt/image/BufferedImageFilter.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/BufferedImageOp.java b/java/awt/image/BufferedImageOp.java
index b1b7575df..2ecbec056 100644
--- a/java/awt/image/BufferedImageOp.java
+++ b/java/awt/image/BufferedImageOp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ByteLookupTable.java b/java/awt/image/ByteLookupTable.java
index 8bea284e9..df02d0a1b 100644
--- a/java/awt/image/ByteLookupTable.java
+++ b/java/awt/image/ByteLookupTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ColorConvertOp.java b/java/awt/image/ColorConvertOp.java
index 5fcb37cc7..18609e0c4 100644
--- a/java/awt/image/ColorConvertOp.java
+++ b/java/awt/image/ColorConvertOp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ColorModel.java b/java/awt/image/ColorModel.java
index 11615fdad..1ebcb98a7 100644
--- a/java/awt/image/ColorModel.java
+++ b/java/awt/image/ColorModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ComponentColorModel.java b/java/awt/image/ComponentColorModel.java
index 2b065328e..f56688f93 100644
--- a/java/awt/image/ComponentColorModel.java
+++ b/java/awt/image/ComponentColorModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ComponentSampleModel.java b/java/awt/image/ComponentSampleModel.java
index 86161e0ae..953f63c1e 100644
--- a/java/awt/image/ComponentSampleModel.java
+++ b/java/awt/image/ComponentSampleModel.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ConvolveOp.java b/java/awt/image/ConvolveOp.java
index 92a629beb..9b89b6519 100644
--- a/java/awt/image/ConvolveOp.java
+++ b/java/awt/image/ConvolveOp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -177,11 +177,13 @@ public class ConvolveOp implements BufferedImageOp, RasterOp
}
/**
+ * Returns (a clone of) the convolution kernel.
+ *
* @return The convolution kernel.
*/
public Kernel getKernel()
{
- return kernel;
+ return (Kernel) kernel.clone();
}
/* (non-Javadoc)
diff --git a/java/awt/image/CropImageFilter.java b/java/awt/image/CropImageFilter.java
index a006d26d8..490f43cd7 100644
--- a/java/awt/image/CropImageFilter.java
+++ b/java/awt/image/CropImageFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/DataBuffer.java b/java/awt/image/DataBuffer.java
index 6f0215b10..9e4f71418 100644
--- a/java/awt/image/DataBuffer.java
+++ b/java/awt/image/DataBuffer.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation
+/* Copyright (C) 2000, 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,43 +46,43 @@ package java.awt.image;
public abstract class DataBuffer
{
/**
- * A constant representng a data type that uses <code>byte</code> primitives
+ * A constant representing a data type that uses <code>byte</code> primitives
* as the storage unit.
*/
public static final int TYPE_BYTE = 0;
/**
- * A constant representng a data type that uses <code>short</code>
+ * A constant representing a data type that uses <code>short</code>
* primitives as the storage unit.
*/
public static final int TYPE_USHORT = 1;
/**
- * A constant representng a data type that uses <code>short</code>
+ * A constant representing a data type that uses <code>short</code>
* primitives as the storage unit.
*/
public static final int TYPE_SHORT = 2;
/**
- * A constant representng a data type that uses <code>int</code>
+ * A constant representing a data type that uses <code>int</code>
* primitives as the storage unit.
*/
public static final int TYPE_INT = 3;
/**
- * A constant representng a data type that uses <code>float</code>
+ * A constant representing a data type that uses <code>float</code>
* primitives as the storage unit.
*/
public static final int TYPE_FLOAT = 4;
/**
- * A constant representng a data type that uses <code>double</code>
+ * A constant representing a data type that uses <code>double</code>
* primitives as the storage unit.
*/
public static final int TYPE_DOUBLE = 5;
/**
- * A constant representng an undefined data type.
+ * A constant representing an undefined data type.
*/
public static final int TYPE_UNDEFINED = 32;
diff --git a/java/awt/image/DataBufferByte.java b/java/awt/image/DataBufferByte.java
index a306ede6f..1113ebb78 100644
--- a/java/awt/image/DataBufferByte.java
+++ b/java/awt/image/DataBufferByte.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,6 +47,9 @@ package java.awt.image;
code is a maintenance nightmare. */
/**
+ * A {@link DataBuffer} that uses an array of <code>byte</code> primitives
+ * to represent each of its banks.
+ *
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no)
*/
public final class DataBufferByte extends DataBuffer
diff --git a/java/awt/image/DataBufferDouble.java b/java/awt/image/DataBufferDouble.java
index c6d1e100d..a8c4b9d05 100644
--- a/java/awt/image/DataBufferDouble.java
+++ b/java/awt/image/DataBufferDouble.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation
+/* Copyright (C) 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,6 +47,9 @@ package java.awt.image;
code is a maintenance nightmare. */
/**
+ * A {@link DataBuffer} that uses an array of <code>double</code> primitives
+ * to represent each of its banks.
+ *
* @since 1.4
*
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no)
@@ -226,7 +229,7 @@ public final class DataBufferDouble
*/
public void setElem(int i, int val)
{
- data[i+offset] = (double) val;
+ data[i+offset] = val;
}
/**
@@ -240,7 +243,7 @@ public final class DataBufferDouble
*/
public void setElem(int bank, int i, int val)
{
- bankData[bank][i+offsets[bank]] = (double) val;
+ bankData[bank][i+offsets[bank]] = val;
}
public float getElemFloat(int i)
diff --git a/java/awt/image/DataBufferFloat.java b/java/awt/image/DataBufferFloat.java
index 6b47e2be0..9cf8784d7 100644
--- a/java/awt/image/DataBufferFloat.java
+++ b/java/awt/image/DataBufferFloat.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation
+/* Copyright (C) 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,6 +47,9 @@ package java.awt.image;
code is a maintenance nightmare. */
/**
+ * A {@link DataBuffer} that uses an array of <code>float</code> primitives
+ * to represent each of its banks.
+ *
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no)
* @author Sascha Brawer (brawer@dandelis.ch)
*/
@@ -224,7 +227,7 @@ public final class DataBufferFloat
*/
public void setElem(int i, int val)
{
- data[i+offset] = (float) val;
+ data[i+offset] = val;
}
/**
@@ -238,7 +241,7 @@ public final class DataBufferFloat
*/
public void setElem(int bank, int i, int val)
{
- bankData[bank][i+offsets[bank]] = (float) val;
+ bankData[bank][i+offsets[bank]] = val;
}
public float getElemFloat(int i)
diff --git a/java/awt/image/DataBufferInt.java b/java/awt/image/DataBufferInt.java
index c90f95588..0aac94040 100644
--- a/java/awt/image/DataBufferInt.java
+++ b/java/awt/image/DataBufferInt.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation
+/* Copyright (C) 2000, 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,6 +47,9 @@ package java.awt.image;
code is a maintenance nightmare. */
/**
+ * A {@link DataBuffer} that uses an array of <code>int</code> primitives
+ * to represent each of its banks.
+ *
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no)
*/
public final class DataBufferInt extends DataBuffer
diff --git a/java/awt/image/DataBufferShort.java b/java/awt/image/DataBufferShort.java
index a8d8cb5ef..5c67a8d3c 100644
--- a/java/awt/image/DataBufferShort.java
+++ b/java/awt/image/DataBufferShort.java
@@ -1,5 +1,5 @@
/* DataBufferShort.java --
- Copyright (C) 2004 Free Software Foundation
+ Copyright (C) 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,6 +48,9 @@ package java.awt.image;
code is a maintenance nightmare. */
/**
+ * A {@link DataBuffer} that uses an array of <code>short</code> primitives
+ * to represent each of its banks.
+ *
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no)
*/
public final class DataBufferShort extends DataBuffer
diff --git a/java/awt/image/DataBufferUShort.java b/java/awt/image/DataBufferUShort.java
index 7466d8579..981e9e9d2 100644
--- a/java/awt/image/DataBufferUShort.java
+++ b/java/awt/image/DataBufferUShort.java
@@ -1,5 +1,5 @@
/* DataBufferUShort.java --
- Copyright (C) 2000, 2002, 2004 Free Software Foundation
+ Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,6 +48,9 @@ package java.awt.image;
code is a maintenance nightmare. */
/**
+ * A {@link DataBuffer} that uses an array of <code>short</code> primitives
+ * to represent each of its banks.
+ *
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no)
*/
public final class DataBufferUShort extends DataBuffer
diff --git a/java/awt/image/DirectColorModel.java b/java/awt/image/DirectColorModel.java
index da39fc931..c98c3f8ea 100644
--- a/java/awt/image/DirectColorModel.java
+++ b/java/awt/image/DirectColorModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/FilteredImageSource.java b/java/awt/image/FilteredImageSource.java
index 8f64f897f..8893e86a6 100644
--- a/java/awt/image/FilteredImageSource.java
+++ b/java/awt/image/FilteredImageSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ImageConsumer.java b/java/awt/image/ImageConsumer.java
index 9ac67d5cf..e1834c397 100644
--- a/java/awt/image/ImageConsumer.java
+++ b/java/awt/image/ImageConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ImageFilter.java b/java/awt/image/ImageFilter.java
index f58e5381d..9940a2b1b 100644
--- a/java/awt/image/ImageFilter.java
+++ b/java/awt/image/ImageFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ImageObserver.java b/java/awt/image/ImageObserver.java
index 738e08a1f..36dd013f4 100644
--- a/java/awt/image/ImageObserver.java
+++ b/java/awt/image/ImageObserver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ImageProducer.java b/java/awt/image/ImageProducer.java
index 47530f123..49846685a 100644
--- a/java/awt/image/ImageProducer.java
+++ b/java/awt/image/ImageProducer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ImagingOpException.java b/java/awt/image/ImagingOpException.java
index 0018dc47c..ca40e9ed3 100644
--- a/java/awt/image/ImagingOpException.java
+++ b/java/awt/image/ImagingOpException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/IndexColorModel.java b/java/awt/image/IndexColorModel.java
index 3dafe5b53..299b4dc0d 100644
--- a/java/awt/image/IndexColorModel.java
+++ b/java/awt/image/IndexColorModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/Kernel.java b/java/awt/image/Kernel.java
index 2bc82ee74..f7c29c3cd 100644
--- a/java/awt/image/Kernel.java
+++ b/java/awt/image/Kernel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/LookupOp.java b/java/awt/image/LookupOp.java
index 523aba451..f131daaba 100644
--- a/java/awt/image/LookupOp.java
+++ b/java/awt/image/LookupOp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/LookupTable.java b/java/awt/image/LookupTable.java
index 497cdb6e0..f814b8e09 100644
--- a/java/awt/image/LookupTable.java
+++ b/java/awt/image/LookupTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/MemoryImageSource.java b/java/awt/image/MemoryImageSource.java
index 6b43d00c3..c27e0bf73 100644
--- a/java/awt/image/MemoryImageSource.java
+++ b/java/awt/image/MemoryImageSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/MultiPixelPackedSampleModel.java b/java/awt/image/MultiPixelPackedSampleModel.java
index ab971c0e6..18a6e5552 100644
--- a/java/awt/image/MultiPixelPackedSampleModel.java
+++ b/java/awt/image/MultiPixelPackedSampleModel.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/PackedColorModel.java b/java/awt/image/PackedColorModel.java
index 457dded93..894e6e66f 100644
--- a/java/awt/image/PackedColorModel.java
+++ b/java/awt/image/PackedColorModel.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/PixelGrabber.java b/java/awt/image/PixelGrabber.java
index 9a68a0847..b576dbfad 100644
--- a/java/awt/image/PixelGrabber.java
+++ b/java/awt/image/PixelGrabber.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/PixelInterleavedSampleModel.java b/java/awt/image/PixelInterleavedSampleModel.java
index 1c0408cd1..4c5c436ed 100644
--- a/java/awt/image/PixelInterleavedSampleModel.java
+++ b/java/awt/image/PixelInterleavedSampleModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/RGBImageFilter.java b/java/awt/image/RGBImageFilter.java
index ca88d70e3..f7b39b97b 100644
--- a/java/awt/image/RGBImageFilter.java
+++ b/java/awt/image/RGBImageFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -147,12 +147,14 @@ public abstract class RGBImageFilter extends ImageFilter
public void filterRGBPixels(int x, int y, int w, int h, int[] pixels,
int offset, int scansize)
{
- for (int xp = x; xp < (x + w); xp++)
- for (int yp = y; yp < (y + h); yp++)
- {
- pixels[offset] = filterRGB(xp, yp, pixels[offset]);
- offset++;
- }
+ for (int yp = 0; yp < h; yp++)
+ {
+ for (int xp = 0; xp < w; xp++)
+ {
+ pixels[offset + xp] = filterRGB(xp + x, yp + y, pixels[offset + xp]);
+ }
+ offset += scansize;
+ }
}
@@ -212,9 +214,9 @@ public abstract class RGBImageFilter extends ImageFilter
else
{
//FIXME: Store the filtered pixels in a separate temporary buffer?
- convertColorModelToDefault( x, y, w, h, model, pixels, offset, scansize );
- filterRGBPixels( x, y, w, h, pixels, offset, scansize );
- consumer.setPixels(x, y, w, h, ColorModel.getRGBdefault(), pixels, offset, scansize);
+ convertColorModelToDefault( x, y, w, h, model, pixels, offset, scansize );
+ filterRGBPixels( x, y, w, h, pixels, offset, scansize );
+ consumer.setPixels(x, y, w, h, ColorModel.getRGBdefault(), pixels, offset, scansize);
}
}
diff --git a/java/awt/image/Raster.java b/java/awt/image/Raster.java
index c3cb07fb2..4af958a17 100644
--- a/java/awt/image/Raster.java
+++ b/java/awt/image/Raster.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/RasterFormatException.java b/java/awt/image/RasterFormatException.java
index 4cfc5b5dc..582c2ae5a 100644
--- a/java/awt/image/RasterFormatException.java
+++ b/java/awt/image/RasterFormatException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/RasterOp.java b/java/awt/image/RasterOp.java
index c40c7a82b..e081ca3d2 100644
--- a/java/awt/image/RasterOp.java
+++ b/java/awt/image/RasterOp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/RenderedImage.java b/java/awt/image/RenderedImage.java
index f38b44a94..b35f86021 100644
--- a/java/awt/image/RenderedImage.java
+++ b/java/awt/image/RenderedImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/ReplicateScaleFilter.java b/java/awt/image/ReplicateScaleFilter.java
index 091909d5b..3841e49d5 100644
--- a/java/awt/image/ReplicateScaleFilter.java
+++ b/java/awt/image/ReplicateScaleFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/RescaleOp.java b/java/awt/image/RescaleOp.java
index cc892b677..35b42f79c 100644
--- a/java/awt/image/RescaleOp.java
+++ b/java/awt/image/RescaleOp.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/SampleModel.java b/java/awt/image/SampleModel.java
index b0d12c0ea..257e30a5b 100644
--- a/java/awt/image/SampleModel.java
+++ b/java/awt/image/SampleModel.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2002 Free Software Foundation
+/* Copyright (C) 2000, 2001, 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -236,7 +236,7 @@ public abstract class SampleModel
{
for (int xx=x; xx<(x+w); xx++)
{
- getPixel(xx, yy, pixel, data);
+ pixel = getPixel(xx, yy, pixel, data);
System.arraycopy(pixel, 0, iArray, outOffset, numBands);
outOffset += numBands;
}
@@ -257,7 +257,7 @@ public abstract class SampleModel
{
for (int xx=x; xx<(x+w); xx++)
{
- getPixel(xx, yy, pixel, data);
+ pixel = getPixel(xx, yy, pixel, data);
System.arraycopy(pixel, 0, fArray, outOffset, numBands);
outOffset += numBands;
}
@@ -278,7 +278,7 @@ public abstract class SampleModel
{
for (int xx=x; xx<(x+w); xx++)
{
- getPixel(xx, yy, pixel, data);
+ pixel = getPixel(xx, yy, pixel, data);
System.arraycopy(pixel, 0, dArray, outOffset, numBands);
outOffset += numBands;
}
diff --git a/java/awt/image/ShortLookupTable.java b/java/awt/image/ShortLookupTable.java
index c57abeba7..5915a7939 100644
--- a/java/awt/image/ShortLookupTable.java
+++ b/java/awt/image/ShortLookupTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/SinglePixelPackedSampleModel.java b/java/awt/image/SinglePixelPackedSampleModel.java
index 32789fc63..6ccce753b 100644
--- a/java/awt/image/SinglePixelPackedSampleModel.java
+++ b/java/awt/image/SinglePixelPackedSampleModel.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/TileObserver.java b/java/awt/image/TileObserver.java
index b76217870..99aafbce8 100644
--- a/java/awt/image/TileObserver.java
+++ b/java/awt/image/TileObserver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/VolatileImage.java b/java/awt/image/VolatileImage.java
index a615e41f3..308654162 100644
--- a/java/awt/image/VolatileImage.java
+++ b/java/awt/image/VolatileImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/WritableRaster.java b/java/awt/image/WritableRaster.java
index de3648af5..2e5462fd9 100644
--- a/java/awt/image/WritableRaster.java
+++ b/java/awt/image/WritableRaster.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/WritableRenderedImage.java b/java/awt/image/WritableRenderedImage.java
index 657d6fdb6..4ed9f1013 100644
--- a/java/awt/image/WritableRenderedImage.java
+++ b/java/awt/image/WritableRenderedImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/package.html b/java/awt/image/package.html
index 53ae8da6a..50fa99d13 100644
--- a/java/awt/image/package.html
+++ b/java/awt/image/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/renderable/ContextualRenderedImageFactory.java b/java/awt/image/renderable/ContextualRenderedImageFactory.java
index 41f07714a..729d857ac 100644
--- a/java/awt/image/renderable/ContextualRenderedImageFactory.java
+++ b/java/awt/image/renderable/ContextualRenderedImageFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/renderable/ParameterBlock.java b/java/awt/image/renderable/ParameterBlock.java
index a54209d32..879d3c4fb 100644
--- a/java/awt/image/renderable/ParameterBlock.java
+++ b/java/awt/image/renderable/ParameterBlock.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/renderable/RenderContext.java b/java/awt/image/renderable/RenderContext.java
index 81d84a45e..67f0b8adb 100644
--- a/java/awt/image/renderable/RenderContext.java
+++ b/java/awt/image/renderable/RenderContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/renderable/RenderableImage.java b/java/awt/image/renderable/RenderableImage.java
index c953914c6..45d2eb7eb 100644
--- a/java/awt/image/renderable/RenderableImage.java
+++ b/java/awt/image/renderable/RenderableImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/renderable/RenderableImageOp.java b/java/awt/image/renderable/RenderableImageOp.java
index ac7cadfeb..5385a82a3 100644
--- a/java/awt/image/renderable/RenderableImageOp.java
+++ b/java/awt/image/renderable/RenderableImageOp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/renderable/RenderableImageProducer.java b/java/awt/image/renderable/RenderableImageProducer.java
index 15ec571bc..78f3051ea 100644
--- a/java/awt/image/renderable/RenderableImageProducer.java
+++ b/java/awt/image/renderable/RenderableImageProducer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/renderable/RenderedImageFactory.java b/java/awt/image/renderable/RenderedImageFactory.java
index 0d5627739..6ff4cb031 100644
--- a/java/awt/image/renderable/RenderedImageFactory.java
+++ b/java/awt/image/renderable/RenderedImageFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/image/renderable/package.html b/java/awt/image/renderable/package.html
index eaa41d344..a24237e72 100644
--- a/java/awt/image/renderable/package.html
+++ b/java/awt/image/renderable/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/package.html b/java/awt/package.html
index 99b558586..c5ff9881a 100644
--- a/java/awt/package.html
+++ b/java/awt/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/ButtonPeer.java b/java/awt/peer/ButtonPeer.java
index 42eabc853..a55fc2236 100644
--- a/java/awt/peer/ButtonPeer.java
+++ b/java/awt/peer/ButtonPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/CanvasPeer.java b/java/awt/peer/CanvasPeer.java
index 62dbf6146..4b33835a4 100644
--- a/java/awt/peer/CanvasPeer.java
+++ b/java/awt/peer/CanvasPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/CheckboxMenuItemPeer.java b/java/awt/peer/CheckboxMenuItemPeer.java
index f791d389e..5213dc906 100644
--- a/java/awt/peer/CheckboxMenuItemPeer.java
+++ b/java/awt/peer/CheckboxMenuItemPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/CheckboxPeer.java b/java/awt/peer/CheckboxPeer.java
index ad245be58..8b23b3f6f 100644
--- a/java/awt/peer/CheckboxPeer.java
+++ b/java/awt/peer/CheckboxPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/ChoicePeer.java b/java/awt/peer/ChoicePeer.java
index c4a4cc010..8ed11072e 100644
--- a/java/awt/peer/ChoicePeer.java
+++ b/java/awt/peer/ChoicePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/ComponentPeer.java b/java/awt/peer/ComponentPeer.java
index 95c7832fd..7ed8f6051 100644
--- a/java/awt/peer/ComponentPeer.java
+++ b/java/awt/peer/ComponentPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/ContainerPeer.java b/java/awt/peer/ContainerPeer.java
index f06fe2fc5..f1373a164 100644
--- a/java/awt/peer/ContainerPeer.java
+++ b/java/awt/peer/ContainerPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/DialogPeer.java b/java/awt/peer/DialogPeer.java
index 86d5dcd16..e26d64ff9 100644
--- a/java/awt/peer/DialogPeer.java
+++ b/java/awt/peer/DialogPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/FileDialogPeer.java b/java/awt/peer/FileDialogPeer.java
index cfce64211..7db179816 100644
--- a/java/awt/peer/FileDialogPeer.java
+++ b/java/awt/peer/FileDialogPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/FontPeer.java b/java/awt/peer/FontPeer.java
index 7a4a581d6..f0ba6d830 100644
--- a/java/awt/peer/FontPeer.java
+++ b/java/awt/peer/FontPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/FramePeer.java b/java/awt/peer/FramePeer.java
index 4d1af2bdd..13498ff2f 100644
--- a/java/awt/peer/FramePeer.java
+++ b/java/awt/peer/FramePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/LabelPeer.java b/java/awt/peer/LabelPeer.java
index 3020bc610..d0fca462f 100644
--- a/java/awt/peer/LabelPeer.java
+++ b/java/awt/peer/LabelPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/LightweightPeer.java b/java/awt/peer/LightweightPeer.java
index 757f33032..93cad7a03 100644
--- a/java/awt/peer/LightweightPeer.java
+++ b/java/awt/peer/LightweightPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/ListPeer.java b/java/awt/peer/ListPeer.java
index f1c2dfe41..c0f765d16 100644
--- a/java/awt/peer/ListPeer.java
+++ b/java/awt/peer/ListPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/MenuBarPeer.java b/java/awt/peer/MenuBarPeer.java
index 6018c41b3..c5f7c581f 100644
--- a/java/awt/peer/MenuBarPeer.java
+++ b/java/awt/peer/MenuBarPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/MenuComponentPeer.java b/java/awt/peer/MenuComponentPeer.java
index ebc21b6b8..1b10ca1f4 100644
--- a/java/awt/peer/MenuComponentPeer.java
+++ b/java/awt/peer/MenuComponentPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/MenuItemPeer.java b/java/awt/peer/MenuItemPeer.java
index e34c2e733..3ba1027e5 100644
--- a/java/awt/peer/MenuItemPeer.java
+++ b/java/awt/peer/MenuItemPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/MenuPeer.java b/java/awt/peer/MenuPeer.java
index 0b15914d0..c51ea73bb 100644
--- a/java/awt/peer/MenuPeer.java
+++ b/java/awt/peer/MenuPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/PanelPeer.java b/java/awt/peer/PanelPeer.java
index 36fa300ad..192632e46 100644
--- a/java/awt/peer/PanelPeer.java
+++ b/java/awt/peer/PanelPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/PopupMenuPeer.java b/java/awt/peer/PopupMenuPeer.java
index bb8202ef7..2e8f4bbed 100644
--- a/java/awt/peer/PopupMenuPeer.java
+++ b/java/awt/peer/PopupMenuPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/RobotPeer.java b/java/awt/peer/RobotPeer.java
index a187fc021..db81c809d 100644
--- a/java/awt/peer/RobotPeer.java
+++ b/java/awt/peer/RobotPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/ScrollPanePeer.java b/java/awt/peer/ScrollPanePeer.java
index a81b91f11..de4331e04 100644
--- a/java/awt/peer/ScrollPanePeer.java
+++ b/java/awt/peer/ScrollPanePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/ScrollbarPeer.java b/java/awt/peer/ScrollbarPeer.java
index fc8c54ffd..fe4f24d64 100644
--- a/java/awt/peer/ScrollbarPeer.java
+++ b/java/awt/peer/ScrollbarPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/TextAreaPeer.java b/java/awt/peer/TextAreaPeer.java
index 2500914a1..354e46d9c 100644
--- a/java/awt/peer/TextAreaPeer.java
+++ b/java/awt/peer/TextAreaPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/TextComponentPeer.java b/java/awt/peer/TextComponentPeer.java
index 62a2f4206..cacc7d8de 100644
--- a/java/awt/peer/TextComponentPeer.java
+++ b/java/awt/peer/TextComponentPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/TextFieldPeer.java b/java/awt/peer/TextFieldPeer.java
index a29bb5534..e68d6663f 100644
--- a/java/awt/peer/TextFieldPeer.java
+++ b/java/awt/peer/TextFieldPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/WindowPeer.java b/java/awt/peer/WindowPeer.java
index c98b1dacc..8f136dd2d 100644
--- a/java/awt/peer/WindowPeer.java
+++ b/java/awt/peer/WindowPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/peer/package.html b/java/awt/peer/package.html
index d12e171e7..7a7458c17 100644
--- a/java/awt/peer/package.html
+++ b/java/awt/peer/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/Book.java b/java/awt/print/Book.java
index 41f360bec..b084a1723 100644
--- a/java/awt/print/Book.java
+++ b/java/awt/print/Book.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/PageFormat.java b/java/awt/print/PageFormat.java
index d9ca50bea..6399552de 100644
--- a/java/awt/print/PageFormat.java
+++ b/java/awt/print/PageFormat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/Pageable.java b/java/awt/print/Pageable.java
index 594cfd12a..12fa542a8 100644
--- a/java/awt/print/Pageable.java
+++ b/java/awt/print/Pageable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/Paper.java b/java/awt/print/Paper.java
index e4e858727..4579da3ea 100644
--- a/java/awt/print/Paper.java
+++ b/java/awt/print/Paper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/Printable.java b/java/awt/print/Printable.java
index 3e63211ef..775167e66 100644
--- a/java/awt/print/Printable.java
+++ b/java/awt/print/Printable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/PrinterAbortException.java b/java/awt/print/PrinterAbortException.java
index 5507a4f6e..458063079 100644
--- a/java/awt/print/PrinterAbortException.java
+++ b/java/awt/print/PrinterAbortException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/PrinterException.java b/java/awt/print/PrinterException.java
index e27fdbff4..c105f549d 100644
--- a/java/awt/print/PrinterException.java
+++ b/java/awt/print/PrinterException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/PrinterGraphics.java b/java/awt/print/PrinterGraphics.java
index be8549b5e..5ca641904 100644
--- a/java/awt/print/PrinterGraphics.java
+++ b/java/awt/print/PrinterGraphics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/PrinterIOException.java b/java/awt/print/PrinterIOException.java
index e64ff4e6f..c646acdec 100644
--- a/java/awt/print/PrinterIOException.java
+++ b/java/awt/print/PrinterIOException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/PrinterJob.java b/java/awt/print/PrinterJob.java
index c7dba00e4..e61ab61bc 100644
--- a/java/awt/print/PrinterJob.java
+++ b/java/awt/print/PrinterJob.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/awt/print/package.html b/java/awt/print/package.html
index 79719dbbd..50abcbfad 100644
--- a/java/awt/print/package.html
+++ b/java/awt/print/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/AppletInitializer.java b/java/beans/AppletInitializer.java
index 0b20c86fe..69dc2cae5 100644
--- a/java/beans/AppletInitializer.java
+++ b/java/beans/AppletInitializer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/BeanDescriptor.java b/java/beans/BeanDescriptor.java
index dcab281cf..b4bc6870d 100644
--- a/java/beans/BeanDescriptor.java
+++ b/java/beans/BeanDescriptor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/BeanInfo.java b/java/beans/BeanInfo.java
index f9e04fa03..525500a38 100644
--- a/java/beans/BeanInfo.java
+++ b/java/beans/BeanInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/Beans.java b/java/beans/Beans.java
index 30f6642bb..ffcb83fc1 100644
--- a/java/beans/Beans.java
+++ b/java/beans/Beans.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/Customizer.java b/java/beans/Customizer.java
index f7b712757..b36c89f88 100644
--- a/java/beans/Customizer.java
+++ b/java/beans/Customizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/DesignMode.java b/java/beans/DesignMode.java
index 8331dca4f..39805d50c 100644
--- a/java/beans/DesignMode.java
+++ b/java/beans/DesignMode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/EventHandler.java b/java/beans/EventHandler.java
index b1e4da794..318b27489 100644
--- a/java/beans/EventHandler.java
+++ b/java/beans/EventHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/EventSetDescriptor.java b/java/beans/EventSetDescriptor.java
index b68916eb2..8624e6434 100644
--- a/java/beans/EventSetDescriptor.java
+++ b/java/beans/EventSetDescriptor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/ExceptionListener.java b/java/beans/ExceptionListener.java
index 01f952f85..0eeb8a956 100644
--- a/java/beans/ExceptionListener.java
+++ b/java/beans/ExceptionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/Expression.java b/java/beans/Expression.java
index 33268d19e..20b04f1c1 100644
--- a/java/beans/Expression.java
+++ b/java/beans/Expression.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/FeatureDescriptor.java b/java/beans/FeatureDescriptor.java
index 0d20c5539..aeb409490 100644
--- a/java/beans/FeatureDescriptor.java
+++ b/java/beans/FeatureDescriptor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/IndexedPropertyDescriptor.java b/java/beans/IndexedPropertyDescriptor.java
index 8d80be984..efdc7b402 100644
--- a/java/beans/IndexedPropertyDescriptor.java
+++ b/java/beans/IndexedPropertyDescriptor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/IntrospectionException.java b/java/beans/IntrospectionException.java
index 9883c9ab4..7bb83dac5 100644
--- a/java/beans/IntrospectionException.java
+++ b/java/beans/IntrospectionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/Introspector.java b/java/beans/Introspector.java
index 59e17d9e9..02781b46e 100644
--- a/java/beans/Introspector.java
+++ b/java/beans/Introspector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/MethodDescriptor.java b/java/beans/MethodDescriptor.java
index 27503b835..123dba60c 100644
--- a/java/beans/MethodDescriptor.java
+++ b/java/beans/MethodDescriptor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/ParameterDescriptor.java b/java/beans/ParameterDescriptor.java
index 87aceff92..8ea93a9bd 100644
--- a/java/beans/ParameterDescriptor.java
+++ b/java/beans/ParameterDescriptor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyChangeEvent.java b/java/beans/PropertyChangeEvent.java
index 75e17b18b..3e3f948e3 100644
--- a/java/beans/PropertyChangeEvent.java
+++ b/java/beans/PropertyChangeEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyChangeListener.java b/java/beans/PropertyChangeListener.java
index df5bd867d..a97e6e1c2 100644
--- a/java/beans/PropertyChangeListener.java
+++ b/java/beans/PropertyChangeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyChangeListenerProxy.java b/java/beans/PropertyChangeListenerProxy.java
index 3a04de2db..68a815303 100644
--- a/java/beans/PropertyChangeListenerProxy.java
+++ b/java/beans/PropertyChangeListenerProxy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyChangeSupport.java b/java/beans/PropertyChangeSupport.java
index 76932bccd..a0e64af4d 100644
--- a/java/beans/PropertyChangeSupport.java
+++ b/java/beans/PropertyChangeSupport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyDescriptor.java b/java/beans/PropertyDescriptor.java
index 57ed4f8ca..416d46857 100644
--- a/java/beans/PropertyDescriptor.java
+++ b/java/beans/PropertyDescriptor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyEditor.java b/java/beans/PropertyEditor.java
index 5cc3f6ab0..d1c510341 100644
--- a/java/beans/PropertyEditor.java
+++ b/java/beans/PropertyEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyEditorManager.java b/java/beans/PropertyEditorManager.java
index 89c474f0b..da2a5678c 100644
--- a/java/beans/PropertyEditorManager.java
+++ b/java/beans/PropertyEditorManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyEditorSupport.java b/java/beans/PropertyEditorSupport.java
index 2ea9aaa4f..bb68e0e31 100644
--- a/java/beans/PropertyEditorSupport.java
+++ b/java/beans/PropertyEditorSupport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/PropertyVetoException.java b/java/beans/PropertyVetoException.java
index 31f01d8b1..1f0399b4b 100644
--- a/java/beans/PropertyVetoException.java
+++ b/java/beans/PropertyVetoException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/SimpleBeanInfo.java b/java/beans/SimpleBeanInfo.java
index deadfbf46..cfb960484 100644
--- a/java/beans/SimpleBeanInfo.java
+++ b/java/beans/SimpleBeanInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/Statement.java b/java/beans/Statement.java
index 9b3c7af0a..01f86dd28 100644
--- a/java/beans/Statement.java
+++ b/java/beans/Statement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/VetoableChangeListener.java b/java/beans/VetoableChangeListener.java
index 1620a6620..5107954b0 100644
--- a/java/beans/VetoableChangeListener.java
+++ b/java/beans/VetoableChangeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/VetoableChangeListenerProxy.java b/java/beans/VetoableChangeListenerProxy.java
index d5007317b..56ca5a38c 100644
--- a/java/beans/VetoableChangeListenerProxy.java
+++ b/java/beans/VetoableChangeListenerProxy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/VetoableChangeSupport.java b/java/beans/VetoableChangeSupport.java
index f1dbc50a7..dce8dffd3 100644
--- a/java/beans/VetoableChangeSupport.java
+++ b/java/beans/VetoableChangeSupport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/Visibility.java b/java/beans/Visibility.java
index 82c0fa17a..428f3a207 100644
--- a/java/beans/Visibility.java
+++ b/java/beans/Visibility.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/XMLDecoder.java b/java/beans/XMLDecoder.java
index 877033522..238fd6bed 100644
--- a/java/beans/XMLDecoder.java
+++ b/java/beans/XMLDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContext.java b/java/beans/beancontext/BeanContext.java
index d23ee4562..3d1be7fc8 100644
--- a/java/beans/beancontext/BeanContext.java
+++ b/java/beans/beancontext/BeanContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextChild.java b/java/beans/beancontext/BeanContextChild.java
index acded069c..d1115efac 100644
--- a/java/beans/beancontext/BeanContextChild.java
+++ b/java/beans/beancontext/BeanContextChild.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextChildComponentProxy.java b/java/beans/beancontext/BeanContextChildComponentProxy.java
index 27c8bac8f..a8d6e3404 100644
--- a/java/beans/beancontext/BeanContextChildComponentProxy.java
+++ b/java/beans/beancontext/BeanContextChildComponentProxy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextChildSupport.java b/java/beans/beancontext/BeanContextChildSupport.java
index c5d1387a2..4444ad713 100644
--- a/java/beans/beancontext/BeanContextChildSupport.java
+++ b/java/beans/beancontext/BeanContextChildSupport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextContainerProxy.java b/java/beans/beancontext/BeanContextContainerProxy.java
index b582e688f..3df91038b 100644
--- a/java/beans/beancontext/BeanContextContainerProxy.java
+++ b/java/beans/beancontext/BeanContextContainerProxy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextEvent.java b/java/beans/beancontext/BeanContextEvent.java
index 1fa68292b..f326541b0 100644
--- a/java/beans/beancontext/BeanContextEvent.java
+++ b/java/beans/beancontext/BeanContextEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextMembershipEvent.java b/java/beans/beancontext/BeanContextMembershipEvent.java
index 129d0309e..317654266 100644
--- a/java/beans/beancontext/BeanContextMembershipEvent.java
+++ b/java/beans/beancontext/BeanContextMembershipEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextMembershipListener.java b/java/beans/beancontext/BeanContextMembershipListener.java
index 39b1e0775..d39c36c4b 100644
--- a/java/beans/beancontext/BeanContextMembershipListener.java
+++ b/java/beans/beancontext/BeanContextMembershipListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextProxy.java b/java/beans/beancontext/BeanContextProxy.java
index 78061f51c..49dd7a77f 100644
--- a/java/beans/beancontext/BeanContextProxy.java
+++ b/java/beans/beancontext/BeanContextProxy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextServiceAvailableEvent.java b/java/beans/beancontext/BeanContextServiceAvailableEvent.java
index 2023fd637..eea10f261 100644
--- a/java/beans/beancontext/BeanContextServiceAvailableEvent.java
+++ b/java/beans/beancontext/BeanContextServiceAvailableEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextServiceProvider.java b/java/beans/beancontext/BeanContextServiceProvider.java
index cc2c935b3..c09b5815f 100644
--- a/java/beans/beancontext/BeanContextServiceProvider.java
+++ b/java/beans/beancontext/BeanContextServiceProvider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextServiceProviderBeanInfo.java b/java/beans/beancontext/BeanContextServiceProviderBeanInfo.java
index 2c5a2c434..690b94e2c 100644
--- a/java/beans/beancontext/BeanContextServiceProviderBeanInfo.java
+++ b/java/beans/beancontext/BeanContextServiceProviderBeanInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextServiceRevokedEvent.java b/java/beans/beancontext/BeanContextServiceRevokedEvent.java
index 78e37b4be..dfa2b89b3 100644
--- a/java/beans/beancontext/BeanContextServiceRevokedEvent.java
+++ b/java/beans/beancontext/BeanContextServiceRevokedEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextServiceRevokedListener.java b/java/beans/beancontext/BeanContextServiceRevokedListener.java
index c3fcb3e4b..101e6e191 100644
--- a/java/beans/beancontext/BeanContextServiceRevokedListener.java
+++ b/java/beans/beancontext/BeanContextServiceRevokedListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextServices.java b/java/beans/beancontext/BeanContextServices.java
index 6e76b0075..cb1950360 100644
--- a/java/beans/beancontext/BeanContextServices.java
+++ b/java/beans/beancontext/BeanContextServices.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextServicesListener.java b/java/beans/beancontext/BeanContextServicesListener.java
index 5fd27f78c..becc7cdb6 100644
--- a/java/beans/beancontext/BeanContextServicesListener.java
+++ b/java/beans/beancontext/BeanContextServicesListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextServicesSupport.java b/java/beans/beancontext/BeanContextServicesSupport.java
index 318bf9bea..b7c4a49d8 100644
--- a/java/beans/beancontext/BeanContextServicesSupport.java
+++ b/java/beans/beancontext/BeanContextServicesSupport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/BeanContextSupport.java b/java/beans/beancontext/BeanContextSupport.java
index cb500530e..7e024e23a 100644
--- a/java/beans/beancontext/BeanContextSupport.java
+++ b/java/beans/beancontext/BeanContextSupport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/beancontext/package.html b/java/beans/beancontext/package.html
index 004942483..55e3bd723 100644
--- a/java/beans/beancontext/package.html
+++ b/java/beans/beancontext/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/beans/package.html b/java/beans/package.html
index ba6c1e64e..5ca800037 100644
--- a/java/beans/package.html
+++ b/java/beans/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/BufferedInputStream.java b/java/io/BufferedInputStream.java
index cda29ee35..6fb024614 100644
--- a/java/io/BufferedInputStream.java
+++ b/java/io/BufferedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/BufferedOutputStream.java b/java/io/BufferedOutputStream.java
index 137dec549..ce7ebc7e9 100644
--- a/java/io/BufferedOutputStream.java
+++ b/java/io/BufferedOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/BufferedReader.java b/java/io/BufferedReader.java
index ab5978848..4849949c9 100644
--- a/java/io/BufferedReader.java
+++ b/java/io/BufferedReader.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/BufferedWriter.java b/java/io/BufferedWriter.java
index 4beb5c541..185a53440 100644
--- a/java/io/BufferedWriter.java
+++ b/java/io/BufferedWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/ByteArrayInputStream.java b/java/io/ByteArrayInputStream.java
index 906e71a0d..2bbde95b7 100644
--- a/java/io/ByteArrayInputStream.java
+++ b/java/io/ByteArrayInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/ByteArrayOutputStream.java b/java/io/ByteArrayOutputStream.java
index 095debefa..e996ebbc7 100644
--- a/java/io/ByteArrayOutputStream.java
+++ b/java/io/ByteArrayOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/CharArrayReader.java b/java/io/CharArrayReader.java
index d0d5a2839..c14fa0775 100644
--- a/java/io/CharArrayReader.java
+++ b/java/io/CharArrayReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/CharArrayWriter.java b/java/io/CharArrayWriter.java
index 46995f4a2..81d82f31b 100644
--- a/java/io/CharArrayWriter.java
+++ b/java/io/CharArrayWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/CharConversionException.java b/java/io/CharConversionException.java
index 6f2afb53f..a7a608429 100644
--- a/java/io/CharConversionException.java
+++ b/java/io/CharConversionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/Closeable.java b/java/io/Closeable.java
index aea8f0dbf..b8523d79e 100644
--- a/java/io/Closeable.java
+++ b/java/io/Closeable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/DataInput.java b/java/io/DataInput.java
index 0aa172b17..45cb0c130 100644
--- a/java/io/DataInput.java
+++ b/java/io/DataInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/DataInputStream.java b/java/io/DataInputStream.java
index 1eda85584..d2604b51f 100644
--- a/java/io/DataInputStream.java
+++ b/java/io/DataInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -361,8 +361,8 @@ public class DataInputStream extends FilterInputStream implements DataInput
int next_c = in.read();
if (next_c != '\n' && next_c != -1)
{
- if (! (in instanceof PushbackInputStream))
- in = new PushbackInputStream(in);
+ if (!(in instanceof PushbackInputStream))
+ in = new PushbackInputStream(in);
((PushbackInputStream) in).unread(next_c);
}
break;
diff --git a/java/io/DataOutput.java b/java/io/DataOutput.java
index 70fb7d48c..0d4362332 100644
--- a/java/io/DataOutput.java
+++ b/java/io/DataOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -195,7 +195,7 @@ public interface DataOutput
*
* @exception IOException If an error occurs
*
- * @see writeInt
+ * @see #writeInt
* @see DataInput#readFloat
* @see Float#floatToIntBits
*/
@@ -216,7 +216,7 @@ public interface DataOutput
*
* @exception IOException If any other error occurs
*
- * @see writeLong
+ * @see #writeLong
* @see DataInput#readDouble
* @see Double#doubleToLongBits
*/
@@ -245,7 +245,7 @@ public interface DataOutput
*
* @exception IOException If an error occurs
*
- * @see writeChar
+ * @see #writeChar(int)
*/
void writeChars(String value) throws IOException;
diff --git a/java/io/DataOutputStream.java b/java/io/DataOutputStream.java
index c52a7eca1..39f7ed1ff 100644
--- a/java/io/DataOutputStream.java
+++ b/java/io/DataOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/DeleteFileHelper.java b/java/io/DeleteFileHelper.java
index 2ed1aa193..6e33adce8 100644
--- a/java/io/DeleteFileHelper.java
+++ b/java/io/DeleteFileHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/EOFException.java b/java/io/EOFException.java
index 2ec28c6c8..cfedb7d9e 100644
--- a/java/io/EOFException.java
+++ b/java/io/EOFException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/Externalizable.java b/java/io/Externalizable.java
index 71304e24a..113c19ff6 100644
--- a/java/io/Externalizable.java
+++ b/java/io/Externalizable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/File.java b/java/io/File.java
index a93a4c86c..3b747e6bd 100644
--- a/java/io/File.java
+++ b/java/io/File.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FileDescriptor.java b/java/io/FileDescriptor.java
index 1e44a60bb..d300c9cb6 100644
--- a/java/io/FileDescriptor.java
+++ b/java/io/FileDescriptor.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FileFilter.java b/java/io/FileFilter.java
index 916a31f2e..e57ac9fd0 100644
--- a/java/io/FileFilter.java
+++ b/java/io/FileFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FileInputStream.java b/java/io/FileInputStream.java
index 9d573e6ab..8ca38b02f 100644
--- a/java/io/FileInputStream.java
+++ b/java/io/FileInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FileNotFoundException.java b/java/io/FileNotFoundException.java
index 66809f5e7..3c11e2960 100644
--- a/java/io/FileNotFoundException.java
+++ b/java/io/FileNotFoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FileOutputStream.java b/java/io/FileOutputStream.java
index 281ae8797..10ea6b536 100644
--- a/java/io/FileOutputStream.java
+++ b/java/io/FileOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FilePermission.java b/java/io/FilePermission.java
index 6534cd85c..356787bfa 100644
--- a/java/io/FilePermission.java
+++ b/java/io/FilePermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FileReader.java b/java/io/FileReader.java
index c18613852..4a1dd5ff4 100644
--- a/java/io/FileReader.java
+++ b/java/io/FileReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FileWriter.java b/java/io/FileWriter.java
index fb48bba3e..b34db8323 100644
--- a/java/io/FileWriter.java
+++ b/java/io/FileWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FilenameFilter.java b/java/io/FilenameFilter.java
index dad3ccf28..57b4d3b18 100644
--- a/java/io/FilenameFilter.java
+++ b/java/io/FilenameFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FilterInputStream.java b/java/io/FilterInputStream.java
index 477521aa8..d3cb9e4f7 100644
--- a/java/io/FilterInputStream.java
+++ b/java/io/FilterInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FilterOutputStream.java b/java/io/FilterOutputStream.java
index 98db4ac12..4c2dfc04a 100644
--- a/java/io/FilterOutputStream.java
+++ b/java/io/FilterOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FilterReader.java b/java/io/FilterReader.java
index 4cc6940c5..2bd040a7f 100644
--- a/java/io/FilterReader.java
+++ b/java/io/FilterReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/FilterWriter.java b/java/io/FilterWriter.java
index 5a8ede572..9b9ce33f9 100644
--- a/java/io/FilterWriter.java
+++ b/java/io/FilterWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/Flushable.java b/java/io/Flushable.java
index 0008485c8..e9718d60a 100644
--- a/java/io/Flushable.java
+++ b/java/io/Flushable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/IOException.java b/java/io/IOException.java
index f1e3848da..cf3ad1946 100644
--- a/java/io/IOException.java
+++ b/java/io/IOException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/InputStream.java b/java/io/InputStream.java
index 6478f122d..03f5d3c48 100644
--- a/java/io/InputStream.java
+++ b/java/io/InputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/InputStreamReader.java b/java/io/InputStreamReader.java
index 3acb7dc06..315af83e1 100644
--- a/java/io/InputStreamReader.java
+++ b/java/io/InputStreamReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/InterruptedIOException.java b/java/io/InterruptedIOException.java
index 614fb3b89..96ec83649 100644
--- a/java/io/InterruptedIOException.java
+++ b/java/io/InterruptedIOException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/InvalidClassException.java b/java/io/InvalidClassException.java
index a98a22b91..c71b0c67f 100644
--- a/java/io/InvalidClassException.java
+++ b/java/io/InvalidClassException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/InvalidObjectException.java b/java/io/InvalidObjectException.java
index c7846a539..deee876db 100644
--- a/java/io/InvalidObjectException.java
+++ b/java/io/InvalidObjectException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/LineNumberInputStream.java b/java/io/LineNumberInputStream.java
index ae6292e92..da43097f2 100644
--- a/java/io/LineNumberInputStream.java
+++ b/java/io/LineNumberInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -216,8 +216,8 @@ public class LineNumberInputStream extends FilterInputStream
* a single "\n" value which is stored in the buffer. Only a single
* byte is counted towards the number of bytes read in this case.
*
- * @param buf The array into which the bytes read should be stored
- * @param offset The offset into the array to start storing bytes
+ * @param b The array into which the bytes read should be stored
+ * @param off The offset into the array to start storing bytes
* @param len The requested number of bytes to read
*
* @return The actual number of bytes read, or -1 if end of stream
diff --git a/java/io/LineNumberReader.java b/java/io/LineNumberReader.java
index 0a4797bd6..ea418a5e4 100644
--- a/java/io/LineNumberReader.java
+++ b/java/io/LineNumberReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/NotActiveException.java b/java/io/NotActiveException.java
index 22c7e63d8..949ba8eca 100644
--- a/java/io/NotActiveException.java
+++ b/java/io/NotActiveException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/NotSerializableException.java b/java/io/NotSerializableException.java
index fbafd3dd5..d49c939e3 100644
--- a/java/io/NotSerializableException.java
+++ b/java/io/NotSerializableException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/ObjectInput.java b/java/io/ObjectInput.java
index f53294dce..175b60f9d 100644
--- a/java/io/ObjectInput.java
+++ b/java/io/ObjectInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/ObjectInputStream.java b/java/io/ObjectInputStream.java
index 2119917f0..4b6b7ac7b 100644
--- a/java/io/ObjectInputStream.java
+++ b/java/io/ObjectInputStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -82,7 +82,7 @@ public class ObjectInputStream extends InputStream
public ObjectInputStream(InputStream in)
throws IOException, StreamCorruptedException
{
- if (Configuration.DEBUG)
+ if (DEBUG)
{
String val = System.getProperty("gcj.dumpobjects");
if (dump == false && val != null && !val.equals(""))
@@ -780,7 +780,7 @@ public class ObjectInputStream extends InputStream
if (callersClassLoader == null)
{
callersClassLoader = currentLoader ();
- if (Configuration.DEBUG && dump)
+ if (DEBUG && dump)
{
dumpElementln ("CallersClassLoader = " + callersClassLoader);
}
@@ -1918,6 +1918,8 @@ public class ObjectInputStream extends InputStream
// The nesting depth for debugging output
private int depth = 0;
+ private static final boolean DEBUG = false;
+
private void dumpElement (String msg)
{
System.out.print(msg);
diff --git a/java/io/ObjectInputValidation.java b/java/io/ObjectInputValidation.java
index 79fa13fab..4fdb8414f 100644
--- a/java/io/ObjectInputValidation.java
+++ b/java/io/ObjectInputValidation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/ObjectOutput.java b/java/io/ObjectOutput.java
index 8c5833443..d35a09c3a 100644
--- a/java/io/ObjectOutput.java
+++ b/java/io/ObjectOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/ObjectOutputStream.java b/java/io/ObjectOutputStream.java
index 57ee60b01..21cc83142 100644
--- a/java/io/ObjectOutputStream.java
+++ b/java/io/ObjectOutputStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -152,7 +152,7 @@ public class ObjectOutputStream extends OutputStream
useSubclassMethod = false;
writeStreamHeader();
- if (Configuration.DEBUG)
+ if (DEBUG)
{
String val = System.getProperty("gcj.dumpobjects");
if (val != null && !val.equals(""))
@@ -384,7 +384,7 @@ public class ObjectOutputStream extends OutputStream
setBlockDataMode(false);
try
{
- if (Configuration.DEBUG)
+ if (DEBUG)
{
e.printStackTrace(System.out);
}
@@ -395,7 +395,7 @@ public class ObjectOutputStream extends OutputStream
StreamCorruptedException ex =
new StreamCorruptedException
(ioe + " thrown while exception was being written to stream.");
- if (Configuration.DEBUG)
+ if (DEBUG)
{
ex.printStackTrace(System.out);
}
@@ -1492,10 +1492,16 @@ public class ObjectOutputStream extends OutputStream
Field f = getField (klass, field_name);
ObjectStreamField of = new ObjectStreamField(f.getName(), f.getType());
- if (of.getTypeString() == null ||
- !of.getTypeString().equals(type_code))
+ /* if of is primitive something went wrong
+ * in the check for primitive classes in writeFields.
+ */
+ if (of.isPrimitive())
throw new InvalidClassException
- ("invalid type code for " + field_name + " in class " + klass.getName());
+ ("invalid type code for " + field_name + " in class " + klass.getName() + " : object stream field is primitive");
+
+ if (!of.getTypeString().equals(type_code))
+ throw new InvalidClassException
+ ("invalid type code for " + field_name + " in class " + klass.getName() + " : object stream field " + of + " has type string " + of.getTypeString() + " instead of " + type_code);
Object o = f.get (obj);
// FIXME: We should check the type_code here
@@ -1566,6 +1572,8 @@ public class ObjectOutputStream extends OutputStream
// Set if we're generating debugging dumps
private boolean dump = false;
+ private static final boolean DEBUG = false;
+
static
{
if (Configuration.INIT_LOAD_LIBRARY)
diff --git a/java/io/ObjectStreamClass.java b/java/io/ObjectStreamClass.java
index 7cc842fa6..2b3c803bf 100644
--- a/java/io/ObjectStreamClass.java
+++ b/java/io/ObjectStreamClass.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -493,19 +493,66 @@ outer:
return null;
}
+ private static boolean inSamePackage(Class c1, Class c2)
+ {
+ String name1 = c1.getName();
+ String name2 = c2.getName();
+
+ int id1 = name1.lastIndexOf('.');
+ int id2 = name2.lastIndexOf('.');
+
+ // Handle the default package
+ if (id1 == -1 || id2 == -1)
+ return id1 == id2;
+
+ String package1 = name1.substring(0, id1);
+ String package2 = name2.substring(0, id2);
+
+ return package1.equals(package2);
+ }
+
+ final static Class[] noArgs = new Class[0];
+
+ private static Method findAccessibleMethod(String name, Class from)
+ {
+ for (Class c = from; c != null; c = c.getSuperclass())
+ {
+ try
+ {
+ Method res = c.getDeclaredMethod(name, noArgs);
+ int mods = res.getModifiers();
+
+ if (c != from
+ && (Modifier.isPrivate(mods)
+ || ! Modifier.isPublic(mods) && ! inSamePackage(c, from)))
+ continue;
+
+ AccessController.doPrivileged(new SetAccessibleAction(res));
+ return res;
+ }
+ catch (NoSuchMethodException e)
+ {
+ }
+ }
+
+ return null;
+ }
+
private void cacheMethods()
{
Method[] methods = forClass().getDeclaredMethods();
+
readObjectMethod = findMethod(methods, "readObject",
new Class[] { ObjectInputStream.class },
Void.TYPE, true);
writeObjectMethod = findMethod(methods, "writeObject",
new Class[] { ObjectOutputStream.class },
Void.TYPE, true);
- readResolveMethod = findMethod(methods, "readResolve",
- new Class[0], Object.class, false);
- writeReplaceMethod = findMethod(methods, "writeReplace",
- new Class[0], Object.class, false);
+
+ // readResolve and writeReplace can be in parent classes, as long as they
+ // are accessible from this class.
+ readResolveMethod = findAccessibleMethod("readResolve", forClass());
+ writeReplaceMethod = findAccessibleMethod("writeReplace", forClass());
}
private ObjectStreamClass(Class cl)
diff --git a/java/io/ObjectStreamConstants.java b/java/io/ObjectStreamConstants.java
index f7cd597fa..f1a4af724 100644
--- a/java/io/ObjectStreamConstants.java
+++ b/java/io/ObjectStreamConstants.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/ObjectStreamException.java b/java/io/ObjectStreamException.java
index fa2c78021..61d4dd09e 100644
--- a/java/io/ObjectStreamException.java
+++ b/java/io/ObjectStreamException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/ObjectStreamField.java b/java/io/ObjectStreamField.java
index aab9a7d38..21578aca2 100644
--- a/java/io/ObjectStreamField.java
+++ b/java/io/ObjectStreamField.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/OptionalDataException.java b/java/io/OptionalDataException.java
index 858302c04..8d8b1bda0 100644
--- a/java/io/OptionalDataException.java
+++ b/java/io/OptionalDataException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/OutputStream.java b/java/io/OutputStream.java
index 6cdacf51e..e3caa70f1 100644
--- a/java/io/OutputStream.java
+++ b/java/io/OutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/OutputStreamWriter.java b/java/io/OutputStreamWriter.java
index bf0144789..ee229796c 100644
--- a/java/io/OutputStreamWriter.java
+++ b/java/io/OutputStreamWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/PipedInputStream.java b/java/io/PipedInputStream.java
index d42458788..beb310b4f 100644
--- a/java/io/PipedInputStream.java
+++ b/java/io/PipedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/PipedOutputStream.java b/java/io/PipedOutputStream.java
index a65235676..81881050d 100644
--- a/java/io/PipedOutputStream.java
+++ b/java/io/PipedOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/PipedReader.java b/java/io/PipedReader.java
index c91fc211c..90fc10f67 100644
--- a/java/io/PipedReader.java
+++ b/java/io/PipedReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/PipedWriter.java b/java/io/PipedWriter.java
index e053d55b2..92786e5de 100644
--- a/java/io/PipedWriter.java
+++ b/java/io/PipedWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/PrintStream.java b/java/io/PrintStream.java
index 83dd02724..1e70099e0 100644
--- a/java/io/PrintStream.java
+++ b/java/io/PrintStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/PrintWriter.java b/java/io/PrintWriter.java
index bdb1090bd..13570ff0a 100644
--- a/java/io/PrintWriter.java
+++ b/java/io/PrintWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/PushbackInputStream.java b/java/io/PushbackInputStream.java
index aedd7eb65..71cf24427 100644
--- a/java/io/PushbackInputStream.java
+++ b/java/io/PushbackInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/PushbackReader.java b/java/io/PushbackReader.java
index 05f343ed9..04bccc70f 100644
--- a/java/io/PushbackReader.java
+++ b/java/io/PushbackReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/RandomAccessFile.java b/java/io/RandomAccessFile.java
index ead37a31d..048b3f3b2 100644
--- a/java/io/RandomAccessFile.java
+++ b/java/io/RandomAccessFile.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/Reader.java b/java/io/Reader.java
index dbe886d8a..6da1813c6 100644
--- a/java/io/Reader.java
+++ b/java/io/Reader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/SequenceInputStream.java b/java/io/SequenceInputStream.java
index 0781b0acb..5ff85e989 100644
--- a/java/io/SequenceInputStream.java
+++ b/java/io/SequenceInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/Serializable.java b/java/io/Serializable.java
index 1ca6638c8..a6d99f6d5 100644
--- a/java/io/Serializable.java
+++ b/java/io/Serializable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/SerializablePermission.java b/java/io/SerializablePermission.java
index 1d2636bc1..b5c07e4ec 100644
--- a/java/io/SerializablePermission.java
+++ b/java/io/SerializablePermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/StreamCorruptedException.java b/java/io/StreamCorruptedException.java
index 86002cbe8..d24d12150 100644
--- a/java/io/StreamCorruptedException.java
+++ b/java/io/StreamCorruptedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/StreamTokenizer.java b/java/io/StreamTokenizer.java
index b5bd38f2d..bd7773b19 100644
--- a/java/io/StreamTokenizer.java
+++ b/java/io/StreamTokenizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/StringBufferInputStream.java b/java/io/StringBufferInputStream.java
index 4ed9a9f71..090881985 100644
--- a/java/io/StringBufferInputStream.java
+++ b/java/io/StringBufferInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/StringReader.java b/java/io/StringReader.java
index 372f5c013..7e4e7d84f 100644
--- a/java/io/StringReader.java
+++ b/java/io/StringReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/StringWriter.java b/java/io/StringWriter.java
index 103baca31..5a16e63ea 100644
--- a/java/io/StringWriter.java
+++ b/java/io/StringWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/SyncFailedException.java b/java/io/SyncFailedException.java
index 5563268ff..c514c44f2 100644
--- a/java/io/SyncFailedException.java
+++ b/java/io/SyncFailedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/UTFDataFormatException.java b/java/io/UTFDataFormatException.java
index d4f2df253..6bb76aebd 100644
--- a/java/io/UTFDataFormatException.java
+++ b/java/io/UTFDataFormatException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/UnsupportedEncodingException.java b/java/io/UnsupportedEncodingException.java
index 5159fb2b2..cf0ab64cb 100644
--- a/java/io/UnsupportedEncodingException.java
+++ b/java/io/UnsupportedEncodingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/WriteAbortedException.java b/java/io/WriteAbortedException.java
index a7787805f..f051dc975 100644
--- a/java/io/WriteAbortedException.java
+++ b/java/io/WriteAbortedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/Writer.java b/java/io/Writer.java
index 46261739c..660b69089 100644
--- a/java/io/Writer.java
+++ b/java/io/Writer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/io/package.html b/java/io/package.html
index 7ed6a4c84..02e1c5bc3 100644
--- a/java/io/package.html
+++ b/java/io/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/AbstractMethodError.java b/java/lang/AbstractMethodError.java
index 8fd20d3c0..b9eb622ee 100644
--- a/java/lang/AbstractMethodError.java
+++ b/java/lang/AbstractMethodError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Appendable.java b/java/lang/Appendable.java
index 135bd3b18..c09667733 100644
--- a/java/lang/Appendable.java
+++ b/java/lang/Appendable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ArithmeticException.java b/java/lang/ArithmeticException.java
index 7fb9c1cc4..5acea4353 100644
--- a/java/lang/ArithmeticException.java
+++ b/java/lang/ArithmeticException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ArrayIndexOutOfBoundsException.java b/java/lang/ArrayIndexOutOfBoundsException.java
index abc6d1d60..371623bda 100644
--- a/java/lang/ArrayIndexOutOfBoundsException.java
+++ b/java/lang/ArrayIndexOutOfBoundsException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ArrayStoreException.java b/java/lang/ArrayStoreException.java
index 00a084ec1..042e78c55 100644
--- a/java/lang/ArrayStoreException.java
+++ b/java/lang/ArrayStoreException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/AssertionError.java b/java/lang/AssertionError.java
index 499cb345c..778eb5830 100644
--- a/java/lang/AssertionError.java
+++ b/java/lang/AssertionError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Boolean.java b/java/lang/Boolean.java
index 1aec44431..df9fcfe6e 100644
--- a/java/lang/Boolean.java
+++ b/java/lang/Boolean.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Byte.java b/java/lang/Byte.java
index 4cf6b9fac..7f53a494b 100644
--- a/java/lang/Byte.java
+++ b/java/lang/Byte.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/CharSequence.java b/java/lang/CharSequence.java
index 5f5147b0b..5c014e173 100644
--- a/java/lang/CharSequence.java
+++ b/java/lang/CharSequence.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Character.java b/java/lang/Character.java
index d8aef71c2..31321694a 100644
--- a/java/lang/Character.java
+++ b/java/lang/Character.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Class.java b/java/lang/Class.java
index 4bc984d02..d6ba44e81 100644
--- a/java/lang/Class.java
+++ b/java/lang/Class.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -954,18 +954,18 @@ public final class Class<T>
private String resourcePath(String resourceName)
{
if (resourceName.length() > 0)
- {
- if (resourceName.charAt(0) != '/')
- {
- String pkg = getPackagePortion(getName());
- if (pkg.length() > 0)
- resourceName = pkg.replace('.','/') + '/' + resourceName;
- }
- else
{
- resourceName = resourceName.substring(1);
+ if (resourceName.charAt(0) != '/')
+ {
+ String pkg = getPackagePortion(getName());
+ if (pkg.length() > 0)
+ resourceName = pkg.replace('.','/') + '/' + resourceName;
+ }
+ else
+ {
+ resourceName = resourceName.substring(1);
+ }
}
- }
return resourceName;
}
diff --git a/java/lang/ClassCastException.java b/java/lang/ClassCastException.java
index 49c526222..c490f42aa 100644
--- a/java/lang/ClassCastException.java
+++ b/java/lang/ClassCastException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ClassCircularityError.java b/java/lang/ClassCircularityError.java
index fb93327eb..ecdfb7aaf 100644
--- a/java/lang/ClassCircularityError.java
+++ b/java/lang/ClassCircularityError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ClassFormatError.java b/java/lang/ClassFormatError.java
index d28cacdf7..7f90f5cd8 100644
--- a/java/lang/ClassFormatError.java
+++ b/java/lang/ClassFormatError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ClassLoader.java b/java/lang/ClassLoader.java
index 8acbd488b..d73b9f600 100644
--- a/java/lang/ClassLoader.java
+++ b/java/lang/ClassLoader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -124,12 +124,12 @@ import java.util.StringTokenizer;
public abstract class ClassLoader
{
/**
- * All classes loaded by this classloader. VM's may choose to implement
- * this cache natively; but it is here available for use if necessary. It
- * is not private in order to allow native code (and trusted subclasses)
- * access to this field.
+ * All classes loaded by this classloader. If the VM's chooses to implement
+ * this cache natively this field will be null.
+ * It is not private in order to allow VMClassLoader access to this field.
*/
- final HashMap<String, Class<?>> loadedClasses = new HashMap<String, Class<?>>();
+ final HashMap<String, Class<?>> loadedClasses =
+ VMClassLoader.USE_VM_CACHE ? null : new HashMap<String, Class<?>>();
/**
* All packages defined by this classloader. It is not private in order to
@@ -479,7 +479,8 @@ public abstract class ClassLoader
Class<?> retval = VMClassLoader.defineClass(this, name, data,
offset, len, domain);
- loadedClasses.put(retval.getName(), retval);
+ if (! VMClassLoader.USE_VM_CACHE)
+ loadedClasses.put(retval.getName(), retval);
return retval;
}
@@ -565,9 +566,7 @@ public abstract class ClassLoader
*/
protected final synchronized Class<?> findLoadedClass(String name)
{
- // NOTE: If the VM is keeping its own cache, it may make sense to have
- // this method be native.
- return loadedClasses.get(name);
+ return VMClassLoader.findLoadedClass(this, name);
}
/**
diff --git a/java/lang/ClassNotFoundException.java b/java/lang/ClassNotFoundException.java
index cfa03f596..6b6ae949d 100644
--- a/java/lang/ClassNotFoundException.java
+++ b/java/lang/ClassNotFoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/CloneNotSupportedException.java b/java/lang/CloneNotSupportedException.java
index 488e9154c..9d10cf389 100644
--- a/java/lang/CloneNotSupportedException.java
+++ b/java/lang/CloneNotSupportedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Cloneable.java b/java/lang/Cloneable.java
index 0a8243ea2..10f20ce3b 100644
--- a/java/lang/Cloneable.java
+++ b/java/lang/Cloneable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Comparable.java b/java/lang/Comparable.java
index 7f197eedc..4ad39af83 100644
--- a/java/lang/Comparable.java
+++ b/java/lang/Comparable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Compiler.java b/java/lang/Compiler.java
index 1179f79fa..56fb951bb 100644
--- a/java/lang/Compiler.java
+++ b/java/lang/Compiler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Double.java b/java/lang/Double.java
index cde503f8c..504b719fc 100644
--- a/java/lang/Double.java
+++ b/java/lang/Double.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Error.java b/java/lang/Error.java
index fc1d62278..f66c7548b 100644
--- a/java/lang/Error.java
+++ b/java/lang/Error.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Exception.java b/java/lang/Exception.java
index 68a7dcb2d..42f7c640d 100644
--- a/java/lang/Exception.java
+++ b/java/lang/Exception.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ExceptionInInitializerError.java b/java/lang/ExceptionInInitializerError.java
index 966a9f3ac..1e5809580 100644
--- a/java/lang/ExceptionInInitializerError.java
+++ b/java/lang/ExceptionInInitializerError.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Float.java b/java/lang/Float.java
index 3de8d27a1..ff7440765 100644
--- a/java/lang/Float.java
+++ b/java/lang/Float.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/IllegalAccessError.java b/java/lang/IllegalAccessError.java
index a45efd163..e4821606a 100644
--- a/java/lang/IllegalAccessError.java
+++ b/java/lang/IllegalAccessError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/IllegalAccessException.java b/java/lang/IllegalAccessException.java
index f1ac3b0a3..a352c8b1b 100644
--- a/java/lang/IllegalAccessException.java
+++ b/java/lang/IllegalAccessException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,10 @@ exception statement from your version. */
package java.lang;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
/**
* Thrown whenever a reflective method tries to do something that the
* compiler would not allow. For example, using reflection to set a private
diff --git a/java/lang/IllegalArgumentException.java b/java/lang/IllegalArgumentException.java
index 714bc23f8..75a0b8bfe 100644
--- a/java/lang/IllegalArgumentException.java
+++ b/java/lang/IllegalArgumentException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/IllegalMonitorStateException.java b/java/lang/IllegalMonitorStateException.java
index 7461942cc..13b3f952b 100644
--- a/java/lang/IllegalMonitorStateException.java
+++ b/java/lang/IllegalMonitorStateException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/IllegalStateException.java b/java/lang/IllegalStateException.java
index 145dd0069..6b4e5f842 100644
--- a/java/lang/IllegalStateException.java
+++ b/java/lang/IllegalStateException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/IllegalThreadStateException.java b/java/lang/IllegalThreadStateException.java
index d7e0a2ba4..e14385a3e 100644
--- a/java/lang/IllegalThreadStateException.java
+++ b/java/lang/IllegalThreadStateException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/IncompatibleClassChangeError.java b/java/lang/IncompatibleClassChangeError.java
index 7885a2542..637410a90 100644
--- a/java/lang/IncompatibleClassChangeError.java
+++ b/java/lang/IncompatibleClassChangeError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/IndexOutOfBoundsException.java b/java/lang/IndexOutOfBoundsException.java
index 4886f01da..c53c67e55 100644
--- a/java/lang/IndexOutOfBoundsException.java
+++ b/java/lang/IndexOutOfBoundsException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/InheritableThreadLocal.java b/java/lang/InheritableThreadLocal.java
index d64db20d5..9d02e921d 100644
--- a/java/lang/InheritableThreadLocal.java
+++ b/java/lang/InheritableThreadLocal.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/InstantiationError.java b/java/lang/InstantiationError.java
index 3d2750ce8..dd12b513a 100644
--- a/java/lang/InstantiationError.java
+++ b/java/lang/InstantiationError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/InstantiationException.java b/java/lang/InstantiationException.java
index 4aa4bd077..367b14bd2 100644
--- a/java/lang/InstantiationException.java
+++ b/java/lang/InstantiationException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Integer.java b/java/lang/Integer.java
index d6cc81a18..af26ea0ca 100644
--- a/java/lang/Integer.java
+++ b/java/lang/Integer.java
@@ -1,5 +1,6 @@
/* Integer.java -- object wrapper for int
- Copyright (C) 1998, 1999, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/InternalError.java b/java/lang/InternalError.java
index d612d092f..3a95bbeaf 100644
--- a/java/lang/InternalError.java
+++ b/java/lang/InternalError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/InterruptedException.java b/java/lang/InterruptedException.java
index 58951abc4..da2173c8b 100644
--- a/java/lang/InterruptedException.java
+++ b/java/lang/InterruptedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/LinkageError.java b/java/lang/LinkageError.java
index ead768f37..028702081 100644
--- a/java/lang/LinkageError.java
+++ b/java/lang/LinkageError.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Long.java b/java/lang/Long.java
index b67a4ad25..ce88a5b1c 100644
--- a/java/lang/Long.java
+++ b/java/lang/Long.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Math.java b/java/lang/Math.java
index f1f68c483..08081e252 100644
--- a/java/lang/Math.java
+++ b/java/lang/Math.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/NegativeArraySizeException.java b/java/lang/NegativeArraySizeException.java
index 695ee0e6e..fcfa52e47 100644
--- a/java/lang/NegativeArraySizeException.java
+++ b/java/lang/NegativeArraySizeException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/NoClassDefFoundError.java b/java/lang/NoClassDefFoundError.java
index 8fbdb2990..7e8e6caff 100644
--- a/java/lang/NoClassDefFoundError.java
+++ b/java/lang/NoClassDefFoundError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/NoSuchFieldError.java b/java/lang/NoSuchFieldError.java
index 965dfd660..af42e35dc 100644
--- a/java/lang/NoSuchFieldError.java
+++ b/java/lang/NoSuchFieldError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/NoSuchFieldException.java b/java/lang/NoSuchFieldException.java
index 30beeefcd..74d52d137 100644
--- a/java/lang/NoSuchFieldException.java
+++ b/java/lang/NoSuchFieldException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/NoSuchMethodError.java b/java/lang/NoSuchMethodError.java
index 494f7a271..2bda776e8 100644
--- a/java/lang/NoSuchMethodError.java
+++ b/java/lang/NoSuchMethodError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/NoSuchMethodException.java b/java/lang/NoSuchMethodException.java
index fa3e06e4f..e423efb79 100644
--- a/java/lang/NoSuchMethodException.java
+++ b/java/lang/NoSuchMethodException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/NullPointerException.java b/java/lang/NullPointerException.java
index c55341cfd..29a4ee086 100644
--- a/java/lang/NullPointerException.java
+++ b/java/lang/NullPointerException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Number.java b/java/lang/Number.java
index 70d0fe854..eb81f78c8 100644
--- a/java/lang/Number.java
+++ b/java/lang/Number.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/NumberFormatException.java b/java/lang/NumberFormatException.java
index 478036ffc..bf98156d1 100644
--- a/java/lang/NumberFormatException.java
+++ b/java/lang/NumberFormatException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Object.java b/java/lang/Object.java
index 1d3e19eaf..a94f4c636 100644
--- a/java/lang/Object.java
+++ b/java/lang/Object.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/OutOfMemoryError.java b/java/lang/OutOfMemoryError.java
index 105aae5c2..66da563a0 100644
--- a/java/lang/OutOfMemoryError.java
+++ b/java/lang/OutOfMemoryError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Package.java b/java/lang/Package.java
index 956d4cfe4..0b436fe81 100644
--- a/java/lang/Package.java
+++ b/java/lang/Package.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Process.java b/java/lang/Process.java
index e8c52760d..b6e18ca4d 100644
--- a/java/lang/Process.java
+++ b/java/lang/Process.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Readable.java b/java/lang/Readable.java
index b3012d51d..efc1985d6 100644
--- a/java/lang/Readable.java
+++ b/java/lang/Readable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Runnable.java b/java/lang/Runnable.java
index ee8d6842c..32c52b94a 100644
--- a/java/lang/Runnable.java
+++ b/java/lang/Runnable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Runtime.java b/java/lang/Runtime.java
index 0ab3761a2..64ca5d912 100644
--- a/java/lang/Runtime.java
+++ b/java/lang/Runtime.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/RuntimeException.java b/java/lang/RuntimeException.java
index 6e63ed3fd..72cf0872b 100644
--- a/java/lang/RuntimeException.java
+++ b/java/lang/RuntimeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/RuntimePermission.java b/java/lang/RuntimePermission.java
index f4b46f68f..ca33307d1 100644
--- a/java/lang/RuntimePermission.java
+++ b/java/lang/RuntimePermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/SecurityException.java b/java/lang/SecurityException.java
index baaa4eeb6..84be33ce0 100644
--- a/java/lang/SecurityException.java
+++ b/java/lang/SecurityException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/SecurityManager.java b/java/lang/SecurityManager.java
index 8a9012192..8a890798a 100644
--- a/java/lang/SecurityManager.java
+++ b/java/lang/SecurityManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Short.java b/java/lang/Short.java
index 632a24f7c..7e1553d9e 100644
--- a/java/lang/Short.java
+++ b/java/lang/Short.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/StackOverflowError.java b/java/lang/StackOverflowError.java
index dc4c8ccf4..5188ddda1 100644
--- a/java/lang/StackOverflowError.java
+++ b/java/lang/StackOverflowError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/StackTraceElement.java b/java/lang/StackTraceElement.java
index 262d58228..6dd4d8532 100644
--- a/java/lang/StackTraceElement.java
+++ b/java/lang/StackTraceElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/StrictMath.java b/java/lang/StrictMath.java
index 5a9c7cabb..32bd3540d 100644
--- a/java/lang/StrictMath.java
+++ b/java/lang/StrictMath.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/String.java b/java/lang/String.java
index 173c68168..b8a3a6627 100644
--- a/java/lang/String.java
+++ b/java/lang/String.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,20 +40,24 @@ exception statement from your version. */
package java.lang;
import gnu.java.lang.CharData;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CharsetEncoder;
import java.nio.charset.CodingErrorAction;
-import java.nio.charset.CharacterCodingException;
import java.nio.charset.IllegalCharsetNameException;
import java.nio.charset.UnsupportedCharsetException;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.io.Serializable;
-import java.io.UnsupportedEncodingException;
+import java.text.Collator;
import java.util.Comparator;
import java.util.Locale;
+import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
/**
* Strings represent an immutable set of characters. All String literals
@@ -848,7 +852,7 @@ public final class String
* @param ignoreCase true if case should be ignored in comparision
* @param toffset index to start comparison at for this String
* @param other String to compare region to this String
- * @param oofset index to start comparison at for other
+ * @param ooffset index to start comparison at for other
* @param len number of characters to compare
* @return true if regions match, false otherwise
* @throws NullPointerException if other is null
@@ -1094,8 +1098,8 @@ public final class String
* Creates a substring of this String, starting at a specified index
* and ending at one character before a specified index.
*
- * @param begin index to start substring (inclusive, base 0)
- * @param end index to end at (exclusive)
+ * @param beginIndex index to start substring (inclusive, base 0)
+ * @param endIndex index to end at (exclusive)
* @return new String which is a substring of this String
* @throws IndexOutOfBoundsException if begin &lt; 0 || end &gt; length()
* || begin &gt; end (while unspecified, this is a
@@ -1444,7 +1448,7 @@ public final class String
* Trims all characters less than or equal to <code>'\u0020'</code>
* (<code>' '</code>) from the beginning and end of this String. This
* includes many, but not all, ASCII control characters, and all
- * {@link Character#whitespace(char)}.
+ * {@link Character#isWhitespace(char)}.
*
* @return new trimmed String, or this if nothing trimmed
*/
@@ -1482,10 +1486,9 @@ public final class String
*/
public char[] toCharArray()
{
- // XXX ORP 1.0.9 crashes on (char[]) clone() during bootstrap, so we
- // omit this optimization for now.
- // if (count == value.length)
- // return (char[]) value.clone();
+ if (count == value.length)
+ return (char[]) value.clone();
+
char[] copy = new char[count];
VMSystem.arraycopy(value, offset, copy, 0, count);
return copy;
diff --git a/java/lang/StringBuffer.java b/java/lang/StringBuffer.java
index 8b2c3b90b..1fabd6541 100644
--- a/java/lang/StringBuffer.java
+++ b/java/lang/StringBuffer.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/StringBuilder.java b/java/lang/StringBuilder.java
index dc176be48..6c2c47e43 100644
--- a/java/lang/StringBuilder.java
+++ b/java/lang/StringBuilder.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/StringIndexOutOfBoundsException.java b/java/lang/StringIndexOutOfBoundsException.java
index ea0df6890..ebc4a04a3 100644
--- a/java/lang/StringIndexOutOfBoundsException.java
+++ b/java/lang/StringIndexOutOfBoundsException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/System.java b/java/lang/System.java
index e85e271b2..45ad0ef7e 100644
--- a/java/lang/System.java
+++ b/java/lang/System.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Thread.java b/java/lang/Thread.java
index 91f7bde77..dfaf1a4a0 100644
--- a/java/lang/Thread.java
+++ b/java/lang/Thread.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ThreadDeath.java b/java/lang/ThreadDeath.java
index 29c452e30..c7d88fb2a 100644
--- a/java/lang/ThreadDeath.java
+++ b/java/lang/ThreadDeath.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ThreadGroup.java b/java/lang/ThreadGroup.java
index 0704a159f..7fbef88f4 100644
--- a/java/lang/ThreadGroup.java
+++ b/java/lang/ThreadGroup.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ThreadLocal.java b/java/lang/ThreadLocal.java
index 1dbfbc19a..11d545d3f 100644
--- a/java/lang/ThreadLocal.java
+++ b/java/lang/ThreadLocal.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Throwable.java b/java/lang/Throwable.java
index d69b54314..c47a14bf0 100644
--- a/java/lang/Throwable.java
+++ b/java/lang/Throwable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/TypeNotPresentException.java b/java/lang/TypeNotPresentException.java
index cf0f6c219..3010c968b 100644
--- a/java/lang/TypeNotPresentException.java
+++ b/java/lang/TypeNotPresentException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/UnknownError.java b/java/lang/UnknownError.java
index c200689c9..7b317bd2a 100644
--- a/java/lang/UnknownError.java
+++ b/java/lang/UnknownError.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/UnsatisfiedLinkError.java b/java/lang/UnsatisfiedLinkError.java
index ab4095644..0d513d8e0 100644
--- a/java/lang/UnsatisfiedLinkError.java
+++ b/java/lang/UnsatisfiedLinkError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/UnsupportedClassVersionError.java b/java/lang/UnsupportedClassVersionError.java
index 7250949c9..d6974b769 100644
--- a/java/lang/UnsupportedClassVersionError.java
+++ b/java/lang/UnsupportedClassVersionError.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/UnsupportedOperationException.java b/java/lang/UnsupportedOperationException.java
index fb93669ce..e691cc7c9 100644
--- a/java/lang/UnsupportedOperationException.java
+++ b/java/lang/UnsupportedOperationException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/VerifyError.java b/java/lang/VerifyError.java
index c5ae8dd83..350ceaa5e 100644
--- a/java/lang/VerifyError.java
+++ b/java/lang/VerifyError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/VirtualMachineError.java b/java/lang/VirtualMachineError.java
index 161e4e647..3062c4fe8 100644
--- a/java/lang/VirtualMachineError.java
+++ b/java/lang/VirtualMachineError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/Void.java b/java/lang/Void.java
index b51078928..05ed98503 100644
--- a/java/lang/Void.java
+++ b/java/lang/Void.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/annotation/AnnotationFormatError.java b/java/lang/annotation/AnnotationFormatError.java
index faa6e76a1..40ce3ca10 100644
--- a/java/lang/annotation/AnnotationFormatError.java
+++ b/java/lang/annotation/AnnotationFormatError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/annotation/AnnotationTypeMismatchException.java b/java/lang/annotation/AnnotationTypeMismatchException.java
index 6ddc09e3e..653305d63 100644
--- a/java/lang/annotation/AnnotationTypeMismatchException.java
+++ b/java/lang/annotation/AnnotationTypeMismatchException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/annotation/package.html b/java/lang/annotation/package.html
index 5ef2edd44..ee70daf9e 100644
--- a/java/lang/annotation/package.html
+++ b/java/lang/annotation/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/package.html b/java/lang/package.html
index c4e763cb2..715418dbd 100644
--- a/java/lang/package.html
+++ b/java/lang/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ref/PhantomReference.java b/java/lang/ref/PhantomReference.java
index ce4ef0052..67e97d399 100644
--- a/java/lang/ref/PhantomReference.java
+++ b/java/lang/ref/PhantomReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ref/Reference.java b/java/lang/ref/Reference.java
index 5c734833d..e7e316840 100644
--- a/java/lang/ref/Reference.java
+++ b/java/lang/ref/Reference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ref/ReferenceQueue.java b/java/lang/ref/ReferenceQueue.java
index ded979563..7ea48c0b6 100644
--- a/java/lang/ref/ReferenceQueue.java
+++ b/java/lang/ref/ReferenceQueue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ref/SoftReference.java b/java/lang/ref/SoftReference.java
index ac66672fb..077dc173d 100644
--- a/java/lang/ref/SoftReference.java
+++ b/java/lang/ref/SoftReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ref/WeakReference.java b/java/lang/ref/WeakReference.java
index 618aa3338..1de90fc2d 100644
--- a/java/lang/ref/WeakReference.java
+++ b/java/lang/ref/WeakReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/ref/package.html b/java/lang/ref/package.html
index ada3d8ccf..d3d176280 100644
--- a/java/lang/ref/package.html
+++ b/java/lang/ref/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/AccessibleObject.java b/java/lang/reflect/AccessibleObject.java
index d50f3de9d..24418c971 100644
--- a/java/lang/reflect/AccessibleObject.java
+++ b/java/lang/reflect/AccessibleObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/Array.java b/java/lang/reflect/Array.java
index 6cce3f7d6..35c77da36 100644
--- a/java/lang/reflect/Array.java
+++ b/java/lang/reflect/Array.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/GenericArrayType.java b/java/lang/reflect/GenericArrayType.java
index 341c4c197..8dc33a796 100644
--- a/java/lang/reflect/GenericArrayType.java
+++ b/java/lang/reflect/GenericArrayType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/GenericSignatureFormatError.java b/java/lang/reflect/GenericSignatureFormatError.java
index efe47f9fe..ab6928de6 100644
--- a/java/lang/reflect/GenericSignatureFormatError.java
+++ b/java/lang/reflect/GenericSignatureFormatError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/InvocationHandler.java b/java/lang/reflect/InvocationHandler.java
index 514d943f5..208e621ee 100644
--- a/java/lang/reflect/InvocationHandler.java
+++ b/java/lang/reflect/InvocationHandler.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/InvocationTargetException.java b/java/lang/reflect/InvocationTargetException.java
index 2593921a3..af79d3a19 100644
--- a/java/lang/reflect/InvocationTargetException.java
+++ b/java/lang/reflect/InvocationTargetException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/Member.java b/java/lang/reflect/Member.java
index ef980d872..9983b275a 100644
--- a/java/lang/reflect/Member.java
+++ b/java/lang/reflect/Member.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/Modifier.java b/java/lang/reflect/Modifier.java
index 7061ef773..ff4d72e3d 100644
--- a/java/lang/reflect/Modifier.java
+++ b/java/lang/reflect/Modifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/ParameterizedType.java b/java/lang/reflect/ParameterizedType.java
index fb0ebb306..61081c962 100644
--- a/java/lang/reflect/ParameterizedType.java
+++ b/java/lang/reflect/ParameterizedType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/Proxy.java b/java/lang/reflect/Proxy.java
index 5ba978d1e..07ea24942 100644
--- a/java/lang/reflect/Proxy.java
+++ b/java/lang/reflect/Proxy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,7 +38,6 @@ exception statement from your version. */
package java.lang.reflect;
-import gnu.classpath.Configuration;
import gnu.java.lang.reflect.TypeSignature;
import java.io.Serializable;
@@ -263,16 +262,16 @@ public class Proxy implements Serializable
Class clazz = (Class) proxyClasses.get(pt);
if (clazz == null)
{
- if (Configuration.HAVE_NATIVE_GET_PROXY_CLASS)
- clazz = getProxyClass0(loader, interfaces);
+ if (VMProxy.HAVE_NATIVE_GET_PROXY_CLASS)
+ clazz = VMProxy.getProxyClass(loader, interfaces);
else
{
- ProxyData data = (Configuration.HAVE_NATIVE_GET_PROXY_DATA
- ? getProxyData0(loader, interfaces)
+ ProxyData data = (VMProxy.HAVE_NATIVE_GET_PROXY_DATA
+ ? VMProxy.getProxyData(loader, interfaces)
: ProxyData.getProxyData(pt));
- clazz = (Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS
- ? generateProxyClass0(loader, data)
+ clazz = (VMProxy.HAVE_NATIVE_GENERATE_PROXY_CLASS
+ ? VMProxy.generateProxyClass(loader, data)
: new ClassFactory(data).generate(loader));
}
@@ -388,74 +387,6 @@ public class Proxy implements Serializable
}
/**
- * Optional native method to replace (and speed up) the pure Java
- * implementation of getProxyClass. Only needed if
- * Configuration.HAVE_NATIVE_GET_PROXY_CLASS is true, this does the
- * work of both getProxyData0 and generateProxyClass0 with no
- * intermediate form in Java. The native code may safely assume that
- * this class must be created, and does not already exist.
- *
- * @param loader the class loader to define the proxy class in; null
- * implies the bootstrap class loader
- * @param interfaces the interfaces the class will extend
- * @return the generated proxy class
- * @throws IllegalArgumentException if the constraints for getProxyClass
- * were violated, except for problems with null
- * @throws NullPointerException if `interfaces' is null or contains
- * a null entry, or if handler is null
- * @see Configuration#HAVE_NATIVE_GET_PROXY_CLASS
- * @see #getProxyClass(ClassLoader, Class[])
- * @see #getProxyData0(ClassLoader, Class[])
- * @see #generateProxyClass0(ProxyData)
- */
- private static native Class getProxyClass0(ClassLoader loader,
- Class[] interfaces);
-
- /**
- * Optional native method to replace (and speed up) the pure Java
- * implementation of getProxyData. Only needed if
- * Configuration.HAVE_NATIVE_GET_PROXY_DATA is true. The native code
- * may safely assume that a new ProxyData object must be created which
- * does not duplicate any existing ones.
- *
- * @param loader the class loader to define the proxy class in; null
- * implies the bootstrap class loader
- * @param interfaces the interfaces the class will extend
- * @return all data that is required to make this proxy class
- * @throws IllegalArgumentException if the constraints for getProxyClass
- * were violated, except for problems with null
- * @throws NullPointerException if `interfaces' is null or contains
- * a null entry, or if handler is null
- * @see Configuration.HAVE_NATIVE_GET_PROXY_DATA
- * @see #getProxyClass(ClassLoader, Class[])
- * @see #getProxyClass0(ClassLoader, Class[])
- * @see ProxyType#getProxyData()
- */
- private static native ProxyData getProxyData0(ClassLoader loader,
- Class[] interfaces);
-
- /**
- * Optional native method to replace (and speed up) the pure Java
- * implementation of generateProxyClass. Only needed if
- * Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS is true. The native
- * code may safely assume that a new Class must be created, and that
- * the ProxyData object does not describe any existing class.
- *
- * @param loader the class loader to define the proxy class in; null
- * implies the bootstrap class loader
- * @param data the struct of information to convert to a Class. This
- * has already been verified for all problems except exceeding
- * VM limitations
- * @return the newly generated class
- * @throws IllegalArgumentException if VM limitations are exceeded
- * @see #getProxyClass(ClassLoader, Class[])
- * @see #getProxyClass0(ClassLoader, Class[])
- * @see ProxyData#generateProxyClass(ClassLoader)
- */
- private static native Class generateProxyClass0(ClassLoader loader,
- ProxyData data);
-
- /**
* Helper class for mapping unique ClassLoader and interface combinations
* to proxy classes.
*
@@ -720,7 +651,7 @@ public class Proxy implements Serializable
*
* @author Eric Blake (ebb9@email.byu.edu)
*/
- private static final class ProxyData
+ static final class ProxyData
{
/**
* The package this class is in <b>including the trailing dot</b>
@@ -876,7 +807,6 @@ public class Proxy implements Serializable
private static final class ClassFactory
{
/** Constants for assisting the compilation */
- private static final byte POOL = 0;
private static final byte FIELD = 1;
private static final byte METHOD = 2;
private static final byte INTERFACE = 3;
@@ -909,7 +839,6 @@ public class Proxy implements Serializable
private static final char GETFIELD = 180;
private static final char INVOKEVIRTUAL = 182;
private static final char INVOKESPECIAL = 183;
- private static final char INVOKESTATIC = 184;
private static final char INVOKEINTERFACE = 185;
private static final char NEW = 187;
private static final char ANEWARRAY = 189;
diff --git a/java/lang/reflect/ReflectPermission.java b/java/lang/reflect/ReflectPermission.java
index 26fd0fc4a..56eccf813 100644
--- a/java/lang/reflect/ReflectPermission.java
+++ b/java/lang/reflect/ReflectPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/Type.java b/java/lang/reflect/Type.java
index da8b68c7c..c9ea5bfb9 100644
--- a/java/lang/reflect/Type.java
+++ b/java/lang/reflect/Type.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/UndeclaredThrowableException.java b/java/lang/reflect/UndeclaredThrowableException.java
index 2e26e5988..6d5a80084 100644
--- a/java/lang/reflect/UndeclaredThrowableException.java
+++ b/java/lang/reflect/UndeclaredThrowableException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/WildcardType.java b/java/lang/reflect/WildcardType.java
index a769c41f4..4f789067c 100644
--- a/java/lang/reflect/WildcardType.java
+++ b/java/lang/reflect/WildcardType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/lang/reflect/package.html b/java/lang/reflect/package.html
index f2ad7635d..9f7ed6328 100644
--- a/java/lang/reflect/package.html
+++ b/java/lang/reflect/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/math/BigDecimal.java b/java/math/BigDecimal.java
index 90d8ee643..2eddb2aa9 100644
--- a/java/math/BigDecimal.java
+++ b/java/math/BigDecimal.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/math/BigInteger.java b/java/math/BigInteger.java
index 844d2a817..95e9b8f7c 100644
--- a/java/math/BigInteger.java
+++ b/java/math/BigInteger.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/math/package.html b/java/math/package.html
index c95b0beb8..62d12ea16 100644
--- a/java/math/package.html
+++ b/java/math/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/Authenticator.java b/java/net/Authenticator.java
index 8a951cb2d..229e140cc 100644
--- a/java/net/Authenticator.java
+++ b/java/net/Authenticator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/BindException.java b/java/net/BindException.java
index fcb4f9d22..cfb509a70 100644
--- a/java/net/BindException.java
+++ b/java/net/BindException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/ConnectException.java b/java/net/ConnectException.java
index 2a3ec940d..c115d2fe0 100644
--- a/java/net/ConnectException.java
+++ b/java/net/ConnectException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/ContentHandler.java b/java/net/ContentHandler.java
index a3b946cd9..7f63e7402 100644
--- a/java/net/ContentHandler.java
+++ b/java/net/ContentHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/ContentHandlerFactory.java b/java/net/ContentHandlerFactory.java
index fa8e8188f..51a92cf15 100644
--- a/java/net/ContentHandlerFactory.java
+++ b/java/net/ContentHandlerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/DatagramPacket.java b/java/net/DatagramPacket.java
index 087a80630..e642f889c 100644
--- a/java/net/DatagramPacket.java
+++ b/java/net/DatagramPacket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/DatagramSocket.java b/java/net/DatagramSocket.java
index e00425f29..8596b7f80 100644
--- a/java/net/DatagramSocket.java
+++ b/java/net/DatagramSocket.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -209,7 +209,9 @@ public class DatagramSocket
}
catch (IOException e)
{
- throw new SocketException(e.getMessage());
+ SocketException se = new SocketException();
+ se.initCause(e);
+ throw se;
}
}
diff --git a/java/net/DatagramSocketImpl.java b/java/net/DatagramSocketImpl.java
index b48019f77..cfcde92e5 100644
--- a/java/net/DatagramSocketImpl.java
+++ b/java/net/DatagramSocketImpl.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/DatagramSocketImplFactory.java b/java/net/DatagramSocketImplFactory.java
index 54764577d..014651aa8 100644
--- a/java/net/DatagramSocketImplFactory.java
+++ b/java/net/DatagramSocketImplFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/FileNameMap.java b/java/net/FileNameMap.java
index 37033c2b1..6f1d25a6a 100644
--- a/java/net/FileNameMap.java
+++ b/java/net/FileNameMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/HttpURLConnection.java b/java/net/HttpURLConnection.java
index c4c99378e..07eae48e7 100644
--- a/java/net/HttpURLConnection.java
+++ b/java/net/HttpURLConnection.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/Inet4Address.java b/java/net/Inet4Address.java
index 1931b8984..74ce6efb8 100644
--- a/java/net/Inet4Address.java
+++ b/java/net/Inet4Address.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -142,7 +142,7 @@ public final class Inet4Address extends InetAddress
*/
public boolean isMCNodeLocal()
{
- return isMCNodeLocal();
+ return super.isMCNodeLocal();
}
/**
@@ -172,7 +172,7 @@ public final class Inet4Address extends InetAddress
*/
public boolean isMCOrgLocal()
{
- return isMCOrgLocal();
+ return super.isMCOrgLocal();
}
/**
diff --git a/java/net/Inet6Address.java b/java/net/Inet6Address.java
index 69d266a4c..0d62fe919 100644
--- a/java/net/Inet6Address.java
+++ b/java/net/Inet6Address.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/InetAddress.java b/java/net/InetAddress.java
index 6aac00c59..94dc6cb6d 100644
--- a/java/net/InetAddress.java
+++ b/java/net/InetAddress.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/InetSocketAddress.java b/java/net/InetSocketAddress.java
index 5dc63dcd0..30d34e7e8 100644
--- a/java/net/InetSocketAddress.java
+++ b/java/net/InetSocketAddress.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/JarURLConnection.java b/java/net/JarURLConnection.java
index 99a46cc5c..3067ecb81 100644
--- a/java/net/JarURLConnection.java
+++ b/java/net/JarURLConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/MalformedURLException.java b/java/net/MalformedURLException.java
index 6fdf12ae5..27e201886 100644
--- a/java/net/MalformedURLException.java
+++ b/java/net/MalformedURLException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/MimeTypeMapper.java b/java/net/MimeTypeMapper.java
index 7173b3deb..1747f4d56 100644
--- a/java/net/MimeTypeMapper.java
+++ b/java/net/MimeTypeMapper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/MulticastSocket.java b/java/net/MulticastSocket.java
index 65e63253c..03bdf1e77 100644
--- a/java/net/MulticastSocket.java
+++ b/java/net/MulticastSocket.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/NetPermission.java b/java/net/NetPermission.java
index 38a15c48a..cabe54e06 100644
--- a/java/net/NetPermission.java
+++ b/java/net/NetPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/NetworkInterface.java b/java/net/NetworkInterface.java
index cd59e4e45..eccd2dac9 100644
--- a/java/net/NetworkInterface.java
+++ b/java/net/NetworkInterface.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/NoRouteToHostException.java b/java/net/NoRouteToHostException.java
index 5427fb58e..48c3a8e60 100644
--- a/java/net/NoRouteToHostException.java
+++ b/java/net/NoRouteToHostException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/PasswordAuthentication.java b/java/net/PasswordAuthentication.java
index 671783d84..1d4ec8961 100644
--- a/java/net/PasswordAuthentication.java
+++ b/java/net/PasswordAuthentication.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/PortUnreachableException.java b/java/net/PortUnreachableException.java
index f3ba17b7d..49a8c9ea1 100644
--- a/java/net/PortUnreachableException.java
+++ b/java/net/PortUnreachableException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/ProtocolException.java b/java/net/ProtocolException.java
index 7f14ab25d..27718a979 100644
--- a/java/net/ProtocolException.java
+++ b/java/net/ProtocolException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/ServerSocket.java b/java/net/ServerSocket.java
index 9ad2557ac..f73c7482a 100644
--- a/java/net/ServerSocket.java
+++ b/java/net/ServerSocket.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/Socket.java b/java/net/Socket.java
index 5d3223769..9432a6be1 100644
--- a/java/net/Socket.java
+++ b/java/net/Socket.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/SocketAddress.java b/java/net/SocketAddress.java
index d8239a416..48ab01009 100644
--- a/java/net/SocketAddress.java
+++ b/java/net/SocketAddress.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/SocketException.java b/java/net/SocketException.java
index f130d52f2..37b2f6fba 100644
--- a/java/net/SocketException.java
+++ b/java/net/SocketException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/SocketImpl.java b/java/net/SocketImpl.java
index 4016a2fb6..77f470be3 100644
--- a/java/net/SocketImpl.java
+++ b/java/net/SocketImpl.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/SocketImplFactory.java b/java/net/SocketImplFactory.java
index 99374dedc..b7cb10ca6 100644
--- a/java/net/SocketImplFactory.java
+++ b/java/net/SocketImplFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/SocketOptions.java b/java/net/SocketOptions.java
index b266919f5..659bf750c 100644
--- a/java/net/SocketOptions.java
+++ b/java/net/SocketOptions.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/SocketPermission.java b/java/net/SocketPermission.java
index 0cd18c772..8ccd01bae 100644
--- a/java/net/SocketPermission.java
+++ b/java/net/SocketPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/SocketTimeoutException.java b/java/net/SocketTimeoutException.java
index 35bae90ac..21b0dcd86 100644
--- a/java/net/SocketTimeoutException.java
+++ b/java/net/SocketTimeoutException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/URI.java b/java/net/URI.java
index 116be7fee..aeceeeec5 100644
--- a/java/net/URI.java
+++ b/java/net/URI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/URISyntaxException.java b/java/net/URISyntaxException.java
index f170d7373..27a70bdb7 100644
--- a/java/net/URISyntaxException.java
+++ b/java/net/URISyntaxException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/URL.java b/java/net/URL.java
index b4a849f73..627dbc391 100644
--- a/java/net/URL.java
+++ b/java/net/URL.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/URLClassLoader.java b/java/net/URLClassLoader.java
index 0878e86bc..d84d7ab2a 100644
--- a/java/net/URLClassLoader.java
+++ b/java/net/URLClassLoader.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -536,7 +536,7 @@ public class URLClassLoader extends SecureClassLoader
Resource getResource(String name)
{
File file = new File(dir, name);
- if (file.exists())
+ if (file.exists() && !file.isDirectory())
return new FileResource(this, name, file);
return null;
}
@@ -554,36 +554,11 @@ public class URLClassLoader extends SecureClassLoader
InputStream getInputStream() throws IOException
{
- // Delegate to the URL content handler mechanism to retrieve an
- // HTML representation of the directory listing if a directory
- if (file.isDirectory())
- {
- URL url = getURL();
- return url.openStream();
- }
- // Otherwise simply return a FileInputStream
return new FileInputStream(file);
}
public int getLength()
{
- // Delegate to the URL content handler mechanism to retrieve the
- // length of the HTML representation of the directory listing if
- // a directory, or -1 if an exception occurs opening the directory.
- if (file.isDirectory())
- {
- URL url = getURL();
- try
- {
- URLConnection connection = url.openConnection();
- return connection.getContentLength();
- }
- catch (IOException e)
- {
- return -1;
- }
- }
- // Otherwise simply return the file length
return (int) file.length();
}
@@ -613,10 +588,10 @@ public class URLClassLoader extends SecureClassLoader
* in the order given to the URLClassLoader which uses these URLs to
* load classes and resources (after using the default parent ClassLoader).
*
- * @exception SecurityException if the SecurityManager disallows the
- * creation of a ClassLoader.
* @param urls Locations that should be searched by this ClassLoader when
* resolving Classes or Resources.
+ * @exception SecurityException if the SecurityManager disallows the
+ * creation of a ClassLoader.
* @see SecureClassLoader
*/
public URLClassLoader(URL[] urls) throws SecurityException
@@ -635,13 +610,13 @@ public class URLClassLoader extends SecureClassLoader
* can throw a SecurityException. Then the supplied URLs are added
* in the order given to the URLClassLoader which uses these URLs to
* load classes and resources (after using the supplied parent ClassLoader).
- * @exception SecurityException if the SecurityManager disallows the
- * creation of a ClassLoader.
- * @exception SecurityException
* @param urls Locations that should be searched by this ClassLoader when
* resolving Classes or Resources.
* @param parent The parent class loader used before trying this class
* loader.
+ * @exception SecurityException if the SecurityManager disallows the
+ * creation of a ClassLoader.
+ * @exception SecurityException
* @see SecureClassLoader
*/
public URLClassLoader(URL[] urls, ClassLoader parent)
@@ -683,14 +658,14 @@ public class URLClassLoader extends SecureClassLoader
* load classes and resources (after using the supplied parent ClassLoader).
* It will use the supplied <CODE>URLStreamHandlerFactory</CODE> to get the
* protocol handlers of the supplied URLs.
- * @exception SecurityException if the SecurityManager disallows the
- * creation of a ClassLoader.
- * @exception SecurityException
* @param urls Locations that should be searched by this ClassLoader when
* resolving Classes or Resources.
* @param parent The parent class loader used before trying this class
* loader.
* @param factory Used to get the protocol handler for the URLs.
+ * @exception SecurityException if the SecurityManager disallows the
+ * creation of a ClassLoader.
+ * @exception SecurityException
* @see SecureClassLoader
*/
public URLClassLoader(URL[] urls, ClassLoader parent,
@@ -789,12 +764,12 @@ public class URLClassLoader extends SecureClassLoader
* package is sealed. If the Manifest indicates that the package is sealed
* then the Package will be sealed with respect to the supplied URL.
*
- * @exception IllegalArgumentException If this package name already exists
- * in this class loader
* @param name The name of the package
* @param manifest The manifest describing the specification,
* implementation and sealing details of the package
* @param url the code source url to seal the package
+ * @exception IllegalArgumentException If this package name already exists
+ * in this class loader
* @return the defined Package
*/
protected Package definePackage(String name, Manifest manifest, URL url)
@@ -1041,11 +1016,11 @@ public class URLClassLoader extends SecureClassLoader
/**
* Finds all the resources with a particular name from all the locations.
*
- * @exception IOException when an error occurs accessing one of the
- * locations
* @param resourceName the name of the resource to lookup
* @return a (possible empty) enumeration of URLs where the resource can be
* found
+ * @exception IOException when an error occurs accessing one of the
+ * locations
*/
public Enumeration findResources(String resourceName)
throws IOException
@@ -1080,7 +1055,7 @@ public class URLClassLoader extends SecureClassLoader
*
* @param source The codesource that needs the permissions to be accessed
* @return the collection of permissions needed to access the code resource
- * @see java.security.SecureClassLoader#getPermissions()
+ * @see java.security.SecureClassLoader#getPermissions(CodeSource)
*/
protected PermissionCollection getPermissions(CodeSource source)
{
diff --git a/java/net/URLConnection.java b/java/net/URLConnection.java
index d78bd7f1c..0a12d588d 100644
--- a/java/net/URLConnection.java
+++ b/java/net/URLConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/URLDecoder.java b/java/net/URLDecoder.java
index f9ae588f2..ca40c386a 100644
--- a/java/net/URLDecoder.java
+++ b/java/net/URLDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/URLEncoder.java b/java/net/URLEncoder.java
index 75127af1a..dacc3848e 100644
--- a/java/net/URLEncoder.java
+++ b/java/net/URLEncoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/URLStreamHandler.java b/java/net/URLStreamHandler.java
index fbe863f24..57ce2dfa2 100644
--- a/java/net/URLStreamHandler.java
+++ b/java/net/URLStreamHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/URLStreamHandlerFactory.java b/java/net/URLStreamHandlerFactory.java
index ce6ba89c5..c92c71fb2 100644
--- a/java/net/URLStreamHandlerFactory.java
+++ b/java/net/URLStreamHandlerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/UnknownHostException.java b/java/net/UnknownHostException.java
index 39eb94c09..c5ba18330 100644
--- a/java/net/UnknownHostException.java
+++ b/java/net/UnknownHostException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/UnknownServiceException.java b/java/net/UnknownServiceException.java
index 12f16f506..65cc8f592 100644
--- a/java/net/UnknownServiceException.java
+++ b/java/net/UnknownServiceException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/net/package.html b/java/net/package.html
index c1ad808a2..133ee716f 100644
--- a/java/net/package.html
+++ b/java/net/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/Buffer.java b/java/nio/Buffer.java
index 89b95bcb4..47dabf29e 100644
--- a/java/nio/Buffer.java
+++ b/java/nio/Buffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/BufferOverflowException.java b/java/nio/BufferOverflowException.java
index 68dcd541d..588c03290 100644
--- a/java/nio/BufferOverflowException.java
+++ b/java/nio/BufferOverflowException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/BufferUnderflowException.java b/java/nio/BufferUnderflowException.java
index 2ff1bc40b..4b4161c64 100644
--- a/java/nio/BufferUnderflowException.java
+++ b/java/nio/BufferUnderflowException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/ByteBuffer.java b/java/nio/ByteBuffer.java
index e25a3f83f..78ad44718 100644
--- a/java/nio/ByteBuffer.java
+++ b/java/nio/ByteBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/ByteBufferHelper.java b/java/nio/ByteBufferHelper.java
index 799d41c2a..6c46ca5d7 100644
--- a/java/nio/ByteBufferHelper.java
+++ b/java/nio/ByteBufferHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/ByteBufferImpl.java b/java/nio/ByteBufferImpl.java
index 47961700a..48d715200 100644
--- a/java/nio/ByteBufferImpl.java
+++ b/java/nio/ByteBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/ByteOrder.java b/java/nio/ByteOrder.java
index 3c3911193..39a3ff893 100644
--- a/java/nio/ByteOrder.java
+++ b/java/nio/ByteOrder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/CharBuffer.java b/java/nio/CharBuffer.java
index 497d4434a..751e1cec3 100644
--- a/java/nio/CharBuffer.java
+++ b/java/nio/CharBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/CharBufferImpl.java b/java/nio/CharBufferImpl.java
index a6c81d914..33f8dab98 100644
--- a/java/nio/CharBufferImpl.java
+++ b/java/nio/CharBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/CharViewBufferImpl.java b/java/nio/CharViewBufferImpl.java
index 25a2cf797..319831544 100644
--- a/java/nio/CharViewBufferImpl.java
+++ b/java/nio/CharViewBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/DirectByteBufferImpl.java b/java/nio/DirectByteBufferImpl.java
index 5184a80c3..796a157b6 100644
--- a/java/nio/DirectByteBufferImpl.java
+++ b/java/nio/DirectByteBufferImpl.java
@@ -1,4 +1,4 @@
-/* DirectByteBufferImpl.java --
+/* DirectByteBufferImpl.java --
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,8 +60,8 @@ abstract class DirectByteBufferImpl extends ByteBuffer
static final class ReadOnly extends DirectByteBufferImpl
{
ReadOnly(Object owner, RawData address,
- int capacity, int limit,
- int position)
+ int capacity, int limit,
+ int position)
{
super(owner, address, capacity, limit, position);
}
@@ -90,8 +90,8 @@ abstract class DirectByteBufferImpl extends ByteBuffer
}
ReadWrite(Object owner, RawData address,
- int capacity, int limit,
- int position)
+ int capacity, int limit,
+ int position)
{
super(owner, address, capacity, limit, position);
}
@@ -110,8 +110,8 @@ abstract class DirectByteBufferImpl extends ByteBuffer
}
DirectByteBufferImpl(Object owner, RawData address,
- int capacity, int limit,
- int position)
+ int capacity, int limit,
+ int position)
{
super(capacity, limit, position, -1);
this.owner = owner;
@@ -120,7 +120,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer
/**
* Allocates a new direct byte buffer.
- */
+ */
public static ByteBuffer allocate(int capacity)
{
return new DirectByteBufferImpl.ReadWrite(capacity);
@@ -131,7 +131,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer
if (owner == this)
VMDirectByteBuffer.free(address);
}
-
+
public byte get()
{
checkForUnderflow();
@@ -170,7 +170,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer
position(pos + 1);
return this;
}
-
+
public ByteBuffer put(int index, byte value)
{
checkIndex(index);
@@ -178,12 +178,24 @@ abstract class DirectByteBufferImpl extends ByteBuffer
VMDirectByteBuffer.put(address, index, value);
return this;
}
-
+
+ public ByteBuffer put (byte[] src, int offset, int length)
+ {
+ checkArraySize (src.length, offset, length);
+ checkForUnderflow (length);
+
+ int index = position ();
+ VMDirectByteBuffer.put (address, index, src, offset, length);
+ position (index + length);
+
+ return this;
+ }
+
void shiftDown(int dst_offset, int src_offset, int count)
{
VMDirectByteBuffer.shiftDown(address, dst_offset, src_offset, count);
}
-
+
public ByteBuffer compact()
{
checkIfReadOnly();
@@ -191,15 +203,15 @@ abstract class DirectByteBufferImpl extends ByteBuffer
int pos = position();
if (pos > 0)
{
- int count = remaining();
- VMDirectByteBuffer.shiftDown(address, 0, pos, count);
- position(count);
- limit(capacity());
+ int count = remaining();
+ VMDirectByteBuffer.shiftDown(address, 0, pos, count);
+ position(count);
+ limit(capacity());
}
else
{
- position(limit());
- limit(capacity());
+ position(limit());
+ limit(capacity());
}
return this;
}
@@ -233,9 +245,9 @@ abstract class DirectByteBufferImpl extends ByteBuffer
if (mark != pos)
{
- result.position(mark);
- result.mark();
- result.position(pos);
+ result.position(mark);
+ result.mark();
+ result.position(pos);
}
return result;
}
@@ -289,18 +301,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{
return ByteBufferHelper.getChar(this, order());
}
-
+
public ByteBuffer putChar(char value)
{
ByteBufferHelper.putChar(this, value, order());
return this;
}
-
+
public char getChar(int index)
{
return ByteBufferHelper.getChar(this, index, order());
}
-
+
public ByteBuffer putChar(int index, char value)
{
ByteBufferHelper.putChar(this, index, value, order());
@@ -311,18 +323,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{
return ByteBufferHelper.getShort(this, order());
}
-
+
public ByteBuffer putShort(short value)
{
ByteBufferHelper.putShort(this, value, order());
return this;
}
-
+
public short getShort(int index)
{
return ByteBufferHelper.getShort(this, index, order());
}
-
+
public ByteBuffer putShort(int index, short value)
{
ByteBufferHelper.putShort(this, index, value, order());
@@ -333,18 +345,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{
return ByteBufferHelper.getInt(this, order());
}
-
+
public ByteBuffer putInt(int value)
{
ByteBufferHelper.putInt(this, value, order());
return this;
}
-
+
public int getInt(int index)
{
return ByteBufferHelper.getInt(this, index, order());
}
-
+
public ByteBuffer putInt(int index, int value)
{
ByteBufferHelper.putInt(this, index, value, order());
@@ -355,18 +367,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{
return ByteBufferHelper.getLong(this, order());
}
-
+
public ByteBuffer putLong(long value)
{
ByteBufferHelper.putLong(this, value, order());
return this;
}
-
+
public long getLong(int index)
{
return ByteBufferHelper.getLong(this, index, order());
}
-
+
public ByteBuffer putLong(int index, long value)
{
ByteBufferHelper.putLong(this, index, value, order());
@@ -377,13 +389,13 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{
return ByteBufferHelper.getFloat(this, order());
}
-
+
public ByteBuffer putFloat(float value)
{
ByteBufferHelper.putFloat(this, value, order());
return this;
}
-
+
public float getFloat(int index)
{
return ByteBufferHelper.getFloat(this, index, order());
@@ -405,12 +417,12 @@ abstract class DirectByteBufferImpl extends ByteBuffer
ByteBufferHelper.putDouble(this, value, order());
return this;
}
-
+
public double getDouble(int index)
{
return ByteBufferHelper.getDouble(this, index, order());
}
-
+
public ByteBuffer putDouble(int index, double value)
{
ByteBufferHelper.putDouble(this, index, value, order());
diff --git a/java/nio/DoubleBuffer.java b/java/nio/DoubleBuffer.java
index 737ad6f53..be7861cbd 100644
--- a/java/nio/DoubleBuffer.java
+++ b/java/nio/DoubleBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/DoubleBufferImpl.java b/java/nio/DoubleBufferImpl.java
index bad883c7d..248ab45e7 100644
--- a/java/nio/DoubleBufferImpl.java
+++ b/java/nio/DoubleBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/DoubleViewBufferImpl.java b/java/nio/DoubleViewBufferImpl.java
index d47c96463..e860f2f80 100644
--- a/java/nio/DoubleViewBufferImpl.java
+++ b/java/nio/DoubleViewBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/FloatBuffer.java b/java/nio/FloatBuffer.java
index 8215ecc3f..62e353a68 100644
--- a/java/nio/FloatBuffer.java
+++ b/java/nio/FloatBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/FloatBufferImpl.java b/java/nio/FloatBufferImpl.java
index 6f552cfab..b4868780c 100644
--- a/java/nio/FloatBufferImpl.java
+++ b/java/nio/FloatBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/FloatViewBufferImpl.java b/java/nio/FloatViewBufferImpl.java
index 5d074b5be..55770d52a 100644
--- a/java/nio/FloatViewBufferImpl.java
+++ b/java/nio/FloatViewBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/IntBuffer.java b/java/nio/IntBuffer.java
index 3908238f8..d6fcb51dd 100644
--- a/java/nio/IntBuffer.java
+++ b/java/nio/IntBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/IntBufferImpl.java b/java/nio/IntBufferImpl.java
index 6b22d40fb..22657482b 100644
--- a/java/nio/IntBufferImpl.java
+++ b/java/nio/IntBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/IntViewBufferImpl.java b/java/nio/IntViewBufferImpl.java
index 77b04a8c3..d0b0057c1 100644
--- a/java/nio/IntViewBufferImpl.java
+++ b/java/nio/IntViewBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/InvalidMarkException.java b/java/nio/InvalidMarkException.java
index 5917855a4..937d417ab 100644
--- a/java/nio/InvalidMarkException.java
+++ b/java/nio/InvalidMarkException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/LongBuffer.java b/java/nio/LongBuffer.java
index c53c3cff8..9c3bfa627 100644
--- a/java/nio/LongBuffer.java
+++ b/java/nio/LongBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/LongBufferImpl.java b/java/nio/LongBufferImpl.java
index e82f7749c..8772f618c 100644
--- a/java/nio/LongBufferImpl.java
+++ b/java/nio/LongBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/LongViewBufferImpl.java b/java/nio/LongViewBufferImpl.java
index e20547578..9c3452ae8 100644
--- a/java/nio/LongViewBufferImpl.java
+++ b/java/nio/LongViewBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/MappedByteBuffer.java b/java/nio/MappedByteBuffer.java
index 77d6e5882..fa25bb7f1 100644
--- a/java/nio/MappedByteBuffer.java
+++ b/java/nio/MappedByteBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/MappedByteBufferImpl.java b/java/nio/MappedByteBufferImpl.java
index 304b2a47f..1b075d875 100644
--- a/java/nio/MappedByteBufferImpl.java
+++ b/java/nio/MappedByteBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/ReadOnlyBufferException.java b/java/nio/ReadOnlyBufferException.java
index 0fcdc3ac7..d710e1b26 100644
--- a/java/nio/ReadOnlyBufferException.java
+++ b/java/nio/ReadOnlyBufferException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/ShortBuffer.java b/java/nio/ShortBuffer.java
index fc9af8929..33e458a4b 100644
--- a/java/nio/ShortBuffer.java
+++ b/java/nio/ShortBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/ShortBufferImpl.java b/java/nio/ShortBufferImpl.java
index 05424322b..ee5bff2f9 100644
--- a/java/nio/ShortBufferImpl.java
+++ b/java/nio/ShortBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/ShortViewBufferImpl.java b/java/nio/ShortViewBufferImpl.java
index f884ed542..cdd559522 100644
--- a/java/nio/ShortViewBufferImpl.java
+++ b/java/nio/ShortViewBufferImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/AlreadyConnectedException.java b/java/nio/channels/AlreadyConnectedException.java
index 775d2894d..133547ef3 100644
--- a/java/nio/channels/AlreadyConnectedException.java
+++ b/java/nio/channels/AlreadyConnectedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/AsynchronousCloseException.java b/java/nio/channels/AsynchronousCloseException.java
index d6cfd48ee..f45fdd81a 100644
--- a/java/nio/channels/AsynchronousCloseException.java
+++ b/java/nio/channels/AsynchronousCloseException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/ByteChannel.java b/java/nio/channels/ByteChannel.java
index 75dd69f72..d7d7a451b 100644
--- a/java/nio/channels/ByteChannel.java
+++ b/java/nio/channels/ByteChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/CancelledKeyException.java b/java/nio/channels/CancelledKeyException.java
index 00fb04c43..02108f6c7 100644
--- a/java/nio/channels/CancelledKeyException.java
+++ b/java/nio/channels/CancelledKeyException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/Channel.java b/java/nio/channels/Channel.java
index acba092e1..33fcf3174 100644
--- a/java/nio/channels/Channel.java
+++ b/java/nio/channels/Channel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/Channels.java b/java/nio/channels/Channels.java
index 52a2815bf..cdb2e833e 100644
--- a/java/nio/channels/Channels.java
+++ b/java/nio/channels/Channels.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/ClosedByInterruptException.java b/java/nio/channels/ClosedByInterruptException.java
index 7a9e64c4f..17858f613 100644
--- a/java/nio/channels/ClosedByInterruptException.java
+++ b/java/nio/channels/ClosedByInterruptException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/ClosedChannelException.java b/java/nio/channels/ClosedChannelException.java
index 876ad062f..0f8df9b26 100644
--- a/java/nio/channels/ClosedChannelException.java
+++ b/java/nio/channels/ClosedChannelException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/ClosedSelectorException.java b/java/nio/channels/ClosedSelectorException.java
index ae5421d05..e1b7a8ce9 100644
--- a/java/nio/channels/ClosedSelectorException.java
+++ b/java/nio/channels/ClosedSelectorException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/ConnectionPendingException.java b/java/nio/channels/ConnectionPendingException.java
index c224058f0..b0b71294f 100644
--- a/java/nio/channels/ConnectionPendingException.java
+++ b/java/nio/channels/ConnectionPendingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/DatagramChannel.java b/java/nio/channels/DatagramChannel.java
index 9760b7712..d257ff338 100644
--- a/java/nio/channels/DatagramChannel.java
+++ b/java/nio/channels/DatagramChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/FileChannel.java b/java/nio/channels/FileChannel.java
index 7e1a33173..944ec0b8f 100644
--- a/java/nio/channels/FileChannel.java
+++ b/java/nio/channels/FileChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/FileLock.java b/java/nio/channels/FileLock.java
index 46c5d8122..151c23f9f 100644
--- a/java/nio/channels/FileLock.java
+++ b/java/nio/channels/FileLock.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/FileLockInterruptionException.java b/java/nio/channels/FileLockInterruptionException.java
index 5caff1707..7d9e62046 100644
--- a/java/nio/channels/FileLockInterruptionException.java
+++ b/java/nio/channels/FileLockInterruptionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/GatheringByteChannel.java b/java/nio/channels/GatheringByteChannel.java
index 80f50c875..822ea232a 100644
--- a/java/nio/channels/GatheringByteChannel.java
+++ b/java/nio/channels/GatheringByteChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/IllegalBlockingModeException.java b/java/nio/channels/IllegalBlockingModeException.java
index e6a3a2c29..7352b54f7 100644
--- a/java/nio/channels/IllegalBlockingModeException.java
+++ b/java/nio/channels/IllegalBlockingModeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/IllegalSelectorException.java b/java/nio/channels/IllegalSelectorException.java
index d1421e456..049a8d594 100644
--- a/java/nio/channels/IllegalSelectorException.java
+++ b/java/nio/channels/IllegalSelectorException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/InterruptibleChannel.java b/java/nio/channels/InterruptibleChannel.java
index ad4195efb..54122cead 100644
--- a/java/nio/channels/InterruptibleChannel.java
+++ b/java/nio/channels/InterruptibleChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/NoConnectionPendingException.java b/java/nio/channels/NoConnectionPendingException.java
index 4dbe7f96a..afefebf98 100644
--- a/java/nio/channels/NoConnectionPendingException.java
+++ b/java/nio/channels/NoConnectionPendingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/NonReadableChannelException.java b/java/nio/channels/NonReadableChannelException.java
index ff3bd4a9e..e6852a73d 100644
--- a/java/nio/channels/NonReadableChannelException.java
+++ b/java/nio/channels/NonReadableChannelException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/NonWritableChannelException.java b/java/nio/channels/NonWritableChannelException.java
index 363041ba9..61d40bbc4 100644
--- a/java/nio/channels/NonWritableChannelException.java
+++ b/java/nio/channels/NonWritableChannelException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/NotYetBoundException.java b/java/nio/channels/NotYetBoundException.java
index 167d5b5be..7d0c66388 100644
--- a/java/nio/channels/NotYetBoundException.java
+++ b/java/nio/channels/NotYetBoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/NotYetConnectedException.java b/java/nio/channels/NotYetConnectedException.java
index 671ad1a42..463e05934 100644
--- a/java/nio/channels/NotYetConnectedException.java
+++ b/java/nio/channels/NotYetConnectedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/OverlappingFileLockException.java b/java/nio/channels/OverlappingFileLockException.java
index d3435264d..ce0900c6a 100644
--- a/java/nio/channels/OverlappingFileLockException.java
+++ b/java/nio/channels/OverlappingFileLockException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/Pipe.java b/java/nio/channels/Pipe.java
index baee1fa56..c7b04c88c 100644
--- a/java/nio/channels/Pipe.java
+++ b/java/nio/channels/Pipe.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/ReadableByteChannel.java b/java/nio/channels/ReadableByteChannel.java
index fb39dcb58..889662de0 100644
--- a/java/nio/channels/ReadableByteChannel.java
+++ b/java/nio/channels/ReadableByteChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/ScatteringByteChannel.java b/java/nio/channels/ScatteringByteChannel.java
index 7c754065f..5437ea158 100644
--- a/java/nio/channels/ScatteringByteChannel.java
+++ b/java/nio/channels/ScatteringByteChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/SelectableChannel.java b/java/nio/channels/SelectableChannel.java
index de1e31d07..70fa785ce 100644
--- a/java/nio/channels/SelectableChannel.java
+++ b/java/nio/channels/SelectableChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/SelectionKey.java b/java/nio/channels/SelectionKey.java
index 95e7f26fc..5219b6bff 100644
--- a/java/nio/channels/SelectionKey.java
+++ b/java/nio/channels/SelectionKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/Selector.java b/java/nio/channels/Selector.java
index 0eee121e2..2c883efd1 100644
--- a/java/nio/channels/Selector.java
+++ b/java/nio/channels/Selector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/ServerSocketChannel.java b/java/nio/channels/ServerSocketChannel.java
index 4b9db4f63..105d17f94 100644
--- a/java/nio/channels/ServerSocketChannel.java
+++ b/java/nio/channels/ServerSocketChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/SocketChannel.java b/java/nio/channels/SocketChannel.java
index 650df0366..50f21368c 100644
--- a/java/nio/channels/SocketChannel.java
+++ b/java/nio/channels/SocketChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/UnresolvedAddressException.java b/java/nio/channels/UnresolvedAddressException.java
index f8e74a9d2..4db95a7ff 100644
--- a/java/nio/channels/UnresolvedAddressException.java
+++ b/java/nio/channels/UnresolvedAddressException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/UnsupportedAddressTypeException.java b/java/nio/channels/UnsupportedAddressTypeException.java
index adea4ed70..7c16c813f 100644
--- a/java/nio/channels/UnsupportedAddressTypeException.java
+++ b/java/nio/channels/UnsupportedAddressTypeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/WritableByteChannel.java b/java/nio/channels/WritableByteChannel.java
index 0cc6858a4..3845723bc 100644
--- a/java/nio/channels/WritableByteChannel.java
+++ b/java/nio/channels/WritableByteChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/package.html b/java/nio/channels/package.html
index bc40b81f8..4e2bbc9f6 100644
--- a/java/nio/channels/package.html
+++ b/java/nio/channels/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/spi/AbstractInterruptibleChannel.java b/java/nio/channels/spi/AbstractInterruptibleChannel.java
index 98eaf482a..25e8785c0 100644
--- a/java/nio/channels/spi/AbstractInterruptibleChannel.java
+++ b/java/nio/channels/spi/AbstractInterruptibleChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/spi/AbstractSelectableChannel.java b/java/nio/channels/spi/AbstractSelectableChannel.java
index 2255af06d..42ceab7e2 100644
--- a/java/nio/channels/spi/AbstractSelectableChannel.java
+++ b/java/nio/channels/spi/AbstractSelectableChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/spi/AbstractSelectionKey.java b/java/nio/channels/spi/AbstractSelectionKey.java
index 83d6421bc..5ab8468bf 100644
--- a/java/nio/channels/spi/AbstractSelectionKey.java
+++ b/java/nio/channels/spi/AbstractSelectionKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/spi/AbstractSelector.java b/java/nio/channels/spi/AbstractSelector.java
index b1e206139..78380738a 100644
--- a/java/nio/channels/spi/AbstractSelector.java
+++ b/java/nio/channels/spi/AbstractSelector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/spi/SelectorProvider.java b/java/nio/channels/spi/SelectorProvider.java
index 99b33545c..db4e65fe1 100644
--- a/java/nio/channels/spi/SelectorProvider.java
+++ b/java/nio/channels/spi/SelectorProvider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/channels/spi/package.html b/java/nio/channels/spi/package.html
index d0ea50ba3..133fb04f2 100644
--- a/java/nio/channels/spi/package.html
+++ b/java/nio/channels/spi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/CharacterCodingException.java b/java/nio/charset/CharacterCodingException.java
index f6a283bda..6812ebb18 100644
--- a/java/nio/charset/CharacterCodingException.java
+++ b/java/nio/charset/CharacterCodingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/Charset.java b/java/nio/charset/Charset.java
index 1990e5e5a..8c17ec99d 100644
--- a/java/nio/charset/Charset.java
+++ b/java/nio/charset/Charset.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/CharsetDecoder.java b/java/nio/charset/CharsetDecoder.java
index c60a30829..c86f1c8a4 100644
--- a/java/nio/charset/CharsetDecoder.java
+++ b/java/nio/charset/CharsetDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/CharsetEncoder.java b/java/nio/charset/CharsetEncoder.java
index 1768620e9..932fe355d 100644
--- a/java/nio/charset/CharsetEncoder.java
+++ b/java/nio/charset/CharsetEncoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/CoderMalfunctionError.java b/java/nio/charset/CoderMalfunctionError.java
index df57b820a..08294cafb 100644
--- a/java/nio/charset/CoderMalfunctionError.java
+++ b/java/nio/charset/CoderMalfunctionError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/CoderResult.java b/java/nio/charset/CoderResult.java
index 782418342..664215d9a 100644
--- a/java/nio/charset/CoderResult.java
+++ b/java/nio/charset/CoderResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/CodingErrorAction.java b/java/nio/charset/CodingErrorAction.java
index 1a2e317c7..592c15934 100644
--- a/java/nio/charset/CodingErrorAction.java
+++ b/java/nio/charset/CodingErrorAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/IllegalCharsetNameException.java b/java/nio/charset/IllegalCharsetNameException.java
index 8ee9c702e..7baeac323 100644
--- a/java/nio/charset/IllegalCharsetNameException.java
+++ b/java/nio/charset/IllegalCharsetNameException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/MalformedInputException.java b/java/nio/charset/MalformedInputException.java
index 678c5bc64..0beceb40c 100644
--- a/java/nio/charset/MalformedInputException.java
+++ b/java/nio/charset/MalformedInputException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/UnmappableCharacterException.java b/java/nio/charset/UnmappableCharacterException.java
index 5ae49302d..719065108 100644
--- a/java/nio/charset/UnmappableCharacterException.java
+++ b/java/nio/charset/UnmappableCharacterException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/UnsupportedCharsetException.java b/java/nio/charset/UnsupportedCharsetException.java
index beb0be96d..39536baa5 100644
--- a/java/nio/charset/UnsupportedCharsetException.java
+++ b/java/nio/charset/UnsupportedCharsetException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/package.html b/java/nio/charset/package.html
index bf79fa45a..acc7c0203 100644
--- a/java/nio/charset/package.html
+++ b/java/nio/charset/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/spi/CharsetProvider.java b/java/nio/charset/spi/CharsetProvider.java
index 3cbc14b99..f0d40ab85 100644
--- a/java/nio/charset/spi/CharsetProvider.java
+++ b/java/nio/charset/spi/CharsetProvider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/charset/spi/package.html b/java/nio/charset/spi/package.html
index e0d4876f9..dd47a250b 100644
--- a/java/nio/charset/spi/package.html
+++ b/java/nio/charset/spi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/nio/package.html b/java/nio/package.html
index eb475874b..274498be3 100644
--- a/java/nio/package.html
+++ b/java/nio/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/AccessException.java b/java/rmi/AccessException.java
index 389d2df05..b47078004 100644
--- a/java/rmi/AccessException.java
+++ b/java/rmi/AccessException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/AlreadyBoundException.java b/java/rmi/AlreadyBoundException.java
index 2062aede1..091c0ee58 100644
--- a/java/rmi/AlreadyBoundException.java
+++ b/java/rmi/AlreadyBoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/ConnectException.java b/java/rmi/ConnectException.java
index 75a7c454f..dc3abd197 100644
--- a/java/rmi/ConnectException.java
+++ b/java/rmi/ConnectException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/ConnectIOException.java b/java/rmi/ConnectIOException.java
index 24c779d2b..dde753ad5 100644
--- a/java/rmi/ConnectIOException.java
+++ b/java/rmi/ConnectIOException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/MarshalException.java b/java/rmi/MarshalException.java
index 98482a965..e5c10a4bf 100644
--- a/java/rmi/MarshalException.java
+++ b/java/rmi/MarshalException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/MarshalledObject.java b/java/rmi/MarshalledObject.java
index 0ea62f46f..9ec0ace0e 100644
--- a/java/rmi/MarshalledObject.java
+++ b/java/rmi/MarshalledObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/Naming.java b/java/rmi/Naming.java
index dbf687b99..d48df069d 100644
--- a/java/rmi/Naming.java
+++ b/java/rmi/Naming.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/NoSuchObjectException.java b/java/rmi/NoSuchObjectException.java
index dd61f950c..69f7d6c52 100644
--- a/java/rmi/NoSuchObjectException.java
+++ b/java/rmi/NoSuchObjectException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/NotBoundException.java b/java/rmi/NotBoundException.java
index 95af177f3..b8bc0a532 100644
--- a/java/rmi/NotBoundException.java
+++ b/java/rmi/NotBoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/RMISecurityException.java b/java/rmi/RMISecurityException.java
index 3697b7c95..a44a67e2a 100644
--- a/java/rmi/RMISecurityException.java
+++ b/java/rmi/RMISecurityException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/RMISecurityManager.java b/java/rmi/RMISecurityManager.java
index 1ddaa04e2..a8eb13e1a 100644
--- a/java/rmi/RMISecurityManager.java
+++ b/java/rmi/RMISecurityManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/Remote.java b/java/rmi/Remote.java
index 77bdf3f50..93c8d0aa1 100644
--- a/java/rmi/Remote.java
+++ b/java/rmi/Remote.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/RemoteException.java b/java/rmi/RemoteException.java
index b28f07090..cbbb26299 100644
--- a/java/rmi/RemoteException.java
+++ b/java/rmi/RemoteException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/ServerError.java b/java/rmi/ServerError.java
index 59c6a55a4..b1a15b02e 100644
--- a/java/rmi/ServerError.java
+++ b/java/rmi/ServerError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/ServerException.java b/java/rmi/ServerException.java
index 17c3a5790..5170aa7b0 100644
--- a/java/rmi/ServerException.java
+++ b/java/rmi/ServerException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/ServerRuntimeException.java b/java/rmi/ServerRuntimeException.java
index d7e11916a..1f0813739 100644
--- a/java/rmi/ServerRuntimeException.java
+++ b/java/rmi/ServerRuntimeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/StubNotFoundException.java b/java/rmi/StubNotFoundException.java
index 837153bca..2f9e0f5ff 100644
--- a/java/rmi/StubNotFoundException.java
+++ b/java/rmi/StubNotFoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/UnexpectedException.java b/java/rmi/UnexpectedException.java
index 42b6f15d5..e9e0d6a9d 100644
--- a/java/rmi/UnexpectedException.java
+++ b/java/rmi/UnexpectedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/UnknownHostException.java b/java/rmi/UnknownHostException.java
index 089800c36..e21b9944c 100644
--- a/java/rmi/UnknownHostException.java
+++ b/java/rmi/UnknownHostException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/UnmarshalException.java b/java/rmi/UnmarshalException.java
index cff74a935..6567062a5 100644
--- a/java/rmi/UnmarshalException.java
+++ b/java/rmi/UnmarshalException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/Activatable.java b/java/rmi/activation/Activatable.java
index 604c7021f..b4c38bf61 100644
--- a/java/rmi/activation/Activatable.java
+++ b/java/rmi/activation/Activatable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivateFailedException.java b/java/rmi/activation/ActivateFailedException.java
index 02d764c6c..1c2e10ee3 100644
--- a/java/rmi/activation/ActivateFailedException.java
+++ b/java/rmi/activation/ActivateFailedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationDesc.java b/java/rmi/activation/ActivationDesc.java
index b8f14baa7..65894f808 100644
--- a/java/rmi/activation/ActivationDesc.java
+++ b/java/rmi/activation/ActivationDesc.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationException.java b/java/rmi/activation/ActivationException.java
index a335142ce..418f43857 100644
--- a/java/rmi/activation/ActivationException.java
+++ b/java/rmi/activation/ActivationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationGroup.java b/java/rmi/activation/ActivationGroup.java
index 2b97d20df..e5774a1b9 100644
--- a/java/rmi/activation/ActivationGroup.java
+++ b/java/rmi/activation/ActivationGroup.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationGroupDesc.java b/java/rmi/activation/ActivationGroupDesc.java
index 14ade880c..35b546e32 100644
--- a/java/rmi/activation/ActivationGroupDesc.java
+++ b/java/rmi/activation/ActivationGroupDesc.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationGroupID.java b/java/rmi/activation/ActivationGroupID.java
index bf889be11..5e0b96442 100644
--- a/java/rmi/activation/ActivationGroupID.java
+++ b/java/rmi/activation/ActivationGroupID.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationID.java b/java/rmi/activation/ActivationID.java
index cc32349bd..23ed853a4 100644
--- a/java/rmi/activation/ActivationID.java
+++ b/java/rmi/activation/ActivationID.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationInstantiator.java b/java/rmi/activation/ActivationInstantiator.java
index 5afa27d85..0aceb7a4a 100644
--- a/java/rmi/activation/ActivationInstantiator.java
+++ b/java/rmi/activation/ActivationInstantiator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationMonitor.java b/java/rmi/activation/ActivationMonitor.java
index c3736a470..1e64257ed 100644
--- a/java/rmi/activation/ActivationMonitor.java
+++ b/java/rmi/activation/ActivationMonitor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/ActivationSystem.java b/java/rmi/activation/ActivationSystem.java
index 55dedd6e9..4b92d40cb 100644
--- a/java/rmi/activation/ActivationSystem.java
+++ b/java/rmi/activation/ActivationSystem.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/Activator.java b/java/rmi/activation/Activator.java
index 4d80c08d7..2fb5a5810 100644
--- a/java/rmi/activation/Activator.java
+++ b/java/rmi/activation/Activator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/UnknownGroupException.java b/java/rmi/activation/UnknownGroupException.java
index b53e8c28e..91890a907 100644
--- a/java/rmi/activation/UnknownGroupException.java
+++ b/java/rmi/activation/UnknownGroupException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/UnknownObjectException.java b/java/rmi/activation/UnknownObjectException.java
index 81e3871ad..8dbeb0e60 100644
--- a/java/rmi/activation/UnknownObjectException.java
+++ b/java/rmi/activation/UnknownObjectException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/activation/package.html b/java/rmi/activation/package.html
index 16a329989..444782dd7 100644
--- a/java/rmi/activation/package.html
+++ b/java/rmi/activation/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/dgc/DGC.java b/java/rmi/dgc/DGC.java
index 08563a678..e78ec2a3a 100644
--- a/java/rmi/dgc/DGC.java
+++ b/java/rmi/dgc/DGC.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/dgc/Lease.java b/java/rmi/dgc/Lease.java
index febe80aec..d3d7f6952 100644
--- a/java/rmi/dgc/Lease.java
+++ b/java/rmi/dgc/Lease.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/dgc/VMID.java b/java/rmi/dgc/VMID.java
index 7cdfe1c69..f960d9ccd 100644
--- a/java/rmi/dgc/VMID.java
+++ b/java/rmi/dgc/VMID.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/dgc/package.html b/java/rmi/dgc/package.html
index 925ef3906..9458d4c25 100644
--- a/java/rmi/dgc/package.html
+++ b/java/rmi/dgc/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/package.html b/java/rmi/package.html
index 1fdf07663..a7bf85020 100644
--- a/java/rmi/package.html
+++ b/java/rmi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/registry/LocateRegistry.java b/java/rmi/registry/LocateRegistry.java
index 58452158c..3547a7ad0 100644
--- a/java/rmi/registry/LocateRegistry.java
+++ b/java/rmi/registry/LocateRegistry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/registry/Registry.java b/java/rmi/registry/Registry.java
index 46198b642..6cd2a04a6 100644
--- a/java/rmi/registry/Registry.java
+++ b/java/rmi/registry/Registry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/registry/RegistryHandler.java b/java/rmi/registry/RegistryHandler.java
index fc9c3375a..b9b450923 100644
--- a/java/rmi/registry/RegistryHandler.java
+++ b/java/rmi/registry/RegistryHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/registry/package.html b/java/rmi/registry/package.html
index b2353232d..4e1667270 100644
--- a/java/rmi/registry/package.html
+++ b/java/rmi/registry/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/ExportException.java b/java/rmi/server/ExportException.java
index 20e565c73..b2d5bfca5 100644
--- a/java/rmi/server/ExportException.java
+++ b/java/rmi/server/ExportException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/LoaderHandler.java b/java/rmi/server/LoaderHandler.java
index 8ebb56f46..189085710 100644
--- a/java/rmi/server/LoaderHandler.java
+++ b/java/rmi/server/LoaderHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/LogStream.java b/java/rmi/server/LogStream.java
index 57a9e6e98..a2dfbb47f 100644
--- a/java/rmi/server/LogStream.java
+++ b/java/rmi/server/LogStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/ObjID.java b/java/rmi/server/ObjID.java
index c7f470fd8..07cbbde3a 100644
--- a/java/rmi/server/ObjID.java
+++ b/java/rmi/server/ObjID.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/Operation.java b/java/rmi/server/Operation.java
index 3f855dbca..64faf66e2 100644
--- a/java/rmi/server/Operation.java
+++ b/java/rmi/server/Operation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RMIClassLoader.java b/java/rmi/server/RMIClassLoader.java
index 6add274ef..a7a7cb84a 100644
--- a/java/rmi/server/RMIClassLoader.java
+++ b/java/rmi/server/RMIClassLoader.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -214,7 +214,7 @@ public class RMIClassLoader
//try context class loader first
try
{
- return loader.loadClass (name);
+ return Class.forName(name, false, loader);
}
catch (ClassNotFoundException e)
{
@@ -237,7 +237,7 @@ public class RMIClassLoader
") at codebase (" + codebases + ")");
}
- return loader.loadClass (name);
+ return Class.forName(name, false, loader);
}
/**
@@ -250,7 +250,7 @@ public class RMIClassLoader
*
* @throws MalformedURLException if the codebase contains a malformed URL
*/
- private static ClassLoader getClassLoader (String codebases)
+ public static ClassLoader getClassLoader (String codebases)
throws MalformedURLException
{
ClassLoader loader;
diff --git a/java/rmi/server/RMIClassLoaderSpi.java b/java/rmi/server/RMIClassLoaderSpi.java
index ba3bef6b0..372d81879 100644
--- a/java/rmi/server/RMIClassLoaderSpi.java
+++ b/java/rmi/server/RMIClassLoaderSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RMIClientSocketFactory.java b/java/rmi/server/RMIClientSocketFactory.java
index 0662a6801..a54d11175 100644
--- a/java/rmi/server/RMIClientSocketFactory.java
+++ b/java/rmi/server/RMIClientSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RMIFailureHandler.java b/java/rmi/server/RMIFailureHandler.java
index f87321d20..3496cd6a0 100644
--- a/java/rmi/server/RMIFailureHandler.java
+++ b/java/rmi/server/RMIFailureHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RMIServerSocketFactory.java b/java/rmi/server/RMIServerSocketFactory.java
index 6f9fe1c08..88eaff32d 100644
--- a/java/rmi/server/RMIServerSocketFactory.java
+++ b/java/rmi/server/RMIServerSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RMISocketFactory.java b/java/rmi/server/RMISocketFactory.java
index 60ada6add..953f1ef33 100644
--- a/java/rmi/server/RMISocketFactory.java
+++ b/java/rmi/server/RMISocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RemoteCall.java b/java/rmi/server/RemoteCall.java
index fd8dc4854..35f3bf1a6 100644
--- a/java/rmi/server/RemoteCall.java
+++ b/java/rmi/server/RemoteCall.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RemoteObject.java b/java/rmi/server/RemoteObject.java
index 464ea795e..0b3c229c9 100644
--- a/java/rmi/server/RemoteObject.java
+++ b/java/rmi/server/RemoteObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RemoteRef.java b/java/rmi/server/RemoteRef.java
index 89cee1256..7e34db39e 100644
--- a/java/rmi/server/RemoteRef.java
+++ b/java/rmi/server/RemoteRef.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RemoteServer.java b/java/rmi/server/RemoteServer.java
index a10143c97..9efb12a78 100644
--- a/java/rmi/server/RemoteServer.java
+++ b/java/rmi/server/RemoteServer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/RemoteStub.java b/java/rmi/server/RemoteStub.java
index 0266aceb8..18c614b54 100644
--- a/java/rmi/server/RemoteStub.java
+++ b/java/rmi/server/RemoteStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/ServerCloneException.java b/java/rmi/server/ServerCloneException.java
index 3334c8d95..bda41b3ce 100644
--- a/java/rmi/server/ServerCloneException.java
+++ b/java/rmi/server/ServerCloneException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/ServerNotActiveException.java b/java/rmi/server/ServerNotActiveException.java
index 426d5e325..0581b63bc 100644
--- a/java/rmi/server/ServerNotActiveException.java
+++ b/java/rmi/server/ServerNotActiveException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/ServerRef.java b/java/rmi/server/ServerRef.java
index 906b12698..cf1013cf0 100644
--- a/java/rmi/server/ServerRef.java
+++ b/java/rmi/server/ServerRef.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/Skeleton.java b/java/rmi/server/Skeleton.java
index 3d4455cac..82f5d3837 100644
--- a/java/rmi/server/Skeleton.java
+++ b/java/rmi/server/Skeleton.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/SkeletonMismatchException.java b/java/rmi/server/SkeletonMismatchException.java
index dc0fcf87d..9c0206ab3 100644
--- a/java/rmi/server/SkeletonMismatchException.java
+++ b/java/rmi/server/SkeletonMismatchException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/SkeletonNotFoundException.java b/java/rmi/server/SkeletonNotFoundException.java
index 93ad1ecf1..596aae154 100644
--- a/java/rmi/server/SkeletonNotFoundException.java
+++ b/java/rmi/server/SkeletonNotFoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/SocketSecurityException.java b/java/rmi/server/SocketSecurityException.java
index 314ad8784..aaf7698f4 100644
--- a/java/rmi/server/SocketSecurityException.java
+++ b/java/rmi/server/SocketSecurityException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/UID.java b/java/rmi/server/UID.java
index d472e69c9..0f492bae7 100644
--- a/java/rmi/server/UID.java
+++ b/java/rmi/server/UID.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/UnicastRemoteObject.java b/java/rmi/server/UnicastRemoteObject.java
index ed296f033..dbe25bda3 100644
--- a/java/rmi/server/UnicastRemoteObject.java
+++ b/java/rmi/server/UnicastRemoteObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/Unreferenced.java b/java/rmi/server/Unreferenced.java
index 057a8b2da..982aa6445 100644
--- a/java/rmi/server/Unreferenced.java
+++ b/java/rmi/server/Unreferenced.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/rmi/server/package.html b/java/rmi/server/package.html
index a74e3f256..54055a721 100644
--- a/java/rmi/server/package.html
+++ b/java/rmi/server/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/AccessControlContext.java b/java/security/AccessControlContext.java
index a72f0d367..9a6ad2081 100644
--- a/java/security/AccessControlContext.java
+++ b/java/security/AccessControlContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/AccessControlException.java b/java/security/AccessControlException.java
index d7b1f2926..27aee7c86 100644
--- a/java/security/AccessControlException.java
+++ b/java/security/AccessControlException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/AccessController.java b/java/security/AccessController.java
index 485a1ed6c..bc9c2deef 100644
--- a/java/security/AccessController.java
+++ b/java/security/AccessController.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/AlgorithmParameterGenerator.java b/java/security/AlgorithmParameterGenerator.java
index ed2f34401..5dc9e3bb2 100644
--- a/java/security/AlgorithmParameterGenerator.java
+++ b/java/security/AlgorithmParameterGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/AlgorithmParameterGeneratorSpi.java b/java/security/AlgorithmParameterGeneratorSpi.java
index 8e1a204c0..3143ea76b 100644
--- a/java/security/AlgorithmParameterGeneratorSpi.java
+++ b/java/security/AlgorithmParameterGeneratorSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/AlgorithmParameters.java b/java/security/AlgorithmParameters.java
index 8ccd40a31..038fbb4bd 100644
--- a/java/security/AlgorithmParameters.java
+++ b/java/security/AlgorithmParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/AlgorithmParametersSpi.java b/java/security/AlgorithmParametersSpi.java
index d3bcdc782..a9faa1543 100644
--- a/java/security/AlgorithmParametersSpi.java
+++ b/java/security/AlgorithmParametersSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/AllPermission.java b/java/security/AllPermission.java
index e7f316917..6adcd8c9c 100644
--- a/java/security/AllPermission.java
+++ b/java/security/AllPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/BasicPermission.java b/java/security/BasicPermission.java
index 741f2b024..267a6e292 100644
--- a/java/security/BasicPermission.java
+++ b/java/security/BasicPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Certificate.java b/java/security/Certificate.java
index ab6fdb4ac..5cdba6e10 100644
--- a/java/security/Certificate.java
+++ b/java/security/Certificate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/CodeSource.java b/java/security/CodeSource.java
index 12eb156ed..b51617028 100644
--- a/java/security/CodeSource.java
+++ b/java/security/CodeSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/DigestException.java b/java/security/DigestException.java
index bc6724202..6393e0cc8 100644
--- a/java/security/DigestException.java
+++ b/java/security/DigestException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/DigestInputStream.java b/java/security/DigestInputStream.java
index e8d2b63fd..0d4a9d05d 100644
--- a/java/security/DigestInputStream.java
+++ b/java/security/DigestInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/DigestOutputStream.java b/java/security/DigestOutputStream.java
index d95533c97..037b39e78 100644
--- a/java/security/DigestOutputStream.java
+++ b/java/security/DigestOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/DomainCombiner.java b/java/security/DomainCombiner.java
index 5d5397a55..9ec680c63 100644
--- a/java/security/DomainCombiner.java
+++ b/java/security/DomainCombiner.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/DummyKeyPairGenerator.java b/java/security/DummyKeyPairGenerator.java
index 5d3d914cd..da8c362eb 100644
--- a/java/security/DummyKeyPairGenerator.java
+++ b/java/security/DummyKeyPairGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/DummyMessageDigest.java b/java/security/DummyMessageDigest.java
index 703884f4b..6cecdcf68 100644
--- a/java/security/DummyMessageDigest.java
+++ b/java/security/DummyMessageDigest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/DummySignature.java b/java/security/DummySignature.java
index 2f21cd589..b74885c99 100644
--- a/java/security/DummySignature.java
+++ b/java/security/DummySignature.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/GeneralSecurityException.java b/java/security/GeneralSecurityException.java
index 8a26e85cd..72453ee8c 100644
--- a/java/security/GeneralSecurityException.java
+++ b/java/security/GeneralSecurityException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Guard.java b/java/security/Guard.java
index 8a2ab0f0f..4f22360a4 100644
--- a/java/security/Guard.java
+++ b/java/security/Guard.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/GuardedObject.java b/java/security/GuardedObject.java
index 5aeaf91e3..5ca08835d 100644
--- a/java/security/GuardedObject.java
+++ b/java/security/GuardedObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Identity.java b/java/security/Identity.java
index 99af844e1..26b01a50a 100644
--- a/java/security/Identity.java
+++ b/java/security/Identity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/IdentityScope.java b/java/security/IdentityScope.java
index 004f4ee4e..34dd011e2 100644
--- a/java/security/IdentityScope.java
+++ b/java/security/IdentityScope.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/IntersectingDomainCombiner.java b/java/security/IntersectingDomainCombiner.java
index a61aa9fe6..2bfcfb442 100644
--- a/java/security/IntersectingDomainCombiner.java
+++ b/java/security/IntersectingDomainCombiner.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/InvalidAlgorithmParameterException.java b/java/security/InvalidAlgorithmParameterException.java
index 5b2ada1bf..9b7261995 100644
--- a/java/security/InvalidAlgorithmParameterException.java
+++ b/java/security/InvalidAlgorithmParameterException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/InvalidKeyException.java b/java/security/InvalidKeyException.java
index ce6b8e5cd..cd5845a61 100644
--- a/java/security/InvalidKeyException.java
+++ b/java/security/InvalidKeyException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/InvalidParameterException.java b/java/security/InvalidParameterException.java
index f54d819de..c5218a049 100644
--- a/java/security/InvalidParameterException.java
+++ b/java/security/InvalidParameterException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Key.java b/java/security/Key.java
index 5e74be9da..23652b6e7 100644
--- a/java/security/Key.java
+++ b/java/security/Key.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyException.java b/java/security/KeyException.java
index 8d69a5693..feaf0249a 100644
--- a/java/security/KeyException.java
+++ b/java/security/KeyException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyFactory.java b/java/security/KeyFactory.java
index 02709f4c8..64ce841fa 100644
--- a/java/security/KeyFactory.java
+++ b/java/security/KeyFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyFactorySpi.java b/java/security/KeyFactorySpi.java
index 6c240d735..1894fad08 100644
--- a/java/security/KeyFactorySpi.java
+++ b/java/security/KeyFactorySpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyManagementException.java b/java/security/KeyManagementException.java
index ca642ba34..694b4c242 100644
--- a/java/security/KeyManagementException.java
+++ b/java/security/KeyManagementException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyPair.java b/java/security/KeyPair.java
index a2b2fba76..bf1a40a23 100644
--- a/java/security/KeyPair.java
+++ b/java/security/KeyPair.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyPairGenerator.java b/java/security/KeyPairGenerator.java
index 38bd007fa..e6f926e2b 100644
--- a/java/security/KeyPairGenerator.java
+++ b/java/security/KeyPairGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyPairGeneratorSpi.java b/java/security/KeyPairGeneratorSpi.java
index 07de178cf..689fbec12 100644
--- a/java/security/KeyPairGeneratorSpi.java
+++ b/java/security/KeyPairGeneratorSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyStore.java b/java/security/KeyStore.java
index f1e874786..696448728 100644
--- a/java/security/KeyStore.java
+++ b/java/security/KeyStore.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyStoreException.java b/java/security/KeyStoreException.java
index 8f45a555c..9a0a5354d 100644
--- a/java/security/KeyStoreException.java
+++ b/java/security/KeyStoreException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/KeyStoreSpi.java b/java/security/KeyStoreSpi.java
index 56f8c965e..a16008f99 100644
--- a/java/security/KeyStoreSpi.java
+++ b/java/security/KeyStoreSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/MessageDigest.java b/java/security/MessageDigest.java
index 30c303537..8684f2083 100644
--- a/java/security/MessageDigest.java
+++ b/java/security/MessageDigest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/MessageDigestSpi.java b/java/security/MessageDigestSpi.java
index 036392ea9..df3bd3ead 100644
--- a/java/security/MessageDigestSpi.java
+++ b/java/security/MessageDigestSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/NoSuchAlgorithmException.java b/java/security/NoSuchAlgorithmException.java
index 7d167dd0e..412d14a16 100644
--- a/java/security/NoSuchAlgorithmException.java
+++ b/java/security/NoSuchAlgorithmException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/NoSuchProviderException.java b/java/security/NoSuchProviderException.java
index e676046ae..bd26df5ef 100644
--- a/java/security/NoSuchProviderException.java
+++ b/java/security/NoSuchProviderException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Permission.java b/java/security/Permission.java
index 4310500ca..48f4d52a1 100644
--- a/java/security/Permission.java
+++ b/java/security/Permission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/PermissionCollection.java b/java/security/PermissionCollection.java
index 337a8fca9..4e8ffe579 100644
--- a/java/security/PermissionCollection.java
+++ b/java/security/PermissionCollection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Permissions.java b/java/security/Permissions.java
index b603dedcf..e3fd06970 100644
--- a/java/security/Permissions.java
+++ b/java/security/Permissions.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Policy.java b/java/security/Policy.java
index 25765db95..03d9bbb4e 100644
--- a/java/security/Policy.java
+++ b/java/security/Policy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Principal.java b/java/security/Principal.java
index 69990b8f8..6d9de6ccd 100644
--- a/java/security/Principal.java
+++ b/java/security/Principal.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/PrivateKey.java b/java/security/PrivateKey.java
index c4a628c42..70607c134 100644
--- a/java/security/PrivateKey.java
+++ b/java/security/PrivateKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/PrivilegedAction.java b/java/security/PrivilegedAction.java
index 108c7aeb5..c3a41346f 100644
--- a/java/security/PrivilegedAction.java
+++ b/java/security/PrivilegedAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/PrivilegedActionException.java b/java/security/PrivilegedActionException.java
index d699abd87..3f08c8130 100644
--- a/java/security/PrivilegedActionException.java
+++ b/java/security/PrivilegedActionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/PrivilegedExceptionAction.java b/java/security/PrivilegedExceptionAction.java
index b376c6c44..d3d0478fd 100644
--- a/java/security/PrivilegedExceptionAction.java
+++ b/java/security/PrivilegedExceptionAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/ProtectionDomain.java b/java/security/ProtectionDomain.java
index d0768b3a4..a5851b5ad 100644
--- a/java/security/ProtectionDomain.java
+++ b/java/security/ProtectionDomain.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Provider.java b/java/security/Provider.java
index 7a2bd66bb..4ffaa55bc 100644
--- a/java/security/Provider.java
+++ b/java/security/Provider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/ProviderException.java b/java/security/ProviderException.java
index 5b0e86e9b..2dafcec34 100644
--- a/java/security/ProviderException.java
+++ b/java/security/ProviderException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/PublicKey.java b/java/security/PublicKey.java
index f2a331e68..9bf145840 100644
--- a/java/security/PublicKey.java
+++ b/java/security/PublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/SecureClassLoader.java b/java/security/SecureClassLoader.java
index 89b5e4eff..9d1fac797 100644
--- a/java/security/SecureClassLoader.java
+++ b/java/security/SecureClassLoader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/SecureRandom.java b/java/security/SecureRandom.java
index 5d2003838..3ee3a841d 100644
--- a/java/security/SecureRandom.java
+++ b/java/security/SecureRandom.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/SecureRandomSpi.java b/java/security/SecureRandomSpi.java
index 5218a9858..7759097a4 100644
--- a/java/security/SecureRandomSpi.java
+++ b/java/security/SecureRandomSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Security.java b/java/security/Security.java
index 15b76c014..54b97923e 100644
--- a/java/security/Security.java
+++ b/java/security/Security.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/SecurityPermission.java b/java/security/SecurityPermission.java
index a9982d4c3..6aba18f34 100644
--- a/java/security/SecurityPermission.java
+++ b/java/security/SecurityPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Signature.java b/java/security/Signature.java
index 6a69e1a6d..852c95922 100644
--- a/java/security/Signature.java
+++ b/java/security/Signature.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/SignatureException.java b/java/security/SignatureException.java
index daccdf09c..e294c16c3 100644
--- a/java/security/SignatureException.java
+++ b/java/security/SignatureException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/SignatureSpi.java b/java/security/SignatureSpi.java
index 3dd3e4f49..471a73d17 100644
--- a/java/security/SignatureSpi.java
+++ b/java/security/SignatureSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/SignedObject.java b/java/security/SignedObject.java
index f7ef0d5cb..d565b2ea3 100644
--- a/java/security/SignedObject.java
+++ b/java/security/SignedObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/Signer.java b/java/security/Signer.java
index a9e20d42c..ae1463db8 100644
--- a/java/security/Signer.java
+++ b/java/security/Signer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/UnrecoverableKeyException.java b/java/security/UnrecoverableKeyException.java
index 9708625a6..6759c3c7b 100644
--- a/java/security/UnrecoverableKeyException.java
+++ b/java/security/UnrecoverableKeyException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/UnresolvedPermission.java b/java/security/UnresolvedPermission.java
index c1f6f0493..d3f671a9c 100644
--- a/java/security/UnresolvedPermission.java
+++ b/java/security/UnresolvedPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/Acl.java b/java/security/acl/Acl.java
index 4229c92dd..ff139afd6 100644
--- a/java/security/acl/Acl.java
+++ b/java/security/acl/Acl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/AclEntry.java b/java/security/acl/AclEntry.java
index 0cb99a818..7b1bcf54d 100644
--- a/java/security/acl/AclEntry.java
+++ b/java/security/acl/AclEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/AclNotFoundException.java b/java/security/acl/AclNotFoundException.java
index 4462ffc34..9a16d9c50 100644
--- a/java/security/acl/AclNotFoundException.java
+++ b/java/security/acl/AclNotFoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/Group.java b/java/security/acl/Group.java
index 10718a76b..3ffdf15a4 100644
--- a/java/security/acl/Group.java
+++ b/java/security/acl/Group.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/LastOwnerException.java b/java/security/acl/LastOwnerException.java
index 13e139079..952724459 100644
--- a/java/security/acl/LastOwnerException.java
+++ b/java/security/acl/LastOwnerException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/NotOwnerException.java b/java/security/acl/NotOwnerException.java
index 7c3a6c431..bea94763e 100644
--- a/java/security/acl/NotOwnerException.java
+++ b/java/security/acl/NotOwnerException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/Owner.java b/java/security/acl/Owner.java
index 7732fc7f7..df1605b2e 100644
--- a/java/security/acl/Owner.java
+++ b/java/security/acl/Owner.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/Permission.java b/java/security/acl/Permission.java
index ca5000f8b..e5ba29138 100644
--- a/java/security/acl/Permission.java
+++ b/java/security/acl/Permission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/acl/package.html b/java/security/acl/package.html
index f01ede7a4..19facf190 100644
--- a/java/security/acl/package.html
+++ b/java/security/acl/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CRL.java b/java/security/cert/CRL.java
index c2abadfcf..e763663f5 100644
--- a/java/security/cert/CRL.java
+++ b/java/security/cert/CRL.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CRLException.java b/java/security/cert/CRLException.java
index be20d1b6c..f3addfe95 100644
--- a/java/security/cert/CRLException.java
+++ b/java/security/cert/CRLException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CRLSelector.java b/java/security/cert/CRLSelector.java
index 7bfce306b..1fa5a207d 100644
--- a/java/security/cert/CRLSelector.java
+++ b/java/security/cert/CRLSelector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPath.java b/java/security/cert/CertPath.java
index c57bd313b..e818763aa 100644
--- a/java/security/cert/CertPath.java
+++ b/java/security/cert/CertPath.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathBuilder.java b/java/security/cert/CertPathBuilder.java
index 86808f46c..f6965205f 100644
--- a/java/security/cert/CertPathBuilder.java
+++ b/java/security/cert/CertPathBuilder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathBuilderException.java b/java/security/cert/CertPathBuilderException.java
index 2db7d337c..985151010 100644
--- a/java/security/cert/CertPathBuilderException.java
+++ b/java/security/cert/CertPathBuilderException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathBuilderResult.java b/java/security/cert/CertPathBuilderResult.java
index e5b2c6dbc..737ba9431 100644
--- a/java/security/cert/CertPathBuilderResult.java
+++ b/java/security/cert/CertPathBuilderResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathBuilderSpi.java b/java/security/cert/CertPathBuilderSpi.java
index 9220f5a4e..afc7fc073 100644
--- a/java/security/cert/CertPathBuilderSpi.java
+++ b/java/security/cert/CertPathBuilderSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathParameters.java b/java/security/cert/CertPathParameters.java
index 5cc678bdc..62a5cb6a6 100644
--- a/java/security/cert/CertPathParameters.java
+++ b/java/security/cert/CertPathParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathValidator.java b/java/security/cert/CertPathValidator.java
index b8e40223a..5fed19e9a 100644
--- a/java/security/cert/CertPathValidator.java
+++ b/java/security/cert/CertPathValidator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathValidatorException.java b/java/security/cert/CertPathValidatorException.java
index 9c7ad03c9..f3195be29 100644
--- a/java/security/cert/CertPathValidatorException.java
+++ b/java/security/cert/CertPathValidatorException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathValidatorResult.java b/java/security/cert/CertPathValidatorResult.java
index 0732efc8b..71aaf89bc 100644
--- a/java/security/cert/CertPathValidatorResult.java
+++ b/java/security/cert/CertPathValidatorResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertPathValidatorSpi.java b/java/security/cert/CertPathValidatorSpi.java
index cdbde5550..8d18b49da 100644
--- a/java/security/cert/CertPathValidatorSpi.java
+++ b/java/security/cert/CertPathValidatorSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertSelector.java b/java/security/cert/CertSelector.java
index 5001c62da..aea614ad9 100644
--- a/java/security/cert/CertSelector.java
+++ b/java/security/cert/CertSelector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertStore.java b/java/security/cert/CertStore.java
index 67e606cab..864da868f 100644
--- a/java/security/cert/CertStore.java
+++ b/java/security/cert/CertStore.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertStoreException.java b/java/security/cert/CertStoreException.java
index d157b1dc9..a4d8b7a46 100644
--- a/java/security/cert/CertStoreException.java
+++ b/java/security/cert/CertStoreException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertStoreParameters.java b/java/security/cert/CertStoreParameters.java
index 1f4b40d2b..aab22f01f 100644
--- a/java/security/cert/CertStoreParameters.java
+++ b/java/security/cert/CertStoreParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertStoreSpi.java b/java/security/cert/CertStoreSpi.java
index 352062329..eca0e866c 100644
--- a/java/security/cert/CertStoreSpi.java
+++ b/java/security/cert/CertStoreSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/Certificate.java b/java/security/cert/Certificate.java
index a9079fbc3..f8456f97a 100644
--- a/java/security/cert/Certificate.java
+++ b/java/security/cert/Certificate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertificateEncodingException.java b/java/security/cert/CertificateEncodingException.java
index a7730098f..0bb0c26d3 100644
--- a/java/security/cert/CertificateEncodingException.java
+++ b/java/security/cert/CertificateEncodingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertificateException.java b/java/security/cert/CertificateException.java
index d833834a1..3e075ddaf 100644
--- a/java/security/cert/CertificateException.java
+++ b/java/security/cert/CertificateException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertificateExpiredException.java b/java/security/cert/CertificateExpiredException.java
index 6d2350865..5b37142b5 100644
--- a/java/security/cert/CertificateExpiredException.java
+++ b/java/security/cert/CertificateExpiredException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertificateFactory.java b/java/security/cert/CertificateFactory.java
index 6a9231703..aedeff535 100644
--- a/java/security/cert/CertificateFactory.java
+++ b/java/security/cert/CertificateFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertificateFactorySpi.java b/java/security/cert/CertificateFactorySpi.java
index b01eac4ab..beea9646a 100644
--- a/java/security/cert/CertificateFactorySpi.java
+++ b/java/security/cert/CertificateFactorySpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertificateNotYetValidException.java b/java/security/cert/CertificateNotYetValidException.java
index d831265a9..dfb4b4837 100644
--- a/java/security/cert/CertificateNotYetValidException.java
+++ b/java/security/cert/CertificateNotYetValidException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CertificateParsingException.java b/java/security/cert/CertificateParsingException.java
index adc8935d2..61faa4438 100644
--- a/java/security/cert/CertificateParsingException.java
+++ b/java/security/cert/CertificateParsingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/CollectionCertStoreParameters.java b/java/security/cert/CollectionCertStoreParameters.java
index e46cee237..bac1e3b3e 100644
--- a/java/security/cert/CollectionCertStoreParameters.java
+++ b/java/security/cert/CollectionCertStoreParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/LDAPCertStoreParameters.java b/java/security/cert/LDAPCertStoreParameters.java
index 061f7d0c4..4414e65a0 100644
--- a/java/security/cert/LDAPCertStoreParameters.java
+++ b/java/security/cert/LDAPCertStoreParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/PKIXBuilderParameters.java b/java/security/cert/PKIXBuilderParameters.java
index bb44a0561..38b3df5e7 100644
--- a/java/security/cert/PKIXBuilderParameters.java
+++ b/java/security/cert/PKIXBuilderParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/PKIXCertPathBuilderResult.java b/java/security/cert/PKIXCertPathBuilderResult.java
index 4c9cd67f5..5091dd412 100644
--- a/java/security/cert/PKIXCertPathBuilderResult.java
+++ b/java/security/cert/PKIXCertPathBuilderResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/PKIXCertPathChecker.java b/java/security/cert/PKIXCertPathChecker.java
index fda4d061e..7a33576e1 100644
--- a/java/security/cert/PKIXCertPathChecker.java
+++ b/java/security/cert/PKIXCertPathChecker.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/PKIXCertPathValidatorResult.java b/java/security/cert/PKIXCertPathValidatorResult.java
index 7b88acf43..5a1660c3b 100644
--- a/java/security/cert/PKIXCertPathValidatorResult.java
+++ b/java/security/cert/PKIXCertPathValidatorResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/PKIXParameters.java b/java/security/cert/PKIXParameters.java
index faa6fa348..4a987115a 100644
--- a/java/security/cert/PKIXParameters.java
+++ b/java/security/cert/PKIXParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/PolicyNode.java b/java/security/cert/PolicyNode.java
index d39a2e575..58d411cd3 100644
--- a/java/security/cert/PolicyNode.java
+++ b/java/security/cert/PolicyNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/PolicyQualifierInfo.java b/java/security/cert/PolicyQualifierInfo.java
index c53a325eb..7dcf23156 100644
--- a/java/security/cert/PolicyQualifierInfo.java
+++ b/java/security/cert/PolicyQualifierInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/TrustAnchor.java b/java/security/cert/TrustAnchor.java
index 448b855b1..2110ed518 100644
--- a/java/security/cert/TrustAnchor.java
+++ b/java/security/cert/TrustAnchor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/X509CRL.java b/java/security/cert/X509CRL.java
index a606253af..5657b3eb3 100644
--- a/java/security/cert/X509CRL.java
+++ b/java/security/cert/X509CRL.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/X509CRLEntry.java b/java/security/cert/X509CRLEntry.java
index 99ff615cb..4c9cada47 100644
--- a/java/security/cert/X509CRLEntry.java
+++ b/java/security/cert/X509CRLEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/X509CRLSelector.java b/java/security/cert/X509CRLSelector.java
index 164fd663b..3c79fba9c 100644
--- a/java/security/cert/X509CRLSelector.java
+++ b/java/security/cert/X509CRLSelector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/X509CertSelector.java b/java/security/cert/X509CertSelector.java
index d95541996..e3b8c0eb2 100644
--- a/java/security/cert/X509CertSelector.java
+++ b/java/security/cert/X509CertSelector.java
@@ -1,5 +1,5 @@
/* X509CertSelector.java -- selects X.509 certificates by criteria.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -915,7 +915,7 @@ public class X509CertSelector implements CertSelector, Cloneable
}
if (sigId != null)
{
- if (!sigId.equals(cert.getSigAlgOID()))
+ if (!sigId.toString().equals(cert.getSigAlgOID()))
return false;
}
if (subjectKeyId != null)
diff --git a/java/security/cert/X509Certificate.java b/java/security/cert/X509Certificate.java
index ba0d696ab..f6c6fcfb9 100644
--- a/java/security/cert/X509Certificate.java
+++ b/java/security/cert/X509Certificate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/X509Extension.java b/java/security/cert/X509Extension.java
index 8e33bb5ad..d2cb80a9f 100644
--- a/java/security/cert/X509Extension.java
+++ b/java/security/cert/X509Extension.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/cert/package.html b/java/security/cert/package.html
index f7b551833..14b12d16c 100644
--- a/java/security/cert/package.html
+++ b/java/security/cert/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/DSAKey.java b/java/security/interfaces/DSAKey.java
index ea0aa1a4b..c6e819eb0 100644
--- a/java/security/interfaces/DSAKey.java
+++ b/java/security/interfaces/DSAKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/DSAKeyPairGenerator.java b/java/security/interfaces/DSAKeyPairGenerator.java
index 59f3834ca..e657c54b4 100644
--- a/java/security/interfaces/DSAKeyPairGenerator.java
+++ b/java/security/interfaces/DSAKeyPairGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/DSAParams.java b/java/security/interfaces/DSAParams.java
index 5239abe05..42baeeb95 100644
--- a/java/security/interfaces/DSAParams.java
+++ b/java/security/interfaces/DSAParams.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/DSAPrivateKey.java b/java/security/interfaces/DSAPrivateKey.java
index 223db91e8..d79b34b90 100644
--- a/java/security/interfaces/DSAPrivateKey.java
+++ b/java/security/interfaces/DSAPrivateKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/DSAPublicKey.java b/java/security/interfaces/DSAPublicKey.java
index 3f8d211d2..d73e189f6 100644
--- a/java/security/interfaces/DSAPublicKey.java
+++ b/java/security/interfaces/DSAPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/RSAKey.java b/java/security/interfaces/RSAKey.java
index 83cc286cf..485fa81e0 100644
--- a/java/security/interfaces/RSAKey.java
+++ b/java/security/interfaces/RSAKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java b/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
index 68a5e4488..d80b962d0 100644
--- a/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
+++ b/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/RSAPrivateCrtKey.java b/java/security/interfaces/RSAPrivateCrtKey.java
index 1fb2881ed..96a1496cf 100644
--- a/java/security/interfaces/RSAPrivateCrtKey.java
+++ b/java/security/interfaces/RSAPrivateCrtKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/RSAPrivateKey.java b/java/security/interfaces/RSAPrivateKey.java
index b4e342923..514987625 100644
--- a/java/security/interfaces/RSAPrivateKey.java
+++ b/java/security/interfaces/RSAPrivateKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/RSAPublicKey.java b/java/security/interfaces/RSAPublicKey.java
index 9847ae9d2..5fb569d1d 100644
--- a/java/security/interfaces/RSAPublicKey.java
+++ b/java/security/interfaces/RSAPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/interfaces/package.html b/java/security/interfaces/package.html
index 5fe6a25fa..aab0d6375 100644
--- a/java/security/interfaces/package.html
+++ b/java/security/interfaces/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/package.html b/java/security/package.html
index 833689413..328b7044b 100644
--- a/java/security/package.html
+++ b/java/security/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/AlgorithmParameterSpec.java b/java/security/spec/AlgorithmParameterSpec.java
index e994c4ac5..25506f55c 100644
--- a/java/security/spec/AlgorithmParameterSpec.java
+++ b/java/security/spec/AlgorithmParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/DSAParameterSpec.java b/java/security/spec/DSAParameterSpec.java
index 337dc945a..7e263291c 100644
--- a/java/security/spec/DSAParameterSpec.java
+++ b/java/security/spec/DSAParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/DSAPrivateKeySpec.java b/java/security/spec/DSAPrivateKeySpec.java
index c148481ca..7415fa11a 100644
--- a/java/security/spec/DSAPrivateKeySpec.java
+++ b/java/security/spec/DSAPrivateKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/DSAPublicKeySpec.java b/java/security/spec/DSAPublicKeySpec.java
index 687f8dd10..ac1310c1c 100644
--- a/java/security/spec/DSAPublicKeySpec.java
+++ b/java/security/spec/DSAPublicKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/EncodedKeySpec.java b/java/security/spec/EncodedKeySpec.java
index 7168b35f7..c5baf55fd 100644
--- a/java/security/spec/EncodedKeySpec.java
+++ b/java/security/spec/EncodedKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/InvalidKeySpecException.java b/java/security/spec/InvalidKeySpecException.java
index d64e3f66e..c2ec6b03b 100644
--- a/java/security/spec/InvalidKeySpecException.java
+++ b/java/security/spec/InvalidKeySpecException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/InvalidParameterSpecException.java b/java/security/spec/InvalidParameterSpecException.java
index 7b8aca602..481e11e30 100644
--- a/java/security/spec/InvalidParameterSpecException.java
+++ b/java/security/spec/InvalidParameterSpecException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/KeySpec.java b/java/security/spec/KeySpec.java
index af2ff335f..93f1a6db2 100644
--- a/java/security/spec/KeySpec.java
+++ b/java/security/spec/KeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/PKCS8EncodedKeySpec.java b/java/security/spec/PKCS8EncodedKeySpec.java
index 54636a2b0..4a4f1ecce 100644
--- a/java/security/spec/PKCS8EncodedKeySpec.java
+++ b/java/security/spec/PKCS8EncodedKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/PSSParameterSpec.java b/java/security/spec/PSSParameterSpec.java
index c8aa913b4..7a14a24fb 100644
--- a/java/security/spec/PSSParameterSpec.java
+++ b/java/security/spec/PSSParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/RSAKeyGenParameterSpec.java b/java/security/spec/RSAKeyGenParameterSpec.java
index 017fb925b..0df8dec78 100644
--- a/java/security/spec/RSAKeyGenParameterSpec.java
+++ b/java/security/spec/RSAKeyGenParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java b/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
index 9bec96d1b..519a02913 100644
--- a/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
+++ b/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/RSAOtherPrimeInfo.java b/java/security/spec/RSAOtherPrimeInfo.java
index 082101e16..654bcb574 100644
--- a/java/security/spec/RSAOtherPrimeInfo.java
+++ b/java/security/spec/RSAOtherPrimeInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/RSAPrivateCrtKeySpec.java b/java/security/spec/RSAPrivateCrtKeySpec.java
index 054c45da7..a904c305d 100644
--- a/java/security/spec/RSAPrivateCrtKeySpec.java
+++ b/java/security/spec/RSAPrivateCrtKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/RSAPrivateKeySpec.java b/java/security/spec/RSAPrivateKeySpec.java
index 2adcd9a14..d29f261cf 100644
--- a/java/security/spec/RSAPrivateKeySpec.java
+++ b/java/security/spec/RSAPrivateKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/RSAPublicKeySpec.java b/java/security/spec/RSAPublicKeySpec.java
index 408c59a0f..21283aa64 100644
--- a/java/security/spec/RSAPublicKeySpec.java
+++ b/java/security/spec/RSAPublicKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/X509EncodedKeySpec.java b/java/security/spec/X509EncodedKeySpec.java
index b6ee6a5e5..de3596029 100644
--- a/java/security/spec/X509EncodedKeySpec.java
+++ b/java/security/spec/X509EncodedKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/security/spec/package.html b/java/security/spec/package.html
index 561ac3fce..8e818896a 100644
--- a/java/security/spec/package.html
+++ b/java/security/spec/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Array.java b/java/sql/Array.java
index 3246c86f8..516287578 100644
--- a/java/sql/Array.java
+++ b/java/sql/Array.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/BatchUpdateException.java b/java/sql/BatchUpdateException.java
index 515f1d466..c2e186548 100644
--- a/java/sql/BatchUpdateException.java
+++ b/java/sql/BatchUpdateException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Blob.java b/java/sql/Blob.java
index 070201bb8..616839d01 100644
--- a/java/sql/Blob.java
+++ b/java/sql/Blob.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/CallableStatement.java b/java/sql/CallableStatement.java
index 68a22d03a..452294144 100644
--- a/java/sql/CallableStatement.java
+++ b/java/sql/CallableStatement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Clob.java b/java/sql/Clob.java
index f764f5cfc..8789da596 100644
--- a/java/sql/Clob.java
+++ b/java/sql/Clob.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Connection.java b/java/sql/Connection.java
index af7c987d1..48ec12dd0 100644
--- a/java/sql/Connection.java
+++ b/java/sql/Connection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/DataTruncation.java b/java/sql/DataTruncation.java
index 9892cd034..ec522c025 100644
--- a/java/sql/DataTruncation.java
+++ b/java/sql/DataTruncation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/DatabaseMetaData.java b/java/sql/DatabaseMetaData.java
index cd20691b7..d34c4e2f9 100644
--- a/java/sql/DatabaseMetaData.java
+++ b/java/sql/DatabaseMetaData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Date.java b/java/sql/Date.java
index 67d5eb7af..48a274f33 100644
--- a/java/sql/Date.java
+++ b/java/sql/Date.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Driver.java b/java/sql/Driver.java
index ebd026537..10f83ef2f 100644
--- a/java/sql/Driver.java
+++ b/java/sql/Driver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/DriverManager.java b/java/sql/DriverManager.java
index 695aab177..9e252abcc 100644
--- a/java/sql/DriverManager.java
+++ b/java/sql/DriverManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/DriverPropertyInfo.java b/java/sql/DriverPropertyInfo.java
index 12382e33b..34e40fa0c 100644
--- a/java/sql/DriverPropertyInfo.java
+++ b/java/sql/DriverPropertyInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/ParameterMetaData.java b/java/sql/ParameterMetaData.java
index 11ac6ebda..b3a75fd20 100644
--- a/java/sql/ParameterMetaData.java
+++ b/java/sql/ParameterMetaData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/PreparedStatement.java b/java/sql/PreparedStatement.java
index 0fc5d4d26..3aedbc593 100644
--- a/java/sql/PreparedStatement.java
+++ b/java/sql/PreparedStatement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Ref.java b/java/sql/Ref.java
index 6b52c025b..4ebd5e648 100644
--- a/java/sql/Ref.java
+++ b/java/sql/Ref.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/ResultSet.java b/java/sql/ResultSet.java
index bbc2bae13..97f2897d4 100644
--- a/java/sql/ResultSet.java
+++ b/java/sql/ResultSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/ResultSetMetaData.java b/java/sql/ResultSetMetaData.java
index 5cadb00bd..0086677ee 100644
--- a/java/sql/ResultSetMetaData.java
+++ b/java/sql/ResultSetMetaData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/SQLData.java b/java/sql/SQLData.java
index 7fa60be12..2ba1fb18d 100644
--- a/java/sql/SQLData.java
+++ b/java/sql/SQLData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/SQLException.java b/java/sql/SQLException.java
index 892330228..8c502f2df 100644
--- a/java/sql/SQLException.java
+++ b/java/sql/SQLException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/SQLInput.java b/java/sql/SQLInput.java
index e15ae2384..730627d9a 100644
--- a/java/sql/SQLInput.java
+++ b/java/sql/SQLInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/SQLOutput.java b/java/sql/SQLOutput.java
index c07ca158d..8e6c88f8c 100644
--- a/java/sql/SQLOutput.java
+++ b/java/sql/SQLOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/SQLPermission.java b/java/sql/SQLPermission.java
index 10c6d7871..101fa0161 100644
--- a/java/sql/SQLPermission.java
+++ b/java/sql/SQLPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/SQLWarning.java b/java/sql/SQLWarning.java
index fafb9b7c5..841d137e1 100644
--- a/java/sql/SQLWarning.java
+++ b/java/sql/SQLWarning.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Savepoint.java b/java/sql/Savepoint.java
index ac3d56001..a4d89ae6e 100644
--- a/java/sql/Savepoint.java
+++ b/java/sql/Savepoint.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Statement.java b/java/sql/Statement.java
index 1bff06e08..42e8e8e88 100644
--- a/java/sql/Statement.java
+++ b/java/sql/Statement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Struct.java b/java/sql/Struct.java
index 861d7049e..5cbc88e13 100644
--- a/java/sql/Struct.java
+++ b/java/sql/Struct.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Time.java b/java/sql/Time.java
index 9200ee3ca..eb6ef2d65 100644
--- a/java/sql/Time.java
+++ b/java/sql/Time.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Timestamp.java b/java/sql/Timestamp.java
index 501810054..f3459b22f 100644
--- a/java/sql/Timestamp.java
+++ b/java/sql/Timestamp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/Types.java b/java/sql/Types.java
index 7c4bc9107..7dd41411a 100644
--- a/java/sql/Types.java
+++ b/java/sql/Types.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/sql/package.html b/java/sql/package.html
index bdddf57e3..e8982f529 100644
--- a/java/sql/package.html
+++ b/java/sql/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/text/Annotation.java b/java/text/Annotation.java
index 3bcc4eff9..cecb44aaf 100644
--- a/java/text/Annotation.java
+++ b/java/text/Annotation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/text/AttributedCharacterIterator.java b/java/text/AttributedCharacterIterator.java
index 3bcf1d05a..8413c2031 100644
--- a/java/text/AttributedCharacterIterator.java
+++ b/java/text/AttributedCharacterIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -58,7 +58,7 @@ import java.util.Set;
public interface AttributedCharacterIterator extends CharacterIterator
{
/**
- * This class defines attribute keys that are used as text attributes.
+ * Defines attribute keys that are used as text attributes.
*/
public static class Attribute implements Serializable
{
@@ -74,7 +74,8 @@ public interface AttributedCharacterIterator extends CharacterIterator
* This is the attribute for the reading form of text. This is used
* for storing pronunciation along with the written text for languages
* which need it. The value of attributes of this key type are
- * instances of <code>Annotation</code> which wrappers a <code>String</code>.
+ * instances of <code>Annotation</code> which wrappers a
+ * <code>String</code>.
*/
public static final Attribute READING = new Attribute ("READING");
@@ -87,14 +88,13 @@ public interface AttributedCharacterIterator extends CharacterIterator
new Attribute ("INPUT_METHOD_SEGMENT");
/**
- * This is the name of the attribute key
+ * The name of the attribute key
* @serial
*/
private String name;
/**
- * This method initializes a new instance of this class with the specified
- * name.
+ * Initializes a new instance of this class with the specified name.
*
* @param name The name of this attribute key.
*/
@@ -104,7 +104,7 @@ public interface AttributedCharacterIterator extends CharacterIterator
}
/**
- * This method returns the name of this attribute.
+ * Returns the name of this attribute.
*
* @return The attribute name
*/
@@ -114,14 +114,16 @@ public interface AttributedCharacterIterator extends CharacterIterator
}
/**
- * This method resolves an instance of <code>AttributedCharacterIterator.Attribute</code>
+ * Resolves an instance of
+ * <code>AttributedCharacterIterator.Attribute</code>
* that is being deserialized to one of the three pre-defined attribute
* constants. It does this by comparing the names of the attributes. The
* constant that the deserialized object resolves to is returned.
*
* @return The resolved contant value
*
- * @exception InvalidObjectException If the object being deserialized cannot be resolved.
+ * @exception InvalidObjectException If the object being deserialized
+ * cannot be resolved.
*/
protected Object readResolve() throws InvalidObjectException
{
@@ -134,21 +136,25 @@ public interface AttributedCharacterIterator extends CharacterIterator
if (this.equals (INPUT_METHOD_SEGMENT))
return INPUT_METHOD_SEGMENT;
- throw new InvalidObjectException ("Can't resolve Attribute: " + getName());
+ throw new InvalidObjectException ("Can't resolve Attribute: "
+ + getName());
}
/**
- * This method tests this object for equality against the specified object.
+ * Tests this object for equality against the specified object.
* The two objects will be considered equal if and only if:
* <ul>
* <li>The specified object is not <code>null</code>.
- * <li>The specified object is an instance of <code>AttributedCharacterIterator.Attribute</code>.
+ * <li>The specified object is an instance of
+ * <code>AttributedCharacterIterator.Attribute</code>.
* <li>The specified object has the same attribute name as this object.
* </ul>
*
- * @param The <code>Object</code> to test for equality against this object.
+ * @param obj the <code>Object</code> to test for equality against this
+ * object.
*
- * @return <code>true</code> if the specified object is equal to this one, <code>false</code> otherwise.
+ * @return <code>true</code> if the specified object is equal to this one,
+ * <code>false</code> otherwise.
*/
public final boolean equals (Object obj)
{
@@ -159,7 +165,7 @@ public interface AttributedCharacterIterator extends CharacterIterator
}
/**
- * This method returns a hash value for this object.
+ * Returns a hash value for this object.
*
* @return A hash value for this object.
*/
@@ -169,7 +175,7 @@ public interface AttributedCharacterIterator extends CharacterIterator
}
/**
- * This method returns a <code>String</code> representation of this object.
+ * Returns a <code>String</code> representation of this object.
*
* @return A <code>String</code> representation of this object.
*/
@@ -181,7 +187,7 @@ public interface AttributedCharacterIterator extends CharacterIterator
} // Inner class Attribute
/**
- * This method returns a list of all keys that are defined for the
+ * Returns a list of all keys that are defined for the
* text range. This can be an empty list if no attributes are defined.
*
* @return A list of keys
@@ -189,15 +195,15 @@ public interface AttributedCharacterIterator extends CharacterIterator
Set getAllAttributeKeys();
/**
- * This method returns a <code>Map</code> of the attributed defined for
- * the current character.
+ * Returns a <code>Map</code> of the attributes defined for the current
+ * character.
*
* @return A <code>Map</code> of the attributes for the current character.
*/
Map getAttributes();
/**
- * This method returns the value of the specified attribute for the
+ * Returns the value of the specified attribute for the
* current character. If the attribute is not defined for the current
* character, <code>null</code> is returned.
*
@@ -208,7 +214,7 @@ public interface AttributedCharacterIterator extends CharacterIterator
Object getAttribute (AttributedCharacterIterator.Attribute attrib);
/**
- * This method returns the index of the first character in the run that
+ * Returns the index of the first character in the run that
* contains all attributes defined for the current character.
*
* @return The start index of the run
@@ -216,7 +222,7 @@ public interface AttributedCharacterIterator extends CharacterIterator
int getRunStart();
/**
- * This method returns the index of the first character in the run that
+ * Returns the index of the first character in the run that
* contains all attributes in the specified <code>Set</code> defined for
* the current character.
*
@@ -227,7 +233,7 @@ public interface AttributedCharacterIterator extends CharacterIterator
int getRunStart (Set attribs);
/**
- * This method returns the index of the first character in the run that
+ * Returns the index of the first character in the run that
* contains the specified attribute defined for the current character.
*
* @param attrib The attribute.
@@ -237,15 +243,15 @@ public interface AttributedCharacterIterator extends CharacterIterator
int getRunStart (AttributedCharacterIterator.Attribute attrib);
/**
- * This method returns the index of the character after the end of the run
- * that contains all attributed defined for the current character.
+ * Returns the index of the character after the end of the run
+ * that contains all attributes defined for the current character.
*
* @return The end index of the run.
*/
int getRunLimit();
/**
- * This method returns the index of the character after the end of the run
+ * Returns the index of the character after the end of the run
* that contains all attributes in the specified <code>Set</code> defined
* for the current character.
*
@@ -256,7 +262,7 @@ public interface AttributedCharacterIterator extends CharacterIterator
int getRunLimit (Set attribs);
/**
- * This methods returns the index of the character after the end of the run
+ * Returns the index of the character after the end of the run
* that contains the specified attribute defined for the current character.
*
* @param attrib The attribute.
diff --git a/java/text/AttributedString.java b/java/text/AttributedString.java
index 752b37681..9f0d5af1c 100644
--- a/java/text/AttributedString.java
+++ b/java/text/AttributedString.java
@@ -1,5 +1,5 @@
/* AttributedString.java -- Models text with attributes
- Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,379 +47,326 @@ import java.util.Map;
import java.util.Set;
/**
- * This class models a <code>String</code> with attributes over various
- * subranges of the string. It allows applications to access this
- * information via the <code>AttributedCharcterIterator</code> interface.
- *
- * @version 0.0
- *
- * @author Aaron M. Renn (arenn@urbanophile.com)
- */
-public class AttributedString
-{
-
-/*************************************************************************/
-
-/*
- * Inner Classes
- */
-
-/**
- * This class contains the attributes and ranges of text over which
- * that attributes apply.
- */
-final class AttributeRange
-{
-
-/*
- * Instance Variables
- */
-
-/**
- * A Map of the attributes
- */
-Map attribs;
-
-/**
- * The beginning index of the attributes
- */
-int begin_index;
-
-/**
- * The ending index of the attributes
- */
-int end_index;
-
-/*************************************************************************/
-
-/*
- * Constructors
- */
-
-AttributeRange(Map attribs, int begin_index, int end_index)
-{
- this.attribs = attribs;
- this.begin_index = begin_index;
- this.end_index = end_index;
-}
-
-} // Inner class AttributeRange
-
-/*************************************************************************/
-
-/*
- * Instance Variables
+ * This class models a <code>String</code> with attributes over various
+ * subranges of the string. It allows applications to access this
+ * information via the <code>AttributedCharcterIterator</code> interface.
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
*/
-
-/**
- * This object holds the string we are representing.
- */
-private StringCharacterIterator sci;
-
-/**
- * This is the attribute information
- */
-private AttributeRange[] attribs;
-
-/*************************************************************************/
-
-/*
- * Constructors
- */
-
-/**
- * This method initializes a new instance of <code>AttributedString</code>
- * that represents the specified <code>String</code> with no attributes.
- *
- * @param str The <code>String</code> to be attributed.
- */
-public
-AttributedString(String str)
-{
- sci = new StringCharacterIterator(str);
- attribs = new AttributeRange[0];
-}
-
-/*************************************************************************/
-
-/**
- * This method initializes a new instance of <code>AttributedString</code>
- * that represents that specified <code>String</code> with the specified
- * attributes over the entire length of the <code>String</code>.
- *
- * @param str The <code>String</code> to be attributed.
- * @param attributes The attribute list.
- */
-public
-AttributedString(String str, Map attributes)
-{
- this(str);
-
- attribs = new AttributeRange[1];
- attribs[0] = new AttributeRange(attributes, 0, str.length());
-}
-
-/*************************************************************************/
-
-/**
- * This method initializes a new instance of <code>AttributedString</code>
- * that will use the text and attribute information from the specified
- * <code>AttributedCharacterIterator</code>.
- *
- * @param aci The <code>AttributedCharacterIterator</code> containing the text and attribute information.
- */
-public
-AttributedString(AttributedCharacterIterator aci)
-{
- this(aci, aci.getBeginIndex(), aci.getEndIndex(), null);
-}
-
-/*************************************************************************/
-
-/**
- * This method initializes a new instance of <code>AttributedString</code>
- * that will use the text and attribute information from the specified
- * subrange of the specified <code>AttributedCharacterIterator</code>.
- *
- * @param aci The <code>AttributedCharacterIterator</code> containing the text and attribute information.
- * @param begin_index The beginning index of the text subrange.
- * @param end_index The ending index of the text subrange.
- */
-public
-AttributedString(AttributedCharacterIterator aci, int begin_index,
- int end_index)
+public class AttributedString
{
- this(aci, begin_index, end_index, null);
-}
-
-/*************************************************************************/
-/**
- * This method initializes a new instance of <code>AttributedString</code>
- * that will use the text and attribute information from the specified
- * subrange of the specified <code>AttributedCharacterIterator</code>.
- * Only attributes from the source iterator that are present in the
- * specified array of attributes will be included in the attribute list
- * for this object.
- *
- * @param aci The <code>AttributedCharacterIterator</code> containing the text and attribute information.
- * @param begin_index The beginning index of the text subrange.
- * @param end_index The ending index of the text subrange.
- * @param attributes A list of attributes to include from the iterator, or <code>null</code> to include all attributes.
- */
-public
-AttributedString(AttributedCharacterIterator aci, int begin_index,
- int end_index, AttributedCharacterIterator.Attribute[] attributes)
-{
- // Validate some arguments
- if ((begin_index < 0) || (end_index < begin_index))
- throw new IllegalArgumentException("Bad index values");
-
- StringBuffer sb = new StringBuffer("");
-
- // Get the valid attribute list
- Set all_attribs = aci.getAllAttributeKeys();
- if (attributes != null)
- all_attribs.retainAll(Arrays.asList(attributes));
-
- // Loop through and extract the attributes
- char c = aci.setIndex(begin_index);
-
- ArrayList accum = new ArrayList();
- do
- {
- sb.append(c);
-
- Iterator iter = all_attribs.iterator();
- while(iter.hasNext())
- {
- Object obj = iter.next();
-
- // What should we do if this is not true?
- if (!(obj instanceof AttributedCharacterIterator.Attribute))
- continue;
-
- AttributedCharacterIterator.Attribute attrib =
- (AttributedCharacterIterator.Attribute)obj;
-
- // Make sure the attribute is defined.
- int rl = aci.getRunLimit(attrib);
- if (rl == -1)
- continue;
- if (rl > end_index)
- rl = end_index;
- rl -= begin_index;
-
- // Check to see if we already processed this one
- int rs = aci.getRunStart(attrib);
- if ((rs < aci.getIndex()) && (aci.getIndex() != begin_index))
- continue;
-
- // If the attribute run starts before the beginning index, we
- // need to junk it if it is an Annotation.
- Object attrib_obj = aci.getAttribute(attrib);
- if (rs < begin_index)
- {
- if (attrib_obj instanceof Annotation)
- continue;
-
- rs = begin_index;
- }
- else
- {
- rs -= begin_index;
- }
-
- // Create a map object. Yes this will only contain one attribute
- Map new_map = new Hashtable();
- new_map.put(attrib, attrib_obj);
-
- // Add it to the attribute list.
- accum.add(new AttributeRange(new_map, rs, rl));
- }
-
- c = aci.next();
+ /**
+ * The attributes and ranges of text over which those attributes apply.
+ */
+ final class AttributeRange
+ {
+
+ /** A Map of the attributes */
+ Map attribs;
+
+ /** The beginning index of the attributes */
+ int begin_index;
+
+ /** The ending index of the attributes */
+ int end_index;
+
+ /**
+ * Creates a new attribute range.
+ *
+ * @param attribs the attributes.
+ * @param begin_index the start index.
+ * @param end_index the end index.
+ */
+ AttributeRange(Map attribs, int begin_index, int end_index)
+ {
+ this.attribs = attribs;
+ this.begin_index = begin_index;
+ this.end_index = end_index;
}
- while(c != CharacterIterator.DONE);
-
- attribs = new AttributeRange[accum.size()];
- attribs = (AttributeRange[]) accum.toArray(attribs);
-
- sci = new StringCharacterIterator(sb.toString());
-}
-
-/*************************************************************************/
-
-/*
- * Instance Methods
- */
-
-/**
- * This method adds a new attribute that will cover the entire string.
- *
- * @param attrib The attribute to add.
- * @param value The value of the attribute.
- */
-public void
-addAttribute(AttributedCharacterIterator.Attribute attrib, Object value)
-{
- addAttribute(attrib, value, 0, sci.getEndIndex());
-}
-
-/*************************************************************************/
-
-/**
- * This method adds a new attribute that will cover the specified subrange
- * of the string.
- *
- * @param attrib The attribute to add.
- * @param value The value of the attribute, which may be null.
- * @param begin_index The beginning index of the subrange.
- * @param end_index The ending index of the subrange.
- *
- * @exception IllegalArgumentException If attribute is <code>null</code> or the subrange is not valid.
- */
-public void
-addAttribute(AttributedCharacterIterator.Attribute attrib, Object value,
- int begin_index, int end_index)
-{
- if (attrib == null)
- throw new IllegalArgumentException("null attribute");
-
- HashMap hm = new HashMap();
- hm.put(attrib, value);
- addAttributes(hm, begin_index, end_index);
-}
-
-/*************************************************************************/
-
-/**
- * This method adds all of the attributes in the specified list to the
- * specified subrange of the string.
- *
- * @param attributes The list of attributes.
- * @param begin_index The beginning index.
- * @param end_index The ending index
- *
- * @param IllegalArgumentException If the list is <code>null</code> or the subrange is not valid.
- */
-public void
-addAttributes(Map attributes, int begin_index, int end_index)
-{
- if (attributes == null)
- throw new IllegalArgumentException("null attribute");
-
- if ((begin_index < 0) || (end_index > sci.getEndIndex()) ||
- (end_index < begin_index))
- throw new IllegalArgumentException("bad range");
-
- AttributeRange[] new_list = new AttributeRange[attribs.length + 1];
- System.arraycopy(attribs, 0, new_list, 0, attribs.length);
- attribs = new_list;
- attribs[attribs.length - 1] = new AttributeRange(attributes, begin_index,
- end_index);
-}
-
-/*************************************************************************/
-
-/**
- * This method returns an <code>AttributedCharacterIterator</code> that
- * will iterate over the entire string.
- *
- * @return An <code>AttributedCharacterIterator</code> for the entire string.
- */
-public AttributedCharacterIterator
-getIterator()
-{
- return(new AttributedStringIterator(sci, attribs, 0, sci.getEndIndex(), null));
-}
-
-/*************************************************************************/
-
-/**
- * This method returns an <code>AttributedCharacterIterator</code> that
- * will iterate over the entire string. This iterator will return information
- * about the list of attributes in the specified array. Attributes not in
- * the array may or may not be returned by the iterator. If the specified
- * array is <code>null</code>, all attributes will be returned.
- *
- * @param attributes A list of attributes to include in the returned iterator.
- *
- * @return An <code>AttributedCharacterIterator</code> for this string.
- */
-public AttributedCharacterIterator
-getIterator(AttributedCharacterIterator.Attribute[] attributes)
-{
- return(getIterator(attributes, 0, sci.getEndIndex()));
-}
-
-/*************************************************************************/
-
-/**
- * This method returns an <code>AttributedCharacterIterator</code> that
- * will iterate over the specified subrange. This iterator will return information
- * about the list of attributes in the specified array. Attributes not in
- * the array may or may not be returned by the iterator. If the specified
- * array is <code>null</code>, all attributes will be returned.
- *
- * @param attributes A list of attributes to include in the returned iterator.
- * @param begin_index The beginning index of the subrange.
- * @param end_index The ending index of the subrange.
- *
- * @return An <code>AttributedCharacterIterator</code> for this string.
- */
-public AttributedCharacterIterator
-getIterator(AttributedCharacterIterator.Attribute[] attributes,
- int begin_index, int end_index)
-{
- if ((begin_index < 0) || (end_index > sci.getEndIndex()) ||
- (end_index < begin_index))
- throw new IllegalArgumentException("bad range");
-
- return(new AttributedStringIterator(sci, attribs, begin_index, end_index,
- attributes));
-}
+ } // Inner class AttributeRange
+
+ /** The string we are representing. */
+ private StringCharacterIterator sci;
+
+ /** The attribute information */
+ private AttributeRange[] attribs;
+
+ /**
+ * Creates a new instance of <code>AttributedString</code>
+ * that represents the specified <code>String</code> with no attributes.
+ *
+ * @param str The <code>String</code> to be attributed (<code>null</code> not
+ * permitted).
+ *
+ * @throws NullPointerException if <code>str</code> is <code>null</code>.
+ */
+ public AttributedString(String str)
+ {
+ sci = new StringCharacterIterator(str);
+ attribs = new AttributeRange[0];
+ }
+
+ /**
+ * Creates a new instance of <code>AttributedString</code>
+ * that represents that specified <code>String</code> with the specified
+ * attributes over the entire length of the <code>String</code>.
+ *
+ * @param str The <code>String</code> to be attributed.
+ * @param attributes The attribute list.
+ */
+ public AttributedString(String str, Map attributes)
+ {
+ this(str);
+
+ attribs = new AttributeRange[1];
+ attribs[0] = new AttributeRange(attributes, 0, str.length());
+ }
+
+ /**
+ * Initializes a new instance of <code>AttributedString</code>
+ * that will use the text and attribute information from the specified
+ * <code>AttributedCharacterIterator</code>.
+ *
+ * @param aci The <code>AttributedCharacterIterator</code> containing the
+ * text and attribute information (<code>null</code> not
+ * permitted).
+ *
+ * @throws NullPointerException if <code>aci</code> is <code>null</code>.
+ */
+ public AttributedString(AttributedCharacterIterator aci)
+ {
+ this(aci, aci.getBeginIndex(), aci.getEndIndex(), null);
+ }
+
+ /**
+ * Initializes a new instance of <code>AttributedString</code>
+ * that will use the text and attribute information from the specified
+ * subrange of the specified <code>AttributedCharacterIterator</code>.
+ *
+ * @param aci The <code>AttributedCharacterIterator</code> containing the
+ * text and attribute information.
+ * @param begin_index The beginning index of the text subrange.
+ * @param end_index The ending index of the text subrange.
+ */
+ public AttributedString(AttributedCharacterIterator aci, int begin_index,
+ int end_index)
+ {
+ this(aci, begin_index, end_index, null);
+ }
+
+ /**
+ * Initializes a new instance of <code>AttributedString</code>
+ * that will use the text and attribute information from the specified
+ * subrange of the specified <code>AttributedCharacterIterator</code>.
+ * Only attributes from the source iterator that are present in the
+ * specified array of attributes will be included in the attribute list
+ * for this object.
+ *
+ * @param aci The <code>AttributedCharacterIterator</code> containing the
+ * text and attribute information.
+ * @param begin_index The beginning index of the text subrange.
+ * @param end_index The ending index of the text subrange.
+ * @param attributes A list of attributes to include from the iterator, or
+ * <code>null</code> to include all attributes.
+ */
+ public AttributedString(AttributedCharacterIterator aci, int begin_index,
+ int end_index, AttributedCharacterIterator.Attribute[] attributes)
+ {
+ // Validate some arguments
+ if ((begin_index < 0) || (end_index < begin_index))
+ throw new IllegalArgumentException("Bad index values");
+
+ StringBuffer sb = new StringBuffer("");
+
+ // Get the valid attribute list
+ Set all_attribs = aci.getAllAttributeKeys();
+ if (attributes != null)
+ all_attribs.retainAll(Arrays.asList(attributes));
+
+ // Loop through and extract the attributes
+ char c = aci.setIndex(begin_index);
+
+ ArrayList accum = new ArrayList();
+ do
+ {
+ sb.append(c);
+
+ Iterator iter = all_attribs.iterator();
+ while(iter.hasNext())
+ {
+ Object obj = iter.next();
+
+ // What should we do if this is not true?
+ if (!(obj instanceof AttributedCharacterIterator.Attribute))
+ continue;
+
+ AttributedCharacterIterator.Attribute attrib =
+ (AttributedCharacterIterator.Attribute)obj;
+
+ // Make sure the attribute is defined.
+ int rl = aci.getRunLimit(attrib);
+ if (rl == -1)
+ continue;
+ if (rl > end_index)
+ rl = end_index;
+ rl -= begin_index;
+
+ // Check to see if we already processed this one
+ int rs = aci.getRunStart(attrib);
+ if ((rs < aci.getIndex()) && (aci.getIndex() != begin_index))
+ continue;
+
+ // If the attribute run starts before the beginning index, we
+ // need to junk it if it is an Annotation.
+ Object attrib_obj = aci.getAttribute(attrib);
+ if (rs < begin_index)
+ {
+ if (attrib_obj instanceof Annotation)
+ continue;
+
+ rs = begin_index;
+ }
+ else
+ {
+ rs -= begin_index;
+ }
+
+ // Create a map object. Yes this will only contain one attribute
+ Map new_map = new Hashtable();
+ new_map.put(attrib, attrib_obj);
+
+ // Add it to the attribute list.
+ accum.add(new AttributeRange(new_map, rs, rl));
+ }
+
+ c = aci.next();
+ }
+ while(c != CharacterIterator.DONE);
+
+ attribs = new AttributeRange[accum.size()];
+ attribs = (AttributeRange[]) accum.toArray(attribs);
+
+ sci = new StringCharacterIterator(sb.toString());
+ }
+
+ /**
+ * Adds a new attribute that will cover the entire string.
+ *
+ * @param attrib The attribute to add.
+ * @param value The value of the attribute.
+ */
+ public void addAttribute(AttributedCharacterIterator.Attribute attrib,
+ Object value)
+ {
+ addAttribute(attrib, value, 0, sci.getEndIndex());
+ }
+
+ /**
+ * Adds a new attribute that will cover the specified subrange
+ * of the string.
+ *
+ * @param attrib The attribute to add.
+ * @param value The value of the attribute, which may be <code>null</code>.
+ * @param begin_index The beginning index of the subrange.
+ * @param end_index The ending index of the subrange.
+ *
+ * @exception IllegalArgumentException If attribute is <code>null</code> or
+ * the subrange is not valid.
+ */
+ public void addAttribute(AttributedCharacterIterator.Attribute attrib,
+ Object value, int begin_index, int end_index)
+ {
+ if (attrib == null)
+ throw new IllegalArgumentException("null attribute");
+
+ HashMap hm = new HashMap();
+ hm.put(attrib, value);
+
+ addAttributes(hm, begin_index, end_index);
+ }
+
+ /**
+ * Adds all of the attributes in the specified list to the
+ * specified subrange of the string.
+ *
+ * @param attributes The list of attributes.
+ * @param begin_index The beginning index.
+ * @param end_index The ending index
+ *
+ * @throws IllegalArgumentException If the list is <code>null</code> or the
+ * subrange is not valid.
+ */
+ public void addAttributes(Map attributes, int begin_index, int end_index)
+ {
+ if (attributes == null)
+ throw new IllegalArgumentException("null attribute");
+
+ if ((begin_index < 0) || (end_index > sci.getEndIndex()) ||
+ (end_index < begin_index))
+ throw new IllegalArgumentException("bad range");
+
+ AttributeRange[] new_list = new AttributeRange[attribs.length + 1];
+ System.arraycopy(attribs, 0, new_list, 0, attribs.length);
+ attribs = new_list;
+ attribs[attribs.length - 1] = new AttributeRange(attributes, begin_index,
+ end_index);
+ }
+
+ /**
+ * Returns an <code>AttributedCharacterIterator</code> that
+ * will iterate over the entire string.
+ *
+ * @return An <code>AttributedCharacterIterator</code> for the entire string.
+ */
+ public AttributedCharacterIterator getIterator()
+ {
+ return(new AttributedStringIterator(sci, attribs, 0, sci.getEndIndex(),
+ null));
+ }
+
+ /**
+ * Returns an <code>AttributedCharacterIterator</code> that
+ * will iterate over the entire string. This iterator will return information
+ * about the list of attributes in the specified array. Attributes not in
+ * the array may or may not be returned by the iterator. If the specified
+ * array is <code>null</code>, all attributes will be returned.
+ *
+ * @param attributes A list of attributes to include in the returned iterator.
+ *
+ * @return An <code>AttributedCharacterIterator</code> for this string.
+ */
+ public AttributedCharacterIterator getIterator(
+ AttributedCharacterIterator.Attribute[] attributes)
+ {
+ return(getIterator(attributes, 0, sci.getEndIndex()));
+ }
+
+ /**
+ * Returns an <code>AttributedCharacterIterator</code> that
+ * will iterate over the specified subrange. This iterator will return
+ * information about the list of attributes in the specified array.
+ * Attributes not in the array may or may not be returned by the iterator.
+ * If the specified array is <code>null</code>, all attributes will be
+ * returned.
+ *
+ * @param attributes A list of attributes to include in the returned iterator.
+ * @param begin_index The beginning index of the subrange.
+ * @param end_index The ending index of the subrange.
+ *
+ * @return An <code>AttributedCharacterIterator</code> for this string.
+ */
+ public AttributedCharacterIterator getIterator(
+ AttributedCharacterIterator.Attribute[] attributes,
+ int begin_index, int end_index)
+ {
+ if ((begin_index < 0) || (end_index > sci.getEndIndex()) ||
+ (end_index < begin_index))
+ throw new IllegalArgumentException("bad range");
+
+ return(new AttributedStringIterator(sci, attribs, begin_index, end_index,
+ attributes));
+ }
} // class AttributedString
-
diff --git a/java/text/AttributedStringIterator.java b/java/text/AttributedStringIterator.java
index ca2080114..7fba5d63c 100644
--- a/java/text/AttributedStringIterator.java
+++ b/java/text/AttributedStringIterator.java
@@ -1,5 +1,5 @@
/* AttributedStringIterator.java -- Class to iterate over AttributedString
- Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,129 +55,102 @@ import java.util.Set;
class AttributedStringIterator implements AttributedCharacterIterator
{
-/*************************************************************************/
-
-/**
- * Instance Variables
- */
-
-/**
- * The character iterator containing the text
- */
-private CharacterIterator ci;
-
-/**
- * The list of attributes and ranges
- */
-private AttributedString.AttributeRange[] attribs;
-
-/**
- * The list of attributes that the user is interested in. We may,
- * at our option, not return any other attributes.
- */
-private AttributedCharacterIterator.Attribute[] restricts;
-
-/*************************************************************************/
-
-/*
- * Constructors
- */
-
-AttributedStringIterator(StringCharacterIterator sci,
- AttributedString.AttributeRange[] attribs,
- int begin_index, int end_index,
- AttributedCharacterIterator.Attribute[] restricts)
-{
- this.ci = new StringCharacterIterator(sci, begin_index, end_index);
- this.attribs = attribs;
- this.restricts = restricts;
-}
-
-/*************************************************************************/
-
-/*
- * Instance Methods
- */
-
-// First we have a bunch of stupid redirects. If StringCharacterIterator
-// weren't final, I just would have extended that for this class. Alas, no.
-
-public Object
-clone()
-{
- return(ci.clone());
-}
-
-public char
-current()
-{
- return(ci.current());
-}
-
-public char
-next()
-{
- return(ci.next());
-}
-
-public char
-previous()
-{
- return(ci.previous());
-}
-
-public char
-first()
-{
- return(ci.first());
-}
-
-public char
-last()
-{
- return(ci.last());
-}
-
-public int
-getIndex()
-{
- return(ci.getIndex());
-}
-
-public char
-setIndex(int index)
-{
- return(ci.setIndex(index));
-}
-
-public int
-getBeginIndex()
-{
- return(ci.getBeginIndex());
-}
-
-public int
-getEndIndex()
-{
- return(ci.getEndIndex());
-}
-
-/*
- * Here is where the AttributedCharacterIterator methods start.
- */
-
-/*************************************************************************/
-
-/**
- * Returns a list of all the attribute keys that are defined anywhere
- * on this string.
- */
-public Set
-getAllAttributeKeys()
-{
- HashSet s = new HashSet();
- if (attribs == null)
- return(s);
+ /*************************************************************************/
+
+ /** The character iterator containing the text */
+ private CharacterIterator ci;
+
+ /** The list of attributes and ranges */
+ private AttributedString.AttributeRange[] attribs;
+
+ /**
+ * The list of attributes that the user is interested in. We may,
+ * at our option, not return any other attributes.
+ */
+ private AttributedCharacterIterator.Attribute[] restricts;
+
+ /*************************************************************************/
+
+ AttributedStringIterator(StringCharacterIterator sci,
+ AttributedString.AttributeRange[] attribs,
+ int begin_index, int end_index,
+ AttributedCharacterIterator.Attribute[] restricts)
+ {
+ this.ci = new StringCharacterIterator(sci, begin_index, end_index);
+ this.attribs = attribs;
+ this.restricts = restricts;
+ }
+
+ /*************************************************************************/
+
+ // First we have a bunch of stupid redirects. If StringCharacterIterator
+ // weren't final, I just would have extended that for this class. Alas, no.
+
+ public Object clone()
+ {
+ return(ci.clone());
+ }
+
+ public char current()
+ {
+ return(ci.current());
+ }
+
+ public char next()
+ {
+ return(ci.next());
+ }
+
+ public char previous()
+ {
+ return(ci.previous());
+ }
+
+ public char first()
+ {
+ return(ci.first());
+ }
+
+ public char last()
+ {
+ return(ci.last());
+ }
+
+ public int getIndex()
+ {
+ return(ci.getIndex());
+ }
+
+ public char setIndex(int index)
+ {
+ return(ci.setIndex(index));
+ }
+
+ public int getBeginIndex()
+ {
+ return(ci.getBeginIndex());
+ }
+
+ public int getEndIndex()
+ {
+ return(ci.getEndIndex());
+ }
+
+ /*
+ * Here is where the AttributedCharacterIterator methods start.
+ */
+
+ /*************************************************************************/
+
+ /**
+ * Returns a list of all the attribute keys that are defined anywhere
+ * on this string.
+ */
+ public Set getAllAttributeKeys()
+ {
+ HashSet s = new HashSet();
+ if (attribs == null)
+ return(s);
for (int i = 0; i < attribs.length; i++)
{
@@ -193,156 +166,146 @@ getAllAttributeKeys()
}
}
- return(s);
-}
-
-/*************************************************************************/
-
-/**
- * Various methods that determine how far the run extends for various
- * attribute combinations.
- */
-
-public int
-getRunLimit()
-{
- return(getRunLimit(getAttributes().keySet()));
-}
-
-public int
-getRunLimit(AttributedCharacterIterator.Attribute attrib)
-{
- HashSet s = new HashSet();
- s.add(attrib);
-
- return(getRunLimit(s));
-}
-
-public synchronized int
-getRunLimit(Set attribute_set)
-{
- boolean hit = false;
- int runLimit = ci.getEndIndex ();
- int pos = ci.getIndex ();
-
- for (int i = 0; i < attribs.length; ++i)
- {
- if (pos >= attribs[i].begin_index &&
- pos <= attribs[i].end_index)
- {
- Iterator iter = attribute_set.iterator();
- while(iter.hasNext())
- if (attribs[i].attribs.containsKey(iter.next()))
- {
- hit = true;
- runLimit = Math.min(runLimit, attribs[i].end_index);
- }
- }
- }
- if (hit)
- return runLimit;
- else
- return -1;
-}
-
-/*************************************************************************/
-
-/**
- * Various methods that determine where the run begins for various
- * attribute combinations.
- */
-
-public int
-getRunStart()
-{
- return(getRunStart(getAttributes().keySet()));
-}
-
-public int
-getRunStart(AttributedCharacterIterator.Attribute attrib)
-{
- HashSet s = new HashSet();
- s.add(attrib);
-
- return(getRunStart(s));
-}
-
-public int
-getRunStart(Set attribute_set)
-{
- boolean hit = false;
- int runBegin = 0;
- int pos = ci.getIndex ();
-
- for (int i = 0; i < attribs.length; ++i)
- {
- if (pos >= attribs[i].begin_index &&
- pos <= attribs[i].end_index)
- {
- Iterator iter = attribute_set.iterator();
- while(iter.hasNext())
- if (attribs[i].attribs.containsKey(iter.next()))
- {
- hit = true;
- runBegin = Math.max(runBegin, attribs[i].begin_index);
- }
- }
- }
- if (hit)
- return runBegin;
- else
- return -1;
-}
+ return(s);
+ }
+
+ /*************************************************************************/
+
+ /**
+ * Various methods that determine how far the run extends for various
+ * attribute combinations.
+ */
+
+ public int getRunLimit()
+ {
+ return(getRunLimit(getAttributes().keySet()));
+ }
+
+ public int getRunLimit(AttributedCharacterIterator.Attribute attrib)
+ {
+ HashSet s = new HashSet();
+ s.add(attrib);
+ return(getRunLimit(s));
+ }
+
+ public synchronized int getRunLimit(Set attribute_set)
+ {
+ boolean hit = false;
+ int runLimit = ci.getEndIndex ();
+ int pos = ci.getIndex ();
+
+ for (int i = 0; i < attribs.length; ++i)
+ {
+ if (pos >= attribs[i].begin_index &&
+ pos < attribs[i].end_index)
+ {
+ Iterator iter = attribute_set.iterator();
+ while(iter.hasNext())
+ if (attribs[i].attribs.containsKey(iter.next()))
+ {
+ hit = true;
+ runLimit = Math.min(runLimit, attribs[i].end_index);
+ }
+ }
+ }
+ if (hit)
+ return runLimit;
+ else
+ return ci.getEndIndex();
+ }
+
+ /*************************************************************************/
+
+ /**
+ * Various methods that determine where the run begins for various
+ * attribute combinations.
+ */
+
+ public int getRunStart()
+ {
+ return(getRunStart(getAttributes().keySet()));
+ }
+
+ public int getRunStart(AttributedCharacterIterator.Attribute attrib)
+ {
+ HashSet s = new HashSet();
+ s.add(attrib);
+
+ return(getRunStart(s));
+ }
+
+ public int getRunStart(Set attribute_set)
+ {
+ boolean hit = false;
+ int runBegin = 0;
+ int pos = ci.getIndex();
+
+ for (int i = 0; i < attribs.length; ++i)
+ {
+ if (pos >= attribs[i].begin_index &&
+ pos <= attribs[i].end_index)
+ {
+ Iterator iter = attribute_set.iterator();
+ while(iter.hasNext())
+ if (attribs[i].attribs.containsKey(iter.next()))
+ {
+ hit = true;
+ runBegin = Math.max(runBegin, attribs[i].begin_index);
+ }
+ }
+ }
+ if (hit)
+ return runBegin;
+ else
+ return -1;
+ }
+
+ /*************************************************************************/
+
+ public Object getAttribute(AttributedCharacterIterator.Attribute attrib)
+ {
+ if (attribs == null)
+ return(null);
-/*************************************************************************/
+ for (int i = 0; i < attribs.length; i++)
+ {
+ Set key_set = attribs[i].attribs.keySet();
+ Iterator iter = key_set.iterator();
+ while (iter.hasNext())
+ {
+ Object obj = iter.next();
+
+ // Check for attribute match and range match
+ if (obj.equals(attrib))
+ if ((ci.getIndex() >= attribs[i].begin_index) &&
+ (ci.getIndex() < attribs[i].end_index))
+ return(attribs[i].attribs.get(obj));
+ }
+ }
-public Object
-getAttribute(AttributedCharacterIterator.Attribute attrib)
-{
- if (attribs == null)
return(null);
-
- for (int i = 0; i < attribs.length; i++)
- {
- Set key_set = attribs[i].attribs.keySet();
- Iterator iter = key_set.iterator();
- while (iter.hasNext())
- {
- Object obj = iter.next();
-
- // Check for attribute match and range match
- if (obj.equals(attrib))
- if ((ci.getIndex() >= attribs[i].begin_index) &&
- (ci.getIndex() < attribs[i].end_index))
- return(attribs[i].attribs.get(obj));
- }
- }
-
- return(null);
-}
-
-/*************************************************************************/
-
-/**
- * Return a list of all the attributes and values defined for this
- * character
- */
-public Map
-getAttributes()
-{
- HashMap m = new HashMap();
- if (attribs == null)
- return(m);
+ }
+
+ /*************************************************************************/
+
+ /**
+ * Return a list of all the attributes and values defined for this
+ * character
+ */
+ public Map getAttributes()
+ {
+ HashMap m = new HashMap();
+ if (attribs == null)
+ return(m);
- for (int i = 0; i < attribs.length; i++)
- {
- if ((ci.getIndex() >= attribs[i].begin_index) &&
- (ci.getIndex() < attribs[i].end_index))
- m.putAll(attribs[i].attribs);
- }
+ for (int i = 0; i < attribs.length; i++)
+ {
+ if ((ci.getIndex() >= attribs[i].begin_index) &&
+ (ci.getIndex() < attribs[i].end_index))
+ m.putAll(attribs[i].attribs);
+ }
- return(m);
-}
+ return(m);
+ }
} // class AttributedStringIterator
-
diff --git a/java/text/BreakIterator.java b/java/text/BreakIterator.java
index 7fbc16b58..7ba116870 100644
--- a/java/text/BreakIterator.java
+++ b/java/text/BreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -114,9 +114,9 @@ public abstract class BreakIterator implements Cloneable
* This methdod returns the offset of the text element boundary following
* the specified offset.
*
- * @param offset The text index from which to find the next text boundary.
+ * @param pos The text index from which to find the next text boundary.
*
- * @param The next text boundary following the specified index.
+ * @return The next text boundary following the specified index.
*/
public abstract int following (int pos);
@@ -186,9 +186,9 @@ public abstract class BreakIterator implements Cloneable
*
* @return A <code>BreakIterator</code> instance for the default locale.
*/
- public static BreakIterator getCharacterInstance (Locale loc)
+ public static BreakIterator getCharacterInstance (Locale locale)
{
- BreakIterator r = getInstance ("CharacterIterator", loc);
+ BreakIterator r = getInstance ("CharacterIterator", locale);
if (r == null)
r = new gnu.java.text.CharacterBreakIterator ();
return r;
@@ -214,9 +214,9 @@ public abstract class BreakIterator implements Cloneable
*
* @return A <code>BreakIterator</code> instance for the default locale.
*/
- public static BreakIterator getLineInstance (Locale loc)
+ public static BreakIterator getLineInstance (Locale locale)
{
- BreakIterator r = getInstance ("LineIterator", loc);
+ BreakIterator r = getInstance ("LineIterator", locale);
if (r == null)
r = new gnu.java.text.LineBreakIterator ();
return r;
@@ -242,9 +242,9 @@ public abstract class BreakIterator implements Cloneable
*
* @return A <code>BreakIterator</code> instance for the default locale.
*/
- public static BreakIterator getSentenceInstance (Locale loc)
+ public static BreakIterator getSentenceInstance (Locale locale)
{
- BreakIterator r = getInstance ("SentenceIterator", loc);
+ BreakIterator r = getInstance ("SentenceIterator", locale);
if (r == null)
r = new gnu.java.text.SentenceBreakIterator ();
return r;
@@ -254,7 +254,7 @@ public abstract class BreakIterator implements Cloneable
* This method returns the text this object is iterating over as a
* <code>CharacterIterator</code>.
*
- * @param The text being iterated over.
+ * @return The text being iterated over.
*/
public abstract CharacterIterator getText ();
@@ -278,9 +278,9 @@ public abstract class BreakIterator implements Cloneable
*
* @return A <code>BreakIterator</code> instance for the default locale.
*/
- public static BreakIterator getWordInstance (Locale loc)
+ public static BreakIterator getWordInstance (Locale locale)
{
- BreakIterator r = getInstance ("WordIterator", loc);
+ BreakIterator r = getInstance ("WordIterator", locale);
if (r == null)
r = new gnu.java.text.WordBreakIterator ();
return r;
@@ -290,7 +290,7 @@ public abstract class BreakIterator implements Cloneable
* This method tests whether or not the specified position is a text
* element boundary.
*
- * @param offset The text position to test.
+ * @param pos The text position to test.
*
* @return <code>true</code> if the position is a boundary,
* <code>false</code> otherwise.
@@ -332,8 +332,7 @@ public abstract class BreakIterator implements Cloneable
* This methdod returns the offset of the text element boundary preceding
* the specified offset.
*
- * @param offset The text index from which to find the preceding
- * text boundary.
+ * @param pos The text index from which to find the preceding text boundary.
*
* @returns The next text boundary preceding the specified index.
*/
@@ -357,7 +356,7 @@ public abstract class BreakIterator implements Cloneable
/**
* This method sets the text string to iterate over.
*
- * @param str The <code>String</code> to iterate over.
+ * @param newText The <code>String</code> to iterate over.
*/
public void setText (String newText)
{
@@ -368,7 +367,7 @@ public abstract class BreakIterator implements Cloneable
* This method sets the text to iterate over from the specified
* <code>CharacterIterator</code>.
*
- * @param ci The desired <code>CharacterIterator</code>.
+ * @param newText The desired <code>CharacterIterator</code>.
*/
public abstract void setText (CharacterIterator newText);
}
diff --git a/java/text/CharacterIterator.java b/java/text/CharacterIterator.java
index 7b774f7a2..58d6ddc39 100644
--- a/java/text/CharacterIterator.java
+++ b/java/text/CharacterIterator.java
@@ -1,5 +1,5 @@
/* CharacterIterator.java -- Iterate over a character range
- Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -64,8 +64,8 @@ public interface CharacterIterator extends Cloneable
/**
* This method increments the current index and then returns the character
- * at the new index value. If the index is already at <code>getEndIndex() - 1</code>,
- * it will not be incremented.
+ * at the new index value. If the index is already at
+ * <code>getEndIndex() - 1</code>, it will not be incremented.
*
* @return The character at the position of the incremented index value,
* or <code>DONE</code> if the index has reached getEndIndex() - 1
@@ -78,7 +78,8 @@ public interface CharacterIterator extends Cloneable
* index, it will not be decremented.
*
* @return The character at the position of the decremented index value,
- * or <code>DONE</code> if index was already equal to the beginning index value.
+ * or {@link #DONE} if index was already equal to the beginning index
+ * value.
*/
char previous();
@@ -86,7 +87,8 @@ public interface CharacterIterator extends Cloneable
* This method sets the index value to the beginning of the range and returns
* the character there.
*
- * @return The character at the beginning of the range, or <code>DONE</code> if the range is empty.
+ * @return The character at the beginning of the range, or {@link #DONE} if
+ * the range is empty.
*/
char first();
@@ -95,7 +97,8 @@ public interface CharacterIterator extends Cloneable
* returns the character there. If the range is empty, then the index value
* will be set equal to the beginning index.
*
- * @return The character at the end of the range, or <code>DONE</code> if the range is empty.
+ * @return The character at the end of the range, or {@link #DONE} if the
+ * range is empty.
*/
char last();
@@ -112,7 +115,8 @@ public interface CharacterIterator extends Cloneable
*
* @param index The new index value.
*
- * @return The character at the new index value or <code>DONE</code> if the index value is equal to <code>getEndIndex</code>.
+ * @return The character at the new index value or {@link #DONE} if the index
+ * value is equal to {@link #getEndIndex()}.
*/
char setIndex (int index) throws IllegalArgumentException;
diff --git a/java/text/ChoiceFormat.java b/java/text/ChoiceFormat.java
index 3c390278b..94c13a2ca 100644
--- a/java/text/ChoiceFormat.java
+++ b/java/text/ChoiceFormat.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class ChoiceFormat extends NumberFormat
* object based on the specified pattern. This pattern is of the form
* "term#string|term#string...". For example "1#Sunday|2#Monday|#Tuesday".
*
- * @param pattern The pattern of terminators and format strings.
+ * @param newPattern The pattern of terminators and format strings.
*
* @exception IllegalArgumentException If the pattern is not valid
*/
@@ -170,7 +170,7 @@ public class ChoiceFormat extends NumberFormat
* This is the same pattern type used by the <code>applyPattern</code>
* method.
*
- * @param pattern The pattern of terminators and format strings.
+ * @param newPattern The pattern of terminators and format strings.
*
* @exception IllegalArgumentException If the pattern is not valid
*/
@@ -229,10 +229,11 @@ public class ChoiceFormat extends NumberFormat
* <code>StringBuffer</code> based on the supplied <code>long</code>
* argument.
*
- * @param number The number used for determine (based on the range
+ * @param num The number used for determine (based on the range
* terminators) which format string to append.
- * @param sb The <code>StringBuffer</code> to append the format string to.
- * @param status Unused.
+ * @param appendBuf The <code>StringBuffer</code> to append the format string
+ * to.
+ * @param pos Unused.
*
* @return The <code>StringBuffer</code> with the format string appended.
*/
@@ -247,10 +248,10 @@ public class ChoiceFormat extends NumberFormat
* <code>StringBuffer</code> based on the supplied <code>double</code>
* argument.
*
- * @param number The number used for determine (based on the range
+ * @param num The number used for determine (based on the range
* terminators) which format string to append.
- * @param sb The <code>StringBuffer</code> to append the format string to.
- * @param status Unused.
+ * @param appendBuf The <code>StringBuffer</code> to append the format string to.
+ * @param pos Unused.
*
* @return The <code>StringBuffer</code> with the format string appended.
*/
@@ -333,7 +334,7 @@ public class ChoiceFormat extends NumberFormat
* double less than the specified double will be returned.
*
* @param d The specified double
- * @param positive <code>true</code> to return the next highest
+ * @param next <code>true</code> to return the next highest
* double, <code>false</code> otherwise.
*
* @return The next highest or lowest double value.
diff --git a/java/text/CollationElementIterator.java b/java/text/CollationElementIterator.java
index 481b286c4..45c79142c 100644
--- a/java/text/CollationElementIterator.java
+++ b/java/text/CollationElementIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -177,9 +177,11 @@ public final class CollationElementIterator
* This method returns the primary order value for the given collation
* value.
*
- * @param value The collation value returned from <code>next()</code> or <code>previous()</code>.
+ * @param order The collation value returned from <code>next()</code> or
+ * <code>previous()</code>.
*
- * @return The primary order value of the specified collation value. This is the high 16 bits.
+ * @return The primary order value of the specified collation value. This is
+ * the high 16 bits.
*/
public static int primaryOrder(int order)
{
@@ -201,9 +203,11 @@ public final class CollationElementIterator
* This method returns the secondary order value for the given collation
* value.
*
- * @param value The collation value returned from <code>next()</code> or <code>previous()</code>.
+ * @param order The collation value returned from <code>next()</code> or
+ * <code>previous()</code>.
*
- * @return The secondary order value of the specified collation value. This is the bits 8-15.
+ * @return The secondary order value of the specified collation value. This
+ * is the bits 8-15.
*/
public static short secondaryOrder(int order)
{
@@ -215,9 +219,11 @@ public final class CollationElementIterator
* This method returns the tertiary order value for the given collation
* value.
*
- * @param value The collation value returned from <code>next()</code> or <code>previous()</code>.
+ * @param order The collation value returned from <code>next()</code> or
+ * <code>previous()</code>.
*
- * @return The tertiary order value of the specified collation value. This is the low eight bits.
+ * @return The tertiary order value of the specified collation value. This
+ * is the low eight bits.
*/
public static short tertiaryOrder(int order)
{
@@ -458,7 +464,7 @@ public final class CollationElementIterator
*
* @param value The collation order value
*
- * @param The maximum length of an expansion sequence.
+ * @return The maximum length of an expansion sequence.
*/
public int getMaxExpansion(int value)
{
diff --git a/java/text/CollationKey.java b/java/text/CollationKey.java
index 1fa380f35..a467869b8 100644
--- a/java/text/CollationKey.java
+++ b/java/text/CollationKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package java.text;
+import java.util.Arrays;
+
/* Written using "Java Class Libraries", 2nd edition, plus online
* API docs for JDK 1.2 from http://www.javasoft.com.
* Status: Believed complete and correct.
@@ -154,7 +156,7 @@ public final class CollationKey implements Comparable
if (!ck.getSourceString ().equals (getSourceString ()))
return false;
- if (!ck.toByteArray ().equals (toByteArray ()))
+ if (! Arrays.equals (ck.toByteArray (), toByteArray ()))
return false;
return true;
@@ -190,7 +192,7 @@ public final class CollationKey implements Comparable
/**
* This method returns the collation bit sequence as a byte array.
*
- * @param A byte array containing the collation bit sequence.
+ * @return A byte array containing the collation bit sequence.
*/
public byte[] toByteArray()
{
diff --git a/java/text/Collator.java b/java/text/Collator.java
index 643d9cbf4..7dea83f0a 100644
--- a/java/text/Collator.java
+++ b/java/text/Collator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -150,8 +150,8 @@ public abstract class Collator implements Comparator, Cloneable
* <code>Collator</code> and the strength and decomposition rules in
* effect.
*
- * @param str1 The first object to compare
- * @param str2 The second object to compare
+ * @param source The first object to compare
+ * @param target The second object to compare
*
* @return A negative integer if str1 &lt; str2, 0 if str1 == str2, or
* a positive integer if str1 &gt; str2.
@@ -164,8 +164,8 @@ public abstract class Collator implements Comparator, Cloneable
* equal to, or greater than the second argument. These two objects
* must be <code>String</code>'s or an exception will be thrown.
*
- * @param obj1 The first object to compare
- * @param obj2 The second object to compare
+ * @param o1 The first object to compare
+ * @param o2 The second object to compare
*
* @return A negative integer if obj1 &lt; obj2, 0 if obj1 == obj2, or
* a positive integer if obj1 &gt; obj2.
@@ -208,8 +208,8 @@ public abstract class Collator implements Comparator, Cloneable
* according to the collation rules for the locale of this object and
* the current strength and decomposition settings.
*
- * @param str1 The first <code>String</code> to compare
- * @param str2 The second <code>String</code> to compare
+ * @param source The first <code>String</code> to compare
+ * @param target The second <code>String</code> to compare
*
* @return <code>true</code> if the two strings are equal,
* <code>false</code> otherwise.
@@ -256,7 +256,7 @@ public abstract class Collator implements Comparator, Cloneable
* comparisons against a string might be performed multiple times, such
* as during a sort operation.
*
- * @param str The <code>String</code> to convert.
+ * @param source The <code>String</code> to convert.
*
* @return A <code>CollationKey</code> for the specified <code>String</code>.
*/
@@ -292,7 +292,7 @@ public abstract class Collator implements Comparator, Cloneable
* specified locale. If no <code>Collator</code> exists for the desired
* locale, a <code>Collator</code> for the default locale will be returned.
*
- * @param locale The desired localed to load a <code>Collator</code> for.
+ * @param loc The desired localed to load a <code>Collator</code> for.
*
* @return A <code>Collator</code> for the requested locale
*/
@@ -347,7 +347,7 @@ public abstract class Collator implements Comparator, Cloneable
* exception will be thrown. See the documentation for those
* contants for an explanation of this setting.
*
- * @param decmp The new decomposition setting.
+ * @param mode The new decomposition setting.
*
* @exception IllegalArgumentException If the requested
* decomposition setting is not valid.
diff --git a/java/text/DateFormat.java b/java/text/DateFormat.java
index 14f7cb9b1..5d412aada 100644
--- a/java/text/DateFormat.java
+++ b/java/text/DateFormat.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -405,8 +405,18 @@ public abstract class DateFormat extends Format implements Cloneable
* <ul>
* <li>Is not <code>null</code>.</li>
* <li>Is an instance of <code>DateFormat</code>.</li>
- * <li>Has the same numberFormat field value as this object.</li>
+ * <li>Has equal numberFormat field as this object.</li>
+ * <li>Has equal (Calendar) TimeZone rules as this object.</li>
+ * <li>Has equal (Calendar) isLenient results.</li>
+ * <li>Has equal Calendar first day of week and minimal days in week
+ * values.</li>
* </ul>
+ * Note that not all properties of the Calendar are relevant for a
+ * DateFormat. For formatting only the fact whether or not the
+ * TimeZone has the same rules and whether the calendar is lenient
+ * and has the same week rules is compared for this implementation
+ * of equals. Other properties of the Calendar (such as the time)
+ * are not taken into account.
*
* @param obj The object to test for equality against.
*
@@ -419,8 +429,24 @@ public abstract class DateFormat extends Format implements Cloneable
return false;
DateFormat d = (DateFormat) obj;
-
- return numberFormat.equals(d.numberFormat);
+ TimeZone tz = getTimeZone();
+ TimeZone tzd = d.getTimeZone();
+ if (tz.hasSameRules(tzd))
+ if (isLenient() == d.isLenient())
+ {
+ Calendar c = getCalendar();
+ Calendar cd = d.getCalendar();
+ if ((c == null && cd == null)
+ ||
+ (c.getFirstDayOfWeek() == cd.getFirstDayOfWeek()
+ &&
+ c.getMinimalDaysInFirstWeek()
+ == cd.getMinimalDaysInFirstWeek()))
+ return ((numberFormat == null && d.numberFormat == null)
+ || numberFormat.equals(d.numberFormat));
+ }
+
+ return false;
}
/**
@@ -442,9 +468,9 @@ public abstract class DateFormat extends Format implements Cloneable
* thrown.
*
* @param obj The <code>Object</code> to format.
- * @param toAppendTo The <code>StringBuffer</code> to append the resultant
+ * @param buf The <code>StringBuffer</code> to append the resultant
* <code>String</code> to.
- * @param fieldPosition Is updated to the start and end index of the
+ * @param pos Is updated to the start and end index of the
* specified field.
*
* @return The <code>StringBuffer</code> supplied on input, with the
@@ -479,9 +505,9 @@ public abstract class DateFormat extends Format implements Cloneable
* to the specified <code>StringBuffer</code>.
*
* @param date The <code>Date</code> value to format.
- * @param toAppendTo The <code>StringBuffer</code> to append the resultant
+ * @param buf The <code>StringBuffer</code> to append the resultant
* <code>String</code> to.
- * @param fieldPosition Is updated to the start and end index of the
+ * @param pos Is updated to the start and end index of the
* specified field.
*
* @return The <code>StringBuffer</code> supplied on input, with the
@@ -643,7 +669,7 @@ public abstract class DateFormat extends Format implements Cloneable
* localed will be used in place of the default.
*
* @param style The type of formatting to perform.
- * @param aLocale The desired locale.
+ * @param loc The desired locale.
*
* @return A new <code>DateFormat</code> instance.
*/
@@ -744,7 +770,7 @@ public abstract class DateFormat extends Format implements Cloneable
* localed will be used in place of the default.
*
* @param style The type of formatting to perform.
- * @param aLocale The desired locale.
+ * @param loc The desired locale.
*
* @return A new <code>DateFormat</code> instance.
*/
@@ -818,7 +844,7 @@ public abstract class DateFormat extends Format implements Cloneable
* starting parse position on method entry and the ending parse
* position on method exit.
*
- * @param text The string to parse.
+ * @param source The string to parse.
* @param pos The starting parse position in entry, the ending parse
* position on exit.
*
@@ -848,7 +874,7 @@ public abstract class DateFormat extends Format implements Cloneable
* This method specified the <code>Calendar</code> that should be used
* by this object to parse/format datetimes.
*
- * @param The new <code>Calendar</code> for this object.
+ * @param calendar The new <code>Calendar</code> for this object.
*
* @see java.util.Calendar
*/
@@ -873,7 +899,7 @@ public abstract class DateFormat extends Format implements Cloneable
* This method specifies the <code>NumberFormat</code> object that should
* be used by this object to parse/format times.
*
- * @param The <code>NumberFormat</code> in use by this object.
+ * @param numberFormat The <code>NumberFormat</code> in use by this object.
*/
public void setNumberFormat (NumberFormat numberFormat)
{
@@ -883,7 +909,7 @@ public abstract class DateFormat extends Format implements Cloneable
/**
* This method sets the time zone that should be used by this object.
*
- * @param The new time zone.
+ * @param timeZone The new time zone.
*/
public void setTimeZone (TimeZone timeZone)
{
diff --git a/java/text/DateFormatSymbols.java b/java/text/DateFormatSymbols.java
index 69db689aa..6a20b4c2a 100644
--- a/java/text/DateFormatSymbols.java
+++ b/java/text/DateFormatSymbols.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,7 +41,6 @@ package java.text;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import java.util.StringTokenizer;
/**
* This class acts as container for locale specific date/time formatting
@@ -289,7 +288,7 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
* This is a two element <code>String</code> array indexed by
* <code>Calendar.AM</code> and <code>Calendar.PM</code>
*
- * @param ampms The new list of AM/PM display strings.
+ * @param value The new list of AM/PM display strings.
*/
public void setAmPmStrings (String[] value)
{
@@ -302,11 +301,11 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
* This is a two element <code>String</code>
* array indexed by <code>Calendar.BC</code> and <code>Calendar.AD</code>.
*
- * @param eras The new list of era disply strings.
+ * @param labels The new list of era display strings.
*/
- public void setEras (String[] value)
+ public void setEras (String[] labels)
{
- eras = value;
+ eras = labels;
}
/**
@@ -340,11 +339,11 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
* <li>17 - time zone (z)</li>
* </ul>
*
- * @param localPatternChars The new format patter characters
+ * @param chars The new format pattern characters
*/
- public void setLocalPatternChars (String value)
+ public void setLocalPatternChars (String chars)
{
- localPatternChars = value;
+ localPatternChars = chars;
}
/**
@@ -354,11 +353,11 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
* <code>Calendar.UNDECEMBER</code>. Note that there are thirteen
* elements because some calendars have thriteen months.
*
- * @param months The list of month display strings.
+ * @param labels The list of month display strings.
*/
- public void setMonths (String[] value)
+ public void setMonths (String[] labels)
{
- months = value;
+ months = labels;
}
/**
@@ -369,11 +368,11 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
* through <code>Calendar.UNDECEMBER</code>. Note that there are thirteen
* elements because some calendars have thirteen months.
*
- * @param shortMonths The new list of abbreviated month display strings.
+ * @param labels The new list of abbreviated month display strings.
*/
- public void setShortMonths (String[] value)
+ public void setShortMonths (String[] labels)
{
- shortMonths = value;
+ shortMonths = labels;
}
/**
@@ -384,11 +383,11 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
* through <code>Calendar.SATURDAY</code>. Note that the first element
* of this array is ignored.
*
- * @param shortWeekdays This list of abbreviated weekday display strings.
+ * @param labels This list of abbreviated weekday display strings.
*/
- public void setShortWeekdays (String[] value)
+ public void setShortWeekdays (String[] labels)
{
- shortWeekdays = value;
+ shortWeekdays = labels;
}
/**
@@ -398,11 +397,11 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
* through <code>Calendar.SATURDAY</code>. Note that the first element
* of this array is ignored.
*
- * @param weekdays This list of weekday display strings.
+ * @param labels This list of weekday display strings.
*/
- public void setWeekdays (String[] value)
+ public void setWeekdays (String[] labels)
{
- weekdays = value;
+ weekdays = labels;
}
/**
@@ -418,11 +417,11 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
* <li>4 - the short name of the time zone (daylight savings time).</li>
* </ul>
*
- * @return The list of time zone display strings.
+ * @params zones The list of time zone display strings.
*/
- public void setZoneStrings (String[][] value)
+ public void setZoneStrings (String[][] zones)
{
- zoneStrings = value;
+ zoneStrings = zones;
}
/* Does a "deep" equality test - recurses into arrays. */
@@ -492,7 +491,7 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
/**
* Returns a new copy of this object.
*
- * @param A copy of this object
+ * @return A copy of this object
*/
public Object clone ()
{
diff --git a/java/text/DecimalFormat.java b/java/text/DecimalFormat.java
index 80a105706..6dadb0ce3 100644
--- a/java/text/DecimalFormat.java
+++ b/java/text/DecimalFormat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -437,13 +437,9 @@ public class DecimalFormat extends NumberFormat
* @throws NullPointerException if any argument is null.
* @throws IllegalArgumentException if the pattern is invalid.
*/
- public DecimalFormat (String pattern, DecimalFormatSymbols symbols)
+ public DecimalFormat(String pattern, DecimalFormatSymbols symbols)
{
- if (symbols == null)
- {
- throw new NullPointerException("Supplied set of symbols is null.");
- }
- this.symbols = symbols;
+ this.symbols = (DecimalFormatSymbols) symbols.clone();
applyPattern(pattern);
}
@@ -454,21 +450,39 @@ public class DecimalFormat extends NumberFormat
return s1.equals(s2);
}
- public boolean equals (Object obj)
+ /**
+ * Tests this instance for equality with an arbitrary object. This method
+ * returns <code>true</code> if:
+ * <ul>
+ * <li><code>obj</code> is not <code>null</code>;</li>
+ * <li><code>obj</code> is an instance of <code>DecimalFormat</code>;</li>
+ * <li>this instance and <code>obj</code> have the same attributes;</li>
+ * </ul>
+ *
+ * @param obj the object (<code>null</code> permitted).
+ *
+ * @return A boolean.
+ */
+ public boolean equals(Object obj)
{
if (! (obj instanceof DecimalFormat))
return false;
DecimalFormat dup = (DecimalFormat) obj;
- return (decimalSeparatorAlwaysShown == dup.decimalSeparatorAlwaysShown
- && groupingSize == dup.groupingSize
- && minExponentDigits == dup.minExponentDigits
- && multiplier == dup.multiplier
- && equals(negativePrefix, dup.negativePrefix)
- && equals(negativeSuffix, dup.negativeSuffix)
- && equals(positivePrefix, dup.positivePrefix)
- && equals(positiveSuffix, dup.positiveSuffix)
- && symbols.equals(dup.symbols)
- && useExponentialNotation == dup.useExponentialNotation);
+ return (decimalSeparatorAlwaysShown == dup.decimalSeparatorAlwaysShown
+ && groupingUsed == dup.groupingUsed
+ && groupingSize == dup.groupingSize
+ && multiplier == dup.multiplier
+ && useExponentialNotation == dup.useExponentialNotation
+ && minExponentDigits == dup.minExponentDigits
+ && minimumIntegerDigits == dup.minimumIntegerDigits
+ && maximumIntegerDigits == dup.maximumIntegerDigits
+ && minimumFractionDigits == dup.minimumFractionDigits
+ && maximumFractionDigits == dup.maximumFractionDigits
+ && equals(negativePrefix, dup.negativePrefix)
+ && equals(negativeSuffix, dup.negativeSuffix)
+ && equals(positivePrefix, dup.positivePrefix)
+ && equals(positiveSuffix, dup.positiveSuffix)
+ && symbols.equals(dup.symbols));
}
private void formatInternal (double number, FormatBuffer dest,
@@ -784,9 +798,14 @@ public class DecimalFormat extends NumberFormat
return symbols.getCurrency();
}
- public DecimalFormatSymbols getDecimalFormatSymbols ()
+ /**
+ * Returns a copy of the symbols used by this instance.
+ *
+ * @return A copy of the symbols.
+ */
+ public DecimalFormatSymbols getDecimalFormatSymbols()
{
- return symbols;
+ return (DecimalFormatSymbols) symbols.clone();
}
public int getGroupingSize ()
@@ -1133,9 +1152,15 @@ public class DecimalFormat extends NumberFormat
symbols.setCurrency(currency);
}
- public void setDecimalFormatSymbols (DecimalFormatSymbols newSymbols)
+ /**
+ * Sets the symbols used by this instance. This method makes a copy of
+ * the supplied symbols.
+ *
+ * @param newSymbols the symbols (<code>null</code> not permitted).
+ */
+ public void setDecimalFormatSymbols(DecimalFormatSymbols newSymbols)
{
- symbols = newSymbols;
+ symbols = (DecimalFormatSymbols) newSymbols.clone();
}
public void setDecimalSeparatorAlwaysShown (boolean newValue)
diff --git a/java/text/DecimalFormatSymbols.java b/java/text/DecimalFormatSymbols.java
index 01ead2412..a8735d361 100644
--- a/java/text/DecimalFormatSymbols.java
+++ b/java/text/DecimalFormatSymbols.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -139,7 +139,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
* locales (those with no specified country), such as
* <code>Locale.ENGLISH</code>.
*
- * @param locale The local to load symbols for.
+ * @param loc The local to load symbols for.
* @throws NullPointerException if the locale is null.
*/
public DecimalFormatSymbols (Locale loc)
@@ -422,7 +422,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
/**
* This method sets the currency symbol to the specified value.
*
- * @param currencySymbol The new currency symbol
+ * @param currency The new currency symbol
*/
public void setCurrencySymbol (String currency)
{
@@ -432,7 +432,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
/**
* This method sets the decimal point character to the specified value.
*
- * @param decimalSeparator The new decimal point character
+ * @param decimalSep The new decimal point character
*/
public void setDecimalSeparator (char decimalSep)
{
@@ -464,7 +464,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
/**
* This method sets the character used to separate groups of digits.
*
- * @param groupingSeparator The character used to separate groups of digits.
+ * @param groupSep The character used to separate groups of digits.
*/
public void setGroupingSeparator (char groupSep)
{
@@ -523,8 +523,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
* This method sets the character used for the decimal point in currency
* values.
*
- * @param monetarySeparator The decimal point character used in
- * currency values.
+ * @param decimalSep The decimal point character used in currency values.
*/
public void setMonetaryDecimalSeparator (char decimalSep)
{
@@ -535,7 +534,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
* This method sets the string used to represent the NaN (not a
* number) value.
*
- * @param NaN The string used to represent NaN
+ * @param nan The string used to represent NaN
*/
public void setNaN (String nan)
{
@@ -546,7 +545,7 @@ public final class DecimalFormatSymbols implements Cloneable, Serializable
* This method sets the character used to separate positive and negative
* subpatterns in a format pattern.
*
- * @param patternSeparator The character used to separate positive and
+ * @param patternSep The character used to separate positive and
* negative subpatterns in a format pattern.
*/
public void setPatternSeparator (char patternSep)
diff --git a/java/text/FieldPosition.java b/java/text/FieldPosition.java
index 6dd3a6267..427c07e8e 100644
--- a/java/text/FieldPosition.java
+++ b/java/text/FieldPosition.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/text/Format.java b/java/text/Format.java
index 970c7ce63..38fda34ff 100644
--- a/java/text/Format.java
+++ b/java/text/Format.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/text/MessageFormat.java b/java/text/MessageFormat.java
index 4a24afd1f..f59cfd5ca 100644
--- a/java/text/MessageFormat.java
+++ b/java/text/MessageFormat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -334,7 +334,7 @@ public class MessageFormat extends Format
/**
* Applies the specified pattern to this MessageFormat.
*
- * @param aPattern The Pattern
+ * @param newPattern The Pattern
*/
public void applyPattern (String newPattern)
{
@@ -378,7 +378,6 @@ public class MessageFormat extends Format
/**
* A convinience method to format patterns.
*
- * @param aPattern The pattern used when formatting.
* @param arguments The array containing the objects to be formatted.
*/
public AttributedCharacterIterator formatToCharacterIterator (Object arguments)
@@ -394,7 +393,7 @@ public class MessageFormat extends Format
/**
* A convinience method to format patterns.
*
- * @param aPattern The pattern used when formatting.
+ * @param pattern The pattern used when formatting.
* @param arguments The array containing the objects to be formatted.
*/
public static String format (String pattern, Object arguments[])
@@ -408,8 +407,8 @@ public class MessageFormat extends Format
/**
* Returns the pattern with the formatted objects.
*
- * @param source The array containing the objects to be formatted.
- * @param result The StringBuffer where the text is appened.
+ * @param arguments The array containing the objects to be formatted.
+ * @param appendBuf The StringBuffer where the text is appened.
* @param fp A FieldPosition object (it is ignored).
*/
public final StringBuffer format (Object arguments[], StringBuffer appendBuf,
@@ -658,7 +657,11 @@ public class MessageFormat extends Format
{
// We have a String format. This can lose in a number
// of ways, but we give it a shot.
- int next_index = sourceStr.indexOf(elements[i].trailer, index);
+ int next_index;
+ if (elements[i].trailer.length() > 0)
+ next_index = sourceStr.indexOf(elements[i].trailer, index);
+ else
+ next_index = sourceStr.length();
if (next_index == -1)
{
pos.setErrorIndex(index);
@@ -705,8 +708,8 @@ public class MessageFormat extends Format
* Sets the format for the argument at an specified
* index.
*
- * @param index The index.
- * @format The Format object.
+ * @param variableNum The index.
+ * @param newFormat The Format object.
*/
public void setFormat (int variableNum, Format newFormat)
{
@@ -716,7 +719,7 @@ public class MessageFormat extends Format
/**
* Sets the formats for the arguments.
*
- * @param formats An array of Format objects.
+ * @param newFormats An array of Format objects.
*/
public void setFormats (Format[] newFormats)
{
@@ -731,7 +734,7 @@ public class MessageFormat extends Format
/**
* Sets the locale.
*
- * @param locale A Locale
+ * @param loc A Locale
*/
public void setLocale (Locale loc)
{
diff --git a/java/text/NumberFormat.java b/java/text/NumberFormat.java
index 839943fec..5fede9ee3 100644
--- a/java/text/NumberFormat.java
+++ b/java/text/NumberFormat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -237,7 +237,8 @@ public abstract class NumberFormat extends Format implements Cloneable
* a <code>StringBuffer</code>.
*
* @param number The <code>double</code> to format.
- * @param sb The <code>StringBuffer</code> to append the formatted number to.
+ * @param sbuf The <code>StringBuffer</code> to append the formatted number
+ * to.
* @param pos The desired <code>FieldPosition</code>.
*
* @return The <code>StringBuffer</code> with the appended number.
@@ -250,7 +251,8 @@ public abstract class NumberFormat extends Format implements Cloneable
* a <code>StringBuffer</code>.
*
* @param number The <code>long</code> to format.
- * @param sb The <code>StringBuffer</code> to append the formatted number to.
+ * @param sbuf The <code>StringBuffer</code> to append the formatted number
+ * to.
* @param pos The desired <code>FieldPosition</code>.
*
* @return The <code>StringBuffer</code> with the appended number.
@@ -371,7 +373,7 @@ public abstract class NumberFormat extends Format implements Cloneable
* will be a concrete subclass of <code>NumberFormat</code>, but the
* actual class returned is dependent on the locale.
*
- * @param locale The desired locale.
+ * @param loc The desired locale.
*
* @return An instance of the default <code>NumberFormat</code> class.
*/
@@ -434,8 +436,6 @@ public abstract class NumberFormat extends Format implements Cloneable
* will be a concrete subclass of <code>NumberFormat</code>, but the
* actual class returned is dependent on the locale.
*
- * @param locale The desired locale.
- *
* @return An instance of the default <code>NumberFormat</code> class.
*/
public static final NumberFormat getNumberInstance ()
@@ -502,7 +502,7 @@ public abstract class NumberFormat extends Format implements Cloneable
* This method returns an instance of <code>NumberFormat</code> suitable
* for formatting and parsing percentage values in the specified locale.
*
- * @param locale The desired locale.
+ * @param loc The desired locale.
*
* @return An instance of <code>NumberFormat</code> for handling percentages.
*/
@@ -571,8 +571,8 @@ public abstract class NumberFormat extends Format implements Cloneable
* <code>Double</code>. If no number can be parsed, no exception is
* thrown. Instead, the parse position remains at its initial index.
*
- * @param str The string to parse.
- * @param pp The desired <code>ParsePosition</code>.
+ * @param sourceStr The string to parse.
+ * @param pos The desired <code>ParsePosition</code>.
*
* @return The parsed <code>Number</code>
*/
@@ -584,7 +584,7 @@ public abstract class NumberFormat extends Format implements Cloneable
* <code>Double</code>. If no number can be parsed, an exception will be
* thrown.
*
- * @param str The string to parse.
+ * @param sourceStr The string to parse.
*
* @return The parsed <code>Number</code>
*
@@ -610,8 +610,8 @@ public abstract class NumberFormat extends Format implements Cloneable
* <code>Double</code>. If no number can be parsed, no exception is
* thrown. Instead, the parse position remains at its initial index.
*
- * @param str The string to parse.
- * @param pp The desired <code>ParsePosition</code>.
+ * @param sourceStr The string to parse.
+ * @param pos The desired <code>ParsePosition</code>.
*
* @return The parsed <code>Object</code>
*/
@@ -629,7 +629,7 @@ public abstract class NumberFormat extends Format implements Cloneable
* might appear as "1,000,000". (Both of these assume the US English
* locale).
*
- * @param groupingUsed <code>true</code> to enable grouping,
+ * @param newValue <code>true</code> to enable grouping,
* <code>false</code> to disable it.
*/
public void setGroupingUsed (boolean newValue)
@@ -643,11 +643,11 @@ public abstract class NumberFormat extends Format implements Cloneable
* current minimum allowed digits, the minimum allowed digits value will
* be lowered to be equal to the new maximum allowed digits value.
*
- * @param maximumFractionDigits The new maximum fraction digits value.
+ * @param digits The new maximum fraction digits value.
*/
- public void setMaximumFractionDigits (int newValue)
+ public void setMaximumFractionDigits (int digits)
{
- maximumFractionDigits = newValue;
+ maximumFractionDigits = digits;
if (getMinimumFractionDigits () > maximumFractionDigits)
setMinimumFractionDigits (maximumFractionDigits);
}
@@ -658,11 +658,11 @@ public abstract class NumberFormat extends Format implements Cloneable
* current minimum allowed digits, the minimum allowed digits value will
* be lowered to be equal to the new maximum allowed digits value.
*
- * @param maximumIntegerDigits The new maximum integer digits value.
+ * @param digits The new maximum integer digits value.
*/
- public void setMaximumIntegerDigits (int newValue)
+ public void setMaximumIntegerDigits (int digits)
{
- maximumIntegerDigits = newValue;
+ maximumIntegerDigits = digits;
if (getMinimumIntegerDigits () > maximumIntegerDigits)
setMinimumIntegerDigits (maximumIntegerDigits);
}
@@ -673,11 +673,11 @@ public abstract class NumberFormat extends Format implements Cloneable
* current maximum allowed digits, the maximum allowed digits value will
* be raised to be equal to the new minimum allowed digits value.
*
- * @param minimumFractionDigits The new minimum fraction digits value.
+ * @param digits The new minimum fraction digits value.
*/
- public void setMinimumFractionDigits (int newValue)
+ public void setMinimumFractionDigits (int digits)
{
- minimumFractionDigits = newValue;
+ minimumFractionDigits = digits;
if (getMaximumFractionDigits () < minimumFractionDigits)
setMaximumFractionDigits (minimumFractionDigits);
}
@@ -688,11 +688,11 @@ public abstract class NumberFormat extends Format implements Cloneable
* current maximum allowed digits, the maximum allowed digits value will
* be raised to be equal to the new minimum allowed digits value.
*
- * @param minimumIntegerDigits The new minimum integer digits value.
+ * @param digits The new minimum integer digits value.
*/
- public void setMinimumIntegerDigits (int newValue)
+ public void setMinimumIntegerDigits (int digits)
{
- minimumIntegerDigits = newValue;
+ minimumIntegerDigits = digits;
if (getMaximumIntegerDigits () < minimumIntegerDigits)
setMaximumIntegerDigits (minimumIntegerDigits);
}
@@ -701,7 +701,7 @@ public abstract class NumberFormat extends Format implements Cloneable
* This method sets the parsing behavior of this object to parse only
* integers or not.
*
- * @param parseIntegerOnly <code>true</code> to parse only integers,
+ * @param value <code>true</code> to parse only integers,
* <code>false</code> otherwise.
*/
public void setParseIntegerOnly (boolean value)
diff --git a/java/text/ParseException.java b/java/text/ParseException.java
index 13229c8c8..4c7ad81e7 100644
--- a/java/text/ParseException.java
+++ b/java/text/ParseException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -65,7 +65,7 @@ public class ParseException extends Exception
* This method initializes a new instance of <code>ParseException</code>
* with a detailed error message and a error position.
*
- * @param msg the descriptive message describing the error
+ * @param s the descriptive message describing the error
* @param offset the position where the error was encountered
*/
public ParseException(String s, int offset)
diff --git a/java/text/ParsePosition.java b/java/text/ParsePosition.java
index 91fa44fcc..782f5e0ed 100644
--- a/java/text/ParsePosition.java
+++ b/java/text/ParsePosition.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/text/RuleBasedCollator.java b/java/text/RuleBasedCollator.java
index afb766ff8..ae84a4103 100644
--- a/java/text/RuleBasedCollator.java
+++ b/java/text/RuleBasedCollator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/text/SimpleDateFormat.java b/java/text/SimpleDateFormat.java
index 84475fb1c..f1fc092d3 100644
--- a/java/text/SimpleDateFormat.java
+++ b/java/text/SimpleDateFormat.java
@@ -17,8 +17,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -73,14 +73,16 @@ public class SimpleDateFormat extends DateFormat
private class CompiledField
{
/**
- * The ID of the field within the local pattern characters,
+ * The ID of the field within the local pattern characters.
+ * Package private for use in out class.
*/
- private int field;
+ int field;
/**
* The size of the character sequence.
+ * Package private for use in out class.
*/
- private int size;
+ int size;
/**
* The character used.
@@ -178,8 +180,8 @@ public class SimpleDateFormat extends DateFormat
* years to be interpreted as representing
* the years between 2004 and 2104.
*
- * @see get2DigitYearStart()
- * @see set2DigitYearStart(java.util.Date)
+ * @see #get2DigitYearStart()
+ * @see #set2DigitYearStart(java.util.Date)
* @see Date
* @serial The start date of the century for parsing two digit years.
* May not be null.
@@ -190,8 +192,8 @@ public class SimpleDateFormat extends DateFormat
* The year at which interpretation of two
* digit years starts.
*
- * @see get2DigitYearStart()
- * @see set2DigitYearStart(java.util.Date)
+ * @see #get2DigitYearStart()
+ * @see #set2DigitYearStart(java.util.Date)
* @serial Ignored.
*/
private transient int defaultCentury;
@@ -202,10 +204,10 @@ public class SimpleDateFormat extends DateFormat
* stored in standardChars. Localized patterns
* are translated to this form.
*
- * @see applyPattern(String)
- * @see applyLocalizedPattern(String)
- * @see toPattern()
- * @see toLocalizedPattern()
+ * @see #applyPattern(String)
+ * @see #applyLocalizedPattern(String)
+ * @see #toPattern()
+ * @see #toLocalizedPattern()
* @serial The non-localized pattern string. May not be null.
*/
private String pattern;
@@ -609,7 +611,7 @@ public class SimpleDateFormat extends DateFormat
* <li>Is using the same century for two digit years.</li>
* </ul>
*
- * @param obj The object to compare for equality against.
+ * @param o The object to compare for equality against.
*
* @return <code>true</code> if the specified object is equal to this object,
* <code>false</code> otherwise.
diff --git a/java/text/StringCharacterIterator.java b/java/text/StringCharacterIterator.java
index 82df7c449..f69b1317c 100644
--- a/java/text/StringCharacterIterator.java
+++ b/java/text/StringCharacterIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -113,7 +113,7 @@ public final class StringCharacterIterator implements CharacterIterator
* @param end The ending position in the character range.
* @param index The initial index position.
*
- * @param IllegalArgumentException If any of the range values are
+ * @throws IllegalArgumentException If any of the range values are
* invalid.
*/
public StringCharacterIterator (String text, int begin, int end, int index)
diff --git a/java/text/package.html b/java/text/package.html
index 4799104eb..3c2e22ba5 100644
--- a/java/text/package.html
+++ b/java/text/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/AbstractCollection.java b/java/util/AbstractCollection.java
index 2440e5034..a84f221af 100644
--- a/java/util/AbstractCollection.java
+++ b/java/util/AbstractCollection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/AbstractList.java b/java/util/AbstractList.java
index ab80832ed..27e0e1d52 100644
--- a/java/util/AbstractList.java
+++ b/java/util/AbstractList.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/AbstractMap.java b/java/util/AbstractMap.java
index d7594b0a4..5d4efe4e8 100644
--- a/java/util/AbstractMap.java
+++ b/java/util/AbstractMap.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/AbstractSequentialList.java b/java/util/AbstractSequentialList.java
index 1b18ea096..81b0714e1 100644
--- a/java/util/AbstractSequentialList.java
+++ b/java/util/AbstractSequentialList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/AbstractSet.java b/java/util/AbstractSet.java
index 51538131b..423ac8083 100644
--- a/java/util/AbstractSet.java
+++ b/java/util/AbstractSet.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/ArrayList.java b/java/util/ArrayList.java
index 1c4979fe3..c539b5945 100644
--- a/java/util/ArrayList.java
+++ b/java/util/ArrayList.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Arrays.java b/java/util/Arrays.java
index 4de6bbac8..17064ef6a 100644
--- a/java/util/Arrays.java
+++ b/java/util/Arrays.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/BitSet.java b/java/util/BitSet.java
index d752f4a9d..855ea3e37 100644
--- a/java/util/BitSet.java
+++ b/java/util/BitSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -116,8 +116,8 @@ public class BitSet implements Cloneable, Serializable
* given <code>set</code>. This means it builds the intersection
* of the two sets. The result is stored into this bit set.
*
- * @param set the second bit set
- * @throws NullPointerException if set is null
+ * @param bs the second bit set
+ * @throws NullPointerException if bs is null
*/
public void and(BitSet bs)
{
@@ -131,13 +131,13 @@ public class BitSet implements Cloneable, Serializable
/**
* Performs the logical AND operation on this bit set and the
- * complement of the given <code>set</code>. This means it
+ * complement of the given <code>bs</code>. This means it
* selects every element in the first set, that isn't in the
* second set. The result is stored into this bit set and is
* effectively the set difference of the two.
*
- * @param set the second bit set
- * @throws NullPointerException if set is null
+ * @param bs the second bit set
+ * @throws NullPointerException if bs is null
* @since 1.2
*/
public void andNot(BitSet bs)
@@ -190,12 +190,12 @@ public class BitSet implements Cloneable, Serializable
}
/**
- * Removes the integer <code>bitIndex</code> from this set. That is
+ * Removes the integer <code>pos</code> from this set. That is
* the corresponding bit is cleared. If the index is not in the set,
* this method does nothing.
*
- * @param bitIndex a non-negative integer
- * @throws IndexOutOfBoundsException if bitIndex &lt; 0
+ * @param pos a non-negative integer
+ * @throws IndexOutOfBoundsException if pos &lt; 0
*/
public void clear(int pos)
{
@@ -336,8 +336,8 @@ public class BitSet implements Cloneable, Serializable
* set, otherwise false.
*
* @param pos a non-negative integer
- * @return the value of the bit at the specified index
- * @throws IndexOutOfBoundsException if the index is negative
+ * @return the value of the bit at the specified position
+ * @throws IndexOutOfBoundsException if the pos is negative
*/
public boolean get(int pos)
{
diff --git a/java/util/Calendar.java b/java/util/Calendar.java
index ed86bafa6..700aab10c 100644
--- a/java/util/Calendar.java
+++ b/java/util/Calendar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -898,7 +898,6 @@ public abstract class Calendar
/**
* Fills any unset fields in the time field list
- * @return true if the specified field has a value.
*/
protected void complete()
{
diff --git a/java/util/Collection.java b/java/util/Collection.java
index 154d03854..b57566f70 100644
--- a/java/util/Collection.java
+++ b/java/util/Collection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Collections.java b/java/util/Collections.java
index 529db1a50..d2ba5d365 100644
--- a/java/util/Collections.java
+++ b/java/util/Collections.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -298,7 +298,7 @@ public class Collections
*
* @param index The index of the element to retrieve.
* @return the object at the specified index.
- * @throws IndexOutofBoundsException as any given index
+ * @throws IndexOutOfBoundsException as any given index
* is outside the bounds of an empty array.
*/
public T get(int index)
@@ -2150,7 +2150,7 @@ public class Collections
* within the underlying collection, first obtaining
* a lock on the mutex.
*
- * @param cl the collection to test for.
+ * @param c1 the collection to test for.
* @return <code>true</code> if for every element o in c, contains(o)
* would return <code>true</code>.
* @throws ClassCastException if the type of any element in cl is not a valid
@@ -3412,7 +3412,7 @@ public class Collections
* operation). If the map already contains a key, its value is replaced.
* A lock is obtained on the mutex before the operation proceeds.
*
- * @param m the mapping to load into this map
+ * @param map the mapping to load into this map
* @throws UnsupportedOperationException if the operation is not supported
* @throws ClassCastException if a key or value is of the wrong type
* @throws IllegalArgumentException if something about a key or value
@@ -3436,7 +3436,7 @@ public class Collections
* <code>containsKey()</code> check is required to avoid this ambiguity.
* Before the mapping is removed, a lock is obtained on the mutex.
*
- * @param key the key to remove
+ * @param o the key to remove
* @return the value the key mapped to, or null if not present
* @throws UnsupportedOperationException if deletion is unsupported
* @throws NullPointerException if the key is null and this map doesn't
@@ -4129,7 +4129,7 @@ public class Collections
* Test whether the underlying collection contains every element in a given
* collection.
*
- * @param c the collection to test for.
+ * @param c1 the collection to test for.
* @return <code>true</code> if for every element o in c, contains(o) would
* return <code>true</code>.
* @throws ClassCastException if the type of any element in c is not a valid
diff --git a/java/util/Comparator.java b/java/util/Comparator.java
index d435cc2e8..ca414e7b1 100644
--- a/java/util/Comparator.java
+++ b/java/util/Comparator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/ConcurrentModificationException.java b/java/util/ConcurrentModificationException.java
index 9492eb976..3d7ae1084 100644
--- a/java/util/ConcurrentModificationException.java
+++ b/java/util/ConcurrentModificationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Currency.java b/java/util/Currency.java
index ec8fe3d52..32ea75347 100644
--- a/java/util/Currency.java
+++ b/java/util/Currency.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Date.java b/java/util/Date.java
index 3d8f2a69d..aecca29b3 100644
--- a/java/util/Date.java
+++ b/java/util/Date.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,8 @@ import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
/**
* <p>
@@ -240,8 +242,8 @@ public class Date
* <code>TimeZone</code> instead.
* @param year the difference between the required year and 1900.
* @param month the month as a value between 0 and 11.
- * @param day the day as a value between 0 and 31.
- * @param hour the hour as a value between 0 and 23, in 24-hour
+ * @param date the day as a value between 0 and 31.
+ * @param hrs the hour as a value between 0 and 23, in 24-hour
* clock notation.
* @param min the minute as a value between 0 and 59.
* @param sec the second as a value between 0 and 61 (with 60
@@ -718,7 +720,7 @@ public class Date
* </li>
* </ul>
*
- * @param s The String to parse.
+ * @param string The String to parse.
* @return The time in milliseconds since the epoch.
* @throws IllegalArgumentException if the string fails to parse.
* @deprecated Use DateFormat.parse(String)
diff --git a/java/util/Dictionary.java b/java/util/Dictionary.java
index 0728e58c8..7b82a9f64 100644
--- a/java/util/Dictionary.java
+++ b/java/util/Dictionary.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/EmptyStackException.java b/java/util/EmptyStackException.java
index 90109513e..e8b4509ee 100644
--- a/java/util/EmptyStackException.java
+++ b/java/util/EmptyStackException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Enumeration.java b/java/util/Enumeration.java
index 061273a6e..2aec31b6f 100644
--- a/java/util/Enumeration.java
+++ b/java/util/Enumeration.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/EventListener.java b/java/util/EventListener.java
index 32dc563af..c9a1795f9 100644
--- a/java/util/EventListener.java
+++ b/java/util/EventListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/EventListenerProxy.java b/java/util/EventListenerProxy.java
index 484e1f2b4..245c5ffb4 100644
--- a/java/util/EventListenerProxy.java
+++ b/java/util/EventListenerProxy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/EventObject.java b/java/util/EventObject.java
index f6fbd8a47..7ced18aa4 100644
--- a/java/util/EventObject.java
+++ b/java/util/EventObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/GregorianCalendar.java b/java/util/GregorianCalendar.java
index 1b214be60..97ee29b13 100644
--- a/java/util/GregorianCalendar.java
+++ b/java/util/GregorianCalendar.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/HashMap.java b/java/util/HashMap.java
index d1a6786d4..f54f0ce6f 100644
--- a/java/util/HashMap.java
+++ b/java/util/HashMap.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/HashSet.java b/java/util/HashSet.java
index 245166b9d..c08b6db5a 100644
--- a/java/util/HashSet.java
+++ b/java/util/HashSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Hashtable.java b/java/util/Hashtable.java
index 9b2543197..8dfd6215e 100644
--- a/java/util/Hashtable.java
+++ b/java/util/Hashtable.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -197,7 +197,7 @@ public class Hashtable<K, V> extends Dictionary<K, V>
/**
* Resets the value.
- * @param newValue the new value
+ * @param newVal the new value
* @return the prior value
* @throws NullPointerException if <code>newVal</code> is null
*/
diff --git a/java/util/IdentityHashMap.java b/java/util/IdentityHashMap.java
index f2c94fe66..78de47cb0 100644
--- a/java/util/IdentityHashMap.java
+++ b/java/util/IdentityHashMap.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Iterator.java b/java/util/Iterator.java
index fc2df9070..41111a52d 100644
--- a/java/util/Iterator.java
+++ b/java/util/Iterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/LinkedHashMap.java b/java/util/LinkedHashMap.java
index 2b6009b4d..1a344ab00 100644
--- a/java/util/LinkedHashMap.java
+++ b/java/util/LinkedHashMap.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/LinkedHashSet.java b/java/util/LinkedHashSet.java
index f98e1d544..a0b32f349 100644
--- a/java/util/LinkedHashSet.java
+++ b/java/util/LinkedHashSet.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/LinkedList.java b/java/util/LinkedList.java
index ef056d492..f89c36514 100644
--- a/java/util/LinkedList.java
+++ b/java/util/LinkedList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -385,7 +385,7 @@ public class LinkedList<T> extends AbstractSequentialList<T>
/**
* Adds an element to the end of the list.
*
- * @param e the entry to add
+ * @param o the entry to add
* @return true, as it always succeeds
*/
public boolean add(T o)
diff --git a/java/util/List.java b/java/util/List.java
index 07906f44e..0a1c4098c 100644
--- a/java/util/List.java
+++ b/java/util/List.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/ListIterator.java b/java/util/ListIterator.java
index 11e6728ee..9b74528c5 100644
--- a/java/util/ListIterator.java
+++ b/java/util/ListIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/ListResourceBundle.java b/java/util/ListResourceBundle.java
index 3c7336eaf..2bc51c3b0 100644
--- a/java/util/ListResourceBundle.java
+++ b/java/util/ListResourceBundle.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Locale.java b/java/util/Locale.java
index 9ec847146..6d3f84632 100644
--- a/java/util/Locale.java
+++ b/java/util/Locale.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Map.java b/java/util/Map.java
index 8f7ff940f..302e88104 100644
--- a/java/util/Map.java
+++ b/java/util/Map.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/MissingResourceException.java b/java/util/MissingResourceException.java
index 1bfed6252..26640de90 100644
--- a/java/util/MissingResourceException.java
+++ b/java/util/MissingResourceException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/NoSuchElementException.java b/java/util/NoSuchElementException.java
index d0c53a0a8..5e1a2176d 100644
--- a/java/util/NoSuchElementException.java
+++ b/java/util/NoSuchElementException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Observable.java b/java/util/Observable.java
index 4fd9919e4..4c2cddb54 100644
--- a/java/util/Observable.java
+++ b/java/util/Observable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Observer.java b/java/util/Observer.java
index 88d1e4d80..c59a0ca6c 100644
--- a/java/util/Observer.java
+++ b/java/util/Observer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Properties.java b/java/util/Properties.java
index 2532bc950..f50efc115 100644
--- a/java/util/Properties.java
+++ b/java/util/Properties.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -173,7 +173,7 @@ weekdays: Sunday,Monday,Tuesday,Wednesday,\\
# The safest way to include a space at the end of a value:
label = Name:\\u0020</pre>
*
- * @param in the input stream
+ * @param inStream the input stream
* @throws IOException if an error occurred when reading the input
* @throws NullPointerException if in is null
*/
@@ -209,8 +209,12 @@ label = Name:\\u0020</pre>
{
if (pos == line.length())
{
- // The line continues on the next line.
+ // The line continues on the next line. If there
+ // is no next line, just treat it as a key with an
+ // empty value.
line = reader.readLine();
+ if (line == null)
+ line = "";
pos = 0;
while (pos < line.length()
&& Character.isWhitespace(c = line.charAt(pos)))
@@ -411,7 +415,17 @@ label = Name:\\u0020</pre>
*/
public String getProperty(String key)
{
- return getProperty(key, null);
+ Properties prop = this;
+ // Eliminate tail recursion.
+ do
+ {
+ String value = (String) prop.get(key);
+ if (value != null)
+ return value;
+ prop = prop.defaults;
+ }
+ while (prop != null);
+ return null;
}
/**
@@ -430,17 +444,10 @@ label = Name:\\u0020</pre>
*/
public String getProperty(String key, String defaultValue)
{
- Properties prop = this;
- // Eliminate tail recursion.
- do
- {
- String value = (String) prop.get(key);
- if (value != null)
- return value;
- prop = prop.defaults;
- }
- while (prop != null);
- return defaultValue;
+ String prop = getProperty(key);
+ if (prop == null)
+ prop = defaultValue;
+ return prop;
}
/**
diff --git a/java/util/PropertyPermission.java b/java/util/PropertyPermission.java
index 7b2667a39..d1bdbd1d0 100644
--- a/java/util/PropertyPermission.java
+++ b/java/util/PropertyPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/PropertyPermissionCollection.java b/java/util/PropertyPermissionCollection.java
index 6a14c9bd7..c95fa4e66 100644
--- a/java/util/PropertyPermissionCollection.java
+++ b/java/util/PropertyPermissionCollection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/PropertyResourceBundle.java b/java/util/PropertyResourceBundle.java
index 9d556f2e4..aaff0766a 100644
--- a/java/util/PropertyResourceBundle.java
+++ b/java/util/PropertyResourceBundle.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -87,7 +87,7 @@ s16=1,3
* @author Jochen Hoenicke
* @see ResourceBundle
* @see ListResourceBundle
- * @see Properties#load()
+ * @see Properties#load(InputStream)
* @since 1.1
* @status updated to 1.4
*/
diff --git a/java/util/Random.java b/java/util/Random.java
index 6e7d8cf24..bc0050751 100644
--- a/java/util/Random.java
+++ b/java/util/Random.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/RandomAccess.java b/java/util/RandomAccess.java
index a38b6a5f4..054266a1c 100644
--- a/java/util/RandomAccess.java
+++ b/java/util/RandomAccess.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/ResourceBundle.java b/java/util/ResourceBundle.java
index c48b3d7f6..91007e9b1 100644
--- a/java/util/ResourceBundle.java
+++ b/java/util/ResourceBundle.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -359,7 +359,7 @@ public abstract class ResourceBundle
*
* @param baseName the name of the ResourceBundle
* @param locale A locale
- * @param classloader a ClassLoader
+ * @param classLoader a ClassLoader
* @return the desired resource bundle
* @throws MissingResourceException if the resource bundle can't be found
* @throws NullPointerException if any argument is null
diff --git a/java/util/Set.java b/java/util/Set.java
index b730d63af..35f75b5e7 100644
--- a/java/util/Set.java
+++ b/java/util/Set.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/SimpleTimeZone.java b/java/util/SimpleTimeZone.java
index 4da1847a2..995ccea84 100644
--- a/java/util/SimpleTimeZone.java
+++ b/java/util/SimpleTimeZone.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,7 +50,7 @@ package java.util;
* lying in the AD era.
*
* @see Calendar
- * @see GregorianCalender
+ * @see GregorianCalendar
* @author Jochen Hoenicke
*/
public class SimpleTimeZone extends TimeZone
@@ -126,7 +126,7 @@ public class SimpleTimeZone extends TimeZone
/**
* This variable can have different meanings. See startMode for details
- * @see #startMode;
+ * @see #startMode
* @serial
*/
private int startDay;
@@ -135,7 +135,7 @@ public class SimpleTimeZone extends TimeZone
* This variable specifies the day of week the change takes place. If
* startMode == DOM_MODE, this is undefined.
* @serial
- * @see #startMode;
+ * @see #startMode
*/
private int startDayOfWeek;
@@ -173,7 +173,7 @@ public class SimpleTimeZone extends TimeZone
/**
* This variable can have different meanings. See startMode for details
* @serial
- * @see #startMode;
+ * @see #startMode
*/
private int endDay;
@@ -181,7 +181,7 @@ public class SimpleTimeZone extends TimeZone
* This variable specifies the day of week the change takes place. If
* endMode == DOM_MODE, this is undefined.
* @serial
- * @see #startMode;
+ * @see #startMode
*/
private int endDayOfWeek;
@@ -309,13 +309,13 @@ public class SimpleTimeZone extends TimeZone
* @param id The identifier of this time zone.
* @param startMonth The start month of daylight savings; use the
* constants in Calendar.
- * @param startday A day in month or a day of week number, as
+ * @param startDayOfWeekInMonth A day in month or a day of week number, as
* described above.
* @param startDayOfWeek The start rule day of week; see above.
* @param startTime A time in millis in standard time.
* @param endMonth The end month of daylight savings; use the
* constants in Calendar.
- * @param endday A day in month or a day of week number, as
+ * @param endDayOfWeekInMonth A day in month or a day of week number, as
* described above.
* @param endDayOfWeek The end rule day of week; see above.
* @param endTime A time in millis in standard time.
@@ -561,7 +561,7 @@ public class SimpleTimeZone extends TimeZone
* @param day A day in month, or a day of week in month.
* @param dayOfWeek A day of week, when daylight savings ends.
* @param time A time in millis in standard time.
- * @see #setStartRule
+ * @see #setStartRule(int, int, int, int)
*/
public void setEndRule(int month, int day, int dayOfWeek, int time)
{
@@ -601,7 +601,7 @@ public class SimpleTimeZone extends TimeZone
* @param after If true, day and dayOfWeek specify first day of week on or
* after day, else first day of week on or before.
* @since 1.2
- * @see #setStartRule
+ * @see #setStartRule(int, int, int, int, boolean)
*/
public void setEndRule(int month, int day, int dayOfWeek, int time,
boolean after)
@@ -637,9 +637,8 @@ public class SimpleTimeZone extends TimeZone
*
* @param month The end month of daylight savings.
* @param day A day in month, or a day of week in month.
- * @param dayOfWeek A day of week, when daylight savings ends.
* @param time A time in millis in standard time.
- * @see #setStartRule
+ * @see #setStartRule(int, int, int)
*/
public void setEndRule(int month, int day, int time)
{
diff --git a/java/util/SortedMap.java b/java/util/SortedMap.java
index dc4192f4d..2b98848f4 100644
--- a/java/util/SortedMap.java
+++ b/java/util/SortedMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/SortedSet.java b/java/util/SortedSet.java
index a546fb414..89f155a0d 100644
--- a/java/util/SortedSet.java
+++ b/java/util/SortedSet.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Stack.java b/java/util/Stack.java
index d2f6e35f3..404a146c2 100644
--- a/java/util/Stack.java
+++ b/java/util/Stack.java
@@ -17,8 +17,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/StringTokenizer.java b/java/util/StringTokenizer.java
index 90f97dba5..dcc192c85 100644
--- a/java/util/StringTokenizer.java
+++ b/java/util/StringTokenizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/TimeZone.java b/java/util/TimeZone.java
index 94082fbd2..99df11df5 100644
--- a/java/util/TimeZone.java
+++ b/java/util/TimeZone.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Timer.java b/java/util/Timer.java
index 364d5314a..715f06cf6 100644
--- a/java/util/Timer.java
+++ b/java/util/Timer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/TimerTask.java b/java/util/TimerTask.java
index 1b32b67f6..b03118ad0 100644
--- a/java/util/TimerTask.java
+++ b/java/util/TimerTask.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/TooManyListenersException.java b/java/util/TooManyListenersException.java
index dfe326b9a..92ad772f2 100644
--- a/java/util/TooManyListenersException.java
+++ b/java/util/TooManyListenersException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/TreeMap.java b/java/util/TreeMap.java
index fc5d7c139..031e9b859 100644
--- a/java/util/TreeMap.java
+++ b/java/util/TreeMap.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -207,7 +207,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V>
* comparable by the Comparator, otherwise map operations may throw a
* {@link ClassCastException}.
*
- * @param comparator the sort order for the keys of this map, or null
+ * @param c the sort order for the keys of this map, or null
* for the natural order
*/
public TreeMap(Comparator<? super K> c)
diff --git a/java/util/TreeSet.java b/java/util/TreeSet.java
index 3ccdadff8..21cf1af1d 100644
--- a/java/util/TreeSet.java
+++ b/java/util/TreeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/Vector.java b/java/util/Vector.java
index 02f8503ca..1e58ce8b8 100644
--- a/java/util/Vector.java
+++ b/java/util/Vector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/WeakHashMap.java b/java/util/WeakHashMap.java
index 60e353c41..af5f74b04 100644
--- a/java/util/WeakHashMap.java
+++ b/java/util/WeakHashMap.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/jar/Attributes.java b/java/util/jar/Attributes.java
index b8961411b..4db2c72e7 100644
--- a/java/util/jar/Attributes.java
+++ b/java/util/jar/Attributes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/jar/JarEntry.java b/java/util/jar/JarEntry.java
index 4d527965f..722a283bb 100644
--- a/java/util/jar/JarEntry.java
+++ b/java/util/jar/JarEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/jar/JarException.java b/java/util/jar/JarException.java
index 54291c687..d6f0634fe 100644
--- a/java/util/jar/JarException.java
+++ b/java/util/jar/JarException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/jar/JarFile.java b/java/util/jar/JarFile.java
index cb2cbf490..a9ad21ecc 100644
--- a/java/util/jar/JarFile.java
+++ b/java/util/jar/JarFile.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -495,7 +495,8 @@ public class JarFile extends ZipFile
}
// Only called with lock on this JarFile.
- private void readSignatures() throws IOException
+ // Package private for use in inner classes.
+ void readSignatures() throws IOException
{
Map pkcs7Dsa = new HashMap();
Map pkcs7Rsa = new HashMap();
diff --git a/java/util/jar/JarInputStream.java b/java/util/jar/JarInputStream.java
index 74649edba..1788af6ad 100644
--- a/java/util/jar/JarInputStream.java
+++ b/java/util/jar/JarInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/jar/JarOutputStream.java b/java/util/jar/JarOutputStream.java
index 217e245c7..2c8c2f08d 100644
--- a/java/util/jar/JarOutputStream.java
+++ b/java/util/jar/JarOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/jar/Manifest.java b/java/util/jar/Manifest.java
index ddc201b45..fdc76ff97 100644
--- a/java/util/jar/Manifest.java
+++ b/java/util/jar/Manifest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/jar/package.html b/java/util/jar/package.html
index deef0eeb6..7fd87878d 100644
--- a/java/util/jar/package.html
+++ b/java/util/jar/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/ConsoleHandler.java b/java/util/logging/ConsoleHandler.java
index 428a97f91..3cf4bca33 100644
--- a/java/util/logging/ConsoleHandler.java
+++ b/java/util/logging/ConsoleHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/ErrorManager.java b/java/util/logging/ErrorManager.java
index bb481802b..57c079fe2 100644
--- a/java/util/logging/ErrorManager.java
+++ b/java/util/logging/ErrorManager.java
@@ -17,8 +17,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/FileHandler.java b/java/util/logging/FileHandler.java
index ae8eb865a..3d958b7d7 100644
--- a/java/util/logging/FileHandler.java
+++ b/java/util/logging/FileHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,15 @@ package java.util.logging;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.FilterOutputStream;
import java.io.IOException;
+import java.io.OutputStream;
+
+import java.nio.channels.FileChannel;
+import java.nio.channels.FileLock;
+
+import java.util.LinkedList;
+import java.util.ListIterator;
/**
* A <code>FileHandler</code> publishes log records to a set of log
@@ -219,6 +227,20 @@ public class FileHandler
/**
+ * The number of bytes that have currently been written to the stream.
+ * Package private for use in inner classes.
+ */
+ long written;
+
+
+ /**
+ * A linked list of files we are, or have written to. The entries
+ * are file path strings, kept in the order
+ */
+ private LinkedList logFiles;
+
+
+ /**
* Constructs a <code>FileHandler</code>, taking all property values
* from the current {@link LogManager LogManager} configuration.
*
@@ -331,8 +353,7 @@ public class FileHandler
boolean append)
throws IOException, SecurityException
{
- super(createFileStream(pattern, limit, count, append,
- /* generation */ 0),
+ super(/* output stream, created below */ null,
"java.util.logging.FileHandler",
/* default level */ Level.ALL,
/* formatter */ null,
@@ -345,15 +366,20 @@ public class FileHandler
this.limit = limit;
this.count = count;
this.append = append;
+ this.written = 0;
+ this.logFiles = new LinkedList ();
+
+ setOutputStream (createFileStream (pattern, limit, count, append,
+ /* generation */ 0));
}
/* FIXME: Javadoc missing. */
- private static java.io.OutputStream createFileStream(String pattern,
- int limit,
- int count,
- boolean append,
- int generation)
+ private OutputStream createFileStream(String pattern,
+ int limit,
+ int count,
+ boolean append,
+ int generation)
{
String path;
int unique = 0;
@@ -372,6 +398,9 @@ public class FileHandler
if (pattern == null)
pattern = "%h/java%u.log";
+ if (count > 1 && !has (pattern, 'g'))
+ pattern = pattern + ".%g";
+
do
{
path = replaceFileNameEscapes(pattern, generation, unique, count);
@@ -379,16 +408,28 @@ public class FileHandler
try
{
File file = new File(path);
- if (file.createNewFile())
- return new FileOutputStream(path, append);
+ if (!file.exists () || append)
+ {
+ FileOutputStream fout = new FileOutputStream (file, append);
+ // FIXME we need file locks for this to work properly, but they
+ // are not implemented yet in Classpath! Madness!
+// FileChannel channel = fout.getChannel ();
+// FileLock lock = channel.tryLock ();
+// if (lock != null) // We've locked the file.
+// {
+ if (logFiles.isEmpty ())
+ logFiles.addFirst (path);
+ return new ostr (fout);
+// }
+ }
}
catch (Exception ex)
{
- ex.printStackTrace();
+ reportError (null, ex, ErrorManager.OPEN_FAILURE);
}
unique = unique + 1;
- if (pattern.indexOf("%u") < 0)
+ if (!has (pattern, 'u'))
pattern = pattern + ".%u";
}
while (true);
@@ -486,21 +527,120 @@ public class FileHandler
}
- /* FIXME: Javadoc missing, implementation incomplete. */
+ /* FIXME: Javadoc missing. */
public void publish(LogRecord record)
{
+ if (limit > 0 && written >= limit)
+ rotate ();
super.publish(record);
+ flush ();
+ }
- /* FIXME: Decide when to switch over. How do we get to
- * the number of bytes published so far? Two possibilities:
- * 1. File.length, 2. have metering wrapper around
- * output stream counting the number of written bytes.
- */
-
- /* FIXME: Switch over if needed! This implementation always
- * writes into a single file, i.e. behaves as if limit
- * always was zero. So, the implementation is somewhat
- * functional but incomplete.
- */
+ /**
+ * Rotates the current log files, possibly removing one if we
+ * exceed the file count.
+ */
+ private synchronized void rotate ()
+ {
+ if (logFiles.size () > 0)
+ {
+ File f1 = null;
+ ListIterator lit = null;
+
+ // If we reach the file count, ditch the oldest file.
+ if (logFiles.size () == count)
+ {
+ f1 = new File ((String) logFiles.getLast ());
+ f1.delete ();
+ lit = logFiles.listIterator (logFiles.size () - 1);
+ }
+ // Otherwise, move the oldest to a new location.
+ else
+ {
+ String path = replaceFileNameEscapes (pattern, logFiles.size (),
+ /* unique */ 0, count);
+ f1 = new File (path);
+ logFiles.addLast (path);
+ lit = logFiles.listIterator (logFiles.size () - 1);
+ }
+
+ // Now rotate the files.
+ while (lit.hasPrevious ())
+ {
+ String s = (String) lit.previous ();
+ File f2 = new File (s);
+ f2.renameTo (f1);
+ f1 = f2;
+ }
+ }
+
+ setOutputStream (createFileStream (pattern, limit, count, append,
+ /* generation */ 0));
+
+ // Reset written count.
+ written = 0;
+ }
+
+ /**
+ * Tell if <code>pattern</code> contains the pattern sequence
+ * with character <code>escape</code>. That is, if <code>escape</code>
+ * is 'g', this method returns true if the given pattern contains
+ * "%g", and not just the substring "%g" (for example, in the case of
+ * "%%g").
+ *
+ * @param pattern The pattern to test.
+ * @param escape The escape character to search for.
+ * @return True iff the pattern contains the escape sequence with the
+ * given character.
+ */
+ private static boolean has (final String pattern, final char escape)
+ {
+ final int len = pattern.length ();
+ boolean sawPercent = false;
+ for (int i = 0; i < len; i++)
+ {
+ char c = pattern.charAt (i);
+ if (sawPercent)
+ {
+ if (c == escape)
+ return true;
+ if (c == '%') // Double percent
+ {
+ sawPercent = false;
+ continue;
+ }
+ }
+ sawPercent = (c == '%');
+ }
+ return false;
+ }
+
+ /**
+ * An output stream that tracks the number of bytes written to it.
+ */
+ private final class ostr extends FilterOutputStream
+ {
+ private ostr (OutputStream out)
+ {
+ super (out);
+ }
+
+ public void write (final int b) throws IOException
+ {
+ out.write (b);
+ FileHandler.this.written++; // FIXME: synchronize?
+ }
+
+ public void write (final byte[] b) throws IOException
+ {
+ write (b, 0, b.length);
+ }
+
+ public void write (final byte[] b, final int offset, final int length)
+ throws IOException
+ {
+ out.write (b, offset, length);
+ FileHandler.this.written += length; // FIXME: synchronize?
+ }
}
}
diff --git a/java/util/logging/Filter.java b/java/util/logging/Filter.java
index 46b67472c..ec4597670 100644
--- a/java/util/logging/Filter.java
+++ b/java/util/logging/Filter.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/Formatter.java b/java/util/logging/Formatter.java
index 0965f3664..ee747b0b9 100644
--- a/java/util/logging/Formatter.java
+++ b/java/util/logging/Formatter.java
@@ -17,8 +17,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/Handler.java b/java/util/logging/Handler.java
index c781f09f8..c3227d6f5 100644
--- a/java/util/logging/Handler.java
+++ b/java/util/logging/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/Level.java b/java/util/logging/Level.java
index 5c3c22bf9..2c400dc3a 100644
--- a/java/util/logging/Level.java
+++ b/java/util/logging/Level.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/LogManager.java b/java/util/logging/LogManager.java
index d771a7015..7e3fd97d0 100644
--- a/java/util/logging/LogManager.java
+++ b/java/util/logging/LogManager.java
@@ -1,6 +1,6 @@
/* LogManager.java -- a class for maintaining Loggers and managing
configuration properties
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002,2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -95,6 +95,10 @@ import java.util.StringTokenizer;
* the system property <code>gnu.classpath.home.url</code>.</li>
* </ul>
*
+ * <p>The <code>LogManager</code> has a level of <code>INFO</code> by
+ * default, and this will be inherited by <code>Logger</code>s unless they
+ * override it either by properties or programmatically.
+ *
* @author Sascha Brawer (brawer@acm.org)
*/
public class LogManager
@@ -140,6 +144,7 @@ public class LogManager
logManager = this;
loggers = new java.util.HashMap();
rootLogger = new Logger("", null);
+ rootLogger.setLevel(Level.INFO);
addLogger(rootLogger);
/* Make sure that Logger.global has the rootLogger as its parent.
@@ -441,11 +446,15 @@ public class LogManager
if (logger == null)
iter.remove();
else if (logger != rootLogger)
- logger.setLevel(null);
+ {
+ logger.resetLogger();
+ logger.setLevel(null);
+ }
}
}
rootLogger.setLevel(Level.INFO);
+ rootLogger.resetLogger();
}
/**
@@ -508,6 +517,7 @@ public class LogManager
checkAccess();
newProperties = new Properties();
newProperties.load(inputStream);
+ reset();
this.properties = newProperties;
keys = newProperties.propertyNames();
@@ -529,7 +539,7 @@ public class LogManager
String handlerName = tokenizer.nextToken();
try
{
- Class handlerClass = Class.forName(handlerName);
+ Class handlerClass = ClassLoader.getSystemClassLoader().loadClass(handlerName);
getLogger("").addHandler((Handler) handlerClass
.newInstance());
}
diff --git a/java/util/logging/LogRecord.java b/java/util/logging/LogRecord.java
index f976033a0..af7f2058d 100644
--- a/java/util/logging/LogRecord.java
+++ b/java/util/logging/LogRecord.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/Logger.java b/java/util/logging/Logger.java
index 99c9be9a3..ae985a93c 100644
--- a/java/util/logging/Logger.java
+++ b/java/util/logging/Logger.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -585,10 +585,10 @@ public class Logger
String message,
Object param)
{
- StackTraceElement caller = getCallerStackFrame();
+ StackTraceElement caller = getCallerStackFrame();
logp(level,
- caller.getClassName(),
- caller.getMethodName(),
+ caller != null ? caller.getClassName() : "<unknown>",
+ caller != null ? caller.getMethodName() : "<unknown>",
message,
param);
}
@@ -600,8 +600,8 @@ public class Logger
{
StackTraceElement caller = getCallerStackFrame();
logp(level,
- caller.getClassName(),
- caller.getMethodName(),
+ caller != null ? caller.getClassName() : "<unknown>",
+ caller != null ? caller.getMethodName() : "<unknown>",
message,
params);
}
@@ -611,10 +611,10 @@ public class Logger
String message,
Throwable thrown)
{
- StackTraceElement caller = getCallerStackFrame();
+ StackTraceElement caller = getCallerStackFrame();
logp(level,
- caller.getClassName(),
- caller.getMethodName(),
+ caller != null ? caller.getClassName() : "<unknown>",
+ caller != null ? caller.getMethodName() : "<unknown>",
message,
thrown);
}
@@ -1146,13 +1146,8 @@ public class Logger
lm = LogManager.getLogManager();
if (this == lm.rootLogger)
- {
- if (parent != null)
throw new IllegalArgumentException(
"only the root logger can have a null parent");
- this.parent = null;
- return;
- }
/* An application is allowed to control an anonymous logger
* without having the permission to control the logging
@@ -1167,19 +1162,38 @@ public class Logger
/**
* Gets the StackTraceElement of the first class that is not this class.
* That should be the initial caller of a logging method.
- * @return caller of the initial looging method
+ * @return caller of the initial logging method or null if unknown.
*/
private StackTraceElement getCallerStackFrame()
{
Throwable t = new Throwable();
StackTraceElement[] stackTrace = t.getStackTrace();
int index = 0;
+
// skip to stackentries until this class
- while(!stackTrace[index].getClassName().equals(getClass().getName())){index++;}
+ while(index < stackTrace.length
+ && !stackTrace[index].getClassName().equals(getClass().getName()))
+ index++;
+
// skip the stackentries of this class
- while(stackTrace[index].getClassName().equals(getClass().getName())){index++;}
+ while(index < stackTrace.length
+ && stackTrace[index].getClassName().equals(getClass().getName()))
+ index++;
- return stackTrace[index];
+ return index < stackTrace.length ? stackTrace[index] : null;
}
+ /**
+ * Reset and close handlers attached to this logger. This function is package
+ * private because it must only be avaiable to the LogManager.
+ */
+ void resetLogger()
+ {
+ for (int i = 0; i < handlers.length; i++)
+ {
+ handlers[i].close();
+ handlerList.remove(handlers[i]);
+ }
+ handlers = getHandlers();
+ }
}
diff --git a/java/util/logging/LoggingPermission.java b/java/util/logging/LoggingPermission.java
index a42d7131f..c7a2255ec 100644
--- a/java/util/logging/LoggingPermission.java
+++ b/java/util/logging/LoggingPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/MemoryHandler.java b/java/util/logging/MemoryHandler.java
index 4fa850e08..ffa589f16 100644
--- a/java/util/logging/MemoryHandler.java
+++ b/java/util/logging/MemoryHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/SimpleFormatter.java b/java/util/logging/SimpleFormatter.java
index c98348924..f7a442792 100644
--- a/java/util/logging/SimpleFormatter.java
+++ b/java/util/logging/SimpleFormatter.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/SocketHandler.java b/java/util/logging/SocketHandler.java
index 2e6c96c97..002dfdbbe 100644
--- a/java/util/logging/SocketHandler.java
+++ b/java/util/logging/SocketHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/StreamHandler.java b/java/util/logging/StreamHandler.java
index c7b50e477..5c35c1e48 100644
--- a/java/util/logging/StreamHandler.java
+++ b/java/util/logging/StreamHandler.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/XMLFormatter.java b/java/util/logging/XMLFormatter.java
index 71fad3ad1..4dd632817 100644
--- a/java/util/logging/XMLFormatter.java
+++ b/java/util/logging/XMLFormatter.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/logging/package.html b/java/util/logging/package.html
index 16690576d..31f0494fc 100644
--- a/java/util/logging/package.html
+++ b/java/util/logging/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/package.html b/java/util/package.html
index 32312d696..ff2919c55 100644
--- a/java/util/package.html
+++ b/java/util/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/AbstractPreferences.java b/java/util/prefs/AbstractPreferences.java
index 95809f2fa..3f70400f5 100644
--- a/java/util/prefs/AbstractPreferences.java
+++ b/java/util/prefs/AbstractPreferences.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/BackingStoreException.java b/java/util/prefs/BackingStoreException.java
index 850825155..0ba358a56 100644
--- a/java/util/prefs/BackingStoreException.java
+++ b/java/util/prefs/BackingStoreException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/InvalidPreferencesFormatException.java b/java/util/prefs/InvalidPreferencesFormatException.java
index 220e1420c..f929b56f6 100644
--- a/java/util/prefs/InvalidPreferencesFormatException.java
+++ b/java/util/prefs/InvalidPreferencesFormatException.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/NodeChangeEvent.java b/java/util/prefs/NodeChangeEvent.java
index a919c464a..89986db88 100644
--- a/java/util/prefs/NodeChangeEvent.java
+++ b/java/util/prefs/NodeChangeEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/NodeChangeListener.java b/java/util/prefs/NodeChangeListener.java
index 04e8dc141..19664c665 100644
--- a/java/util/prefs/NodeChangeListener.java
+++ b/java/util/prefs/NodeChangeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/PreferenceChangeEvent.java b/java/util/prefs/PreferenceChangeEvent.java
index de98dbb31..fe371f15e 100644
--- a/java/util/prefs/PreferenceChangeEvent.java
+++ b/java/util/prefs/PreferenceChangeEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/PreferenceChangeListener.java b/java/util/prefs/PreferenceChangeListener.java
index 26e17274c..adff35820 100644
--- a/java/util/prefs/PreferenceChangeListener.java
+++ b/java/util/prefs/PreferenceChangeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/Preferences.java b/java/util/prefs/Preferences.java
index 4186c805a..c407ae612 100644
--- a/java/util/prefs/Preferences.java
+++ b/java/util/prefs/Preferences.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/PreferencesFactory.java b/java/util/prefs/PreferencesFactory.java
index 9b2b41293..f4fe7e37f 100644
--- a/java/util/prefs/PreferencesFactory.java
+++ b/java/util/prefs/PreferencesFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/prefs/package.html b/java/util/prefs/package.html
index b128a48ae..65fc1ac79 100644
--- a/java/util/prefs/package.html
+++ b/java/util/prefs/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/regex/Matcher.java b/java/util/regex/Matcher.java
index f8c8f1a4a..bd97ace54 100644
--- a/java/util/regex/Matcher.java
+++ b/java/util/regex/Matcher.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/regex/Pattern.java b/java/util/regex/Pattern.java
index 7fde5c8db..6a31ef9bf 100644
--- a/java/util/regex/Pattern.java
+++ b/java/util/regex/Pattern.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -84,8 +84,7 @@ public final class Pattern implements Serializable
// if ((flags & UNICODE_CASE) != 0) gnuFlags =
// if ((flags & CANON_EQ) != 0) gnuFlags =
- // Eventually there will be such a thing as JDK 1_4 syntax
- RESyntax syntax = RESyntax.RE_SYNTAX_PERL5;
+ RESyntax syntax = RESyntax.RE_SYNTAX_JAVA_1_4;
if ((flags & UNIX_LINES) != 0)
{
// Use a syntax set with \n for linefeeds?
diff --git a/java/util/regex/PatternSyntaxException.java b/java/util/regex/PatternSyntaxException.java
index e04875223..0c80e119c 100644
--- a/java/util/regex/PatternSyntaxException.java
+++ b/java/util/regex/PatternSyntaxException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/regex/package.html b/java/util/regex/package.html
index 897532db5..0573a360c 100644
--- a/java/util/regex/package.html
+++ b/java/util/regex/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/Adler32.java b/java/util/zip/Adler32.java
index 9d76ff38c..7c4113840 100644
--- a/java/util/zip/Adler32.java
+++ b/java/util/zip/Adler32.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/CRC32.java b/java/util/zip/CRC32.java
index 2085e0f2c..1c2b39738 100644
--- a/java/util/zip/CRC32.java
+++ b/java/util/zip/CRC32.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/CheckedInputStream.java b/java/util/zip/CheckedInputStream.java
index 64d4294f7..d743fbb24 100644
--- a/java/util/zip/CheckedInputStream.java
+++ b/java/util/zip/CheckedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/CheckedOutputStream.java b/java/util/zip/CheckedOutputStream.java
index 0f22b21cb..a3c19292f 100644
--- a/java/util/zip/CheckedOutputStream.java
+++ b/java/util/zip/CheckedOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/Checksum.java b/java/util/zip/Checksum.java
index 3b01f979e..3342ba3a6 100644
--- a/java/util/zip/Checksum.java
+++ b/java/util/zip/Checksum.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/DataFormatException.java b/java/util/zip/DataFormatException.java
index e5a948e8a..dc5b10dec 100644
--- a/java/util/zip/DataFormatException.java
+++ b/java/util/zip/DataFormatException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/Deflater.java b/java/util/zip/Deflater.java
index a39aba84e..053c0338d 100644
--- a/java/util/zip/Deflater.java
+++ b/java/util/zip/Deflater.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/DeflaterConstants.java b/java/util/zip/DeflaterConstants.java
index e97592da8..bfef86344 100644
--- a/java/util/zip/DeflaterConstants.java
+++ b/java/util/zip/DeflaterConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/DeflaterEngine.java b/java/util/zip/DeflaterEngine.java
index 636e43f8e..025a0a775 100644
--- a/java/util/zip/DeflaterEngine.java
+++ b/java/util/zip/DeflaterEngine.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/DeflaterHuffman.java b/java/util/zip/DeflaterHuffman.java
index 4e743f0f0..d040dde48 100644
--- a/java/util/zip/DeflaterHuffman.java
+++ b/java/util/zip/DeflaterHuffman.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/DeflaterOutputStream.java b/java/util/zip/DeflaterOutputStream.java
index 671e9a5b7..b10100d8a 100644
--- a/java/util/zip/DeflaterOutputStream.java
+++ b/java/util/zip/DeflaterOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/DeflaterPending.java b/java/util/zip/DeflaterPending.java
index d1ea2f585..f38212c35 100644
--- a/java/util/zip/DeflaterPending.java
+++ b/java/util/zip/DeflaterPending.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/GZIPInputStream.java b/java/util/zip/GZIPInputStream.java
index 68e9b0cdd..2cea755b3 100644
--- a/java/util/zip/GZIPInputStream.java
+++ b/java/util/zip/GZIPInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/GZIPOutputStream.java b/java/util/zip/GZIPOutputStream.java
index ea9ec9d08..5b7b827a9 100644
--- a/java/util/zip/GZIPOutputStream.java
+++ b/java/util/zip/GZIPOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/Inflater.java b/java/util/zip/Inflater.java
index 1a0498668..fcb0844df 100644
--- a/java/util/zip/Inflater.java
+++ b/java/util/zip/Inflater.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -288,7 +288,7 @@ public class Inflater
* returns 0, you should check, whether needsDictionary(),
* needsInput() or finished() returns true, to determine why no
* further output is produced.
- * @param buffer the output buffer.
+ * @param buf the output buffer.
* @return the number of bytes written to the buffer, 0 if no further
* output can be produced.
* @exception DataFormatException if deflated stream is invalid.
@@ -304,7 +304,7 @@ public class Inflater
* returns 0, you should check, whether needsDictionary(),
* needsInput() or finished() returns true, to determine why no
* further output is produced.
- * @param buffer the output buffer.
+ * @param buf the output buffer.
* @param off the offset into buffer where the output should start.
* @param len the maximum length of the output.
* @return the number of bytes written to the buffer, 0 if no further
@@ -428,7 +428,7 @@ public class Inflater
/**
* Sets the input. This should only be called, if needsInput()
* returns true.
- * @param buffer the input.
+ * @param buf the input.
* @exception IllegalStateException if no input is needed.
*/
public void setInput (byte[] buf)
@@ -439,7 +439,7 @@ public class Inflater
/**
* Sets the input. This should only be called, if needsInput()
* returns true.
- * @param buffer the input.
+ * @param buf the input.
* @param off the offset into buffer where the input starts.
* @param len the length of the input.
* @exception IllegalStateException if no input is needed.
diff --git a/java/util/zip/InflaterDynHeader.java b/java/util/zip/InflaterDynHeader.java
index bb53cb9b1..bff84a894 100644
--- a/java/util/zip/InflaterDynHeader.java
+++ b/java/util/zip/InflaterDynHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/InflaterHuffmanTree.java b/java/util/zip/InflaterHuffmanTree.java
index 1e2501452..6c9b2175d 100644
--- a/java/util/zip/InflaterHuffmanTree.java
+++ b/java/util/zip/InflaterHuffmanTree.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/InflaterInputStream.java b/java/util/zip/InflaterInputStream.java
index 104997bd1..3c3745706 100644
--- a/java/util/zip/InflaterInputStream.java
+++ b/java/util/zip/InflaterInputStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/OutputWindow.java b/java/util/zip/OutputWindow.java
index 89afbe30e..1f082a9fa 100644
--- a/java/util/zip/OutputWindow.java
+++ b/java/util/zip/OutputWindow.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/PendingBuffer.java b/java/util/zip/PendingBuffer.java
index cbc7bc2d2..dd7ed1008 100644
--- a/java/util/zip/PendingBuffer.java
+++ b/java/util/zip/PendingBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/StreamManipulator.java b/java/util/zip/StreamManipulator.java
index 0e0553ad6..57d15ae28 100644
--- a/java/util/zip/StreamManipulator.java
+++ b/java/util/zip/StreamManipulator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/ZipConstants.java b/java/util/zip/ZipConstants.java
index a934e90a0..952a44def 100644
--- a/java/util/zip/ZipConstants.java
+++ b/java/util/zip/ZipConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/ZipEntry.java b/java/util/zip/ZipEntry.java
index 8e3e229c2..ae21997db 100644
--- a/java/util/zip/ZipEntry.java
+++ b/java/util/zip/ZipEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/ZipException.java b/java/util/zip/ZipException.java
index 9130ef296..c5bfc1e7c 100644
--- a/java/util/zip/ZipException.java
+++ b/java/util/zip/ZipException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/ZipFile.java b/java/util/zip/ZipFile.java
index 20ba33fa1..33f67c78b 100644
--- a/java/util/zip/ZipFile.java
+++ b/java/util/zip/ZipFile.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/ZipInputStream.java b/java/util/zip/ZipInputStream.java
index b694c9f4e..573252323 100644
--- a/java/util/zip/ZipInputStream.java
+++ b/java/util/zip/ZipInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/ZipOutputStream.java b/java/util/zip/ZipOutputStream.java
index ab1d0ce56..5699ff046 100644
--- a/java/util/zip/ZipOutputStream.java
+++ b/java/util/zip/ZipOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/java/util/zip/package.html b/java/util/zip/package.html
index e9e370d89..5f3ac4917 100644
--- a/java/util/zip/package.html
+++ b/java/util/zip/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/Accessible.java b/javax/accessibility/Accessible.java
index e26cf850c..0aa5ea569 100644
--- a/javax/accessibility/Accessible.java
+++ b/javax/accessibility/Accessible.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleAction.java b/javax/accessibility/AccessibleAction.java
index b65fb96a4..2ca683e45 100644
--- a/javax/accessibility/AccessibleAction.java
+++ b/javax/accessibility/AccessibleAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleBundle.java b/javax/accessibility/AccessibleBundle.java
index de8067096..7d78c021e 100644
--- a/javax/accessibility/AccessibleBundle.java
+++ b/javax/accessibility/AccessibleBundle.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleComponent.java b/javax/accessibility/AccessibleComponent.java
index e57d84a2f..4c612703f 100644
--- a/javax/accessibility/AccessibleComponent.java
+++ b/javax/accessibility/AccessibleComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -117,7 +117,7 @@ public interface AccessibleComponent
* Get the font of this component
*
* @return the font of the component, or null if not supported
- * @see setFont(Font)
+ * @see #setFont(Font)
*/
Font getFont();
diff --git a/javax/accessibility/AccessibleContext.java b/javax/accessibility/AccessibleContext.java
index 582bd28e9..536deac0d 100644
--- a/javax/accessibility/AccessibleContext.java
+++ b/javax/accessibility/AccessibleContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleEditableText.java b/javax/accessibility/AccessibleEditableText.java
index ae1ef23f8..07d7530e4 100644
--- a/javax/accessibility/AccessibleEditableText.java
+++ b/javax/accessibility/AccessibleEditableText.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleExtendedComponent.java b/javax/accessibility/AccessibleExtendedComponent.java
index 230c73972..5b751f6eb 100644
--- a/javax/accessibility/AccessibleExtendedComponent.java
+++ b/javax/accessibility/AccessibleExtendedComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleExtendedTable.java b/javax/accessibility/AccessibleExtendedTable.java
index f7c237db6..999c1f0b5 100644
--- a/javax/accessibility/AccessibleExtendedTable.java
+++ b/javax/accessibility/AccessibleExtendedTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleHyperlink.java b/javax/accessibility/AccessibleHyperlink.java
index 663f30af0..aec1f2a9c 100644
--- a/javax/accessibility/AccessibleHyperlink.java
+++ b/javax/accessibility/AccessibleHyperlink.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleHypertext.java b/javax/accessibility/AccessibleHypertext.java
index b10fb9af1..c70357272 100644
--- a/javax/accessibility/AccessibleHypertext.java
+++ b/javax/accessibility/AccessibleHypertext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleIcon.java b/javax/accessibility/AccessibleIcon.java
index b1e5dde41..22786e5f3 100644
--- a/javax/accessibility/AccessibleIcon.java
+++ b/javax/accessibility/AccessibleIcon.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleKeyBinding.java b/javax/accessibility/AccessibleKeyBinding.java
index 16d7e36e5..b3a3ac453 100644
--- a/javax/accessibility/AccessibleKeyBinding.java
+++ b/javax/accessibility/AccessibleKeyBinding.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleRelation.java b/javax/accessibility/AccessibleRelation.java
index d77a90a3d..fae69efc4 100644
--- a/javax/accessibility/AccessibleRelation.java
+++ b/javax/accessibility/AccessibleRelation.java
@@ -1,5 +1,5 @@
/* AccessibleRelation.java -- the relation between accessible objects
- Copyright (C) 2002 Free Software Foundation
+ Copyright (C) 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,8 @@ exception statement from your version. */
package javax.accessibility;
+import java.util.Locale;
+
/**
* The relation between one accessible object and one or more other objects.
* For example, a button may control an action. An AccessibleRelationSet
diff --git a/javax/accessibility/AccessibleRelationSet.java b/javax/accessibility/AccessibleRelationSet.java
index 767aa0647..8c33eaa72 100644
--- a/javax/accessibility/AccessibleRelationSet.java
+++ b/javax/accessibility/AccessibleRelationSet.java
@@ -1,5 +1,5 @@
/* AccessibleRelationSet.java -- the combined relations of an accessible object
- Copyright (C) 2002 Free Software Foundation
+ Copyright (C) 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package javax.accessibility;
+import java.util.Locale;
import java.util.Vector;
/**
@@ -159,7 +160,7 @@ public class AccessibleRelationSet
/**
* Check if the relation key is in the set.
*
- * @param relation the relation to locate
+ * @param key the relation to locate
* @return true if it is in the set
*/
public boolean contains(String key)
@@ -174,7 +175,7 @@ public class AccessibleRelationSet
/**
* Get the relation that matches the key.
*
- * @param relation the relation to locate
+ * @param key the relation to locate
* @return the relation in the set, or null
*/
public AccessibleRelation get(String key)
diff --git a/javax/accessibility/AccessibleResourceBundle.java b/javax/accessibility/AccessibleResourceBundle.java
index b34dd73b0..52cf9cc38 100644
--- a/javax/accessibility/AccessibleResourceBundle.java
+++ b/javax/accessibility/AccessibleResourceBundle.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,13 +39,14 @@ exception statement from your version. */
package javax.accessibility;
import java.util.ListResourceBundle;
+import java.util.Locale;
/**
* This class is deprecated. It once was used for localizing accessibility
* strings, and was never meant for external use anyway.
*
* @author Eric Blake (ebb9@email.byu.edu)
- * @see AccessibleBundle.toDisplayString(String, Locale)
+ * @see AccessibleBundle#toDisplayString(String, Locale)
* @since 1.2
* @deprecated this class is no longer used
* @status updated to 1.4
diff --git a/javax/accessibility/AccessibleRole.java b/javax/accessibility/AccessibleRole.java
index 34f75602b..f386ad0e9 100644
--- a/javax/accessibility/AccessibleRole.java
+++ b/javax/accessibility/AccessibleRole.java
@@ -1,5 +1,5 @@
/* AccessibleRole.java -- the primary role of an accessible object
- Copyright (C) 2002 Free Software Foundation
+ Copyright (C) 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,8 @@ exception statement from your version. */
package javax.accessibility;
+import java.util.Locale;
+
/**
* The role of an accessible object. For example, this could be "button" or
* "table". This strongly typed "enumeration" supports localized strings. If
diff --git a/javax/accessibility/AccessibleSelection.java b/javax/accessibility/AccessibleSelection.java
index ad52ebc73..de26de76e 100644
--- a/javax/accessibility/AccessibleSelection.java
+++ b/javax/accessibility/AccessibleSelection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleState.java b/javax/accessibility/AccessibleState.java
index 74e5d08a0..a630354b0 100644
--- a/javax/accessibility/AccessibleState.java
+++ b/javax/accessibility/AccessibleState.java
@@ -1,5 +1,5 @@
/* AccessibleState.java -- a state of an accessible object
- Copyright (C) 2002 Free Software Foundation
+ Copyright (C) 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,9 @@ exception statement from your version. */
package javax.accessibility;
+import java.awt.Dimension;
+import java.util.Locale;
+
/**
* A state portion of an accessible object. A combination of states represent
* the entire object state, in an AccessibleStateSet. For example, this could
diff --git a/javax/accessibility/AccessibleStateSet.java b/javax/accessibility/AccessibleStateSet.java
index 06218f3f9..29fd2ed97 100644
--- a/javax/accessibility/AccessibleStateSet.java
+++ b/javax/accessibility/AccessibleStateSet.java
@@ -1,5 +1,5 @@
/* AccessibleStateSet.java -- the combined state of an accessible object
- Copyright (C) 2002 Free Software Foundation
+ Copyright (C) 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package javax.accessibility;
+import java.util.Locale;
import java.util.Vector;
/**
diff --git a/javax/accessibility/AccessibleTable.java b/javax/accessibility/AccessibleTable.java
index c008f455e..3be5177ad 100644
--- a/javax/accessibility/AccessibleTable.java
+++ b/javax/accessibility/AccessibleTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleTableModelChange.java b/javax/accessibility/AccessibleTableModelChange.java
index 0001a612a..6a85d0295 100644
--- a/javax/accessibility/AccessibleTableModelChange.java
+++ b/javax/accessibility/AccessibleTableModelChange.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/AccessibleText.java b/javax/accessibility/AccessibleText.java
index cffabe454..88aee1495 100644
--- a/javax/accessibility/AccessibleText.java
+++ b/javax/accessibility/AccessibleText.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -125,7 +125,7 @@ public interface AccessibleText
* Returns the section of text at the index, or null if the index or part
* is invalid.
*
- * @param part {@link CHARACTER}, {@link WORD}, or {@link SENTENCE}
+ * @param part {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index the 0-based character index
* @return the selection of text at that index, or null
*/
@@ -135,7 +135,7 @@ public interface AccessibleText
* Returns the section of text after the index, or null if the index or part
* is invalid.
*
- * @param part {@link CHARACTER}, {@link WORD}, or {@link SENTENCE}
+ * @param part {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index the 0-based character index
* @return the selection of text after that index, or null
*/
@@ -145,7 +145,7 @@ public interface AccessibleText
* Returns the section of text before the index, or null if the index or part
* is invalid.
*
- * @param part {@link CHARACTER}, {@link WORD}, or {@link SENTENCE}
+ * @param part {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index the 0-based character index
* @return the selection of text before that index, or null
*/
diff --git a/javax/accessibility/AccessibleValue.java b/javax/accessibility/AccessibleValue.java
index a58e9ed1d..100b3ed8d 100644
--- a/javax/accessibility/AccessibleValue.java
+++ b/javax/accessibility/AccessibleValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/accessibility/package.html b/javax/accessibility/package.html
index 2577f8d73..ec3ce8e91 100644
--- a/javax/accessibility/package.html
+++ b/javax/accessibility/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/BadPaddingException.java b/javax/crypto/BadPaddingException.java
index d15224f3e..a1d6dd595 100644
--- a/javax/crypto/BadPaddingException.java
+++ b/javax/crypto/BadPaddingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/Cipher.java b/javax/crypto/Cipher.java
index 2e2d28f7f..b9dee74d5 100644
--- a/javax/crypto/Cipher.java
+++ b/javax/crypto/Cipher.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/CipherInputStream.java b/javax/crypto/CipherInputStream.java
index 35d495609..01c9976a1 100644
--- a/javax/crypto/CipherInputStream.java
+++ b/javax/crypto/CipherInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/CipherOutputStream.java b/javax/crypto/CipherOutputStream.java
index 7eb09c1d0..adeb6e5ed 100644
--- a/javax/crypto/CipherOutputStream.java
+++ b/javax/crypto/CipherOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/CipherSpi.java b/javax/crypto/CipherSpi.java
index 06ea534f4..a51a3aed6 100644
--- a/javax/crypto/CipherSpi.java
+++ b/javax/crypto/CipherSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/EncryptedPrivateKeyInfo.java b/javax/crypto/EncryptedPrivateKeyInfo.java
index 2d565f118..a52d7b15d 100644
--- a/javax/crypto/EncryptedPrivateKeyInfo.java
+++ b/javax/crypto/EncryptedPrivateKeyInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/ExemptionMechanism.java b/javax/crypto/ExemptionMechanism.java
index b00ff0d5f..b6cb02c63 100644
--- a/javax/crypto/ExemptionMechanism.java
+++ b/javax/crypto/ExemptionMechanism.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/ExemptionMechanismException.java b/javax/crypto/ExemptionMechanismException.java
index 2c0665dc8..6cc44c70d 100644
--- a/javax/crypto/ExemptionMechanismException.java
+++ b/javax/crypto/ExemptionMechanismException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/ExemptionMechanismSpi.java b/javax/crypto/ExemptionMechanismSpi.java
index 78997ee07..00406095e 100644
--- a/javax/crypto/ExemptionMechanismSpi.java
+++ b/javax/crypto/ExemptionMechanismSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/IllegalBlockSizeException.java b/javax/crypto/IllegalBlockSizeException.java
index 1e442833c..c08752aab 100644
--- a/javax/crypto/IllegalBlockSizeException.java
+++ b/javax/crypto/IllegalBlockSizeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/KeyAgreement.java b/javax/crypto/KeyAgreement.java
index 884e0f918..d71743e3e 100644
--- a/javax/crypto/KeyAgreement.java
+++ b/javax/crypto/KeyAgreement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/KeyAgreementSpi.java b/javax/crypto/KeyAgreementSpi.java
index 231f11279..d71c89c13 100644
--- a/javax/crypto/KeyAgreementSpi.java
+++ b/javax/crypto/KeyAgreementSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/KeyGenerator.java b/javax/crypto/KeyGenerator.java
index 3deda21fe..c3f4cee9f 100644
--- a/javax/crypto/KeyGenerator.java
+++ b/javax/crypto/KeyGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/KeyGeneratorSpi.java b/javax/crypto/KeyGeneratorSpi.java
index fcf229b95..1c481890b 100644
--- a/javax/crypto/KeyGeneratorSpi.java
+++ b/javax/crypto/KeyGeneratorSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/Mac.java b/javax/crypto/Mac.java
index 9bbd68c21..abbff8b23 100644
--- a/javax/crypto/Mac.java
+++ b/javax/crypto/Mac.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/MacSpi.java b/javax/crypto/MacSpi.java
index d96182a91..b0f96bff3 100644
--- a/javax/crypto/MacSpi.java
+++ b/javax/crypto/MacSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/NoSuchPaddingException.java b/javax/crypto/NoSuchPaddingException.java
index 3acd7ae68..57ada3c5d 100644
--- a/javax/crypto/NoSuchPaddingException.java
+++ b/javax/crypto/NoSuchPaddingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/NullCipher.java b/javax/crypto/NullCipher.java
index 95f3a8e8f..1913afb35 100644
--- a/javax/crypto/NullCipher.java
+++ b/javax/crypto/NullCipher.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/NullCipherImpl.java b/javax/crypto/NullCipherImpl.java
index b203d24bf..2ff5e0e77 100644
--- a/javax/crypto/NullCipherImpl.java
+++ b/javax/crypto/NullCipherImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/SealedObject.java b/javax/crypto/SealedObject.java
index 9bbbe29be..0f28f3335 100644
--- a/javax/crypto/SealedObject.java
+++ b/javax/crypto/SealedObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/SecretKey.java b/javax/crypto/SecretKey.java
index 3865db4a6..5f95a1a0f 100644
--- a/javax/crypto/SecretKey.java
+++ b/javax/crypto/SecretKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/SecretKeyFactory.java b/javax/crypto/SecretKeyFactory.java
index d543c57c7..0a63ef067 100644
--- a/javax/crypto/SecretKeyFactory.java
+++ b/javax/crypto/SecretKeyFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/SecretKeyFactorySpi.java b/javax/crypto/SecretKeyFactorySpi.java
index 41c815270..6c9a3ca29 100644
--- a/javax/crypto/SecretKeyFactorySpi.java
+++ b/javax/crypto/SecretKeyFactorySpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/ShortBufferException.java b/javax/crypto/ShortBufferException.java
index 5b5bf5437..98d2101c3 100644
--- a/javax/crypto/ShortBufferException.java
+++ b/javax/crypto/ShortBufferException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/interfaces/DHKey.java b/javax/crypto/interfaces/DHKey.java
index d5d827946..0c3ec97e0 100644
--- a/javax/crypto/interfaces/DHKey.java
+++ b/javax/crypto/interfaces/DHKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/interfaces/DHPrivateKey.java b/javax/crypto/interfaces/DHPrivateKey.java
index 7f9ea391f..12077bad2 100644
--- a/javax/crypto/interfaces/DHPrivateKey.java
+++ b/javax/crypto/interfaces/DHPrivateKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/interfaces/DHPublicKey.java b/javax/crypto/interfaces/DHPublicKey.java
index 1fcb8144a..d0519d4db 100644
--- a/javax/crypto/interfaces/DHPublicKey.java
+++ b/javax/crypto/interfaces/DHPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/interfaces/PBEKey.java b/javax/crypto/interfaces/PBEKey.java
index 30d25323f..df7f2e2b2 100644
--- a/javax/crypto/interfaces/PBEKey.java
+++ b/javax/crypto/interfaces/PBEKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/interfaces/package.html b/javax/crypto/interfaces/package.html
index ade7507af..9461e39fa 100644
--- a/javax/crypto/interfaces/package.html
+++ b/javax/crypto/interfaces/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/package.html b/javax/crypto/package.html
index e5a68ed12..d055fb578 100644
--- a/javax/crypto/package.html
+++ b/javax/crypto/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/DESKeySpec.java b/javax/crypto/spec/DESKeySpec.java
index 7423c969b..9075a77d2 100644
--- a/javax/crypto/spec/DESKeySpec.java
+++ b/javax/crypto/spec/DESKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/DESedeKeySpec.java b/javax/crypto/spec/DESedeKeySpec.java
index d455163bc..1f6a25026 100644
--- a/javax/crypto/spec/DESedeKeySpec.java
+++ b/javax/crypto/spec/DESedeKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/DHGenParameterSpec.java b/javax/crypto/spec/DHGenParameterSpec.java
index 67392a50f..0fc8ed58e 100644
--- a/javax/crypto/spec/DHGenParameterSpec.java
+++ b/javax/crypto/spec/DHGenParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/DHParameterSpec.java b/javax/crypto/spec/DHParameterSpec.java
index e66f632e8..4db82870f 100644
--- a/javax/crypto/spec/DHParameterSpec.java
+++ b/javax/crypto/spec/DHParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/DHPrivateKeySpec.java b/javax/crypto/spec/DHPrivateKeySpec.java
index 8a4a790a1..348a19264 100644
--- a/javax/crypto/spec/DHPrivateKeySpec.java
+++ b/javax/crypto/spec/DHPrivateKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/DHPublicKeySpec.java b/javax/crypto/spec/DHPublicKeySpec.java
index 723dfefa4..e81872785 100644
--- a/javax/crypto/spec/DHPublicKeySpec.java
+++ b/javax/crypto/spec/DHPublicKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/IvParameterSpec.java b/javax/crypto/spec/IvParameterSpec.java
index 1c09c7665..3af38f58e 100644
--- a/javax/crypto/spec/IvParameterSpec.java
+++ b/javax/crypto/spec/IvParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/PBEKeySpec.java b/javax/crypto/spec/PBEKeySpec.java
index 7a8c224cc..d17dc41ee 100644
--- a/javax/crypto/spec/PBEKeySpec.java
+++ b/javax/crypto/spec/PBEKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/PBEParameterSpec.java b/javax/crypto/spec/PBEParameterSpec.java
index f45c866c9..322d9556c 100644
--- a/javax/crypto/spec/PBEParameterSpec.java
+++ b/javax/crypto/spec/PBEParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/RC2ParameterSpec.java b/javax/crypto/spec/RC2ParameterSpec.java
index ec9cde71c..33155b2b3 100644
--- a/javax/crypto/spec/RC2ParameterSpec.java
+++ b/javax/crypto/spec/RC2ParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/RC5ParameterSpec.java b/javax/crypto/spec/RC5ParameterSpec.java
index e7549dd63..8570c86b3 100644
--- a/javax/crypto/spec/RC5ParameterSpec.java
+++ b/javax/crypto/spec/RC5ParameterSpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/SecretKeySpec.java b/javax/crypto/spec/SecretKeySpec.java
index 63c696840..4caf51a46 100644
--- a/javax/crypto/spec/SecretKeySpec.java
+++ b/javax/crypto/spec/SecretKeySpec.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/crypto/spec/package.html b/javax/crypto/spec/package.html
index 12b2d02a5..8580c2f42 100644
--- a/javax/crypto/spec/package.html
+++ b/javax/crypto/spec/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/IIOException.java b/javax/imageio/IIOException.java
index 490c8c555..8f8dd0344 100644
--- a/javax/imageio/IIOException.java
+++ b/javax/imageio/IIOException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/IIOImage.java b/javax/imageio/IIOImage.java
index 587a3d4b2..651c9baaa 100644
--- a/javax/imageio/IIOImage.java
+++ b/javax/imageio/IIOImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/IIOParam.java b/javax/imageio/IIOParam.java
index 1a5912399..01f616605 100644
--- a/javax/imageio/IIOParam.java
+++ b/javax/imageio/IIOParam.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/IIOParamController.java b/javax/imageio/IIOParamController.java
index 0568c19a2..125520e73 100644
--- a/javax/imageio/IIOParamController.java
+++ b/javax/imageio/IIOParamController.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/ImageIO.java b/javax/imageio/ImageIO.java
index c93ff738d..95c7c3251 100644
--- a/javax/imageio/ImageIO.java
+++ b/javax/imageio/ImageIO.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/ImageReadParam.java b/javax/imageio/ImageReadParam.java
index 4192c563b..889fe6cc9 100644
--- a/javax/imageio/ImageReadParam.java
+++ b/javax/imageio/ImageReadParam.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/ImageReader.java b/javax/imageio/ImageReader.java
index 6e5a1b2d8..fdf692bd2 100644
--- a/javax/imageio/ImageReader.java
+++ b/javax/imageio/ImageReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/ImageTranscoder.java b/javax/imageio/ImageTranscoder.java
index 7b2012ba5..ccc993162 100644
--- a/javax/imageio/ImageTranscoder.java
+++ b/javax/imageio/ImageTranscoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/ImageTypeSpecifier.java b/javax/imageio/ImageTypeSpecifier.java
index f5d9ee278..0751e3767 100644
--- a/javax/imageio/ImageTypeSpecifier.java
+++ b/javax/imageio/ImageTypeSpecifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/ImageWriteParam.java b/javax/imageio/ImageWriteParam.java
index 0eb9073dc..08f4885a8 100644
--- a/javax/imageio/ImageWriteParam.java
+++ b/javax/imageio/ImageWriteParam.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/ImageWriter.java b/javax/imageio/ImageWriter.java
index 389ca4360..7479c3074 100644
--- a/javax/imageio/ImageWriter.java
+++ b/javax/imageio/ImageWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/event/IIOReadProgressListener.java b/javax/imageio/event/IIOReadProgressListener.java
index 7ba5bbaf5..404336c24 100644
--- a/javax/imageio/event/IIOReadProgressListener.java
+++ b/javax/imageio/event/IIOReadProgressListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/event/IIOReadUpdateListener.java b/javax/imageio/event/IIOReadUpdateListener.java
index 18ac4f0b0..77b1a4e07 100644
--- a/javax/imageio/event/IIOReadUpdateListener.java
+++ b/javax/imageio/event/IIOReadUpdateListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/event/IIOReadWarningListener.java b/javax/imageio/event/IIOReadWarningListener.java
index 34fcbb784..e89735035 100644
--- a/javax/imageio/event/IIOReadWarningListener.java
+++ b/javax/imageio/event/IIOReadWarningListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/event/IIOWriteProgressListener.java b/javax/imageio/event/IIOWriteProgressListener.java
index e71364288..16b8891f0 100644
--- a/javax/imageio/event/IIOWriteProgressListener.java
+++ b/javax/imageio/event/IIOWriteProgressListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/event/IIOWriteWarningListener.java b/javax/imageio/event/IIOWriteWarningListener.java
index 9f8d52135..3c4e3bd99 100644
--- a/javax/imageio/event/IIOWriteWarningListener.java
+++ b/javax/imageio/event/IIOWriteWarningListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/event/package.html b/javax/imageio/event/package.html
index c36a11a71..69171d276 100644
--- a/javax/imageio/event/package.html
+++ b/javax/imageio/event/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIOAttr.java b/javax/imageio/metadata/IIOAttr.java
index c041d396b..0c1d3d2ef 100644
--- a/javax/imageio/metadata/IIOAttr.java
+++ b/javax/imageio/metadata/IIOAttr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIOInvalidTreeException.java b/javax/imageio/metadata/IIOInvalidTreeException.java
index af84f0732..18d5bf617 100644
--- a/javax/imageio/metadata/IIOInvalidTreeException.java
+++ b/javax/imageio/metadata/IIOInvalidTreeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIOMetadata.java b/javax/imageio/metadata/IIOMetadata.java
index bb96770dd..d727e1d1e 100644
--- a/javax/imageio/metadata/IIOMetadata.java
+++ b/javax/imageio/metadata/IIOMetadata.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIOMetadataController.java b/javax/imageio/metadata/IIOMetadataController.java
index db899d8cc..86e544386 100644
--- a/javax/imageio/metadata/IIOMetadataController.java
+++ b/javax/imageio/metadata/IIOMetadataController.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIOMetadataFormat.java b/javax/imageio/metadata/IIOMetadataFormat.java
index 2aef2660b..76e0950a3 100644
--- a/javax/imageio/metadata/IIOMetadataFormat.java
+++ b/javax/imageio/metadata/IIOMetadataFormat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIOMetadataFormatImpl.java b/javax/imageio/metadata/IIOMetadataFormatImpl.java
index eab205591..2ce8f9c3d 100644
--- a/javax/imageio/metadata/IIOMetadataFormatImpl.java
+++ b/javax/imageio/metadata/IIOMetadataFormatImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIOMetadataNode.java b/javax/imageio/metadata/IIOMetadataNode.java
index 609db4d78..d9e0983e9 100644
--- a/javax/imageio/metadata/IIOMetadataNode.java
+++ b/javax/imageio/metadata/IIOMetadataNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIONamedNodeMap.java b/javax/imageio/metadata/IIONamedNodeMap.java
index e549c1cf0..92da28d5b 100644
--- a/javax/imageio/metadata/IIONamedNodeMap.java
+++ b/javax/imageio/metadata/IIONamedNodeMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/IIONodeList.java b/javax/imageio/metadata/IIONodeList.java
index 4ef7f4cbe..395d261b6 100644
--- a/javax/imageio/metadata/IIONodeList.java
+++ b/javax/imageio/metadata/IIONodeList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/metadata/package.html b/javax/imageio/metadata/package.html
index 3188e32e5..5bd77c2a5 100644
--- a/javax/imageio/metadata/package.html
+++ b/javax/imageio/metadata/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/package.html b/javax/imageio/package.html
index ed284b93c..ce36a7b44 100644
--- a/javax/imageio/package.html
+++ b/javax/imageio/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/IIORegistry.java b/javax/imageio/spi/IIORegistry.java
index 01cfe5274..a0e111290 100644
--- a/javax/imageio/spi/IIORegistry.java
+++ b/javax/imageio/spi/IIORegistry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/IIOServiceProvider.java b/javax/imageio/spi/IIOServiceProvider.java
index a0d8b79bc..1ec59d526 100644
--- a/javax/imageio/spi/IIOServiceProvider.java
+++ b/javax/imageio/spi/IIOServiceProvider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/ImageInputStreamSpi.java b/javax/imageio/spi/ImageInputStreamSpi.java
index 8679ed1f4..51c58395f 100644
--- a/javax/imageio/spi/ImageInputStreamSpi.java
+++ b/javax/imageio/spi/ImageInputStreamSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/ImageOutputStreamSpi.java b/javax/imageio/spi/ImageOutputStreamSpi.java
index 43781aa11..0f1d3cdb2 100644
--- a/javax/imageio/spi/ImageOutputStreamSpi.java
+++ b/javax/imageio/spi/ImageOutputStreamSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/ImageReaderSpi.java b/javax/imageio/spi/ImageReaderSpi.java
index e041c371e..e97d23940 100644
--- a/javax/imageio/spi/ImageReaderSpi.java
+++ b/javax/imageio/spi/ImageReaderSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/ImageReaderWriterSpi.java b/javax/imageio/spi/ImageReaderWriterSpi.java
index 9821adf88..4aa7fd412 100644
--- a/javax/imageio/spi/ImageReaderWriterSpi.java
+++ b/javax/imageio/spi/ImageReaderWriterSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/ImageTranscoderSpi.java b/javax/imageio/spi/ImageTranscoderSpi.java
index d3a4d89b0..1c04ad20c 100644
--- a/javax/imageio/spi/ImageTranscoderSpi.java
+++ b/javax/imageio/spi/ImageTranscoderSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/ImageWriterSpi.java b/javax/imageio/spi/ImageWriterSpi.java
index 306408df8..3ec52c51c 100644
--- a/javax/imageio/spi/ImageWriterSpi.java
+++ b/javax/imageio/spi/ImageWriterSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/RegisterableService.java b/javax/imageio/spi/RegisterableService.java
index 2afee80ab..ccf734e69 100644
--- a/javax/imageio/spi/RegisterableService.java
+++ b/javax/imageio/spi/RegisterableService.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/ServiceRegistry.java b/javax/imageio/spi/ServiceRegistry.java
index a08ea69e8..031b66604 100644
--- a/javax/imageio/spi/ServiceRegistry.java
+++ b/javax/imageio/spi/ServiceRegistry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/spi/package.html b/javax/imageio/spi/package.html
index 5c0779e68..69fe33f60 100644
--- a/javax/imageio/spi/package.html
+++ b/javax/imageio/spi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/FileCacheImageInputStream.java b/javax/imageio/stream/FileCacheImageInputStream.java
index a8db4779b..40fed63af 100644
--- a/javax/imageio/stream/FileCacheImageInputStream.java
+++ b/javax/imageio/stream/FileCacheImageInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/FileCacheImageOutputStream.java b/javax/imageio/stream/FileCacheImageOutputStream.java
index 912b368d1..16cd0a7a9 100644
--- a/javax/imageio/stream/FileCacheImageOutputStream.java
+++ b/javax/imageio/stream/FileCacheImageOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/FileImageInputStream.java b/javax/imageio/stream/FileImageInputStream.java
index 168463255..4fa1ac8a3 100644
--- a/javax/imageio/stream/FileImageInputStream.java
+++ b/javax/imageio/stream/FileImageInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/FileImageOutputStream.java b/javax/imageio/stream/FileImageOutputStream.java
index 5b47af840..e1ce5c25e 100644
--- a/javax/imageio/stream/FileImageOutputStream.java
+++ b/javax/imageio/stream/FileImageOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/IIOByteBuffer.java b/javax/imageio/stream/IIOByteBuffer.java
index e303255b3..f783653a7 100644
--- a/javax/imageio/stream/IIOByteBuffer.java
+++ b/javax/imageio/stream/IIOByteBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/ImageInputStream.java b/javax/imageio/stream/ImageInputStream.java
index c75939e94..a2af6c3e2 100644
--- a/javax/imageio/stream/ImageInputStream.java
+++ b/javax/imageio/stream/ImageInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ exception statement from your version. */
package javax.imageio.stream;
import java.io.DataInput;
+import java.io.EOFException;
import java.io.IOException;
import java.nio.ByteOrder;
diff --git a/javax/imageio/stream/ImageInputStreamImpl.java b/javax/imageio/stream/ImageInputStreamImpl.java
index dbe6d1aaa..0967fee46 100644
--- a/javax/imageio/stream/ImageInputStreamImpl.java
+++ b/javax/imageio/stream/ImageInputStreamImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/ImageOutputStream.java b/javax/imageio/stream/ImageOutputStream.java
index b00b37ff9..49a1bcf33 100644
--- a/javax/imageio/stream/ImageOutputStream.java
+++ b/javax/imageio/stream/ImageOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/ImageOutputStreamImpl.java b/javax/imageio/stream/ImageOutputStreamImpl.java
index 214925545..c708a2368 100644
--- a/javax/imageio/stream/ImageOutputStreamImpl.java
+++ b/javax/imageio/stream/ImageOutputStreamImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/MemoryCacheImageInputStream.java b/javax/imageio/stream/MemoryCacheImageInputStream.java
index 3631e64fc..3d9f61846 100644
--- a/javax/imageio/stream/MemoryCacheImageInputStream.java
+++ b/javax/imageio/stream/MemoryCacheImageInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/MemoryCacheImageOutputStream.java b/javax/imageio/stream/MemoryCacheImageOutputStream.java
index a21efae98..8914c3305 100644
--- a/javax/imageio/stream/MemoryCacheImageOutputStream.java
+++ b/javax/imageio/stream/MemoryCacheImageOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/imageio/stream/package.html b/javax/imageio/stream/package.html
index 5449c1237..63e53ca65 100644
--- a/javax/imageio/stream/package.html
+++ b/javax/imageio/stream/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/AuthenticationException.java b/javax/naming/AuthenticationException.java
index 63bfb4b8e..f332561e4 100644
--- a/javax/naming/AuthenticationException.java
+++ b/javax/naming/AuthenticationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/AuthenticationNotSupportedException.java b/javax/naming/AuthenticationNotSupportedException.java
index e14fed92e..52b133a5c 100644
--- a/javax/naming/AuthenticationNotSupportedException.java
+++ b/javax/naming/AuthenticationNotSupportedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/BinaryRefAddr.java b/javax/naming/BinaryRefAddr.java
index 793552a9e..0b813abc3 100644
--- a/javax/naming/BinaryRefAddr.java
+++ b/javax/naming/BinaryRefAddr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/Binding.java b/javax/naming/Binding.java
index 066d84ecd..91c0d95f7 100644
--- a/javax/naming/Binding.java
+++ b/javax/naming/Binding.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/CannotProceedException.java b/javax/naming/CannotProceedException.java
index db457729c..3a69cd381 100644
--- a/javax/naming/CannotProceedException.java
+++ b/javax/naming/CannotProceedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/CommunicationException.java b/javax/naming/CommunicationException.java
index 4a22922f1..c780387cf 100644
--- a/javax/naming/CommunicationException.java
+++ b/javax/naming/CommunicationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/CompositeName.java b/javax/naming/CompositeName.java
index cd77723ea..61adcf177 100644
--- a/javax/naming/CompositeName.java
+++ b/javax/naming/CompositeName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/CompoundName.java b/javax/naming/CompoundName.java
index 229971587..4b30557f8 100644
--- a/javax/naming/CompoundName.java
+++ b/javax/naming/CompoundName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ConfigurationException.java b/javax/naming/ConfigurationException.java
index f8dad9459..196654865 100644
--- a/javax/naming/ConfigurationException.java
+++ b/javax/naming/ConfigurationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/Context.java b/javax/naming/Context.java
index b1b621dce..9df82c684 100644
--- a/javax/naming/Context.java
+++ b/javax/naming/Context.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ContextNotEmptyException.java b/javax/naming/ContextNotEmptyException.java
index b77080c8f..c6fe5e81c 100644
--- a/javax/naming/ContextNotEmptyException.java
+++ b/javax/naming/ContextNotEmptyException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/InitialContext.java b/javax/naming/InitialContext.java
index 889a79dde..1a9ee5a27 100644
--- a/javax/naming/InitialContext.java
+++ b/javax/naming/InitialContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/InsufficientResourcesException.java b/javax/naming/InsufficientResourcesException.java
index d2cb27fee..bcb9fe577 100644
--- a/javax/naming/InsufficientResourcesException.java
+++ b/javax/naming/InsufficientResourcesException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/InterruptedNamingException.java b/javax/naming/InterruptedNamingException.java
index d9e3d4c58..8cdf30d4e 100644
--- a/javax/naming/InterruptedNamingException.java
+++ b/javax/naming/InterruptedNamingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/InvalidNameException.java b/javax/naming/InvalidNameException.java
index 4b6fc3a2c..a3b99e1f6 100644
--- a/javax/naming/InvalidNameException.java
+++ b/javax/naming/InvalidNameException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/LimitExceededException.java b/javax/naming/LimitExceededException.java
index 4fff2af2d..7e7af81c7 100644
--- a/javax/naming/LimitExceededException.java
+++ b/javax/naming/LimitExceededException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/LinkException.java b/javax/naming/LinkException.java
index 29179ff52..2c3c50711 100644
--- a/javax/naming/LinkException.java
+++ b/javax/naming/LinkException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/LinkLoopException.java b/javax/naming/LinkLoopException.java
index 43fc0ce1a..9c00dbeb6 100644
--- a/javax/naming/LinkLoopException.java
+++ b/javax/naming/LinkLoopException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/LinkRef.java b/javax/naming/LinkRef.java
index 313574f16..35d9a406f 100644
--- a/javax/naming/LinkRef.java
+++ b/javax/naming/LinkRef.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/MalformedLinkException.java b/javax/naming/MalformedLinkException.java
index 56e13e054..5422b9094 100644
--- a/javax/naming/MalformedLinkException.java
+++ b/javax/naming/MalformedLinkException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/Name.java b/javax/naming/Name.java
index 0d4a2ed53..f8592d9ea 100644
--- a/javax/naming/Name.java
+++ b/javax/naming/Name.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NameAlreadyBoundException.java b/javax/naming/NameAlreadyBoundException.java
index dbde071bd..4b2fb0e74 100644
--- a/javax/naming/NameAlreadyBoundException.java
+++ b/javax/naming/NameAlreadyBoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NameClassPair.java b/javax/naming/NameClassPair.java
index bc90f224e..4e2605131 100644
--- a/javax/naming/NameClassPair.java
+++ b/javax/naming/NameClassPair.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NameNotFoundException.java b/javax/naming/NameNotFoundException.java
index d0d1fff00..b533b0412 100644
--- a/javax/naming/NameNotFoundException.java
+++ b/javax/naming/NameNotFoundException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NameParser.java b/javax/naming/NameParser.java
index 802cd33db..1aeaf3600 100644
--- a/javax/naming/NameParser.java
+++ b/javax/naming/NameParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NamingEnumeration.java b/javax/naming/NamingEnumeration.java
index 578662f25..3c9ee2d01 100644
--- a/javax/naming/NamingEnumeration.java
+++ b/javax/naming/NamingEnumeration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NamingException.java b/javax/naming/NamingException.java
index e0aef0a5e..ad3923326 100644
--- a/javax/naming/NamingException.java
+++ b/javax/naming/NamingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NamingSecurityException.java b/javax/naming/NamingSecurityException.java
index 1860a0e0a..ae7f5edf6 100644
--- a/javax/naming/NamingSecurityException.java
+++ b/javax/naming/NamingSecurityException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NoInitialContextException.java b/javax/naming/NoInitialContextException.java
index 7139fd2b2..d12dfcb7b 100644
--- a/javax/naming/NoInitialContextException.java
+++ b/javax/naming/NoInitialContextException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NoPermissionException.java b/javax/naming/NoPermissionException.java
index 9de1c7a69..ddc43937c 100644
--- a/javax/naming/NoPermissionException.java
+++ b/javax/naming/NoPermissionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/NotContextException.java b/javax/naming/NotContextException.java
index d480eed20..b3d02cfbb 100644
--- a/javax/naming/NotContextException.java
+++ b/javax/naming/NotContextException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/OperationNotSupportedException.java b/javax/naming/OperationNotSupportedException.java
index 7278118d9..a4a4945af 100644
--- a/javax/naming/OperationNotSupportedException.java
+++ b/javax/naming/OperationNotSupportedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/PartialResultException.java b/javax/naming/PartialResultException.java
index 2f5a0645f..32f389d13 100644
--- a/javax/naming/PartialResultException.java
+++ b/javax/naming/PartialResultException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/RefAddr.java b/javax/naming/RefAddr.java
index a1c096c10..f345c8829 100644
--- a/javax/naming/RefAddr.java
+++ b/javax/naming/RefAddr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/Reference.java b/javax/naming/Reference.java
index 4b06f4ab9..6cc4d1570 100644
--- a/javax/naming/Reference.java
+++ b/javax/naming/Reference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/Referenceable.java b/javax/naming/Referenceable.java
index 013127a49..cf1100aab 100644
--- a/javax/naming/Referenceable.java
+++ b/javax/naming/Referenceable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ReferralException.java b/javax/naming/ReferralException.java
index 430a38d4d..ec2178e77 100644
--- a/javax/naming/ReferralException.java
+++ b/javax/naming/ReferralException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ServiceUnavailableException.java b/javax/naming/ServiceUnavailableException.java
index 389197a15..678eb1328 100644
--- a/javax/naming/ServiceUnavailableException.java
+++ b/javax/naming/ServiceUnavailableException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/SizeLimitExceededException.java b/javax/naming/SizeLimitExceededException.java
index aad7903e8..e23f4d2da 100644
--- a/javax/naming/SizeLimitExceededException.java
+++ b/javax/naming/SizeLimitExceededException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/StringRefAddr.java b/javax/naming/StringRefAddr.java
index fbb57cbfe..f40da8fd8 100644
--- a/javax/naming/StringRefAddr.java
+++ b/javax/naming/StringRefAddr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/TimeLimitExceededException.java b/javax/naming/TimeLimitExceededException.java
index 5baf5bf9e..f4be6759b 100644
--- a/javax/naming/TimeLimitExceededException.java
+++ b/javax/naming/TimeLimitExceededException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/Attribute.java b/javax/naming/directory/Attribute.java
index e46a563b8..59bf66dab 100644
--- a/javax/naming/directory/Attribute.java
+++ b/javax/naming/directory/Attribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/AttributeInUseException.java b/javax/naming/directory/AttributeInUseException.java
index 709595542..466142452 100644
--- a/javax/naming/directory/AttributeInUseException.java
+++ b/javax/naming/directory/AttributeInUseException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/AttributeModificationException.java b/javax/naming/directory/AttributeModificationException.java
index a1bffba76..4ef6fc20b 100644
--- a/javax/naming/directory/AttributeModificationException.java
+++ b/javax/naming/directory/AttributeModificationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/Attributes.java b/javax/naming/directory/Attributes.java
index 34bb8c099..3d5ef9f4f 100644
--- a/javax/naming/directory/Attributes.java
+++ b/javax/naming/directory/Attributes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/BasicAttribute.java b/javax/naming/directory/BasicAttribute.java
index 24c21e6b0..047036585 100644
--- a/javax/naming/directory/BasicAttribute.java
+++ b/javax/naming/directory/BasicAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/BasicAttributes.java b/javax/naming/directory/BasicAttributes.java
index b20072424..37ec19577 100644
--- a/javax/naming/directory/BasicAttributes.java
+++ b/javax/naming/directory/BasicAttributes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/DirContext.java b/javax/naming/directory/DirContext.java
index a42908b80..002cb78a9 100644
--- a/javax/naming/directory/DirContext.java
+++ b/javax/naming/directory/DirContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/InitialDirContext.java b/javax/naming/directory/InitialDirContext.java
index 7d02b7949..c946f416b 100644
--- a/javax/naming/directory/InitialDirContext.java
+++ b/javax/naming/directory/InitialDirContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/InvalidAttributeIdentifierException.java b/javax/naming/directory/InvalidAttributeIdentifierException.java
index e48d48352..af1a8c7a2 100644
--- a/javax/naming/directory/InvalidAttributeIdentifierException.java
+++ b/javax/naming/directory/InvalidAttributeIdentifierException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/InvalidAttributeValueException.java b/javax/naming/directory/InvalidAttributeValueException.java
index b9f62237f..b667fa9a7 100644
--- a/javax/naming/directory/InvalidAttributeValueException.java
+++ b/javax/naming/directory/InvalidAttributeValueException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/InvalidAttributesException.java b/javax/naming/directory/InvalidAttributesException.java
index a7a8cc61f..ad7f7c1c1 100644
--- a/javax/naming/directory/InvalidAttributesException.java
+++ b/javax/naming/directory/InvalidAttributesException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/InvalidSearchControlsException.java b/javax/naming/directory/InvalidSearchControlsException.java
index 38325cee4..594e5d1bf 100644
--- a/javax/naming/directory/InvalidSearchControlsException.java
+++ b/javax/naming/directory/InvalidSearchControlsException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/InvalidSearchFilterException.java b/javax/naming/directory/InvalidSearchFilterException.java
index b6e009c88..127b381ea 100644
--- a/javax/naming/directory/InvalidSearchFilterException.java
+++ b/javax/naming/directory/InvalidSearchFilterException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/ModificationItem.java b/javax/naming/directory/ModificationItem.java
index e5530aa11..f0a69f56a 100644
--- a/javax/naming/directory/ModificationItem.java
+++ b/javax/naming/directory/ModificationItem.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/NoSuchAttributeException.java b/javax/naming/directory/NoSuchAttributeException.java
index 48598bba6..cff9f95b7 100644
--- a/javax/naming/directory/NoSuchAttributeException.java
+++ b/javax/naming/directory/NoSuchAttributeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/SchemaViolationException.java b/javax/naming/directory/SchemaViolationException.java
index 56afc1147..a11e50f20 100644
--- a/javax/naming/directory/SchemaViolationException.java
+++ b/javax/naming/directory/SchemaViolationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/SearchControls.java b/javax/naming/directory/SearchControls.java
index 5e630807a..4cc789d52 100644
--- a/javax/naming/directory/SearchControls.java
+++ b/javax/naming/directory/SearchControls.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/SearchResult.java b/javax/naming/directory/SearchResult.java
index 793a28d47..a6d5490df 100644
--- a/javax/naming/directory/SearchResult.java
+++ b/javax/naming/directory/SearchResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/directory/package.html b/javax/naming/directory/package.html
index 9d2ff734c..6286dd2e4 100644
--- a/javax/naming/directory/package.html
+++ b/javax/naming/directory/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/event/EventContext.java b/javax/naming/event/EventContext.java
index 365d73a06..32629c04c 100644
--- a/javax/naming/event/EventContext.java
+++ b/javax/naming/event/EventContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/event/EventDirContext.java b/javax/naming/event/EventDirContext.java
index 288ecb171..d2883aec3 100644
--- a/javax/naming/event/EventDirContext.java
+++ b/javax/naming/event/EventDirContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/event/NamespaceChangeListener.java b/javax/naming/event/NamespaceChangeListener.java
index 7952d7193..464b7187a 100644
--- a/javax/naming/event/NamespaceChangeListener.java
+++ b/javax/naming/event/NamespaceChangeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/event/NamingEvent.java b/javax/naming/event/NamingEvent.java
index 6ac976230..a121b8e13 100644
--- a/javax/naming/event/NamingEvent.java
+++ b/javax/naming/event/NamingEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/event/NamingExceptionEvent.java b/javax/naming/event/NamingExceptionEvent.java
index 8fb4255a6..07896d48d 100644
--- a/javax/naming/event/NamingExceptionEvent.java
+++ b/javax/naming/event/NamingExceptionEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/event/NamingListener.java b/javax/naming/event/NamingListener.java
index bc820dcb0..4f313a35c 100644
--- a/javax/naming/event/NamingListener.java
+++ b/javax/naming/event/NamingListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/event/ObjectChangeListener.java b/javax/naming/event/ObjectChangeListener.java
index 0a2b19d1a..00e8c4cb0 100644
--- a/javax/naming/event/ObjectChangeListener.java
+++ b/javax/naming/event/ObjectChangeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/event/package.html b/javax/naming/event/package.html
index 2b2752825..a5d620e47 100644
--- a/javax/naming/event/package.html
+++ b/javax/naming/event/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/Control.java b/javax/naming/ldap/Control.java
index 03de2159b..9f6409b53 100644
--- a/javax/naming/ldap/Control.java
+++ b/javax/naming/ldap/Control.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/ControlFactory.java b/javax/naming/ldap/ControlFactory.java
index 3acf1c728..f72e67a75 100644
--- a/javax/naming/ldap/ControlFactory.java
+++ b/javax/naming/ldap/ControlFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/ExtendedRequest.java b/javax/naming/ldap/ExtendedRequest.java
index 35f4c5ee9..e6379c0c0 100644
--- a/javax/naming/ldap/ExtendedRequest.java
+++ b/javax/naming/ldap/ExtendedRequest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/ExtendedResponse.java b/javax/naming/ldap/ExtendedResponse.java
index 662512848..a3b6dd12c 100644
--- a/javax/naming/ldap/ExtendedResponse.java
+++ b/javax/naming/ldap/ExtendedResponse.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/HasControls.java b/javax/naming/ldap/HasControls.java
index 6153e5451..a1698963f 100644
--- a/javax/naming/ldap/HasControls.java
+++ b/javax/naming/ldap/HasControls.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/InitialLdapContext.java b/javax/naming/ldap/InitialLdapContext.java
index abba7a5bd..45a9eae1a 100644
--- a/javax/naming/ldap/InitialLdapContext.java
+++ b/javax/naming/ldap/InitialLdapContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/LdapContext.java b/javax/naming/ldap/LdapContext.java
index 7f554a618..10b72f77f 100644
--- a/javax/naming/ldap/LdapContext.java
+++ b/javax/naming/ldap/LdapContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/LdapReferralException.java b/javax/naming/ldap/LdapReferralException.java
index fa4063246..61a2b8e44 100644
--- a/javax/naming/ldap/LdapReferralException.java
+++ b/javax/naming/ldap/LdapReferralException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/UnsolicitedNotification.java b/javax/naming/ldap/UnsolicitedNotification.java
index 5a97227b1..0b6f9d779 100644
--- a/javax/naming/ldap/UnsolicitedNotification.java
+++ b/javax/naming/ldap/UnsolicitedNotification.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/UnsolicitedNotificationEvent.java b/javax/naming/ldap/UnsolicitedNotificationEvent.java
index bade7e1c3..f9946064a 100644
--- a/javax/naming/ldap/UnsolicitedNotificationEvent.java
+++ b/javax/naming/ldap/UnsolicitedNotificationEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/UnsolicitedNotificationListener.java b/javax/naming/ldap/UnsolicitedNotificationListener.java
index e5b15c566..fd56f0598 100644
--- a/javax/naming/ldap/UnsolicitedNotificationListener.java
+++ b/javax/naming/ldap/UnsolicitedNotificationListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/ldap/package.html b/javax/naming/ldap/package.html
index c1a2c9510..0a4e45e6e 100644
--- a/javax/naming/ldap/package.html
+++ b/javax/naming/ldap/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/package.html b/javax/naming/package.html
index 5d0b41d50..0794d3de8 100644
--- a/javax/naming/package.html
+++ b/javax/naming/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/DirObjectFactory.java b/javax/naming/spi/DirObjectFactory.java
index 5f27c95b3..ea0e69706 100644
--- a/javax/naming/spi/DirObjectFactory.java
+++ b/javax/naming/spi/DirObjectFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/DirStateFactory.java b/javax/naming/spi/DirStateFactory.java
index b846dc9d2..b5add91cb 100644
--- a/javax/naming/spi/DirStateFactory.java
+++ b/javax/naming/spi/DirStateFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/DirectoryManager.java b/javax/naming/spi/DirectoryManager.java
index a98b05df8..fd482efb5 100644
--- a/javax/naming/spi/DirectoryManager.java
+++ b/javax/naming/spi/DirectoryManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/InitialContextFactory.java b/javax/naming/spi/InitialContextFactory.java
index 044269c6d..7bfcf095e 100644
--- a/javax/naming/spi/InitialContextFactory.java
+++ b/javax/naming/spi/InitialContextFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/InitialContextFactoryBuilder.java b/javax/naming/spi/InitialContextFactoryBuilder.java
index 6144a31a4..76564ab5e 100644
--- a/javax/naming/spi/InitialContextFactoryBuilder.java
+++ b/javax/naming/spi/InitialContextFactoryBuilder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/NamingManager.java b/javax/naming/spi/NamingManager.java
index 543831cf9..cfc9dbd5f 100644
--- a/javax/naming/spi/NamingManager.java
+++ b/javax/naming/spi/NamingManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/ObjectFactory.java b/javax/naming/spi/ObjectFactory.java
index 2415a8532..81648d9a8 100644
--- a/javax/naming/spi/ObjectFactory.java
+++ b/javax/naming/spi/ObjectFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/ObjectFactoryBuilder.java b/javax/naming/spi/ObjectFactoryBuilder.java
index 35a80959d..a76139315 100644
--- a/javax/naming/spi/ObjectFactoryBuilder.java
+++ b/javax/naming/spi/ObjectFactoryBuilder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/ResolveResult.java b/javax/naming/spi/ResolveResult.java
index d9c637629..72a101ec5 100644
--- a/javax/naming/spi/ResolveResult.java
+++ b/javax/naming/spi/ResolveResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/Resolver.java b/javax/naming/spi/Resolver.java
index 0f7f3868e..d80fb6169 100644
--- a/javax/naming/spi/Resolver.java
+++ b/javax/naming/spi/Resolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/StateFactory.java b/javax/naming/spi/StateFactory.java
index 14b91ea11..1fbdeb1fa 100644
--- a/javax/naming/spi/StateFactory.java
+++ b/javax/naming/spi/StateFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/naming/spi/package.html b/javax/naming/spi/package.html
index ef44c8d04..b55e97a40 100644
--- a/javax/naming/spi/package.html
+++ b/javax/naming/spi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ServerSocketFactory.java b/javax/net/ServerSocketFactory.java
index d20c7fbe9..0fc13d184 100644
--- a/javax/net/ServerSocketFactory.java
+++ b/javax/net/ServerSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/SocketFactory.java b/javax/net/SocketFactory.java
index 9e236d2df..945a52b68 100644
--- a/javax/net/SocketFactory.java
+++ b/javax/net/SocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/VanillaServerSocketFactory.java b/javax/net/VanillaServerSocketFactory.java
index e52ecba9e..f6e4dc876 100644
--- a/javax/net/VanillaServerSocketFactory.java
+++ b/javax/net/VanillaServerSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/VanillaSocketFactory.java b/javax/net/VanillaSocketFactory.java
index ace849293..5fffe106d 100644
--- a/javax/net/VanillaSocketFactory.java
+++ b/javax/net/VanillaSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/package.html b/javax/net/package.html
index 7d295da8e..d9964d35f 100644
--- a/javax/net/package.html
+++ b/javax/net/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/HandshakeCompletedEvent.java b/javax/net/ssl/HandshakeCompletedEvent.java
index ecb0ac929..743f13726 100644
--- a/javax/net/ssl/HandshakeCompletedEvent.java
+++ b/javax/net/ssl/HandshakeCompletedEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/HandshakeCompletedListener.java b/javax/net/ssl/HandshakeCompletedListener.java
index 5b79bf973..98584f290 100644
--- a/javax/net/ssl/HandshakeCompletedListener.java
+++ b/javax/net/ssl/HandshakeCompletedListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/HostnameVerifier.java b/javax/net/ssl/HostnameVerifier.java
index a45648eff..4b0465678 100644
--- a/javax/net/ssl/HostnameVerifier.java
+++ b/javax/net/ssl/HostnameVerifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/HttpsURLConnection.java b/javax/net/ssl/HttpsURLConnection.java
index 38e686af8..4c73edbcd 100644
--- a/javax/net/ssl/HttpsURLConnection.java
+++ b/javax/net/ssl/HttpsURLConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/KeyManager.java b/javax/net/ssl/KeyManager.java
index 083f3f592..688faa5d5 100644
--- a/javax/net/ssl/KeyManager.java
+++ b/javax/net/ssl/KeyManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/KeyManagerFactory.java b/javax/net/ssl/KeyManagerFactory.java
index 938dbcec9..ab8abd626 100644
--- a/javax/net/ssl/KeyManagerFactory.java
+++ b/javax/net/ssl/KeyManagerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/KeyManagerFactorySpi.java b/javax/net/ssl/KeyManagerFactorySpi.java
index 3ed978f35..a74bcee3a 100644
--- a/javax/net/ssl/KeyManagerFactorySpi.java
+++ b/javax/net/ssl/KeyManagerFactorySpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/ManagerFactoryParameters.java b/javax/net/ssl/ManagerFactoryParameters.java
index 6d3e008de..59c921509 100644
--- a/javax/net/ssl/ManagerFactoryParameters.java
+++ b/javax/net/ssl/ManagerFactoryParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLContext.java b/javax/net/ssl/SSLContext.java
index 6cab45351..eaf3e3638 100644
--- a/javax/net/ssl/SSLContext.java
+++ b/javax/net/ssl/SSLContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLContextSpi.java b/javax/net/ssl/SSLContextSpi.java
index ecac1cbc5..a6b0c7581 100644
--- a/javax/net/ssl/SSLContextSpi.java
+++ b/javax/net/ssl/SSLContextSpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLException.java b/javax/net/ssl/SSLException.java
index 0a33b458f..91d4cb78c 100644
--- a/javax/net/ssl/SSLException.java
+++ b/javax/net/ssl/SSLException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLHandshakeException.java b/javax/net/ssl/SSLHandshakeException.java
index c0f2c5cbb..2572d3b53 100644
--- a/javax/net/ssl/SSLHandshakeException.java
+++ b/javax/net/ssl/SSLHandshakeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLKeyException.java b/javax/net/ssl/SSLKeyException.java
index c60cac19f..bab47275d 100644
--- a/javax/net/ssl/SSLKeyException.java
+++ b/javax/net/ssl/SSLKeyException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLPeerUnverifiedException.java b/javax/net/ssl/SSLPeerUnverifiedException.java
index 1b3acbc24..c53fcdf5a 100644
--- a/javax/net/ssl/SSLPeerUnverifiedException.java
+++ b/javax/net/ssl/SSLPeerUnverifiedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLPermission.java b/javax/net/ssl/SSLPermission.java
index 0fa4a591b..4b1e29539 100644
--- a/javax/net/ssl/SSLPermission.java
+++ b/javax/net/ssl/SSLPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLProtocolException.java b/javax/net/ssl/SSLProtocolException.java
index 16a1457ab..5f9f327a3 100644
--- a/javax/net/ssl/SSLProtocolException.java
+++ b/javax/net/ssl/SSLProtocolException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLServerSocket.java b/javax/net/ssl/SSLServerSocket.java
index fee99f48e..5748c0794 100644
--- a/javax/net/ssl/SSLServerSocket.java
+++ b/javax/net/ssl/SSLServerSocket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLServerSocketFactory.java b/javax/net/ssl/SSLServerSocketFactory.java
index c26a61384..f02619afa 100644
--- a/javax/net/ssl/SSLServerSocketFactory.java
+++ b/javax/net/ssl/SSLServerSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLSession.java b/javax/net/ssl/SSLSession.java
index bad1f0df4..9400a1a51 100644
--- a/javax/net/ssl/SSLSession.java
+++ b/javax/net/ssl/SSLSession.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLSessionBindingEvent.java b/javax/net/ssl/SSLSessionBindingEvent.java
index e0d27efa6..af26efaa8 100644
--- a/javax/net/ssl/SSLSessionBindingEvent.java
+++ b/javax/net/ssl/SSLSessionBindingEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLSessionBindingListener.java b/javax/net/ssl/SSLSessionBindingListener.java
index 2e2432d4a..1941ce553 100644
--- a/javax/net/ssl/SSLSessionBindingListener.java
+++ b/javax/net/ssl/SSLSessionBindingListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLSessionContext.java b/javax/net/ssl/SSLSessionContext.java
index 0cbdeed9d..f9127e781 100644
--- a/javax/net/ssl/SSLSessionContext.java
+++ b/javax/net/ssl/SSLSessionContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLSocket.java b/javax/net/ssl/SSLSocket.java
index 8b943b9d6..32a2b5f17 100644
--- a/javax/net/ssl/SSLSocket.java
+++ b/javax/net/ssl/SSLSocket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/SSLSocketFactory.java b/javax/net/ssl/SSLSocketFactory.java
index 5b9000ed3..d5d9b6e14 100644
--- a/javax/net/ssl/SSLSocketFactory.java
+++ b/javax/net/ssl/SSLSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/TrivialHostnameVerifier.java b/javax/net/ssl/TrivialHostnameVerifier.java
index e4e2befc0..abf1a7f22 100644
--- a/javax/net/ssl/TrivialHostnameVerifier.java
+++ b/javax/net/ssl/TrivialHostnameVerifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/TrustManager.java b/javax/net/ssl/TrustManager.java
index f90629ab4..3bded8b56 100644
--- a/javax/net/ssl/TrustManager.java
+++ b/javax/net/ssl/TrustManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/TrustManagerFactory.java b/javax/net/ssl/TrustManagerFactory.java
index c1f2019f2..62ab1c2df 100644
--- a/javax/net/ssl/TrustManagerFactory.java
+++ b/javax/net/ssl/TrustManagerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/TrustManagerFactorySpi.java b/javax/net/ssl/TrustManagerFactorySpi.java
index 389e02325..3706674d4 100644
--- a/javax/net/ssl/TrustManagerFactorySpi.java
+++ b/javax/net/ssl/TrustManagerFactorySpi.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/X509KeyManager.java b/javax/net/ssl/X509KeyManager.java
index d5c00b62c..6fb6b40bc 100644
--- a/javax/net/ssl/X509KeyManager.java
+++ b/javax/net/ssl/X509KeyManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/X509TrustManager.java b/javax/net/ssl/X509TrustManager.java
index b63e0a830..97daaf046 100644
--- a/javax/net/ssl/X509TrustManager.java
+++ b/javax/net/ssl/X509TrustManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/net/ssl/package.html b/javax/net/ssl/package.html
index a2edfc44a..abc6f0591 100644
--- a/javax/net/ssl/package.html
+++ b/javax/net/ssl/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/AttributeException.java b/javax/print/AttributeException.java
index 780850ff6..d22c5bfab 100644
--- a/javax/print/AttributeException.java
+++ b/javax/print/AttributeException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/CancelablePrintJob.java b/javax/print/CancelablePrintJob.java
index 329103e47..94e9475e5 100644
--- a/javax/print/CancelablePrintJob.java
+++ b/javax/print/CancelablePrintJob.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/Doc.java b/javax/print/Doc.java
index 527038f6c..00e9dc986 100644
--- a/javax/print/Doc.java
+++ b/javax/print/Doc.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/DocFlavor.java b/javax/print/DocFlavor.java
index 11cc36d1a..732823fbe 100644
--- a/javax/print/DocFlavor.java
+++ b/javax/print/DocFlavor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/DocPrintJob.java b/javax/print/DocPrintJob.java
index db4ba8447..f7d361594 100644
--- a/javax/print/DocPrintJob.java
+++ b/javax/print/DocPrintJob.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/FlavorException.java b/javax/print/FlavorException.java
index b60f1c4ec..1de6a22e3 100644
--- a/javax/print/FlavorException.java
+++ b/javax/print/FlavorException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/MultiDoc.java b/javax/print/MultiDoc.java
index 401a7066a..e7747bca7 100644
--- a/javax/print/MultiDoc.java
+++ b/javax/print/MultiDoc.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/MultiDocPrintJob.java b/javax/print/MultiDocPrintJob.java
index e961d189c..b096769b0 100644
--- a/javax/print/MultiDocPrintJob.java
+++ b/javax/print/MultiDocPrintJob.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/MultiDocPrintService.java b/javax/print/MultiDocPrintService.java
index bf68cc702..a71d23a28 100644
--- a/javax/print/MultiDocPrintService.java
+++ b/javax/print/MultiDocPrintService.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/PrintException.java b/javax/print/PrintException.java
index e4626379d..3eef243e7 100644
--- a/javax/print/PrintException.java
+++ b/javax/print/PrintException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/PrintService.java b/javax/print/PrintService.java
index de113681b..d34fde843 100644
--- a/javax/print/PrintService.java
+++ b/javax/print/PrintService.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/PrintServiceLookup.java b/javax/print/PrintServiceLookup.java
index aa46bec61..2add8d1a6 100644
--- a/javax/print/PrintServiceLookup.java
+++ b/javax/print/PrintServiceLookup.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/ServiceUIFactory.java b/javax/print/ServiceUIFactory.java
index 7c9ead8b6..66e611441 100644
--- a/javax/print/ServiceUIFactory.java
+++ b/javax/print/ServiceUIFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/StreamPrintService.java b/javax/print/StreamPrintService.java
index 83f936afc..9246ea47e 100644
--- a/javax/print/StreamPrintService.java
+++ b/javax/print/StreamPrintService.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/URIException.java b/javax/print/URIException.java
index b29c8831c..5cc4c0ddd 100644
--- a/javax/print/URIException.java
+++ b/javax/print/URIException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/Attribute.java b/javax/print/attribute/Attribute.java
index 1af7e70fb..fcaa7d84c 100644
--- a/javax/print/attribute/Attribute.java
+++ b/javax/print/attribute/Attribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/AttributeSet.java b/javax/print/attribute/AttributeSet.java
index 7276f9224..cdc7a8e48 100644
--- a/javax/print/attribute/AttributeSet.java
+++ b/javax/print/attribute/AttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/AttributeSetUtilities.java b/javax/print/attribute/AttributeSetUtilities.java
index 32bee51b6..6f0ffc10d 100644
--- a/javax/print/attribute/AttributeSetUtilities.java
+++ b/javax/print/attribute/AttributeSetUtilities.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/DateTimeSyntax.java b/javax/print/attribute/DateTimeSyntax.java
index 6880f2bca..0e583e0b9 100644
--- a/javax/print/attribute/DateTimeSyntax.java
+++ b/javax/print/attribute/DateTimeSyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/DocAttribute.java b/javax/print/attribute/DocAttribute.java
index 077fdaa14..669d7d982 100644
--- a/javax/print/attribute/DocAttribute.java
+++ b/javax/print/attribute/DocAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/DocAttributeSet.java b/javax/print/attribute/DocAttributeSet.java
index 200420b65..72cd6d88a 100644
--- a/javax/print/attribute/DocAttributeSet.java
+++ b/javax/print/attribute/DocAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/EnumSyntax.java b/javax/print/attribute/EnumSyntax.java
index aa82ccc6b..3ed79fc5f 100644
--- a/javax/print/attribute/EnumSyntax.java
+++ b/javax/print/attribute/EnumSyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/HashAttributeSet.java b/javax/print/attribute/HashAttributeSet.java
index fc3c67ac0..c5fbe5ea8 100644
--- a/javax/print/attribute/HashAttributeSet.java
+++ b/javax/print/attribute/HashAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/HashDocAttributeSet.java b/javax/print/attribute/HashDocAttributeSet.java
index a7eedbf54..1647ae2f9 100644
--- a/javax/print/attribute/HashDocAttributeSet.java
+++ b/javax/print/attribute/HashDocAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/HashPrintJobAttributeSet.java b/javax/print/attribute/HashPrintJobAttributeSet.java
index 16b1beb34..84fa7ec5d 100644
--- a/javax/print/attribute/HashPrintJobAttributeSet.java
+++ b/javax/print/attribute/HashPrintJobAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/HashPrintRequestAttributeSet.java b/javax/print/attribute/HashPrintRequestAttributeSet.java
index 2d0cbbd3a..29a17861f 100644
--- a/javax/print/attribute/HashPrintRequestAttributeSet.java
+++ b/javax/print/attribute/HashPrintRequestAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/HashPrintServiceAttributeSet.java b/javax/print/attribute/HashPrintServiceAttributeSet.java
index aa6793b38..60e12bff0 100644
--- a/javax/print/attribute/HashPrintServiceAttributeSet.java
+++ b/javax/print/attribute/HashPrintServiceAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/IntegerSyntax.java b/javax/print/attribute/IntegerSyntax.java
index 6e3c455c4..d5500b4ca 100644
--- a/javax/print/attribute/IntegerSyntax.java
+++ b/javax/print/attribute/IntegerSyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/PrintJobAttribute.java b/javax/print/attribute/PrintJobAttribute.java
index 2c8e9c410..ba3a737b5 100644
--- a/javax/print/attribute/PrintJobAttribute.java
+++ b/javax/print/attribute/PrintJobAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/PrintJobAttributeSet.java b/javax/print/attribute/PrintJobAttributeSet.java
index 14c231b0c..905d53c2d 100644
--- a/javax/print/attribute/PrintJobAttributeSet.java
+++ b/javax/print/attribute/PrintJobAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/PrintRequestAttribute.java b/javax/print/attribute/PrintRequestAttribute.java
index a630a4948..756350020 100644
--- a/javax/print/attribute/PrintRequestAttribute.java
+++ b/javax/print/attribute/PrintRequestAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/PrintRequestAttributeSet.java b/javax/print/attribute/PrintRequestAttributeSet.java
index 8c07a8c0d..d72d2d71c 100644
--- a/javax/print/attribute/PrintRequestAttributeSet.java
+++ b/javax/print/attribute/PrintRequestAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/PrintServiceAttribute.java b/javax/print/attribute/PrintServiceAttribute.java
index 371670277..3cf8825f5 100644
--- a/javax/print/attribute/PrintServiceAttribute.java
+++ b/javax/print/attribute/PrintServiceAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/PrintServiceAttributeSet.java b/javax/print/attribute/PrintServiceAttributeSet.java
index 245ba1095..d67c9af55 100644
--- a/javax/print/attribute/PrintServiceAttributeSet.java
+++ b/javax/print/attribute/PrintServiceAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/ResolutionSyntax.java b/javax/print/attribute/ResolutionSyntax.java
index 678b373a1..a7878c50b 100644
--- a/javax/print/attribute/ResolutionSyntax.java
+++ b/javax/print/attribute/ResolutionSyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/SetOfIntegerSyntax.java b/javax/print/attribute/SetOfIntegerSyntax.java
index adea9199d..d73b867d5 100644
--- a/javax/print/attribute/SetOfIntegerSyntax.java
+++ b/javax/print/attribute/SetOfIntegerSyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/Size2DSyntax.java b/javax/print/attribute/Size2DSyntax.java
index 4b71fd6aa..c8d6ec781 100644
--- a/javax/print/attribute/Size2DSyntax.java
+++ b/javax/print/attribute/Size2DSyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/SupportedValuesAttribute.java b/javax/print/attribute/SupportedValuesAttribute.java
index 96d608219..d0f4b65c6 100644
--- a/javax/print/attribute/SupportedValuesAttribute.java
+++ b/javax/print/attribute/SupportedValuesAttribute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/TextSyntax.java b/javax/print/attribute/TextSyntax.java
index dda5cf5d4..98fabdc67 100644
--- a/javax/print/attribute/TextSyntax.java
+++ b/javax/print/attribute/TextSyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/URISyntax.java b/javax/print/attribute/URISyntax.java
index 56a25368f..f0583f7e5 100644
--- a/javax/print/attribute/URISyntax.java
+++ b/javax/print/attribute/URISyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/UnmodifiableSetException.java b/javax/print/attribute/UnmodifiableSetException.java
index 83d389d2b..678531769 100644
--- a/javax/print/attribute/UnmodifiableSetException.java
+++ b/javax/print/attribute/UnmodifiableSetException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/package.html b/javax/print/attribute/package.html
index 8ea172304..ba67d1a79 100644
--- a/javax/print/attribute/package.html
+++ b/javax/print/attribute/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Chromaticity.java b/javax/print/attribute/standard/Chromaticity.java
index 306cc38c8..3d336a482 100644
--- a/javax/print/attribute/standard/Chromaticity.java
+++ b/javax/print/attribute/standard/Chromaticity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/ColorSupported.java b/javax/print/attribute/standard/ColorSupported.java
index 7999d9f15..fad7ced01 100644
--- a/javax/print/attribute/standard/ColorSupported.java
+++ b/javax/print/attribute/standard/ColorSupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Compression.java b/javax/print/attribute/standard/Compression.java
index 743e6701f..112202a0b 100644
--- a/javax/print/attribute/standard/Compression.java
+++ b/javax/print/attribute/standard/Compression.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Copies.java b/javax/print/attribute/standard/Copies.java
index ad2a85ec2..7c5fdff0c 100644
--- a/javax/print/attribute/standard/Copies.java
+++ b/javax/print/attribute/standard/Copies.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/CopiesSupported.java b/javax/print/attribute/standard/CopiesSupported.java
index 15ed3b56d..8062ebca1 100644
--- a/javax/print/attribute/standard/CopiesSupported.java
+++ b/javax/print/attribute/standard/CopiesSupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/DateTimeAtCompleted.java b/javax/print/attribute/standard/DateTimeAtCompleted.java
index 7553989e2..fbb9e084a 100644
--- a/javax/print/attribute/standard/DateTimeAtCompleted.java
+++ b/javax/print/attribute/standard/DateTimeAtCompleted.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/DateTimeAtCreation.java b/javax/print/attribute/standard/DateTimeAtCreation.java
index df8463b2c..b98af57a7 100644
--- a/javax/print/attribute/standard/DateTimeAtCreation.java
+++ b/javax/print/attribute/standard/DateTimeAtCreation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/DateTimeAtProcessing.java b/javax/print/attribute/standard/DateTimeAtProcessing.java
index b2a96be36..ff537b98a 100644
--- a/javax/print/attribute/standard/DateTimeAtProcessing.java
+++ b/javax/print/attribute/standard/DateTimeAtProcessing.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Destination.java b/javax/print/attribute/standard/Destination.java
index 6d723ccb9..c2da19926 100644
--- a/javax/print/attribute/standard/Destination.java
+++ b/javax/print/attribute/standard/Destination.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/DocumentName.java b/javax/print/attribute/standard/DocumentName.java
index 91f41c48f..2c472aa20 100644
--- a/javax/print/attribute/standard/DocumentName.java
+++ b/javax/print/attribute/standard/DocumentName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Fidelity.java b/javax/print/attribute/standard/Fidelity.java
index d10077ff5..9b26906fd 100644
--- a/javax/print/attribute/standard/Fidelity.java
+++ b/javax/print/attribute/standard/Fidelity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Finishings.java b/javax/print/attribute/standard/Finishings.java
index 117e6b200..1224c1da1 100644
--- a/javax/print/attribute/standard/Finishings.java
+++ b/javax/print/attribute/standard/Finishings.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobHoldUntil.java b/javax/print/attribute/standard/JobHoldUntil.java
index 31f9b924f..5f0546382 100644
--- a/javax/print/attribute/standard/JobHoldUntil.java
+++ b/javax/print/attribute/standard/JobHoldUntil.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobImpressions.java b/javax/print/attribute/standard/JobImpressions.java
index e06c4a4fc..a29c24cd4 100644
--- a/javax/print/attribute/standard/JobImpressions.java
+++ b/javax/print/attribute/standard/JobImpressions.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobImpressionsCompleted.java b/javax/print/attribute/standard/JobImpressionsCompleted.java
index 0d41b1eaf..d1b3e964e 100644
--- a/javax/print/attribute/standard/JobImpressionsCompleted.java
+++ b/javax/print/attribute/standard/JobImpressionsCompleted.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobImpressionsSupported.java b/javax/print/attribute/standard/JobImpressionsSupported.java
index 9090cbc96..0ba7089c6 100644
--- a/javax/print/attribute/standard/JobImpressionsSupported.java
+++ b/javax/print/attribute/standard/JobImpressionsSupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobKOctets.java b/javax/print/attribute/standard/JobKOctets.java
index b26ba1177..71f02c577 100644
--- a/javax/print/attribute/standard/JobKOctets.java
+++ b/javax/print/attribute/standard/JobKOctets.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobKOctetsProcessed.java b/javax/print/attribute/standard/JobKOctetsProcessed.java
index 319856eae..7561222ca 100644
--- a/javax/print/attribute/standard/JobKOctetsProcessed.java
+++ b/javax/print/attribute/standard/JobKOctetsProcessed.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobKOctetsSupported.java b/javax/print/attribute/standard/JobKOctetsSupported.java
index ba0389801..303dc953b 100644
--- a/javax/print/attribute/standard/JobKOctetsSupported.java
+++ b/javax/print/attribute/standard/JobKOctetsSupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobMediaSheets.java b/javax/print/attribute/standard/JobMediaSheets.java
index be73b8844..662c54acb 100644
--- a/javax/print/attribute/standard/JobMediaSheets.java
+++ b/javax/print/attribute/standard/JobMediaSheets.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobMediaSheetsCompleted.java b/javax/print/attribute/standard/JobMediaSheetsCompleted.java
index c28488ee8..09b82bfcd 100644
--- a/javax/print/attribute/standard/JobMediaSheetsCompleted.java
+++ b/javax/print/attribute/standard/JobMediaSheetsCompleted.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobMediaSheetsSupported.java b/javax/print/attribute/standard/JobMediaSheetsSupported.java
index 93900653b..392fe7ed7 100644
--- a/javax/print/attribute/standard/JobMediaSheetsSupported.java
+++ b/javax/print/attribute/standard/JobMediaSheetsSupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobMessageFromOperator.java b/javax/print/attribute/standard/JobMessageFromOperator.java
index 66429cae9..84eab8b62 100644
--- a/javax/print/attribute/standard/JobMessageFromOperator.java
+++ b/javax/print/attribute/standard/JobMessageFromOperator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobName.java b/javax/print/attribute/standard/JobName.java
index ca4303894..a64a88cf3 100644
--- a/javax/print/attribute/standard/JobName.java
+++ b/javax/print/attribute/standard/JobName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobOriginatingUserName.java b/javax/print/attribute/standard/JobOriginatingUserName.java
index 1810df808..116de28cf 100644
--- a/javax/print/attribute/standard/JobOriginatingUserName.java
+++ b/javax/print/attribute/standard/JobOriginatingUserName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobPriority.java b/javax/print/attribute/standard/JobPriority.java
index e4e4bf70c..6c88dfc9e 100644
--- a/javax/print/attribute/standard/JobPriority.java
+++ b/javax/print/attribute/standard/JobPriority.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobPrioritySupported.java b/javax/print/attribute/standard/JobPrioritySupported.java
index 0ff1aa5ac..fdfe6c7c5 100644
--- a/javax/print/attribute/standard/JobPrioritySupported.java
+++ b/javax/print/attribute/standard/JobPrioritySupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobSheets.java b/javax/print/attribute/standard/JobSheets.java
index 0e1d12e4c..183aed2a1 100644
--- a/javax/print/attribute/standard/JobSheets.java
+++ b/javax/print/attribute/standard/JobSheets.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobState.java b/javax/print/attribute/standard/JobState.java
index c0b2ac02b..1350e697f 100644
--- a/javax/print/attribute/standard/JobState.java
+++ b/javax/print/attribute/standard/JobState.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobStateReason.java b/javax/print/attribute/standard/JobStateReason.java
index e2cff0106..4a9f1a91a 100644
--- a/javax/print/attribute/standard/JobStateReason.java
+++ b/javax/print/attribute/standard/JobStateReason.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/JobStateReasons.java b/javax/print/attribute/standard/JobStateReasons.java
index 4b82002f9..39187373d 100644
--- a/javax/print/attribute/standard/JobStateReasons.java
+++ b/javax/print/attribute/standard/JobStateReasons.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Media.java b/javax/print/attribute/standard/Media.java
index c56da91ee..ebb15d0d0 100644
--- a/javax/print/attribute/standard/Media.java
+++ b/javax/print/attribute/standard/Media.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/MediaPrintableArea.java b/javax/print/attribute/standard/MediaPrintableArea.java
index cc1a07e13..c7cf8d3a9 100644
--- a/javax/print/attribute/standard/MediaPrintableArea.java
+++ b/javax/print/attribute/standard/MediaPrintableArea.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/MediaSize.java b/javax/print/attribute/standard/MediaSize.java
index 35a6d3e94..6abf97974 100644
--- a/javax/print/attribute/standard/MediaSize.java
+++ b/javax/print/attribute/standard/MediaSize.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/MediaSizeName.java b/javax/print/attribute/standard/MediaSizeName.java
index 1d7469019..9990a2def 100644
--- a/javax/print/attribute/standard/MediaSizeName.java
+++ b/javax/print/attribute/standard/MediaSizeName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/MultipleDocumentHandling.java b/javax/print/attribute/standard/MultipleDocumentHandling.java
index e213e18e8..8298092b0 100644
--- a/javax/print/attribute/standard/MultipleDocumentHandling.java
+++ b/javax/print/attribute/standard/MultipleDocumentHandling.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/NumberOfDocuments.java b/javax/print/attribute/standard/NumberOfDocuments.java
index 9369e7e03..cf2e9dcca 100644
--- a/javax/print/attribute/standard/NumberOfDocuments.java
+++ b/javax/print/attribute/standard/NumberOfDocuments.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/NumberOfInterveningJobs.java b/javax/print/attribute/standard/NumberOfInterveningJobs.java
index fd3f1e14d..1da2e1b46 100644
--- a/javax/print/attribute/standard/NumberOfInterveningJobs.java
+++ b/javax/print/attribute/standard/NumberOfInterveningJobs.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/NumberUp.java b/javax/print/attribute/standard/NumberUp.java
index 8770cdd62..4dee55394 100644
--- a/javax/print/attribute/standard/NumberUp.java
+++ b/javax/print/attribute/standard/NumberUp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/NumberUpSupported.java b/javax/print/attribute/standard/NumberUpSupported.java
index 70fbab2de..512bdaa00 100644
--- a/javax/print/attribute/standard/NumberUpSupported.java
+++ b/javax/print/attribute/standard/NumberUpSupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/OrientationRequested.java b/javax/print/attribute/standard/OrientationRequested.java
index 41f6b50c2..ca63fffda 100644
--- a/javax/print/attribute/standard/OrientationRequested.java
+++ b/javax/print/attribute/standard/OrientationRequested.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/OutputDeviceAssigned.java b/javax/print/attribute/standard/OutputDeviceAssigned.java
index 93a53e0c6..4bc1f6c83 100644
--- a/javax/print/attribute/standard/OutputDeviceAssigned.java
+++ b/javax/print/attribute/standard/OutputDeviceAssigned.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PDLOverrideSupported.java b/javax/print/attribute/standard/PDLOverrideSupported.java
index e65b67f4f..798653904 100644
--- a/javax/print/attribute/standard/PDLOverrideSupported.java
+++ b/javax/print/attribute/standard/PDLOverrideSupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PageRanges.java b/javax/print/attribute/standard/PageRanges.java
index 3445c93f0..2b3c632e2 100644
--- a/javax/print/attribute/standard/PageRanges.java
+++ b/javax/print/attribute/standard/PageRanges.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PagesPerMinute.java b/javax/print/attribute/standard/PagesPerMinute.java
index b6b7a1d08..db2658a7f 100644
--- a/javax/print/attribute/standard/PagesPerMinute.java
+++ b/javax/print/attribute/standard/PagesPerMinute.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PagesPerMinuteColor.java b/javax/print/attribute/standard/PagesPerMinuteColor.java
index 12c4f338e..85421d70d 100644
--- a/javax/print/attribute/standard/PagesPerMinuteColor.java
+++ b/javax/print/attribute/standard/PagesPerMinuteColor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PresentationDirection.java b/javax/print/attribute/standard/PresentationDirection.java
index 0a13288bd..bd1821d12 100644
--- a/javax/print/attribute/standard/PresentationDirection.java
+++ b/javax/print/attribute/standard/PresentationDirection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrintQuality.java b/javax/print/attribute/standard/PrintQuality.java
index be78cab9e..63be24e70 100644
--- a/javax/print/attribute/standard/PrintQuality.java
+++ b/javax/print/attribute/standard/PrintQuality.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterInfo.java b/javax/print/attribute/standard/PrinterInfo.java
index cca88c1e8..66199c482 100644
--- a/javax/print/attribute/standard/PrinterInfo.java
+++ b/javax/print/attribute/standard/PrinterInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterIsAcceptingJobs.java b/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
index dac567262..19b555a36 100644
--- a/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
+++ b/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterLocation.java b/javax/print/attribute/standard/PrinterLocation.java
index 1037677f6..f342e8c4b 100644
--- a/javax/print/attribute/standard/PrinterLocation.java
+++ b/javax/print/attribute/standard/PrinterLocation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterMakeAndModel.java b/javax/print/attribute/standard/PrinterMakeAndModel.java
index 517fa4205..c3f3a6388 100644
--- a/javax/print/attribute/standard/PrinterMakeAndModel.java
+++ b/javax/print/attribute/standard/PrinterMakeAndModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterMessageFromOperator.java b/javax/print/attribute/standard/PrinterMessageFromOperator.java
index 50e9273c0..d231eb2aa 100644
--- a/javax/print/attribute/standard/PrinterMessageFromOperator.java
+++ b/javax/print/attribute/standard/PrinterMessageFromOperator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterMoreInfo.java b/javax/print/attribute/standard/PrinterMoreInfo.java
index 5aa53cc68..b0cf97397 100644
--- a/javax/print/attribute/standard/PrinterMoreInfo.java
+++ b/javax/print/attribute/standard/PrinterMoreInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java b/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
index 83dba0871..0a39b866c 100644
--- a/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
+++ b/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterName.java b/javax/print/attribute/standard/PrinterName.java
index a2bdc9b8e..d3b495bdb 100644
--- a/javax/print/attribute/standard/PrinterName.java
+++ b/javax/print/attribute/standard/PrinterName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterResolution.java b/javax/print/attribute/standard/PrinterResolution.java
index 10a20d9a9..6a237a8c3 100644
--- a/javax/print/attribute/standard/PrinterResolution.java
+++ b/javax/print/attribute/standard/PrinterResolution.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterState.java b/javax/print/attribute/standard/PrinterState.java
index 3d3e7bef6..28d78cd50 100644
--- a/javax/print/attribute/standard/PrinterState.java
+++ b/javax/print/attribute/standard/PrinterState.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterStateReason.java b/javax/print/attribute/standard/PrinterStateReason.java
index c471d8f41..847395e49 100644
--- a/javax/print/attribute/standard/PrinterStateReason.java
+++ b/javax/print/attribute/standard/PrinterStateReason.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterStateReasons.java b/javax/print/attribute/standard/PrinterStateReasons.java
index 7e33e7761..d81313f7c 100644
--- a/javax/print/attribute/standard/PrinterStateReasons.java
+++ b/javax/print/attribute/standard/PrinterStateReasons.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/PrinterURI.java b/javax/print/attribute/standard/PrinterURI.java
index a3e2ceb58..e4c89a5c8 100644
--- a/javax/print/attribute/standard/PrinterURI.java
+++ b/javax/print/attribute/standard/PrinterURI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/QueuedJobCount.java b/javax/print/attribute/standard/QueuedJobCount.java
index 3a0fd8781..7ee0f7c35 100644
--- a/javax/print/attribute/standard/QueuedJobCount.java
+++ b/javax/print/attribute/standard/QueuedJobCount.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/ReferenceUriSchemesSupported.java b/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
index 096d2fefd..b4c0d9408 100644
--- a/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
+++ b/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/RequestingUserName.java b/javax/print/attribute/standard/RequestingUserName.java
index 3de3903f7..bca7fbbb4 100644
--- a/javax/print/attribute/standard/RequestingUserName.java
+++ b/javax/print/attribute/standard/RequestingUserName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Severity.java b/javax/print/attribute/standard/Severity.java
index 994977374..c34ed3e29 100644
--- a/javax/print/attribute/standard/Severity.java
+++ b/javax/print/attribute/standard/Severity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/SheetCollate.java b/javax/print/attribute/standard/SheetCollate.java
index 1f14cdb67..a4e31f443 100644
--- a/javax/print/attribute/standard/SheetCollate.java
+++ b/javax/print/attribute/standard/SheetCollate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/Sides.java b/javax/print/attribute/standard/Sides.java
index 6543f5d11..94b473c33 100644
--- a/javax/print/attribute/standard/Sides.java
+++ b/javax/print/attribute/standard/Sides.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/attribute/standard/package.html b/javax/print/attribute/standard/package.html
index e0608679b..9d2d97009 100644
--- a/javax/print/attribute/standard/package.html
+++ b/javax/print/attribute/standard/package.html
@@ -17,8 +17,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/PrintEvent.java b/javax/print/event/PrintEvent.java
index 3fff4e579..cbf93852c 100644
--- a/javax/print/event/PrintEvent.java
+++ b/javax/print/event/PrintEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/PrintJobAdapter.java b/javax/print/event/PrintJobAdapter.java
index 603b17508..3615108f9 100644
--- a/javax/print/event/PrintJobAdapter.java
+++ b/javax/print/event/PrintJobAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/PrintJobAttributeEvent.java b/javax/print/event/PrintJobAttributeEvent.java
index 246c691a6..0914aea9f 100644
--- a/javax/print/event/PrintJobAttributeEvent.java
+++ b/javax/print/event/PrintJobAttributeEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/PrintJobAttributeListener.java b/javax/print/event/PrintJobAttributeListener.java
index 7dfcc5d50..ee816d22a 100644
--- a/javax/print/event/PrintJobAttributeListener.java
+++ b/javax/print/event/PrintJobAttributeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/PrintJobEvent.java b/javax/print/event/PrintJobEvent.java
index 467bfa090..c4b7cd6f9 100644
--- a/javax/print/event/PrintJobEvent.java
+++ b/javax/print/event/PrintJobEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/PrintJobListener.java b/javax/print/event/PrintJobListener.java
index 1aad06879..d1dcf42be 100644
--- a/javax/print/event/PrintJobListener.java
+++ b/javax/print/event/PrintJobListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/PrintServiceAttributeEvent.java b/javax/print/event/PrintServiceAttributeEvent.java
index a9162c89f..d3981747f 100644
--- a/javax/print/event/PrintServiceAttributeEvent.java
+++ b/javax/print/event/PrintServiceAttributeEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/PrintServiceAttributeListener.java b/javax/print/event/PrintServiceAttributeListener.java
index d066019ec..e43d9ad65 100644
--- a/javax/print/event/PrintServiceAttributeListener.java
+++ b/javax/print/event/PrintServiceAttributeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/event/package.html b/javax/print/event/package.html
index 16c929fef..52a298a68 100644
--- a/javax/print/event/package.html
+++ b/javax/print/event/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/print/package.html b/javax/print/package.html
index ec4a6482f..dfa4b0f8d 100644
--- a/javax/print/package.html
+++ b/javax/print/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/ClassDesc.java b/javax/rmi/CORBA/ClassDesc.java
index 052046df9..01befa493 100644
--- a/javax/rmi/CORBA/ClassDesc.java
+++ b/javax/rmi/CORBA/ClassDesc.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/PortableRemoteObjectDelegate.java b/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
index 7798a4666..9ae45a33d 100644
--- a/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
+++ b/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/Stub.java b/javax/rmi/CORBA/Stub.java
index 9e0edc847..a35a08fa9 100644
--- a/javax/rmi/CORBA/Stub.java
+++ b/javax/rmi/CORBA/Stub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/StubDelegate.java b/javax/rmi/CORBA/StubDelegate.java
index 6c7f69fe7..5c00a038f 100644
--- a/javax/rmi/CORBA/StubDelegate.java
+++ b/javax/rmi/CORBA/StubDelegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/Tie.java b/javax/rmi/CORBA/Tie.java
index ca14e3d42..4b1984c58 100644
--- a/javax/rmi/CORBA/Tie.java
+++ b/javax/rmi/CORBA/Tie.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/Util.java b/javax/rmi/CORBA/Util.java
index 34e05dafd..0370cce83 100644
--- a/javax/rmi/CORBA/Util.java
+++ b/javax/rmi/CORBA/Util.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/UtilDelegate.java b/javax/rmi/CORBA/UtilDelegate.java
index fac60d542..deeb94f68 100644
--- a/javax/rmi/CORBA/UtilDelegate.java
+++ b/javax/rmi/CORBA/UtilDelegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/ValueHandler.java b/javax/rmi/CORBA/ValueHandler.java
index fe9800221..f26e75b2a 100644
--- a/javax/rmi/CORBA/ValueHandler.java
+++ b/javax/rmi/CORBA/ValueHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/CORBA/package.html b/javax/rmi/CORBA/package.html
index c80400db4..f5a5ac758 100644
--- a/javax/rmi/CORBA/package.html
+++ b/javax/rmi/CORBA/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/PortableRemoteObject.java b/javax/rmi/PortableRemoteObject.java
index f95dafd6b..5e5d1fd29 100644
--- a/javax/rmi/PortableRemoteObject.java
+++ b/javax/rmi/PortableRemoteObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/rmi/package.html b/javax/rmi/package.html
index e853317ce..febf59bd6 100644
--- a/javax/rmi/package.html
+++ b/javax/rmi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/AuthPermission.java b/javax/security/auth/AuthPermission.java
index b4ffa15a9..176ed9fb4 100644
--- a/javax/security/auth/AuthPermission.java
+++ b/javax/security/auth/AuthPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/DestroyFailedException.java b/javax/security/auth/DestroyFailedException.java
index 00bbd8966..98de82bd4 100644
--- a/javax/security/auth/DestroyFailedException.java
+++ b/javax/security/auth/DestroyFailedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/Destroyable.java b/javax/security/auth/Destroyable.java
index 484bece8d..1ebd85c07 100644
--- a/javax/security/auth/Destroyable.java
+++ b/javax/security/auth/Destroyable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/Policy.java b/javax/security/auth/Policy.java
index 2234d8573..4da9a84df 100644
--- a/javax/security/auth/Policy.java
+++ b/javax/security/auth/Policy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/PrivateCredentialPermission.java b/javax/security/auth/PrivateCredentialPermission.java
index c8573f79e..1982eef3d 100644
--- a/javax/security/auth/PrivateCredentialPermission.java
+++ b/javax/security/auth/PrivateCredentialPermission.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/RefreshFailedException.java b/javax/security/auth/RefreshFailedException.java
index 5be9ab75e..6b8f94dcd 100644
--- a/javax/security/auth/RefreshFailedException.java
+++ b/javax/security/auth/RefreshFailedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/Refreshable.java b/javax/security/auth/Refreshable.java
index b3ceded41..14d766079 100644
--- a/javax/security/auth/Refreshable.java
+++ b/javax/security/auth/Refreshable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/Subject.java b/javax/security/auth/Subject.java
index 37baecc8a..4e35a645d 100644
--- a/javax/security/auth/Subject.java
+++ b/javax/security/auth/Subject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/SubjectDomainCombiner.java b/javax/security/auth/SubjectDomainCombiner.java
index 194e1130a..94a7160eb 100644
--- a/javax/security/auth/SubjectDomainCombiner.java
+++ b/javax/security/auth/SubjectDomainCombiner.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/Callback.java b/javax/security/auth/callback/Callback.java
index 71932cb0f..359828e1a 100644
--- a/javax/security/auth/callback/Callback.java
+++ b/javax/security/auth/callback/Callback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/CallbackHandler.java b/javax/security/auth/callback/CallbackHandler.java
index ed1195a89..8d22943ca 100644
--- a/javax/security/auth/callback/CallbackHandler.java
+++ b/javax/security/auth/callback/CallbackHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/ChoiceCallback.java b/javax/security/auth/callback/ChoiceCallback.java
index 8fd038edf..ec12a6685 100644
--- a/javax/security/auth/callback/ChoiceCallback.java
+++ b/javax/security/auth/callback/ChoiceCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/ConfirmationCallback.java b/javax/security/auth/callback/ConfirmationCallback.java
index aa912189f..938b30173 100644
--- a/javax/security/auth/callback/ConfirmationCallback.java
+++ b/javax/security/auth/callback/ConfirmationCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/LanguageCallback.java b/javax/security/auth/callback/LanguageCallback.java
index b53149adc..e0190e6cc 100644
--- a/javax/security/auth/callback/LanguageCallback.java
+++ b/javax/security/auth/callback/LanguageCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/NameCallback.java b/javax/security/auth/callback/NameCallback.java
index 094349e19..0e281d1cc 100644
--- a/javax/security/auth/callback/NameCallback.java
+++ b/javax/security/auth/callback/NameCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/PasswordCallback.java b/javax/security/auth/callback/PasswordCallback.java
index 7e5f9cb7c..e8c862aca 100644
--- a/javax/security/auth/callback/PasswordCallback.java
+++ b/javax/security/auth/callback/PasswordCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/TextInputCallback.java b/javax/security/auth/callback/TextInputCallback.java
index 01b544cb2..98b0ae3c1 100644
--- a/javax/security/auth/callback/TextInputCallback.java
+++ b/javax/security/auth/callback/TextInputCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/TextOutputCallback.java b/javax/security/auth/callback/TextOutputCallback.java
index 47202bcaa..197cece5f 100644
--- a/javax/security/auth/callback/TextOutputCallback.java
+++ b/javax/security/auth/callback/TextOutputCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/UnsupportedCallbackException.java b/javax/security/auth/callback/UnsupportedCallbackException.java
index 167a5e236..f5308b9ea 100644
--- a/javax/security/auth/callback/UnsupportedCallbackException.java
+++ b/javax/security/auth/callback/UnsupportedCallbackException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/callback/package.html b/javax/security/auth/callback/package.html
index 2d1c84cef..f927f1c30 100644
--- a/javax/security/auth/callback/package.html
+++ b/javax/security/auth/callback/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/AccountExpiredException.java b/javax/security/auth/login/AccountExpiredException.java
index e8e331347..74a97a7dd 100644
--- a/javax/security/auth/login/AccountExpiredException.java
+++ b/javax/security/auth/login/AccountExpiredException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/AppConfigurationEntry.java b/javax/security/auth/login/AppConfigurationEntry.java
index 1879a68c1..557d3d7f8 100644
--- a/javax/security/auth/login/AppConfigurationEntry.java
+++ b/javax/security/auth/login/AppConfigurationEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/Configuration.java b/javax/security/auth/login/Configuration.java
index 4425770d6..1e0d272f1 100644
--- a/javax/security/auth/login/Configuration.java
+++ b/javax/security/auth/login/Configuration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/CredentialExpiredException.java b/javax/security/auth/login/CredentialExpiredException.java
index df643ba69..03f7ec964 100644
--- a/javax/security/auth/login/CredentialExpiredException.java
+++ b/javax/security/auth/login/CredentialExpiredException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/FailedLoginException.java b/javax/security/auth/login/FailedLoginException.java
index 384ade084..db975fbdd 100644
--- a/javax/security/auth/login/FailedLoginException.java
+++ b/javax/security/auth/login/FailedLoginException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/LoginContext.java b/javax/security/auth/login/LoginContext.java
index aa4d611d9..8fc2ca759 100644
--- a/javax/security/auth/login/LoginContext.java
+++ b/javax/security/auth/login/LoginContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/LoginException.java b/javax/security/auth/login/LoginException.java
index 878120381..46ec33aed 100644
--- a/javax/security/auth/login/LoginException.java
+++ b/javax/security/auth/login/LoginException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/NullConfiguration.java b/javax/security/auth/login/NullConfiguration.java
index 011f9a63a..a3f0c9943 100644
--- a/javax/security/auth/login/NullConfiguration.java
+++ b/javax/security/auth/login/NullConfiguration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/login/package.html b/javax/security/auth/login/package.html
index 4b887f0bd..dcb7710cc 100644
--- a/javax/security/auth/login/package.html
+++ b/javax/security/auth/login/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/package.html b/javax/security/auth/package.html
index a81188d19..9888552c9 100644
--- a/javax/security/auth/package.html
+++ b/javax/security/auth/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/spi/LoginModule.java b/javax/security/auth/spi/LoginModule.java
index 4f9cc4017..00b33c517 100644
--- a/javax/security/auth/spi/LoginModule.java
+++ b/javax/security/auth/spi/LoginModule.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/spi/package.html b/javax/security/auth/spi/package.html
index 2c6d6b3d1..9f3de395e 100644
--- a/javax/security/auth/spi/package.html
+++ b/javax/security/auth/spi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/x500/X500Principal.java b/javax/security/auth/x500/X500Principal.java
index e9032ffaf..dbe8b9c86 100644
--- a/javax/security/auth/x500/X500Principal.java
+++ b/javax/security/auth/x500/X500Principal.java
@@ -1,5 +1,5 @@
/* X500Principal.java -- X.500 principal.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -209,7 +209,7 @@ public final class X500Principal implements Principal, Serializable
str.append ("OU");
else if (oid.equals (DC) && rfc2253)
str.append ("DC");
- else if (oid.equals ("UID") && rfc2253)
+ else if (oid.equals (UID) && rfc2253)
str.append ("UID");
else
str.append (oid.toString());
diff --git a/javax/security/auth/x500/X500PrivateCredential.java b/javax/security/auth/x500/X500PrivateCredential.java
index b2eeb8da8..8cba93c6f 100644
--- a/javax/security/auth/x500/X500PrivateCredential.java
+++ b/javax/security/auth/x500/X500PrivateCredential.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/auth/x500/package.html b/javax/security/auth/x500/package.html
index fefcf8f74..449be814f 100644
--- a/javax/security/auth/x500/package.html
+++ b/javax/security/auth/x500/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/Certificate.java b/javax/security/cert/Certificate.java
index 8090817fc..50c7340fb 100644
--- a/javax/security/cert/Certificate.java
+++ b/javax/security/cert/Certificate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/CertificateEncodingException.java b/javax/security/cert/CertificateEncodingException.java
index 81c85dd9f..47aedcf05 100644
--- a/javax/security/cert/CertificateEncodingException.java
+++ b/javax/security/cert/CertificateEncodingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/CertificateException.java b/javax/security/cert/CertificateException.java
index 4e79a3120..270cc926f 100644
--- a/javax/security/cert/CertificateException.java
+++ b/javax/security/cert/CertificateException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/CertificateExpiredException.java b/javax/security/cert/CertificateExpiredException.java
index 53b0cc007..3a8c0515e 100644
--- a/javax/security/cert/CertificateExpiredException.java
+++ b/javax/security/cert/CertificateExpiredException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/CertificateNotYetValidException.java b/javax/security/cert/CertificateNotYetValidException.java
index 56c8aeb7f..22a7c4a22 100644
--- a/javax/security/cert/CertificateNotYetValidException.java
+++ b/javax/security/cert/CertificateNotYetValidException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/CertificateParsingException.java b/javax/security/cert/CertificateParsingException.java
index 17012e2f1..f359f8d7a 100644
--- a/javax/security/cert/CertificateParsingException.java
+++ b/javax/security/cert/CertificateParsingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/X509CertBridge.java b/javax/security/cert/X509CertBridge.java
index 9db2c4829..36fc4202a 100644
--- a/javax/security/cert/X509CertBridge.java
+++ b/javax/security/cert/X509CertBridge.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/X509Certificate.java b/javax/security/cert/X509Certificate.java
index f22573f40..e7f6b05e4 100644
--- a/javax/security/cert/X509Certificate.java
+++ b/javax/security/cert/X509Certificate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/cert/package.html b/javax/security/cert/package.html
index cccdf5f80..7c6e88717 100644
--- a/javax/security/cert/package.html
+++ b/javax/security/cert/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/package.html b/javax/security/package.html
index 619654641..bbc295674 100644
--- a/javax/security/package.html
+++ b/javax/security/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/AuthenticationException.java b/javax/security/sasl/AuthenticationException.java
index b215f4137..12a8fe052 100644
--- a/javax/security/sasl/AuthenticationException.java
+++ b/javax/security/sasl/AuthenticationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/AuthorizeCallback.java b/javax/security/sasl/AuthorizeCallback.java
index d32f03be1..bf1b8470d 100644
--- a/javax/security/sasl/AuthorizeCallback.java
+++ b/javax/security/sasl/AuthorizeCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/RealmCallback.java b/javax/security/sasl/RealmCallback.java
index 26712e020..12d834054 100644
--- a/javax/security/sasl/RealmCallback.java
+++ b/javax/security/sasl/RealmCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/RealmChoiceCallback.java b/javax/security/sasl/RealmChoiceCallback.java
index 40203d1f4..d16e61f6a 100644
--- a/javax/security/sasl/RealmChoiceCallback.java
+++ b/javax/security/sasl/RealmChoiceCallback.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/Sasl.java b/javax/security/sasl/Sasl.java
index 257198b0e..058e4f6e1 100644
--- a/javax/security/sasl/Sasl.java
+++ b/javax/security/sasl/Sasl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -448,7 +448,7 @@ public class Sasl
HashSet names = new HashSet();
Provider[] providers = Security.getProviders();
Iterator it;
- if (providers == null)
+ if (providers != null)
{
Provider p;
String key;
@@ -640,7 +640,7 @@ public class Sasl
HashSet names = new HashSet();
Provider[] providers = Security.getProviders();
Iterator it;
- if (providers == null)
+ if (providers != null)
{
Provider p;
String key;
diff --git a/javax/security/sasl/SaslClient.java b/javax/security/sasl/SaslClient.java
index 04e97479a..544ab17d6 100644
--- a/javax/security/sasl/SaslClient.java
+++ b/javax/security/sasl/SaslClient.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/SaslClientFactory.java b/javax/security/sasl/SaslClientFactory.java
index 9f15f5919..d6e8cd5ff 100644
--- a/javax/security/sasl/SaslClientFactory.java
+++ b/javax/security/sasl/SaslClientFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/SaslException.java b/javax/security/sasl/SaslException.java
index 12fbf1b54..13113e6bc 100644
--- a/javax/security/sasl/SaslException.java
+++ b/javax/security/sasl/SaslException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/SaslServer.java b/javax/security/sasl/SaslServer.java
index 0395c78d7..f5a04975d 100644
--- a/javax/security/sasl/SaslServer.java
+++ b/javax/security/sasl/SaslServer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/SaslServerFactory.java b/javax/security/sasl/SaslServerFactory.java
index d2f279190..0fff32fa4 100644
--- a/javax/security/sasl/SaslServerFactory.java
+++ b/javax/security/sasl/SaslServerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/security/sasl/package.html b/javax/security/sasl/package.html
index e5627d2c8..4cde67043 100644
--- a/javax/security/sasl/package.html
+++ b/javax/security/sasl/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/ConnectionEvent.java b/javax/sql/ConnectionEvent.java
index b973dca3d..0d20b1afb 100644
--- a/javax/sql/ConnectionEvent.java
+++ b/javax/sql/ConnectionEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/ConnectionEventListener.java b/javax/sql/ConnectionEventListener.java
index b71531853..080118966 100644
--- a/javax/sql/ConnectionEventListener.java
+++ b/javax/sql/ConnectionEventListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/ConnectionPoolDataSource.java b/javax/sql/ConnectionPoolDataSource.java
index 7e70ce77c..99661d7f4 100644
--- a/javax/sql/ConnectionPoolDataSource.java
+++ b/javax/sql/ConnectionPoolDataSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/DataSource.java b/javax/sql/DataSource.java
index 3b6830f3d..de1bc8267 100644
--- a/javax/sql/DataSource.java
+++ b/javax/sql/DataSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/PooledConnection.java b/javax/sql/PooledConnection.java
index a1281192f..1fb23df14 100644
--- a/javax/sql/PooledConnection.java
+++ b/javax/sql/PooledConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/RowSet.java b/javax/sql/RowSet.java
index 085288d6e..46b776b3c 100644
--- a/javax/sql/RowSet.java
+++ b/javax/sql/RowSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/RowSetEvent.java b/javax/sql/RowSetEvent.java
index 357e999ac..26de4e973 100644
--- a/javax/sql/RowSetEvent.java
+++ b/javax/sql/RowSetEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/RowSetInternal.java b/javax/sql/RowSetInternal.java
index 8feaa27f9..1fdacb9e7 100644
--- a/javax/sql/RowSetInternal.java
+++ b/javax/sql/RowSetInternal.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/RowSetListener.java b/javax/sql/RowSetListener.java
index 6a6e619dd..86726747f 100644
--- a/javax/sql/RowSetListener.java
+++ b/javax/sql/RowSetListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/RowSetMetaData.java b/javax/sql/RowSetMetaData.java
index 7f7749234..8279fee39 100644
--- a/javax/sql/RowSetMetaData.java
+++ b/javax/sql/RowSetMetaData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/RowSetReader.java b/javax/sql/RowSetReader.java
index a5e0f81ff..fb33315b4 100644
--- a/javax/sql/RowSetReader.java
+++ b/javax/sql/RowSetReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/RowSetWriter.java b/javax/sql/RowSetWriter.java
index fe4c1e6a1..20c1034dd 100644
--- a/javax/sql/RowSetWriter.java
+++ b/javax/sql/RowSetWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/XAConnection.java b/javax/sql/XAConnection.java
index f1caa7884..2fadffcfe 100644
--- a/javax/sql/XAConnection.java
+++ b/javax/sql/XAConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/XADataSource.java b/javax/sql/XADataSource.java
index ef55a3280..724e2f08a 100644
--- a/javax/sql/XADataSource.java
+++ b/javax/sql/XADataSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/sql/package.html b/javax/sql/package.html
index 4015f5848..31be02623 100644
--- a/javax/sql/package.html
+++ b/javax/sql/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/AbstractAction.java b/javax/swing/AbstractAction.java
index c0ddf44ff..da65bdd1d 100644
--- a/javax/swing/AbstractAction.java
+++ b/javax/swing/AbstractAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,9 +48,9 @@ import java.util.HashMap;
import javax.swing.event.SwingPropertyChangeSupport;
/**
- * AbstractAction
- * @author Andrew Selkirk
- * @version 1.0
+ * A base class for implementing the {@link Action} interface.
+ *
+ * @author Andrew Selkirk
*/
public abstract class AbstractAction
implements Action, Cloneable, Serializable
@@ -58,12 +58,12 @@ public abstract class AbstractAction
private static final long serialVersionUID = -6803159439231523484L;
/**
- * enabled
+ * A flag that indicates whether or not the action is enabled.
*/
protected boolean enabled = true;
/**
- * changeSupport
+ * Provides support for property change event notification.
*/
protected SwingPropertyChangeSupport changeSupport =
new SwingPropertyChangeSupport(this);
@@ -74,7 +74,8 @@ public abstract class AbstractAction
private transient HashMap store = new HashMap();
/**
- * Constructor AbstractAction
+ * Creates a new action with an empty string for the name. All other
+ * properties are initialised to <code>null</code>
*/
public AbstractAction()
{
@@ -82,9 +83,10 @@ public abstract class AbstractAction
}
/**
- * Constructor AbstractAction
+ * Creates a new action with the specified name. All other properties are
+ * initialised to <code>null</code>.
*
- * @param name TODO
+ * @param name the name (<code>null</code> permitted).
*/
public AbstractAction(String name)
{
@@ -92,10 +94,11 @@ public abstract class AbstractAction
}
/**
- * Constructor AbstractAction
+ * Creates a new action with the specified name and icon. All other
+ * properties are initialised to <code>null</code>.
*
- * @param name TODO
- * @param icon TODO
+ * @param name the name (<code>null</code> permitted).
+ * @param icon the icon (<code>null</code> permitted).
*/
public AbstractAction(String name, Icon icon)
{
@@ -144,11 +147,12 @@ public abstract class AbstractAction
}
/**
- * Returns a value for a given key from the built-in store.
- *
- * @param key the key to get the value for
- *
- * @return Object
+ * Returns the value associated with the specified key.
+ *
+ * @param key the key (not <code>null</code>).
+ *
+ * @return The value associated with the specified key, or
+ * <code>null</code> if the key is not found.
*/
public Object getValue(String key)
{
@@ -156,10 +160,16 @@ public abstract class AbstractAction
}
/**
- * Puts a key/value pair into the built-in store.
- *
- * @param key the key
- * @param value the value
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+ * The standard keys are: {@link #NAME}, {@link #SHORT_DESCRIPTION},
+ * {@link #LONG_DESCRIPTION}, {@link #SMALL_ICON},
+ * {@link #ACTION_COMMAND_KEY}, {@link #ACCELERATOR_KEY} and
+ * {@link #MNEMONIC_KEY}. Any existing value associated with the key will be
+ * overwritten.
+ *
+ * @param key the key (not <code>null</code>).
+ * @param value the value (<code>null</code> permitted).
*/
public void putValue(String key, Object value)
{
@@ -172,9 +182,9 @@ public abstract class AbstractAction
}
/**
- * isEnabled
+ * Returns the flag that indicates whether or not the action is enabled.
*
- * @return boolean
+ * @return The flag.
*/
public boolean isEnabled()
{
@@ -182,9 +192,11 @@ public abstract class AbstractAction
}
/**
- * setEnabled
+ * Sets the flag that indicates whether or not the action is enabled and, if
+ * the value of the flag changed from the previous setting, sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
*
- * @param enabled TODO
+ * @param enabled the new flag value.
*/
public void setEnabled(boolean enabled)
{
diff --git a/javax/swing/AbstractButton.java b/javax/swing/AbstractButton.java
index 6f465b738..21c4fc0a2 100644
--- a/javax/swing/AbstractButton.java
+++ b/javax/swing/AbstractButton.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,9 +47,10 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
-import java.io.Serializable;
+import java.awt.image.ImageObserver;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.io.Serializable;
import javax.accessibility.AccessibleAction;
import javax.accessibility.AccessibleIcon;
@@ -64,18 +65,13 @@ import javax.swing.text.AttributeSet;
/**
- * <p>The purpose of this class is to serve as a facade over a number of
- * classes which collectively represent the semantics of a button: the
- * button's model, its listeners, its action, and its look and feel. Some
- * parts of a button's state are stored explicitly in this class, other
- * parts are delegates to the model. Some methods related to buttons are
- * implemented in this class, other methods pass through to the current
- * model or look and feel.</p>
+ * Provides an abstract implementation of common button behaviour,
+ * data model and look &amp; feel.
*
- * <p>Furthermore this class is supposed to serve as a base class for
+ * <p>This class is supposed to serve as a base class for
* several kinds of buttons with similar but non-identical semantics:
- * toggle buttons (radio buttons and checkboxes), simple "push" buttons,
- * menu items.</p>
+ * toggle buttons (radio buttons and checkboxes), simple push buttons,
+ * menu items, etc.</p>
*
* <p>Buttons have many properties, some of which are stored in this class
* while others are delegated to the button's model. The following properties
@@ -199,7 +195,10 @@ public abstract class AbstractButton extends JComponent
/** The text displayed in the button. */
String text;
- /** The gap between icon and text, if both icon and text are non-<code>null</code>. */
+ /**
+ * The gap between icon and text, if both icon and text are
+ * non-<code>null</code>.
+ */
int iconTextGap;
/** The vertical alignment of the button's text and icon. */
@@ -235,8 +234,10 @@ public abstract class AbstractButton extends JComponent
/** The margin between the button's border and its label. */
Insets margin;
- /** A hint to the look and feel class, suggesting which character in the
- * button's label should be underlined when drawing the label. */
+ /**
+ * A hint to the look and feel class, suggesting which character in the
+ * button's label should be underlined when drawing the label.
+ */
int mnemonicIndex;
/** Listener the button uses to receive ActionEvents from its model. */
@@ -248,39 +249,66 @@ public abstract class AbstractButton extends JComponent
/** Listener the button uses to receive ChangeEvents from its model. */
protected ChangeListener changeListener;
- /** The time in miliseconds in which clicks get coalesced into a single
- * <code>ActionEvent</code>. */
+ /**
+ * The time in miliseconds in which clicks get coalesced into a single
+ * <code>ActionEvent</code>.
+ */
long multiClickThreshhold;
- /** Listener the button uses to receive PropertyChangeEvents from its
- Action. */
+ /**
+ * Listener the button uses to receive PropertyChangeEvents from its
+ * Action.
+ */
PropertyChangeListener actionPropertyChangeListener;
/** ChangeEvent that is fired to button's ChangeEventListeners */
protected ChangeEvent changeEvent = new ChangeEvent(this);
- /** Fired in a PropertyChangeEvent when the "borderPainted" property changes. */
+ /**
+ * Fired in a PropertyChangeEvent when the "borderPainted" property changes.
+ */
public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted";
- /** Fired in a PropertyChangeEvent when the "contentAreaFilled" property changes. */
- public static final String CONTENT_AREA_FILLED_CHANGED_PROPERTY = "contentAreaFilled";
+ /**
+ * Fired in a PropertyChangeEvent when the "contentAreaFilled" property
+ * changes.
+ */
+ public static final String CONTENT_AREA_FILLED_CHANGED_PROPERTY =
+ "contentAreaFilled";
- /** Fired in a PropertyChangeEvent when the "disabledIcon" property changes. */
+ /**
+ * Fired in a PropertyChangeEvent when the "disabledIcon" property changes.
+ */
public static final String DISABLED_ICON_CHANGED_PROPERTY = "disabledIcon";
- /** Fired in a PropertyChangeEvent when the "disabledSelectedIcon" property changes. */
- public static final String DISABLED_SELECTED_ICON_CHANGED_PROPERTY = "disabledSelectedIcon";
+ /**
+ * Fired in a PropertyChangeEvent when the "disabledSelectedIcon" property
+ * changes.
+ */
+ public static final String DISABLED_SELECTED_ICON_CHANGED_PROPERTY =
+ "disabledSelectedIcon";
- /** Fired in a PropertyChangeEvent when the "focusPainted" property changes. */
+ /**
+ * Fired in a PropertyChangeEvent when the "focusPainted" property changes.
+ */
public static final String FOCUS_PAINTED_CHANGED_PROPERTY = "focusPainted";
- /** Fired in a PropertyChangeEvent when the "horizontalAlignment" property changes. */
- public static final String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY = "horizontalAlignment";
+ /**
+ * Fired in a PropertyChangeEvent when the "horizontalAlignment" property
+ * changes.
+ */
+ public static final String HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY =
+ "horizontalAlignment";
- /** Fired in a PropertyChangeEvent when the "horizontalTextPosition" property changes. */
- public static final String HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY = "horizontalTextPosition";
+ /**
+ * Fired in a PropertyChangeEvent when the "horizontalTextPosition" property
+ * changes.
+ */
+ public static final String HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY =
+ "horizontalTextPosition";
- /** Fired in a PropertyChangeEvent when the "icon" property changes. */
+ /**
+ * Fired in a PropertyChangeEvent when the "icon" property changes. */
public static final String ICON_CHANGED_PROPERTY = "icon";
/** Fired in a PropertyChangeEvent when the "margin" property changes. */
@@ -295,26 +323,46 @@ public abstract class AbstractButton extends JComponent
/** Fired in a PropertyChangeEvent when the "pressedIcon" property changes. */
public static final String PRESSED_ICON_CHANGED_PROPERTY = "pressedIcon";
- /** Fired in a PropertyChangeEvent when the "rolloverEnabled" property changes. */
- public static final String ROLLOVER_ENABLED_CHANGED_PROPERTY = "rolloverEnabled";
+ /**
+ * Fired in a PropertyChangeEvent when the "rolloverEnabled" property
+ * changes.
+ */
+ public static final String ROLLOVER_ENABLED_CHANGED_PROPERTY =
+ "rolloverEnabled";
- /** Fired in a PropertyChangeEvent when the "rolloverIcon" property changes. */
+ /**
+ * Fired in a PropertyChangeEvent when the "rolloverIcon" property changes.
+ */
public static final String ROLLOVER_ICON_CHANGED_PROPERTY = "rolloverIcon";
- /** Fired in a PropertyChangeEvent when the "rolloverSelectedIcon" property changes. */
- public static final String ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY = "rolloverSelectedIcon";
+ /**
+ * Fired in a PropertyChangeEvent when the "rolloverSelectedIcon" property
+ * changes.
+ */
+ public static final String ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY =
+ "rolloverSelectedIcon";
- /** Fired in a PropertyChangeEvent when the "selectedIcon" property changes. */
+ /**
+ * Fired in a PropertyChangeEvent when the "selectedIcon" property changes.
+ */
public static final String SELECTED_ICON_CHANGED_PROPERTY = "selectedIcon";
/** Fired in a PropertyChangeEvent when the "text" property changes. */
public static final String TEXT_CHANGED_PROPERTY = "text";
- /** Fired in a PropertyChangeEvent when the "verticalAlignment" property changes. */
- public static final String VERTICAL_ALIGNMENT_CHANGED_PROPERTY = "verticalAlignment";
+ /**
+ * Fired in a PropertyChangeEvent when the "verticalAlignment" property
+ * changes.
+ */
+ public static final String VERTICAL_ALIGNMENT_CHANGED_PROPERTY =
+ "verticalAlignment";
- /** Fired in a PropertyChangeEvent when the "verticalTextPosition" property changes. */
- public static final String VERTICAL_TEXT_POSITION_CHANGED_PROPERTY = "verticalTextPosition";
+ /**
+ * Fired in a PropertyChangeEvent when the "verticalTextPosition" property
+ * changes.
+ */
+ public static final String VERTICAL_TEXT_POSITION_CHANGED_PROPERTY =
+ "verticalTextPosition";
/**
* A Java Accessibility extension of the AbstractButton.
@@ -465,18 +513,7 @@ public abstract class AbstractButton extends JComponent
*/
public AbstractButton()
{
- this("",null);
- }
-
- /**
- * Creates a new AbstractButton object.
- *
- * @param txt Value to use for the button's "text" property
- * @param icon Value to use for the button's "defaultIcon" property
- */
- AbstractButton(String txt, Icon icon)
- {
- init (txt, icon);
+ init("", null);
updateUI();
}
@@ -523,8 +560,16 @@ public abstract class AbstractButton extends JComponent
protected void init(String text, Icon icon)
{
- this.text = text;
- default_icon = icon;
+ // If text is null, we fall back to the empty
+ // string (which is set using AbstractButton's
+ // constructor).
+ // This way the behavior of the JDK is matched.
+ if(text != null)
+ this.text = text;
+
+ if (icon != null)
+ default_icon = icon;
+
actionListener = createActionListener();
changeListener = createChangeListener();
itemListener = createItemListener();
@@ -546,24 +591,31 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Get the action command string for this button's model.
+ * <p>Returns the action command string for this button's model.</p>
+ *
+ * <p>If the action command was set to <code>null</code>, the button's
+ * text (label) is returned instead.</p>
*
* @return The current action command string from the button's model
*/
public String getActionCommand()
{
- return getModel().getActionCommand();
+ String ac = model.getActionCommand();
+ if (ac != null)
+ return ac;
+ else
+ return text;
}
/**
- * Set the action command string for this button's model.
+ * Sets the action command string for this button's model.
*
- * @param aCommand The new action command string to set in the button's
+ * @param actionCommand The new action command string to set in the button's
* model.
*/
- public void setActionCommand(String aCommand)
+ public void setActionCommand(String actionCommand)
{
- getModel().setActionCommand(aCommand);
+ model.setActionCommand(actionCommand);
}
/**
@@ -670,7 +722,7 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Calls {@link ItemListener.itemStateChanged} on each ItemListener in
+ * Calls {@link ItemListener#itemStateChanged} on each ItemListener in
* the button's listener list.
*
* @param e The event signifying that the button's model changed state
@@ -685,22 +737,30 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Calls {@link ActionListener.actionPerformed} on each {@link
+ * Calls {@link ActionListener#actionPerformed} on each {@link
* ActionListener} in the button's listener list.
*
* @param e The event signifying that the button's model was clicked
*/
protected void fireActionPerformed(ActionEvent e)
{
- e.setSource(this);
+ // Dispatch a copy of the given ActionEvent in order to
+ // set the source and action command correctly.
+ ActionEvent ae = new ActionEvent(
+ this,
+ e.getID(),
+ getActionCommand(),
+ e.getWhen(),
+ e.getModifiers());
+
ActionListener[] listeners = getActionListeners();
for (int i = 0; i < listeners.length; i++)
- listeners[i].actionPerformed(e);
+ listeners[i].actionPerformed(ae);
}
/**
- * Calls {@link ChangeEvent.stateChanged} on each {@link ChangeListener}
+ * Calls {@link ChangeListener#stateChanged} on each {@link ChangeListener}
* in the button's listener list.
*/
protected void fireStateChanged()
@@ -754,22 +814,22 @@ public abstract class AbstractButton extends JComponent
if (old != mne)
{
- getModel().setMnemonic(mne);
-
- if (text != null && ! text.equals(""))
- {
- // Since lower case char = upper case char for
- // mnemonic, we will convert both text and mnemonic
- // to upper case before checking if mnemonic character occurs
- // in the menu item text.
- int upperCaseMne = Character.toUpperCase((char) mne);
- String upperCaseText = text.toUpperCase();
- setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne));
- }
-
- firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne);
- revalidate();
- repaint();
+ getModel().setMnemonic(mne);
+
+ if (text != null && !text.equals(""))
+ {
+ // Since lower case char = upper case char for
+ // mnemonic, we will convert both text and mnemonic
+ // to upper case before checking if mnemonic character occurs
+ // in the menu item text.
+ int upperCaseMne = Character.toUpperCase((char) mne);
+ String upperCaseText = text.toUpperCase();
+ setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne));
+ }
+
+ firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne);
+ revalidate();
+ repaint();
}
}
@@ -1068,7 +1128,7 @@ public abstract class AbstractButton extends JComponent
* PropertyChangeListener.</p>
*
* <p>This method also configures several of the button's properties from
- * the Action, by calling {@link configurePropertiesFromAction}, and
+ * the Action, by calling {@link #configurePropertiesFromAction}, and
* subscribes the button to the Action as a PropertyChangeListener.
* Subsequent changes to the Action will thus reconfigure the button
* automatically.</p>
@@ -1284,9 +1344,12 @@ public abstract class AbstractButton extends JComponent
*/
public Icon getDisabledIcon()
{
- if (disabeldIcon == null
- && default_icon instanceof ImageIcon)
- disabeldIcon = new ImageIcon(GrayFilter.createDisabledImage(((ImageIcon) default_icon).getImage()));
+ if (disabeldIcon == null && default_icon instanceof ImageIcon)
+ {
+ Image iconImage = ((ImageIcon) default_icon).getImage();
+ Image grayImage = GrayFilter.createDisabledImage(iconImage);
+ disabeldIcon = new ImageIcon(grayImage);
+ }
return disabeldIcon;
}
@@ -1298,7 +1361,7 @@ public abstract class AbstractButton extends JComponent
* <code>null</code>, in which case an icon is constructed, based on the
* default icon.
*
- * @param disabledIcon The new "disabledIcon" property
+ * @param d The new "disabledIcon" property
*/
public void setDisabledIcon(Icon d)
{
@@ -1328,7 +1391,7 @@ public abstract class AbstractButton extends JComponent
* focused, but no special decoration is painted to indicate the presence
* of focus.
*
- * @param b The new "paintFocus" property
+ * @param p The new "paintFocus" property
*/
public void setFocusPainted(boolean p)
{
@@ -1356,8 +1419,8 @@ public abstract class AbstractButton extends JComponent
*
* @throws IllegalArgumentException If key is not one of the valid constants
*
- * @see setHorizontalTextPosition()
- * @see setHorizontalAlignment()
+ * @see #setHorizontalTextPosition(int)
+ * @see #setHorizontalAlignment(int)
*/
protected int checkHorizontalKey(int key, String exception)
{
@@ -1388,8 +1451,8 @@ public abstract class AbstractButton extends JComponent
*
* @throws IllegalArgumentException If key is not one of the valid constants
*
- * @see setVerticalTextPosition()
- * @see setVerticalAlignment()
+ * @see #setVerticalTextPosition(int)
+ * @see #setVerticalAlignment(int)
*/
protected int checkVerticalKey(int key, String exception)
{
@@ -1431,7 +1494,7 @@ public abstract class AbstractButton extends JComponent
*
* @param a An Action to configure the button from
*/
- protected void configurePropertiesFromAction(Action a)
+ protected void configurePropertiesFromAction(Action a)
{
if (a == null)
{
@@ -1442,19 +1505,19 @@ public abstract class AbstractButton extends JComponent
}
else
{
- setText((String)(a.getValue(Action.NAME)));
- setIcon((Icon)(a.getValue(Action.SMALL_ICON)));
+ setText((String) (a.getValue(Action.NAME)));
+ setIcon((Icon) (a.getValue(Action.SMALL_ICON)));
setEnabled(a.isEnabled());
- setToolTipText((String)(a.getValue(Action.SHORT_DESCRIPTION)));
- if (a.getValue(Action.MNEMONIC_KEY) != null)
- setMnemonic(((Integer)(a.getValue(Action.MNEMONIC_KEY))).intValue());
- String actionCommand = (String)(a.getValue(Action.ACTION_COMMAND_KEY));
+ setToolTipText((String) (a.getValue(Action.SHORT_DESCRIPTION)));
+ if (a.getValue(Action.MNEMONIC_KEY) != null)
+ setMnemonic(((Integer) (a.getValue(Action.MNEMONIC_KEY))).intValue());
+ String actionCommand = (String) (a.getValue(Action.ACTION_COMMAND_KEY));
// Set actionCommand to button's text by default if it is not specified
if (actionCommand != null)
- setActionCommand((String)(a.getValue(Action.ACTION_COMMAND_KEY)));
- else
- setActionCommand(getText());
+ setActionCommand((String) (a.getValue(Action.ACTION_COMMAND_KEY)));
+ else
+ setActionCommand(getText());
}
}
@@ -1462,7 +1525,7 @@ public abstract class AbstractButton extends JComponent
* <p>A factory method which should return an {@link ActionListener} that
* propagates events from the button's {@link ButtonModel} to any of the
* button's ActionListeners. By default, this is an inner class which
- * calls {@link AbstractButton.fireActionPerformed} with a modified copy
+ * calls {@link AbstractButton#fireActionPerformed} with a modified copy
* of the incoming model {@link ActionEvent}.</p>
*
* <p>The button calls this method during construction, stores the
@@ -1488,10 +1551,10 @@ public abstract class AbstractButton extends JComponent
* <p>A factory method which should return a {@link PropertyChangeListener}
* that accepts changes to the specified {@link Action} and reconfigure
* the {@link AbstractButton}, by default using the {@link
- * configurePropertiesFromAction} method.</p>
+ * #configurePropertiesFromAction} method.</p>
*
* <p>The button calls this method whenever a new Action is assigned to
- * the button's "action" property, via {@link setAction}, and stores the
+ * the button's "action" property, via {@link #setAction}, and stores the
* resulting PropertyChangeListener in its
* <code>actionPropertyChangeListener</code> member field. The button
* then subscribes the listener to the button's new action. If the
@@ -1510,21 +1573,22 @@ public abstract class AbstractButton extends JComponent
{
public void propertyChange(PropertyChangeEvent e)
{
- Action act = (Action) (e.getSource());
- if (e.getPropertyName().equals("enabled"))
- setEnabled(act.isEnabled());
- else if (e.getPropertyName().equals(Action.NAME))
- setText((String)(act.getValue(Action.NAME)));
- else if (e.getPropertyName().equals(Action.SMALL_ICON))
- setIcon((Icon)(act.getValue(Action.SMALL_ICON)));
- else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION))
- setToolTipText((String)(act.getValue(Action.SHORT_DESCRIPTION)));
- else if (e.getPropertyName().equals(Action.MNEMONIC_KEY))
+ Action act = (Action) (e.getSource());
+ if (e.getPropertyName().equals("enabled"))
+ setEnabled(act.isEnabled());
+ else if (e.getPropertyName().equals(Action.NAME))
+ setText((String) (act.getValue(Action.NAME)));
+ else if (e.getPropertyName().equals(Action.SMALL_ICON))
+ setIcon((Icon) (act.getValue(Action.SMALL_ICON)));
+ else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION))
+ setToolTipText((String) (act.getValue(Action.SHORT_DESCRIPTION)));
+ else if (e.getPropertyName().equals(Action.MNEMONIC_KEY))
if (act.getValue(Action.MNEMONIC_KEY) != null)
- setMnemonic(((Integer)(act.getValue(Action.MNEMONIC_KEY))).intValue());
- else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY))
- setActionCommand((String)(act.getValue(Action.ACTION_COMMAND_KEY)));
- }
+ setMnemonic(((Integer) (act.getValue(Action.MNEMONIC_KEY)))
+ .intValue());
+ else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY))
+ setActionCommand((String) (act.getValue(Action.ACTION_COMMAND_KEY)));
+ }
};
}
@@ -1534,7 +1598,7 @@ public abstract class AbstractButton extends JComponent
* AbstractButton may wish to override the listener used to subscribe to
* such ChangeEvents. By default, the listener just propagates the
* {@link ChangeEvent} to the button's ChangeListeners, via the {@link
- * AbstractButton.fireStateChanged} method.</p>
+ * AbstractButton#fireStateChanged} method.</p>
*
* <p>The button calls this method during construction, stores the
* resulting ChangeListener in its <code>changeListener</code> member
@@ -1562,7 +1626,7 @@ public abstract class AbstractButton extends JComponent
* AbstractButton may wish to override the listener used to subscribe to
* such ItemEvents. By default, the listener just propagates the
* {@link ItemEvent} to the button's ItemListeners, via the {@link
- * AbstractButton.fireItemStateChanged} method.</p>
+ * AbstractButton#fireItemStateChanged} method.</p>
*
* <p>The button calls this method during construction, stores the
* resulting ItemListener in its <code>changeListener</code> member
@@ -1671,7 +1735,7 @@ public abstract class AbstractButton extends JComponent
* paint this icon when the "rolloverEnabled" property of the button is
* <code>true</code> and the mouse rolls over the button.
*
- * @param rolloverIcon The new rollover icon
+ * @param r The new rollover icon
*/
public void setRolloverIcon(Icon r)
{
@@ -1704,7 +1768,7 @@ public abstract class AbstractButton extends JComponent
* is <code>true</code>, the "selected" property of the button's model is
* <code>true</code>, and the mouse rolls over the button.
*
- * @param rolloverSelectedIcon The new rollover selected icon
+ * @param r The new rollover selected icon
*/
public void setRolloverSelectedIcon(Icon r)
{
@@ -1739,7 +1803,7 @@ public abstract class AbstractButton extends JComponent
* button is <code>false</code> or the mouse is not currently rolled
* over the button.
*
- * @param selectedIcon The new selected icon
+ * @param s The new selected icon
*/
public void setSelectedIcon(Icon s)
{
@@ -1769,7 +1833,7 @@ public abstract class AbstractButton extends JComponent
return objs;
}
else
- {
+ {
return null;
}
}
@@ -1778,15 +1842,15 @@ public abstract class AbstractButton extends JComponent
* Called when image data becomes available for one of the button's icons.
*
* @param img The image being updated
- * @param infoflags One of the constant codes in {@link ImageObserver} used to describe
- * updated portions of an image.
+ * @param infoflags One of the constant codes in {@link ImageObserver} used
+ * to describe updated portions of an image.
* @param x X coordinate of the region being updated
* @param y Y coordinate of the region being updated
* @param w Width of the region beign updated
* @param h Height of the region being updated
*
- * @return <code>true</code> if img is equal to the button's current
- * icon, otherwise <code>false</code>
+ * @return <code>true</code> if img is equal to the button's current icon,
+ * otherwise <code>false</code>
*/
public boolean imageUpdate(Image img, int infoflags, int x, int y, int w,
int h)
@@ -1825,8 +1889,9 @@ public abstract class AbstractButton extends JComponent
boolean old = contentAreaFilled;
contentAreaFilled = b;
firePropertyChange(CONTENT_AREA_FILLED_CHANGED_PROPERTY, old, b);
- revalidate();
- repaint();
+ // The JDK sets the opaque property to the value of the contentAreaFilled
+ // property, so should we do.
+ setOpaque(b);
}
/**
diff --git a/javax/swing/AbstractCellEditor.java b/javax/swing/AbstractCellEditor.java
index 18f78e319..4ed15809a 100644
--- a/javax/swing/AbstractCellEditor.java
+++ b/javax/swing/AbstractCellEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,11 +46,10 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.EventListenerList;
/**
- * The abstract superclass for table and tree cells. This provides some
+ * An abstract superclass for table and tree cell editors. This provides some
* common shared functionality.
*
- * @author Andrew Selkirk
- * @version 1.0
+ * @author Andrew Selkirk
*/
public abstract class AbstractCellEditor
implements CellEditor, Serializable
@@ -162,8 +161,8 @@ public abstract class AbstractCellEditor
}
/**
- * Notifies all registered listeners that the editing of the cell has
- * has been stopped.
+ * Notifies all registered listeners that the editing of the cell has has been
+ * stopped.
*/
protected void fireEditingStopped()
{
@@ -171,7 +170,7 @@ public abstract class AbstractCellEditor
for (int index = 0; index < listeners.length; index++)
{
- listeners [index].editingStopped (changeEvent);
+ listeners[index].editingStopped(changeEvent);
}
}
@@ -185,7 +184,7 @@ public abstract class AbstractCellEditor
for (int index = 0; index < listeners.length; index++)
{
- listeners [index].editingCanceled (changeEvent);
+ listeners[index].editingCanceled(changeEvent);
}
}
}
diff --git a/javax/swing/AbstractListModel.java b/javax/swing/AbstractListModel.java
index a380b2a2e..8973e5292 100644
--- a/javax/swing/AbstractListModel.java
+++ b/javax/swing/AbstractListModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,11 +46,10 @@ import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
/**
- * AbstractListModel
+ * Provides standard implementations of some methods in {@link ListModel}.
*
* @author Ronald Veldema
* @author Andrew Selkirk
- * @version 1.0
*/
public abstract class AbstractListModel implements ListModel, Serializable
{
@@ -88,7 +87,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
/**
* Call {@link ListDataListener#contentsChanged} on each element of the
- * {@link listenerList} which is a {@link ListDataListener}. The event
+ * {@link #listenerList} which is a {@link ListDataListener}. The event
* fired has type {@ListDataEvent.CONTENTS_CHANGED} and represents a
* change to the data elements in the range [startIndex, endIndex]
* inclusive.
@@ -110,7 +109,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
/**
* Call {@link ListDataListener#intervalAdded} on each element of the
- * {@link listenerList} which is a {@link ListDataListener}. The event
+ * {@link #listenerList} which is a {@link ListDataListener}. The event
* fired has type {@ListDataEvent.INTERVAL_ADDED} and represents an
* addition of the data elements in the range [startIndex, endIndex]
* inclusive.
@@ -132,7 +131,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
/**
* Call {@link ListDataListener#intervalRemoved} on each element of the
- * {@link listenerList} which is a {@link ListDataListener}. The event
+ * {@link #listenerList} which is a {@link ListDataListener}. The event
* fired has type {@ListDataEvent.INTERVAL_REMOVED} and represents a
* removal of the data elements in the range [startIndex, endIndex]
* inclusive.
@@ -155,7 +154,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
/**
* Return the subset of {@link EventListener} objects found in this
- * object's {@link listenerList} which are elements of the specified
+ * object's {@link #listenerList} which are elements of the specified
* type.
*
* @param listenerType The type of listeners to select
@@ -170,7 +169,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
/**
* A synonym for <code>getListeners(ListDataListener.class)</code>.
*
- * @return The set of ListDataListeners found in the {@link listenerList}
+ * @return The set of ListDataListeners found in the {@link #listenerList}
*/
public ListDataListener[] getListDataListeners()
{
diff --git a/javax/swing/AbstractSpinnerModel.java b/javax/swing/AbstractSpinnerModel.java
index 1d3a621e4..d61113b08 100644
--- a/javax/swing/AbstractSpinnerModel.java
+++ b/javax/swing/AbstractSpinnerModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,9 +45,10 @@ import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
/**
- * AbstractSpinnerModel
- * @author Ka-Hing Cheung
- * @version 1.0
+ * Provides standard implementations for some of the methods in
+ * {@link SpinnerModel}.
+ *
+ * @author Ka-Hing Cheung
*/
public abstract class AbstractSpinnerModel implements SpinnerModel
{
diff --git a/javax/swing/Action.java b/javax/swing/Action.java
index 008ff7f06..3dd63539d 100644
--- a/javax/swing/Action.java
+++ b/javax/swing/Action.java
@@ -1,5 +1,5 @@
/* Action.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,98 +41,113 @@ import java.awt.event.ActionListener;
import java.beans.PropertyChangeListener;
/**
- * Action
+ * Provides a convenient central point of control for some task
+ * that can be triggered by more than one control in a Swing user interface
+ * (for example, a menu item and a toolbar button).
+ *
+ * @see AbstractButton#setAction(Action)
+ *
* @author Ronald Veldema (rveldema@cs.vu.nl)
* @author Andrew Selkirk
*/
public interface Action extends ActionListener {
- //-------------------------------------------------------------
- // Constants --------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * DEFAULT
- */
- String DEFAULT = "Default";
-
- /**
- * LONG_DESCRIPTION
- */
- String LONG_DESCRIPTION = "LongDescription";
-
- /**
- * NAME
- */
- String NAME = "Name";
-
- /**
- * SHORT_DESCRIPTION
- */
- String SHORT_DESCRIPTION = "ShortDescription";
-
- /**
- * SMALL_ICON
- */
- String SMALL_ICON = "SmallIcon";
-
- /**
- * ACCELERATOR_KEY
- */
- String ACCELERATOR_KEY = "AcceleratorKey";
-
- /**
- * ACTION_COMMAND_KEY
- */
- String ACTION_COMMAND_KEY = "ActionCommandKey";
-
- /**
- * MNEMONIC_KEY
- */
- String MNEMONIC_KEY = "MnemonicKey";
-
-
- //-------------------------------------------------------------
- // Interface: Action ------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * getValue
- * @param key TODO
- * @returns TODO
- */
- Object getValue(String key);
-
- /**
- * setValue
- * @param key TODO
- * @param value TODO
- */
- void putValue(String key, Object value);
-
- /**
- * isEnabled
- * @returns TODO
- */
- boolean isEnabled();
-
- /**
- * setEnabled
- * @param b TODO
- */
- void setEnabled(boolean b);
-
- /**
- * addPropertyChangeListener
- * @param listener TODO
- */
- void addPropertyChangeListener(PropertyChangeListener listener);
-
- /**
- * removePropertyChangeListener
- * @param listener TODO
- */
- void removePropertyChangeListener(PropertyChangeListener listener);
-
+ /**
+ * A key to access the default property for the action (this is not used).
+ */
+ String DEFAULT = "Default";
+
+ /**
+ * A key to access the long description for the action.
+ */
+ String LONG_DESCRIPTION = "LongDescription";
+
+ /**
+ * A key to access the name for the action.
+ */
+ String NAME = "Name";
+
+ /**
+ * A key to access the short description for the action (the short
+ * description is typically used as the tool tip text).
+ */
+ String SHORT_DESCRIPTION = "ShortDescription";
+
+ /**
+ * A key to access the icon for the action.
+ */
+ String SMALL_ICON = "SmallIcon";
+
+ /**
+ * A key to access the {@link KeyStroke} used as the accelerator for the
+ * action.
+ */
+ String ACCELERATOR_KEY = "AcceleratorKey";
+
+ /**
+ * A key to access the action command string for the action.
+ */
+ String ACTION_COMMAND_KEY = "ActionCommandKey";
+
+ /**
+ * A key to access the mnemonic for the action.
+ */
+ String MNEMONIC_KEY = "MnemonicKey";
+
+ /**
+ * Returns the value associated with the specified key.
+ *
+ * @param key the key (not <code>null</code>).
+ *
+ * @return The value associated with the specified key, or
+ * <code>null</code> if the key is not found.
+ */
+ Object getValue(String key);
+
+ /**
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+ * The standard keys are defined in this interface: {@link #NAME},
+ * {@link #SHORT_DESCRIPTION}, {@link #LONG_DESCRIPTION},
+ * {@link #SMALL_ICON}, {@link #ACTION_COMMAND_KEY},
+ * {@link #ACCELERATOR_KEY} and {@link #MNEMONIC_KEY}. Any existing value
+ * associated with the key will be overwritten.
+ *
+ * @param key the key (not <code>null</code>).
+ * @param value the value (<code>null</code> permitted).
+ */
+ void putValue(String key, Object value);
+
+ /**
+ * Returns the flag that indicates whether or not this action is enabled.
+ *
+ * @return The flag.
+ */
+ boolean isEnabled();
+
+ /**
+ * Sets the flag that indicates whether or not this action is enabled. If
+ * the value changes, a {@link java.beans.PropertyChangeEvent} is sent to
+ * all registered listeners.
+ *
+ * @param b the new value of the flag.
+ */
+ void setEnabled(boolean b);
+
+ /**
+ * Registers a listener to receive notification whenever one of the
+ * action's properties is modified.
+ *
+ * @param listener the listener.
+ */
+ void addPropertyChangeListener(PropertyChangeListener listener);
+
+ /**
+ * Deregisters a listener so that it no longer receives notification of
+ * changes to the action's properties.
+ *
+ * @param listener the listener.
+ */
+ void removePropertyChangeListener(PropertyChangeListener listener);
} // Action
diff --git a/javax/swing/ActionMap.java b/javax/swing/ActionMap.java
index 939affe85..c14bafdb4 100644
--- a/javax/swing/ActionMap.java
+++ b/javax/swing/ActionMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -49,6 +49,14 @@ import java.util.Set;
/**
+ * Maps arbitrary keys (usually Strings) to {@link Action} instances. This
+ * is used in combination with {@link InputMap}s.
+ *
+ * If a component receives an input event, this is looked up in
+ * the component's <code>InputMap</code>. The result is an object which
+ * serves as a key to the components <code>ActionMap</code>. Finally
+ * the <code>Action</code> that is stored is executed.
+ *
* @author Andrew Selkirk
* @author Michael Koch
*/
diff --git a/javax/swing/BorderFactory.java b/javax/swing/BorderFactory.java
index 4f0a1ee4e..45cf3bbe0 100644
--- a/javax/swing/BorderFactory.java
+++ b/javax/swing/BorderFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,20 +50,25 @@ import javax.swing.border.LineBorder;
import javax.swing.border.MatteBorder;
import javax.swing.border.TitledBorder;
+/**
+ * A factory for commonly used borders.
+ *
+ * @author original author unknown
+ */
public class BorderFactory
{
private BorderFactory()
{
// Do nothing.
}
-
+
/**
* Creates a line border withe the specified color.
*
* @param color A color to use for the line.
*
* @return The Border object
- */
+ */
public static Border createLineBorder(Color color)
{
return null;
@@ -79,10 +84,10 @@ public class BorderFactory
* @param thickness An int specifying the width in pixels.
*
* @return The Border object
- */
- public static Border createLineBorder (Color color, int thickness)
+ */
+ public static Border createLineBorder(Color color, int thickness)
{
- return new LineBorder (color, thickness);
+ return new LineBorder(color, thickness);
}
/**
@@ -92,10 +97,10 @@ public class BorderFactory
* shadows are underneath.)
*
* @return The Border object
- */
- public static Border createRaisedBevelBorder ()
+ */
+ public static Border createRaisedBevelBorder()
{
- return new BevelBorder (BevelBorder.RAISED);
+ return new BevelBorder(BevelBorder.RAISED);
}
/**
@@ -105,10 +110,10 @@ public class BorderFactory
* highlights are underneath.)
*
* @return The Border object
- */
- public static Border createLoweredBevelBorder ()
+ */
+ public static Border createLoweredBevelBorder()
{
- return new BevelBorder (BevelBorder.LOWERED);
+ return new BevelBorder(BevelBorder.LOWERED);
}
/**
@@ -118,13 +123,13 @@ public class BorderFactory
* highlights are underneath.).
*
* @param type An int specifying either BevelBorder.LOWERED or
- * BevelBorder.RAISED
+ * BevelBorder.RAISED
*
- * @Return The Border object
- */
- public static Border createBevelBorder (int type)
+ * @return The Border object
+ */
+ public static Border createBevelBorder(int type)
{
- return new BevelBorder (type);
+ return new BevelBorder(type);
}
/**
@@ -134,16 +139,15 @@ public class BorderFactory
* area uses a brighter shade of the shadaw color.
*
* @param type An int specifying either BevelBorder.LOWERED or
- * BevelBorder.RAISED
+ * BevelBorder.RAISED
* @param highlight A Color object for highlights
* @param shadow A Color object for shadows
*
* @return The Border object
- */
- public static Border createBevelBorder (int type, Color highlight,
- Color shadow)
+ */
+ public static Border createBevelBorder(int type, Color highlight, Color shadow)
{
- return new BevelBorder (type, highlight, shadow);
+ return new BevelBorder(type, highlight, shadow);
}
/**
@@ -151,22 +155,22 @@ public class BorderFactory
* for the inner and outer highlight and shadow areas.
*
* @param type An int specifying either BevelBorder.LOWERED or
- * BevelBorder.RAISED
+ * BevelBorder.RAISED
* @param highlightOuter A Color object for the outer edge of the
- * highlight area
+ * highlight area
* @param highlightInner A Color object for the inner edge of the
- * highlight area
+ * highlight area
* @param shadowOuter A Color object for the outer edge of the shadow area
* @param shadowInner A Color object for the inner edge of the shadow area
*
* @return The Border object
- */
- public static Border createBevelBorder (int type, Color highlightOuter,
- Color highlightInner,
- Color shadowOuter, Color shadowInner)
+ */
+ public static Border createBevelBorder(int type, Color highlightOuter,
+ Color highlightInner,
+ Color shadowOuter, Color shadowInner)
{
- return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter,
- shadowInner);
+ return new BevelBorder(type, highlightOuter, highlightInner, shadowOuter,
+ shadowInner);
}
/**
@@ -174,10 +178,10 @@ public class BorderFactory
* background color for highlighting and shading.
*
* @return The Border object
- */
- public static Border createEtchedBorder ()
+ */
+ public static Border createEtchedBorder()
{
- return new EtchedBorder ();
+ return new EtchedBorder();
}
/**
@@ -185,10 +189,10 @@ public class BorderFactory
* background color for highlighting and shading.
*
* @return The Border object
- */
- public static Border createEtchedBorder (int etchType)
+ */
+ public static Border createEtchedBorder(int etchType)
{
- return new EtchedBorder (etchType);
+ return new EtchedBorder(etchType);
}
/**
@@ -199,10 +203,10 @@ public class BorderFactory
* @param shadow A Color object for the border shadows
*
* @return The Border object
- */
- public static Border createEtchedBorder (Color highlight, Color shadow)
+ */
+ public static Border createEtchedBorder(Color highlight, Color shadow)
{
- return new EtchedBorder (highlight, shadow);
+ return new EtchedBorder(highlight, shadow);
}
/**
@@ -213,11 +217,11 @@ public class BorderFactory
* @param shadow A Color object for the border shadows
*
* @return The Border object
- */
- public static Border createEtchedBorder (int etchType, Color highlight,
- Color shadow)
+ */
+ public static Border createEtchedBorder(int etchType, Color highlight,
+ Color shadow)
{
- return new EtchedBorder (etchType, highlight, shadow);
+ return new EtchedBorder(etchType, highlight, shadow);
}
/**
@@ -229,10 +233,10 @@ public class BorderFactory
* @param title A String containing the text of the title
*
* @return The TitledBorder object
- */
- public static TitledBorder createTitledBorder (String title)
+ */
+ public static TitledBorder createTitledBorder(String title)
{
- return new TitledBorder (title);
+ return new TitledBorder(title);
}
/**
@@ -246,10 +250,10 @@ public class BorderFactory
* @param border The Border object to add the title to
*
* @return The TitledBorder object
- */
- public static TitledBorder createTitledBorder (Border border)
+ */
+ public static TitledBorder createTitledBorder(Border border)
{
- return new TitledBorder (border);
+ return new TitledBorder(border);
}
/**
@@ -258,14 +262,14 @@ public class BorderFactory
* justification (left) and using the default font and text color determined
* by the current look and feel.
*
- * @param order The Border object to add the title to
+ * @param border The Border object to add the title to
* @param title A String containing the text of the title
*
* @return The TitledBorder object
- */
- public static TitledBorder createTitledBorder (Border border, String title)
+ */
+ public static TitledBorder createTitledBorder(Border border, String title)
{
- return new TitledBorder (border, title);
+ return new TitledBorder(border, title);
}
/**
@@ -276,21 +280,22 @@ public class BorderFactory
* @param border The Border object to add the title to
* @param title A String containing the text of the title
* @param titleJustification An int specifying the left/right position of
- * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or
- * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).
+ * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or
+ * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).
* @param titlePosition An int specifying the vertical position of the text
- * in relation to the border -- one of: TitledBorder.ABOVE_TOP,
- * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP,
- * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom
- * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top).
+ * in relation to the border -- one of: TitledBorder.ABOVE_TOP,
+ * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP,
+ * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom
+ * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION
+ * (top).
*
* @return The TitledBorder object
- */
- public static TitledBorder createTitledBorder (Border border, String title,
+ */
+ public static TitledBorder createTitledBorder(Border border, String title,
int titleJustification,
int titlePosition)
{
- return new TitledBorder (border, title, titleJustification, titlePosition);
+ return new TitledBorder(border, title, titleJustification, titlePosition);
}
/**
@@ -301,24 +306,24 @@ public class BorderFactory
* @param border - the Border object to add the title to
* @param title - a String containing the text of the title
* @param titleJustification - an int specifying the left/right position of
- * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or
- * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).
+ * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or
+ * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).
* @param titlePosition - an int specifying the vertical position of the
- * text in relation to the border -- one of: TitledBorder.ABOVE_TOP,
- * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP,
- * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom
- * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top).
+ * text in relation to the border -- one of: TitledBorder.ABOVE_TOP,
+ * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP,
+ * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom
+ * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top).
* @param titleFont - a Font object specifying the title font
*
* @return The TitledBorder object
- */
- public static TitledBorder createTitledBorder (Border border, String title,
- int titleJustification,
- int titlePosition,
- Font titleFont)
+ */
+ public static TitledBorder createTitledBorder(Border border, String title,
+ int titleJustification,
+ int titlePosition,
+ Font titleFont)
{
- return new TitledBorder (border, title, titleJustification, titlePosition,
- titleFont);
+ return new TitledBorder(border, title, titleJustification, titlePosition,
+ titleFont);
}
/**
@@ -328,27 +333,25 @@ public class BorderFactory
* @param border - the Border object to add the title to
* @param title - a String containing the text of the title
* @param titleJustification - an int specifying the left/right position of
- * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or
- * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).
+ * the title -- one of TitledBorder.LEFT, TitledBorder.CENTER, or
+ * TitledBorder.RIGHT, TitledBorder.DEFAULT_JUSTIFICATION (left).
* @param titlePosition - an int specifying the vertical position of the text
- * in relation to the border -- one of: TitledBorder.ABOVE_TOP,
- * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP,
- * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom
- * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top).
+ * in relation to the border -- one of: TitledBorder.ABOVE_TOP,
+ * TitledBorder.TOP (sitting on the top line), TitledBorder.BELOW_TOP,
+ * TitledBorder.ABOVE_BOTTOM, TitledBorder.BOTTOM (sitting on the bottom
+ * line), TitledBorder.BELOW_BOTTOM, or TitledBorder.DEFAULT_POSITION (top).
* @param titleFont - a Font object specifying the title font
* @param titleColor - a Color object specifying the title color
*
* @return The TitledBorder object
- */
- public static TitledBorder createTitledBorder (Border border,
- String title,
- int titleJustification,
- int titlePosition,
- Font titleFont,
- Color titleColor)
+ */
+ public static TitledBorder createTitledBorder(Border border, String title,
+ int titleJustification,
+ int titlePosition,
+ Font titleFont, Color titleColor)
{
- return new TitledBorder (border, title, titleJustification, titlePosition,
- titleFont, titleColor);
+ return new TitledBorder(border, title, titleJustification, titlePosition,
+ titleFont, titleColor);
}
/**
@@ -356,10 +359,10 @@ public class BorderFactory
* bottom, left, and right sides are all zero.)
*
* @return The Border object
- */
- public static Border createEmptyBorder ()
+ */
+ public static Border createEmptyBorder()
{
- return new EmptyBorder (0, 0, 0, 0);
+ return new EmptyBorder(0, 0, 0, 0);
}
/**
@@ -372,21 +375,21 @@ public class BorderFactory
* @param right An int specifying the width of the bottom in pixels
*
* @return The Border object
- */
- public static Border createEmptyBorder (int top, int left, int bottom,
- int right)
+ */
+ public static Border createEmptyBorder(int top, int left, int bottom,
+ int right)
{
- return new EmptyBorder (top, left, bottom, right);
+ return new EmptyBorder(top, left, bottom, right);
}
/**
* Create a compound border with a null inside edge and a null outside edge.
*
* @return The CompoundBorder object
- */
- public static CompoundBorder createCompoundBorder ()
+ */
+ public static CompoundBorder createCompoundBorder()
{
- return new CompoundBorder ();
+ return new CompoundBorder();
}
/**
@@ -394,35 +397,39 @@ public class BorderFactory
* outside and inside edges.
*
* @param outsideBorder A Border object for the outer edge of the
- * compound border
+ * compound border
* @param insideBorder A Border object for the inner edge of the
- * compound border
+ * compound border
*
* @return The CompoundBorder object
- */
- public static CompoundBorder createCompoundBorder (Border outsideBorder,
- Border insideBorder)
+ */
+ public static CompoundBorder createCompoundBorder(Border outsideBorder,
+ Border insideBorder)
{
- return new CompoundBorder (outsideBorder, insideBorder);
+ return new CompoundBorder(outsideBorder, insideBorder);
}
/**
* Create a matte-look border using a solid color. (The difference between
- * this border and a line border is that you can specify the individual
- * border dimensions.)
- *
- * @param top An int specifying the width of the top in pixels
- * @param left An int specifying the width of the left side in pixels
- * @param bottom An int specifying the width of the right side in pixels
- * @param right An int specifying the width of the bottom in pixels
- * @param color A Color to use for the border
- *
+ * this border and a line border is that you can specify the individual border
+ * dimensions.)
+ *
+ * @param top
+ * An int specifying the width of the top in pixels
+ * @param left
+ * An int specifying the width of the left side in pixels
+ * @param bottom
+ * An int specifying the width of the right side in pixels
+ * @param right
+ * An int specifying the width of the bottom in pixels
+ * @param color
+ * A Color to use for the border
* @return The MatteBorder object
- */
- public static MatteBorder createMatteBorder (int top, int left, int bottom,
- int right, Color color)
+ */
+ public static MatteBorder createMatteBorder(int top, int left, int bottom,
+ int right, Color color)
{
- return new MatteBorder (top, left, bottom, right, color);
+ return new MatteBorder(top, left, bottom, right, color);
}
/**
@@ -440,10 +447,10 @@ public class BorderFactory
* @param tileIcon The Icon object used for the border tiles
*
* @return The MatteBorder object
- */
- public static MatteBorder createMatteBorder (int top, int left, int bottom,
- int right, Icon tileIcon)
+ */
+ public static MatteBorder createMatteBorder(int top, int left, int bottom,
+ int right, Icon tileIcon)
{
- return new MatteBorder (top, left, bottom, right, tileIcon);
+ return new MatteBorder(top, left, bottom, right, tileIcon);
}
}
diff --git a/javax/swing/BoundedRangeModel.java b/javax/swing/BoundedRangeModel.java
index 92cf69df8..5ca5a7e04 100644
--- a/javax/swing/BoundedRangeModel.java
+++ b/javax/swing/BoundedRangeModel.java
@@ -1,5 +1,5 @@
/* BoundedRangeModel.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,24 +38,36 @@ exception statement from your version. */
package javax.swing;
+import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
/**
+ * The data model that represents a <i>range</i> that is constrained to fit
+ * within specified <i>bounds</i>. The range is defined as <code>value</code>
+ * to <code>value + extent</code>, where both <code>value</code> and
+ * <code>extent</code> are integers, and <code>extent >= 0</code>. The bounds
+ * are defined by integers <code>minimum</code> and <code>maximum</code>.
+ * <p>
+ * This type of model is used in components that display a range of values,
+ * like {@link JProgressBar} and {@link JSlider}.
+ *
* @author Andrew Selkirk
*/
public interface BoundedRangeModel
{
/**
- * getValue
+ * Returns the current value for the model.
*
- * @return int
+ * @return The current value for the model.
*
* @see #setValue(int)
*/
int getValue();
/**
- * setValue
+ * Sets the value for the model and sends a {@link ChangeEvent} to
+ * all registered listeners. The new value must satisfy the constraint
+ * <code>min <= value <= value + extent <= max</code>.
*
* @param value the value
*
@@ -64,16 +76,20 @@ public interface BoundedRangeModel
void setValue(int value);
/**
- * getMinimum
+ * Returns the lower bound for the model. The start of the model's range
+ * (see {@link #getValue()}) cannot be less than this lower bound.
*
- * @return int
+ * @return The lower bound for the model.
*
* @see #setMinimum(int)
+ * @see #getMaximum()
*/
int getMinimum();
/**
- * setMinimum
+ * Sets the lower bound for the model and sends a {@link ChangeEvent} to all
+ * registered listeners. The new minimum must be less than or equal to the
+ * start value of the model's range (as returned by {@link #getValue()}).
*
* @param minimum the minimum value
*
@@ -82,16 +98,22 @@ public interface BoundedRangeModel
void setMinimum(int minimum);
/**
- * getMaximum
+ * Returns the upper bound for the model. This sets an upper limit for the
+ * end value of the model's range ({@link #getValue()} +
+ * {@link #getExtent()}).
*
- * @return int
+ * @return The upper bound for the model.
*
* @see #setMaximum(int)
+ * @see #getMinimum()
*/
int getMaximum();
/**
- * setMaximum
+ * Sets the upper bound for the model and sends a {@link ChangeEvent} to all
+ * registered listeners. The new maximum must be greater than or equal to the
+ * end value of the model's range (as returned by {@link #getValue()} +
+ * {@link #getExtent()}).
*
* @param maximum the maximum value
*
@@ -105,12 +127,12 @@ public interface BoundedRangeModel
* @return <code>true</code> if value is adjusting,
* otherwise <code>false</code>
*
- * @see setValueIsAdjusting(boolean)
+ * @see #setValueIsAdjusting(boolean)
*/
boolean getValueIsAdjusting();
/**
- * setValueIsAdjusting
+ * Sets the <code>valueIsAdjusting</code> property.
*
* @param adjusting <code>true</code> if adjusting,
* <code>false</code> otherwise
@@ -129,7 +151,8 @@ public interface BoundedRangeModel
int getExtent();
/**
- * setExtent
+ * Sets the extent, which is the length of the model's range, and sends a
+ * {@link ChangeEvent} to all registered listeners.
*
* @param extent the extent
*
@@ -138,12 +161,14 @@ public interface BoundedRangeModel
void setExtent(int extent);
/**
- * setRangeProperties
+ * Sets all the properties for the model in a single call.
+ *
* @param value the value
* @param extent the extent
* @param minnimum the minimum value
* @param maximum the maximum value
- * @param adjusting TODO
+ * @param adjusting a flag that indicates the model is being adjusted
+ * continuously.
*/
void setRangeProperties(int value, int extent, int minimum, int maximum,
boolean adjusting);
@@ -153,7 +178,7 @@ public interface BoundedRangeModel
*
* @param listener the listener to add
*
- * @see #removeChangeListener(javax.swing.event.ChangeListener)
+ * @see #removeChangeListener(ChangeListener)
*/
void addChangeListener(ChangeListener listener);
@@ -162,7 +187,7 @@ public interface BoundedRangeModel
*
* @param listener the listener to remove
*
- * @see #addChangeListener(javax.swing.event.ChangeListener)
+ * @see #addChangeListener(ChangeListener)
*/
void removeChangeListener(ChangeListener listener);
}
diff --git a/javax/swing/Box.java b/javax/swing/Box.java
index 7532d3087..b2cb44ace 100644
--- a/javax/swing/Box.java
+++ b/javax/swing/Box.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,6 +60,9 @@ public class Box extends JComponent implements Accessible
{
private static final long serialVersionUID = 1525417495883046342L;
+ /**
+ * Provides accessibility support for <code>Box</code>es.
+ */
// FIXME: disable to make libjava compile; visibility rules are broken
protected class AccessibleBox // extends Container.AccessibleAWTContainer
{
@@ -82,6 +85,9 @@ public class Box extends JComponent implements Accessible
{
private static final long serialVersionUID = -1204263191910183998L;
+ /**
+ * Provides accessibility support for <code>Box.Filler</code>.
+ */
// FIXME: disable to make libjava compile; visibility rules are broken
protected class AccessibleBoxFiller // extends Component.AccessibleAWTComponent
{
@@ -192,7 +198,7 @@ public class Box extends JComponent implements Accessible
public static Component createGlue()
{
Filler glue = new Filler(new Dimension(0,0), new Dimension(0,0),
- new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE)
+ new Dimension(Short.MAX_VALUE,Short.MAX_VALUE)
);
return glue;
}
@@ -211,7 +217,10 @@ public class Box extends JComponent implements Accessible
*/
public static Component createHorizontalGlue()
{
- return createGlue();
+ Filler glue = new Filler(new Dimension(0,0), new Dimension(0,0),
+ new Dimension(Short.MAX_VALUE, 0)
+ );
+ return glue;
}
/**
diff --git a/javax/swing/BoxLayout.java b/javax/swing/BoxLayout.java
index 2d4abf944..28bb53928 100644
--- a/javax/swing/BoxLayout.java
+++ b/javax/swing/BoxLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,14 +45,265 @@ import java.awt.Dimension;
import java.awt.Insets;
import java.awt.LayoutManager2;
import java.io.Serializable;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import gnu.java.awt.AWTUtilities;
/**
- * A layout for swing components.
+ * A layout that stacks the children of a container in a Box, either
+ * horizontally or vertically.
*
* @author Ronald Veldema (rveldema@cs.vu.nl)
+ * @author Roman Kennke (roman@kennke.org)
*/
public class BoxLayout implements LayoutManager2, Serializable
{
+
+ /**
+ * This is an abstraction that allows the BoxLayout algorithm to
+ * be applied to both direction (X and Y) without duplicating the
+ * algorithm. It defines several methods that access properties of
+ * a component for a specific direction.
+ */
+ static interface Direction
+ {
+ /**
+ * Returns the correct part of <code>d</code> for this direction. This will
+ * be <code>d.width</code> for horizontal and <code>d.height</code> for
+ * vertical direction.
+ *
+ * @param d the size as Dimension object
+ *
+ * @return the correct part of <code>d</code> for this direction
+ */
+ int size(Dimension d);
+
+ /**
+ * Returns the lower bounds of the {@link Insets} object according to this
+ * direction. This will be <code>insets.top</code> for vertical direction
+ * and <code>insets.left</code> for horizontal direction.
+ *
+ * @param the {@link Insets} object from which to return the lower bounds
+ *
+ * @return the lower bounds of the {@link Insets} object according to this
+ * direction
+ */
+ int lower(Insets insets);
+
+ /**
+ * Returns the alignment property according to this direction.
+ *
+ * @param comp the Component for which to return the alignment property
+ *
+ * @return the alignment property according to this direction
+ */
+ float alignment(Component comp);
+
+ /**
+ * Sets the location for Component <code>c</code>. <code>coord1</code>
+ * specifies the coordinate of the location in this direction,
+ * <code>coord2</code> the coordinate of the location in the opposite
+ * direction.
+ *
+ * @param c the Component for which to set the location
+ * @param coord1 the coordinate in this direction
+ * @param coord2 the coordinate in the opposite direction
+ */
+ void setLocation(Component c, int coord1, int coord2);
+
+ /**
+ * Sets the size for Component <code>c</code>. <code>coord1</code>
+ * specifies the size in this direction,
+ * <code>coord2</code> the size in the opposite
+ * direction.
+ *
+ * @param c the Component for which to set the size
+ * @param size1 the size in this direction
+ * @param size2 the size in the opposite direction
+ */
+ void setSize(Component c, int size1, int size2);
+ }
+
+ /**
+ * The horizontal direction.
+ */
+ static class Horizontal implements Direction
+ {
+ /**
+ * Returns the correct part of <code>d</code> for this direction. This will
+ * be <code>d.width</code> for horizontal and <code>d.height</code> for
+ * vertical direction.
+ *
+ * @param d the size as Dimension object
+ *
+ * @return the correct part of <code>d</code> for this direction
+ */
+ public int size(Dimension d)
+ {
+ return d.width;
+ }
+
+ /**
+ * Returns the lower bounds of the {@link Insets} object according to this
+ * direction. This will be <code>insets.top</code> for vertical direction
+ * and <code>insets.left</code> for horizontal direction.
+ *
+ * @param insets the {@link Insets} object from which to return the lower
+ * bounds
+ *
+ * @return the lower bounds of the {@link Insets} object according to this
+ * direction
+ */
+ public int lower(Insets insets)
+ {
+ return insets.left;
+ }
+
+ /**
+ * Returns the alignment property according to this direction.
+ *
+ * @param comp the Component for which to return the alignment property
+ *
+ * @return the alignment property according to this direction
+ */
+ public float alignment(Component comp)
+ {
+ return comp.getAlignmentX();
+ }
+
+ /**
+ * Sets the location for Component <code>c</code>. <code>coord1</code>
+ * specifies the coordinate of the location in this direction,
+ * <code>coord2</code> the coordinate of the location in the opposite
+ * direction.
+ *
+ * @param c the Component for which to set the location
+ * @param coord1 the coordinate in this direction
+ * @param coord2 the coordinate in the opposite direction
+ */
+ public void setLocation(Component c, int coord1, int coord2)
+ {
+ c.setLocation(coord1, coord2);
+ }
+
+ /**
+ * Sets the size for Component <code>c</code>. <code>coord1</code>
+ * specifies the size in this direction,
+ * <code>coord2</code> the size in the opposite
+ * direction.
+ *
+ * @param c the Component for which to set the size
+ * @param size1 the size in this direction
+ * @param size2 the size in the opposite direction
+ */
+ public void setSize(Component c, int size1, int size2)
+ {
+ c.setSize(size1, size2);
+ }
+ }
+ /**
+ * The vertical direction.
+ */
+ static class Vertical implements Direction
+ {
+ /**
+ * Returns the correct part of <code>d</code> for this direction. This will
+ * be <code>d.width</code> for horizontal and <code>d.height</code> for
+ * vertical direction.
+ *
+ * @param d the size as Dimension object
+ *
+ * @return the correct part of <code>d</code> for this direction
+ */
+ public int size(Dimension d)
+ {
+ return d.height;
+ }
+
+ /**
+ * Returns the lower bounds of the {@link Insets} object according to this
+ * direction. This will be <code>insets.top</code> for vertical direction
+ * and <code>insets.left</code> for horizontal direction.
+ *
+ * @param insets the {@link Insets} object from which to return the lower
+ * bounds
+ *
+ * @return the lower bounds of the {@link Insets} object according to this
+ * direction
+ */
+ public int lower(Insets insets)
+ {
+ return insets.top;
+ }
+
+ /**
+ * Returns the alignment property according to this direction.
+ *
+ * @param comp the Component for which to return the alignment property
+ *
+ * @return the alignment property according to this direction
+ */
+ public float alignment(Component comp)
+ {
+ return comp.getAlignmentY();
+ }
+
+ /**
+ * Sets the location for Component <code>c</code>. <code>coord1</code>
+ * specifies the coordinate of the location in this direction,
+ * <code>coord2</code> the coordinate of the location in the opposite
+ * direction.
+ *
+ * @param c the Component for which to set the location
+ * @param coord1 the coordinate in this direction
+ * @param coord2 the coordinate in the opposite direction
+ */
+ public void setLocation(Component c, int coord1, int coord2)
+ {
+ c.setLocation(coord2, coord1);
+ }
+
+ /**
+ * Sets the size for Component <code>c</code>. <code>coord1</code>
+ * specifies the size in this direction,
+ * <code>coord2</code> the size in the opposite
+ * direction.
+ *
+ * @param c the Component for which to set the size
+ * @param size1 the size in this direction
+ * @param size2 the size in the opposite direction
+ */
+ public void setSize(Component c, int size1, int size2)
+ {
+ c.setSize(size2, size1);
+ }
+ }
+
+ /**
+ * A helper class that temporarily stores the size specs of a component.
+ */
+ static class SizeReq
+ {
+ int size;
+ int min;
+ int pref;
+ int max;
+ float align;
+ Component comp;
+ SizeReq(Component comp, Direction dir)
+ {
+ this.min = dir.size(comp.getMinimumSize());
+ this.pref = dir.size(comp.getPreferredSize());
+ this.max = dir.size(comp.getMaximumSize());
+ this.size = dir.size(comp.getSize());
+ this.align = dir.alignment(comp);
+ this.comp = comp;
+ }
+ }
+
/**
* Specifies that components are laid out left to right.
*/
@@ -88,6 +339,12 @@ public class BoxLayout implements LayoutManager2, Serializable
*/
private int way = X_AXIS;
+ /** Constant for the horizontal direction. */
+ private static final Direction HORIZONTAL = new Horizontal();
+
+ /** Constant for the vertical direction. */
+ private static final Direction VERTICAL = new Vertical();
+
/**
* Constructs a <code>BoxLayout</code> object.
*
@@ -151,16 +408,16 @@ public class BoxLayout implements LayoutManager2, Serializable
int x = 0;
int y = 0;
- Component[] children = parent.getComponents();
+ List children = AWTUtilities.getVisibleChildren(parent);
if (isHorizontalIn(parent))
{
x = insets.left + insets.right;
// sum up preferred widths of components, find maximum of preferred
// heights
- for (int index = 0; index < children.length; index++)
+ for (Iterator i = children.iterator(); i.hasNext();)
{
- Component comp = children[index];
+ Component comp = (Component) i.next();
Dimension sz = comp.getPreferredSize();
x += sz.width;
y = Math.max(y, sz.height);
@@ -172,9 +429,9 @@ public class BoxLayout implements LayoutManager2, Serializable
y = insets.top + insets.bottom;
// sum up preferred heights of components, find maximum of
// preferred widths
- for (int index = 0; index < children.length; index++)
+ for (Iterator i = children.iterator(); i.hasNext();)
{
- Component comp = children[index];
+ Component comp = (Component) i.next();
Dimension sz = comp.getPreferredSize();
y += sz.height;
x = Math.max(x, sz.width);
@@ -201,15 +458,15 @@ public class BoxLayout implements LayoutManager2, Serializable
int x = insets.left + insets.right;
int y = insets.bottom + insets.top;
- Component[] children = parent.getComponents();
+ List children = AWTUtilities.getVisibleChildren(parent);
if (isHorizontalIn(parent))
{
// sum up preferred widths of components, find maximum of preferred
// heights
- for (int index = 0; index < children.length; index++)
+ for (Iterator i = children.iterator(); i.hasNext();)
{
- Component comp = children[index];
+ Component comp = (Component) i.next();
Dimension sz = comp.getMinimumSize();
x += sz.width;
y = Math.max(y, sz.height);
@@ -219,9 +476,9 @@ public class BoxLayout implements LayoutManager2, Serializable
{
// sum up preferred heights of components, find maximum of
// preferred widths
- for (int index = 0; index < children.length; index++)
+ for (Iterator i = children.iterator(); i.hasNext();)
{
- Component comp = children[index];
+ Component comp = (Component) i.next();
Dimension sz = comp.getMinimumSize();
y += sz.height;
x = Math.max(x, sz.width);
@@ -238,163 +495,10 @@ public class BoxLayout implements LayoutManager2, Serializable
*/
public void layoutContainer(Container parent)
{
- if (parent != container)
- throw new AWTError("invalid parent");
-
- Dimension size = parent.getSize();
- Insets insets = parent.getInsets();
- Dimension innerSize = new Dimension(size.width - insets.left
- - insets.right, size.height
- - insets.bottom - insets.top);
- Component[] children = parent.getComponents();
- boolean[] laidOut = new boolean[children.length];
- for (int index = 0; index < laidOut.length; index++)
- laidOut[index] = false;
-
if (isHorizontalIn(parent))
- {
- // compute overall preferred width
- int preferredWidthAll = 0;
- for (int index = 0; index < children.length; index++)
- {
- preferredWidthAll += children[index].getPreferredSize().width;
- }
- double widthFactor = (double) innerSize.width /
- (double) preferredWidthAll;
-
- // sort out components that are constrained by minimum or maximum size
- int widthRemain = innerSize.width;
- for (int index = 0; index < children.length; index++)
- {
- Component comp = children[index];
- Dimension sz = comp.getPreferredSize();
- Dimension minSize = comp.getMinimumSize();
- Dimension maxSize = comp.getMaximumSize();
- int width = (int) (sz.width * widthFactor);
- int height = Math.min(innerSize.height, maxSize.height);
- // check min size
- if (width < minSize.width)
- {
- width = minSize.width;
- comp.setSize(width, height);
- laidOut[index] = true;
- preferredWidthAll -= sz.width;
- widthRemain -= width;
- continue;
- }
- // check max size
- if (width > maxSize.width)
- {
- width = maxSize.width;
- comp.setSize(width, height);
- laidOut[index] = true;
- preferredWidthAll -= sz.width;
- widthRemain -= width;
- continue;
- }
-
- }
-
- // recompute widthFactor for remaining components
- widthFactor = (double) widthRemain / (double) preferredWidthAll;
-
- int x = insets.left;
-
- // lay out remaining comonents
- for (int index = 0; index < children.length; index++)
- {
- Component comp = children[index];
- int width = 0;
-
- if (!laidOut[index])
- {
- Dimension sz = comp.getPreferredSize();
- Dimension maxSize = comp.getMaximumSize();
- width = (int) (sz.width * widthFactor);
- int height = Math.min(innerSize.height, maxSize.height);
- comp.setSize(width, height);
- }
- else
- width = comp.getWidth();
-
- int cy = (int) ((innerSize.height - comp.getHeight())
- * comp.getAlignmentY() + insets.top);
- comp.setLocation(x, cy);
- x = x + width;
- }
- }
+ layoutAlgorithm(parent, HORIZONTAL, VERTICAL);
else
- {
- // compute overall preferred height
- int preferredHeightAll = 0;
- for (int index = 0; index < children.length; index++)
- {
- preferredHeightAll += children[index].getPreferredSize().height;
- }
- double heightFactor = (double) innerSize.height /
- (double) preferredHeightAll;
-
- // sort out components that are constrained by minimum or maximum size
- int heightRemain = innerSize.height;
- for (int index = 0; index < children.length; index++)
- {
- Component comp = children[index];
- Dimension sz = comp.getPreferredSize();
- Dimension minSize = comp.getMinimumSize();
- Dimension maxSize = comp.getMaximumSize();
- int height = (int) (sz.height * heightFactor);
- int width = Math.min(innerSize.width, maxSize.width);
- // check min size
- if (height < minSize.height)
- {
- height = minSize.height;
- comp.setSize(width, height);
- laidOut[index] = true;
- preferredHeightAll -= sz.height;
- heightRemain -= height;
- continue;
- }
- // check max size
- if (height > maxSize.height)
- {
- height = maxSize.height;
- comp.setSize(width, height);
- laidOut[index] = true;
- preferredHeightAll -= sz.height;
- heightRemain -= height;
- continue;
- }
-
- }
-
- // recompute heightFactor for remaining components
- heightFactor = (double) heightRemain / (double) preferredHeightAll;
-
- int y = insets.top;
-
- // lay out remaining comonents
- for (int index = 0; index < children.length; index++)
- {
- Component comp = children[index];
- int height = 0;
-
- if (!laidOut[index])
- {
- Dimension sz = comp.getPreferredSize();
- Dimension maxSize = comp.getMaximumSize();
- height = (int) (sz.height * heightFactor);
- int width = Math.min(innerSize.width, maxSize.width);
- comp.setSize(width, height);
- }
- else
- height = comp.getHeight();
-
- int cx = (int) ((innerSize.width - comp.getWidth())
- * comp.getAlignmentX() + insets.left);
- comp.setLocation(cx, y);
- y = y + height;
- }
- }
+ layoutAlgorithm(parent, VERTICAL, HORIZONTAL);
}
/**
@@ -465,16 +569,16 @@ public class BoxLayout implements LayoutManager2, Serializable
int x = insets.left + insets.right;
int y = insets.top + insets.bottom;
- Component[] children = parent.getComponents();
+ List children = AWTUtilities.getVisibleChildren(parent);
if (isHorizontalIn(parent))
{
// sum up preferred widths of components, find maximum of preferred
// heights
- for (int index = 0; index < children.length; index++)
+ for (Iterator i = children.iterator(); i.hasNext();)
{
- Component comp = children[index];
+ Component comp = (Component) i.next();
Dimension sz = comp.getMaximumSize();
x += sz.width;
// Check for overflow.
@@ -487,9 +591,9 @@ public class BoxLayout implements LayoutManager2, Serializable
{
// sum up preferred heights of components, find maximum of
// preferred widths
- for (int index = 0; index < children.length; index++)
+ for (Iterator i = children.iterator(); i.hasNext();)
{
- Component comp = children[index];
+ Component comp = (Component) i.next();
Dimension sz = comp.getMaximumSize();
y += sz.height;
// Check for overflow
@@ -500,4 +604,146 @@ public class BoxLayout implements LayoutManager2, Serializable
}
return new Dimension(x, y);
}
+
+ /**
+ * Lays out the Container <code>c</code> in the layout direction
+ * <code>layoutDir</code>. The direction that is crossing the layout
+ * direction is specified in <code>crossDir</code>.
+ *
+ * @param parent
+ * @param layoutDir
+ * @param crossDir
+ */
+ void layoutAlgorithm(Container parent, Direction layoutDir, Direction crossDir)
+ {
+ if (parent != container)
+ throw new AWTError("invalid parent");
+
+ Dimension parentSize = parent.getSize();
+ Insets insets = parent.getInsets();
+ Dimension innerSize = new Dimension(parentSize.width - insets.left
+ - insets.right, parentSize.height
+ - insets.bottom - insets.top);
+
+ // Set all components to their preferredSizes and sum up the allocated
+ // space. Create SizeReqs for each component and store them in
+ // sizeReqs. Find the maximum size in the crossing direction.
+ List children = AWTUtilities.getVisibleChildren(parent);
+ Vector sizeReqs = new Vector();
+ int allocated = 0;
+ for (Iterator i = children.iterator(); i.hasNext();)
+ {
+ Component c = (Component) i.next();
+ SizeReq sizeReq = new SizeReq(c, layoutDir);
+ int preferred = layoutDir.size(c.getPreferredSize());
+ sizeReq.size = preferred;
+ allocated += preferred;
+ sizeReqs.add(sizeReq);
+ }
+
+ // Distribute remaining space (may be positive or negative) over components
+ int remainder = layoutDir.size(innerSize) - allocated;
+ distributeSpace(sizeReqs, remainder, layoutDir);
+
+ // Resize and relocate components. If the component can be sized to
+ // take the full space in the crossing direction, then do so, otherwise
+ // align according to its alingnmentX or alignmentY property.
+ int loc = 0;
+ int offset1 = layoutDir.lower(insets);
+ int offset2 = crossDir.lower(insets);
+ for (Iterator i = sizeReqs.iterator(); i.hasNext();)
+ {
+ SizeReq sizeReq = (SizeReq) i.next();
+ Component c = sizeReq.comp;
+ int availCrossSize = crossDir.size(innerSize);
+ int maxCross = crossDir.size(c.getMaximumSize());
+ int crossSize = Math.min(availCrossSize, maxCross);
+ int crossRemainder = availCrossSize - crossSize;
+ int crossLoc = (int) (crossDir.alignment(c) * crossRemainder);
+ layoutDir.setSize(c, sizeReq.size, crossSize);
+ layoutDir.setLocation(c, offset1 + loc, offset2 + crossLoc);
+ loc += sizeReq.size;
+ }
+ }
+
+ /**
+ * Distributes some space over a set of components. This implementation
+ * tries to set the components as close as possible to their
+ * <code>preferredSize</code>s, and respects the components
+ * <code>minimumSize</code> and <code>maximumSize</code>.
+ *
+ * The algorithm is implemented as follows:
+ *
+ * <ul>
+ * <li>The <code>remainder</code> is divided by the number of components
+ * in <code>freeComponents</code>.</li>
+ * <li>The result is added to (or substracted from) the size of each
+ * component.</li>
+ * <li>If the <code>minimumSize</code> or <code>maximumSize</code> of a
+ * component is exceeded, then this component is set to its
+ * <code>minimumSize</code> or <code>maximumSize</code>, it is removed from
+ * <code>freeComponents</code> and the difference is added to a new
+ * remainder.</li>
+ * <li>Finally, if there is a new remainer != 0 and the
+ * <code>freeComponents.size() != 0</code>, then this method is called
+ * recursivly to distribute the newly allocated remaining space.</li>
+ * </ul>
+ *
+ * @param freeComponents a SizeReq collection for components that have space
+ * left so that they can be moved freely
+ * @param remainder the space that should be distributed between the
+ * components
+ * @param dir the direction in which we operate
+ */
+ void distributeSpace(Collection freeComponents, int remainder, Direction dir)
+ {
+ // Sum up total available space in components. If the remainder is negative
+ // then we sum up the difference between minSize and size. If remainder
+ // is positive we sum up the difference between maxSize and size.
+ double totalAvailable = 0;
+ for (Iterator i = freeComponents.iterator(); i.hasNext();)
+ {
+ SizeReq sizeReq = (SizeReq) i.next();
+ if (remainder >= 0)
+ totalAvailable += sizeReq.max - sizeReq.size;
+ else
+ totalAvailable += sizeReq.min - sizeReq.size;
+ }
+ if (totalAvailable == 0)
+ if (remainder >= 0)
+ totalAvailable = 1;
+ else
+ totalAvailable = -1;
+
+ int newRemainder = 0;
+ Vector stillFree = new Vector();
+ for (Iterator i = freeComponents.iterator(); i.hasNext();)
+ {
+ // Add/substract share to component.
+ SizeReq sizeReq = (SizeReq) i.next();
+ double available = 0;
+ if (remainder >= 0)
+ available = sizeReq.max - sizeReq.size;
+ else
+ available = sizeReq.min - sizeReq.size;
+ int share = (int) ((available / totalAvailable) * remainder);
+ sizeReq.size += share;
+ // check for min/maximumSize
+ if (sizeReq.size < sizeReq.min)
+ {
+ newRemainder += sizeReq.size - sizeReq.min;
+ sizeReq.size = sizeReq.min;
+ }
+ else if (sizeReq.size > sizeReq.max)
+ {
+ newRemainder += sizeReq.size - sizeReq.max;
+ sizeReq.size = sizeReq.max;
+ }
+ else
+ stillFree.add(sizeReq);
+ }
+ // recursivly call this method if necessary
+ if (newRemainder != 0 && stillFree.size() > 0)
+ distributeSpace(stillFree, newRemainder, dir);
+ }
}
diff --git a/javax/swing/ButtonGroup.java b/javax/swing/ButtonGroup.java
index 5f6a28d86..3de1d4b9f 100644
--- a/javax/swing/ButtonGroup.java
+++ b/javax/swing/ButtonGroup.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,7 +43,25 @@ import java.util.Vector;
/**
- * DOCUMENT ME!
+ * Logically groups a set of buttons, so that only one of the buttons in
+ * a <code>ButtonGroup</code> can be selected at the same time. If one
+ * button in a <code>ButtonGroup</code> is selected, all other buttons
+ * are automatically deselected.
+ *
+ * While <code>ButtonGroup</code> can be used for all buttons that are derived
+ * from {@link AbstractButton}, it is normally only used for
+ * {@link JRadioButton}s, {@link JRadioButtonMenuItem}s and
+ * {@link JToggleButton}s.
+ *
+ * You could use it for {@link JCheckBox}es, but for the sake of usability
+ * this is strongly discouraged because the common expectation of checkboxes
+ * is that the user is allowed to make multiple selections.
+ *
+ * It makes no sense to put {@link JButton}s or {@link JMenuItem}s in
+ * a <code>ButtonGroup</code> because they don't implement the
+ * <code>selected</code> semantics.
+ *
+ * @author original author unknown
*/
public class ButtonGroup implements Serializable
{
@@ -138,16 +156,16 @@ public class ButtonGroup implements Serializable
if (b && sel != m)
{
- ButtonModel old = sel;
- sel = m;
-
- if (old != null)
- old.setSelected(false);
- AbstractButton button = FindButton(old);
- if (button != null)
- button.repaint();
+ ButtonModel old = sel;
+ sel = m;
+
+ if (old != null)
+ old.setSelected(false);
+ AbstractButton button = FindButton(old);
+ if (button != null)
+ button.repaint();
}
- else if (! b && sel == m)
+ else if (!b && sel == m)
m.setSelected(true);
}
diff --git a/javax/swing/ButtonModel.java b/javax/swing/ButtonModel.java
index 0c704bed2..1bdc5d185 100644
--- a/javax/swing/ButtonModel.java
+++ b/javax/swing/ButtonModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -44,6 +44,9 @@ import java.awt.event.ItemListener;
import javax.swing.event.ChangeListener;
+/**
+ * The data model that is used in all kinds of buttons.
+ */
public interface ButtonModel extends ItemSelectable
{
boolean isArmed();
diff --git a/javax/swing/CellEditor.java b/javax/swing/CellEditor.java
index 5c298dbca..bdb166575 100644
--- a/javax/swing/CellEditor.java
+++ b/javax/swing/CellEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,9 +43,10 @@ import java.util.EventObject;
import javax.swing.event.CellEditorListener;
/**
- * CellEditor
- * @author Andrew Selkirk
- * @version 1.0
+ * Provides edit capabilities for components that display cells like
+ * {@link JTable}, {@link JList} and {@link JTree}.
+ *
+ * @author Andrew Selkirk
*/
public interface CellEditor
{
diff --git a/javax/swing/CellRendererPane.java b/javax/swing/CellRendererPane.java
index 0ef270bf8..886d5c5f2 100644
--- a/javax/swing/CellRendererPane.java
+++ b/javax/swing/CellRendererPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,20 +42,17 @@ import java.awt.Component;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Rectangle;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleRole;
/**
- * The CellRendererPane's purpose is to paint the cells of JList, JTable and
- * JTree. It intercepts the usual paint tree, so that we don't walk up and
+ * Paints the cells of JList, JTable and JTree.
+ * It intercepts the usual paint tree, so that we don't walk up and
* repaint everything.
*
- * @author Andrew Selkirk
- * @version 1.0
+ * @author Andrew Selkirk
*/
public class CellRendererPane
extends Container
@@ -64,7 +61,7 @@ public class CellRendererPane
private static final long serialVersionUID = -7642183829532984273L;
/**
- * AccessibleCellRendererPane
+ * Provides accessibility support for CellRendererPanes.
*/
protected class AccessibleCellRendererPane extends AccessibleAWTContainer
{
@@ -72,7 +69,6 @@ public class CellRendererPane
/**
* Constructor AccessibleCellRendererPane
- * @param component TODO
*/
protected AccessibleCellRendererPane()
{
@@ -216,10 +212,9 @@ public class CellRendererPane
* @param h the height of the components drawing area
*/
public void paintComponent(Graphics graphics, Component c,
- Container p, int x, int y, int w, int h) {
-
+ Container p, int x, int y, int w, int h)
+ {
paintComponent(graphics, c, p, x, y, w, h, false);
-
} // paintComponent()
/**
@@ -237,9 +232,7 @@ public class CellRendererPane
public void paintComponent(Graphics graphics, Component c,
Container p, Rectangle r)
{
-
paintComponent(graphics, c, p, r.x, r.y, r.width, r.height);
-
} // paintComponent()
/**
diff --git a/javax/swing/ComboBoxEditor.java b/javax/swing/ComboBoxEditor.java
index 30813175a..4eb5fc562 100644
--- a/javax/swing/ComboBoxEditor.java
+++ b/javax/swing/ComboBoxEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,11 +41,10 @@ import java.awt.Component;
import java.awt.event.ActionListener;
/**
- * ComboBoxEditor
+ * Provides edit capabilities for {@link JComboBox}es.
*
* @author Andrew Selkirk
* @author Olga Rodimina
- * @version 1.0
*/
public interface ComboBoxEditor
{
diff --git a/javax/swing/ComboBoxModel.java b/javax/swing/ComboBoxModel.java
index c3b59bda6..6968db490 100644
--- a/javax/swing/ComboBoxModel.java
+++ b/javax/swing/ComboBoxModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,13 +39,12 @@ package javax.swing;
/**
- * ComboBoxModel is a data model for JComboBox. This model keeps
+ * The data model for {@link JComboBox}. This model keeps
* track of elements contained in the JComboBox as well as the current
* combo box selection. Whenever selection in the JComboBox changes, the
* ComboBoxModel should fire ListDataEvents to ComboBox's ListDataListeners.
*
- * @author Andrew Selkirk
- * @version 1.0
+ * @author Andrew Selkirk
*/
public interface ComboBoxModel extends ListModel
{
diff --git a/javax/swing/ComponentInputMap.java b/javax/swing/ComponentInputMap.java
index 1c85892f5..f95c31045 100644
--- a/javax/swing/ComponentInputMap.java
+++ b/javax/swing/ComponentInputMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,9 @@ package javax.swing;
/**
+ * An {@link InputMap} that is associated with a particular {@link JComponent}.
+ * The component is notified when its <code>ComponentInputMap</code> changes.
+ *
* @author Andrew Selkirk
* @author Michael Koch
*/
@@ -70,7 +73,7 @@ public class ComponentInputMap extends InputMap
* If actionMapKey is null an existing entry will be removed.
*
* @param keystroke the keystroke for the entry
- * @param actionMapKey the action.
+ * @param value the action.
*/
public void put(KeyStroke keystroke, Object value)
{
@@ -90,7 +93,7 @@ public class ComponentInputMap extends InputMap
/**
* Remove an entry from the <code>InputMap</code>.
*
- * @param key the key of the entry to remove
+ * @param keystroke the key of the entry to remove
*/
public void remove(KeyStroke keystroke)
{
@@ -103,7 +106,7 @@ public class ComponentInputMap extends InputMap
*
* @param parentMap the new parent
*
- * @exception IllegalArgument if parentMap is not a
+ * @exception IllegalArgumentException if parentMap is not a
* <code>ComponentInputMap</code> or not associated with the same component
*/
public void setParent(InputMap parentMap)
diff --git a/javax/swing/DebugGraphics.java b/javax/swing/DebugGraphics.java
index 074d45114..137b82337 100644
--- a/javax/swing/DebugGraphics.java
+++ b/javax/swing/DebugGraphics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,9 +50,11 @@ import java.text.AttributedCharacterIterator;
/**
- * DebugGraphics
- * @author Andrew Selkirk
- * @version 1.0
+ * An extension of {@link Graphics} that can be used for debugging
+ * custom Swing widgets. <code>DebugGraphics</code> has the ability to
+ * draw slowly and can log drawing actions.
+ *
+ * @author Andrew Selkirk
*/
public class DebugGraphics extends Graphics
{
@@ -404,11 +406,11 @@ public class DebugGraphics extends Graphics
{
try
{
- Thread.sleep(milliseconds);
+ Thread.sleep(milliseconds);
}
catch (InterruptedException e)
{
- // Ignore this.
+ // Ignore this.
}
}
@@ -424,13 +426,13 @@ public class DebugGraphics extends Graphics
{
for (int index = 0; index < (debugFlashCount - 1); ++index)
{
- graphics.setColor(color);
- graphics.drawRect(x, y, width, height);
- sleep(debugFlashTime);
-
- graphics.setColor(debugFlashColor);
- graphics.drawRect(x, y, width, height);
- sleep(debugFlashTime);
+ graphics.setColor(color);
+ graphics.drawRect(x, y, width, height);
+ sleep(debugFlashTime);
+
+ graphics.setColor(debugFlashColor);
+ graphics.drawRect(x, y, width, height);
+ sleep(debugFlashTime);
}
graphics.setColor(color);
@@ -449,13 +451,13 @@ public class DebugGraphics extends Graphics
{
for (int index = 0; index < (debugFlashCount - 1); ++index)
{
- graphics.setColor(color);
- graphics.fillRect(x, y, width, height);
- sleep(debugFlashTime);
-
- graphics.setColor(debugFlashColor);
- graphics.fillRect(x, y, width, height);
- sleep(debugFlashTime);
+ graphics.setColor(color);
+ graphics.fillRect(x, y, width, height);
+ sleep(debugFlashTime);
+
+ graphics.setColor(debugFlashColor);
+ graphics.fillRect(x, y, width, height);
+ sleep(debugFlashTime);
}
graphics.setColor(color);
@@ -696,13 +698,13 @@ public class DebugGraphics extends Graphics
{
for (int index = 0; index < (debugFlashCount - 1); ++index)
{
- graphics.setColor(color);
- graphics.drawChars(data, offset, length, x, y);
- sleep(debugFlashTime);
-
- graphics.setColor(debugFlashColor);
- graphics.drawChars(data, offset, length, x, y);
- sleep(debugFlashTime);
+ graphics.setColor(color);
+ graphics.drawChars(data, offset, length, x, y);
+ sleep(debugFlashTime);
+
+ graphics.setColor(debugFlashColor);
+ graphics.drawChars(data, offset, length, x, y);
+ sleep(debugFlashTime);
}
graphics.setColor(color);
diff --git a/javax/swing/DefaultBoundedRangeModel.java b/javax/swing/DefaultBoundedRangeModel.java
index 9c1962379..10de4b948 100644
--- a/javax/swing/DefaultBoundedRangeModel.java
+++ b/javax/swing/DefaultBoundedRangeModel.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,7 +47,7 @@ import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
/**
- * A default implementation of <code>BoundedRangeModel</code>.
+ * The default implementation of <code>BoundedRangeModel</code>.
*
* @author Andrew Selkirk (aselkirk@sympatico.ca)
* @author Sascha Brawer (brawer@dandelis.ch)
@@ -61,7 +61,6 @@ public class DefaultBoundedRangeModel
*/
private static final long serialVersionUID = 5034068491295259790L;
-
/**
* An event that is sent to all registered {@link ChangeListener}s
* when the state of this range model has changed.
@@ -73,13 +72,11 @@ public class DefaultBoundedRangeModel
*/
protected transient ChangeEvent changeEvent;
-
/**
* The list of the currently registered EventListeners.
*/
protected EventListenerList listenerList = new EventListenerList();
-
/**
* The current value of the range model, which is always between
* {@link #minimum} and ({@link #maximum} - {@link #extent}). In a
@@ -88,7 +85,6 @@ public class DefaultBoundedRangeModel
*/
private int value;
-
/**
* The current extent of the range model, which is a number greater
* than or equal to zero. In a scroll bar visualization of a {@link
@@ -97,28 +93,24 @@ public class DefaultBoundedRangeModel
*/
private int extent;
-
/**
* The current minimum value of the range model, which is always
* less than or equal to {@link #maximum}.
*/
private int minimum;
-
/**
* The current maximum value of the range model, which is always
* greater than or equal to {@link #minimum}.
*/
private int maximum;
-
/**
* A property that indicates whether the value of this {@link
* BoundedRangeModel} is going to change in the immediate future.
*/
private boolean isAdjusting;
-
/**
* Constructs a <code>DefaultBoundedRangeModel</code> with default
* values for the properties. The properties <code>value</code>,
@@ -134,29 +126,25 @@ public class DefaultBoundedRangeModel
maximum = 100;
}
-
/**
* Constructs a <code>DefaultBoundedRangeModel</code> with the
* specified values for some properties.
*
* @param value the initial value of the range model, which must be
- * a number between <code>minimum</code> and <code>(maximum -
- * extent)</code>. In a scroll bar visualization of a {@link
- * BoundedRangeModel}, the <code>value</code> is displayed as the
- * position of the thumb.
- *
+ * a number between <code>minimum</code> and <code>(maximum -
+ * extent)</code>. In a scroll bar visualization of a {@link
+ * BoundedRangeModel}, the <code>value</code> is displayed as the
+ * position of the thumb.
* @param extent the initial extent of the range model, which is a
- * number greater than or equal to zero. In a scroll bar
- * visualization of a {@link BoundedRangeModel}, the
- * <code>extent</code> is displayed as the size of the thumb.
- *
+ * number greater than or equal to zero. In a scroll bar
+ * visualization of a {@link BoundedRangeModel}, the
+ * <code>extent</code> is displayed as the size of the thumb.
* @param minimum the initial minimal value of the range model.
- *
* @param maximum the initial maximal value of the range model.
*
* @throws IllegalArgumentException if the following condition is
- * not satisfied: <code>minimum &lt;= value &lt;= value + extent &lt;=
- * maximum</code>.
+ * not satisfied: <code>minimum &lt;= value &lt;= value + extent &lt;=
+ * maximum</code>.
*/
public DefaultBoundedRangeModel(int value, int extent, int minimum,
int maximum)
@@ -172,7 +160,6 @@ public class DefaultBoundedRangeModel
// The isAdjusting field already has a false value by default.
}
-
/**
* Returns a string with all relevant properties of this range
* model.
@@ -190,7 +177,6 @@ public class DefaultBoundedRangeModel
+ ']';
}
-
/**
* Returns the current value of this bounded range model. In a
* scroll bar visualization of a {@link BoundedRangeModel}, the
@@ -203,7 +189,6 @@ public class DefaultBoundedRangeModel
return value;
}
-
/**
* Changes the current value of this bounded range model. In a
* scroll bar visualization of a {@link BoundedRangeModel}, the
@@ -226,7 +211,6 @@ public class DefaultBoundedRangeModel
}
}
-
/**
* Returns the current extent of this bounded range model, which is
* a number greater than or equal to zero. In a scroll bar
@@ -240,14 +224,13 @@ public class DefaultBoundedRangeModel
return extent;
}
-
/**
* Changes the current extent of this bounded range model. In a
* scroll bar visualization of a {@link BoundedRangeModel}, the
* <code>extent</code> is displayed as the size of the thumb.
*
* @param extent the new extent of the range model, which is a
- * number greater than or equal to zero.
+ * number greater than or equal to zero.
*/
public void setExtent(int extent)
{
@@ -262,7 +245,6 @@ public class DefaultBoundedRangeModel
}
}
-
/**
* Returns the current minimal value of this bounded range model.
*/
@@ -271,7 +253,6 @@ public class DefaultBoundedRangeModel
return minimum;
}
-
/**
* Changes the current minimal value of this bounded range model.
*
@@ -287,7 +268,6 @@ public class DefaultBoundedRangeModel
setRangeProperties(value, extent, minimum, maximum, isAdjusting);
}
-
/**
* Returns the current maximal value of this bounded range model.
*
@@ -298,7 +278,6 @@ public class DefaultBoundedRangeModel
return maximum;
}
-
/**
* Changes the current maximal value of this bounded range model.
*
@@ -315,7 +294,6 @@ public class DefaultBoundedRangeModel
setRangeProperties(value, extent, minimum, maximum, isAdjusting);
}
-
/**
* Returns whether or not the value of this bounded range model is
* going to change in the immediate future. Scroll bars set this
@@ -324,14 +302,13 @@ public class DefaultBoundedRangeModel
* <code>false</code> and post a final {@link ChangeEvent}.
*
* @return <code>true</code> if the value will change soon again;
- * <code>false</code> if the value will probably not change soon.
+ * <code>false</code> if the value will probably not change soon.
*/
public boolean getValueIsAdjusting()
{
return isAdjusting;
}
-
/**
* Specifies whether or not the value of this bounded range model is
* going to change in the immediate future. Scroll bars set this
@@ -340,8 +317,8 @@ public class DefaultBoundedRangeModel
* <code>false</code>.
*
* @param isAdjusting <code>true</code> if the value will change
- * soon again; <code>false</code> if the value will probably not
- * change soon.
+ * soon again; <code>false</code> if the value will probably not
+ * change soon.
*/
public void setValueIsAdjusting(boolean isAdjusting)
{
@@ -352,28 +329,23 @@ public class DefaultBoundedRangeModel
fireStateChanged();
}
-
/**
* Sets all properties.
*
* @param value the new value of the range model. In a scroll bar
- * visualization of a {@link BoundedRangeModel}, the
- * <code>value</code> is displayed as the position of the thumb.
- *
+ * visualization of a {@link BoundedRangeModel}, the
+ * <code>value</code> is displayed as the position of the thumb.
* @param extent the new extent of the range model, which is a
- * number greater than or equal to zero. In a scroll bar
- * visualization of a {@link BoundedRangeModel}, the
- * <code>extent</code> is displayed as the size of the thumb.
- *
+ * number greater than or equal to zero. In a scroll bar
+ * visualization of a {@link BoundedRangeModel}, the
+ * <code>extent</code> is displayed as the size of the thumb.
* @param minimum the new minimal value of the range model.
- *
* @param maximum the new maximal value of the range model.
-
* @param isAdjusting whether or not the value of this bounded range
- * model is going to change in the immediate future. Scroll bars set
- * this property to <code>true</code> while the thumb is being
- * dragged around; when the mouse is relased, they set the property
- * to <code>false</code>.
+ * model is going to change in the immediate future. Scroll bars set
+ * this property to <code>true</code> while the thumb is being
+ * dragged around; when the mouse is relased, they set the property
+ * to <code>false</code>.
*/
public void setRangeProperties(int value, int extent, int minimum,
int maximum, boolean isAdjusting)
@@ -400,7 +372,6 @@ public class DefaultBoundedRangeModel
fireStateChanged();
}
-
/**
* Subscribes a ChangeListener to state changes.
*
@@ -411,7 +382,6 @@ public class DefaultBoundedRangeModel
listenerList.add(ChangeListener.class, listener);
}
-
/**
* Cancels the subscription of a ChangeListener.
*
@@ -422,7 +392,6 @@ public class DefaultBoundedRangeModel
listenerList.remove(ChangeListener.class, listener);
}
-
/**
* Sends a {@link ChangeEvent} to any registered {@link
* ChangeListener}s.
@@ -441,15 +410,14 @@ public class DefaultBoundedRangeModel
listeners[i].stateChanged(changeEvent);
}
-
/**
* Retrieves the current listeners of the specified class.
*
- * @param c the class of listeners; usually {@link
- * ChangeListener}<code>.class</code>.
+ * @param listenerType the class of listeners; usually {@link
+ * ChangeListener}<code>.class</code>.
*
* @return an array with the currently subscribed listeners, or
- * an empty array if there are currently no listeners.
+ * an empty array if there are currently no listeners.
*
* @since 1.3
*/
@@ -458,14 +426,13 @@ public class DefaultBoundedRangeModel
return listenerList.getListeners(listenerType);
}
-
/**
* Returns all <code>ChangeListeners</code> that are currently
* subscribed for changes to this
* <code>DefaultBoundedRangeModel</code>.
*
* @return an array with the currently subscribed listeners, or
- * an empty array if there are currently no listeners.
+ * an empty array if there are currently no listeners.
*
* @since 1.4
*/
diff --git a/javax/swing/DefaultButtonModel.java b/javax/swing/DefaultButtonModel.java
index 021f02ced..f7d09d578 100644
--- a/javax/swing/DefaultButtonModel.java
+++ b/javax/swing/DefaultButtonModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package javax.swing;
+import java.awt.ItemSelectable;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
@@ -51,6 +52,7 @@ import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
/**
+ * The default implementation of {@link ButtonModel}.
* The purpose of this class is to model the dynamic state of an abstract
* button. The concrete button type holding this state may be a a "toggle"
* button (checkbox, radio button) or a "push" button (menu button, button).
@@ -265,9 +267,9 @@ public class DefaultButtonModel implements ButtonModel, Serializable
}
/**
- * Inform each ItemListener in the {@link listenerList} that an ItemEvent
+ * Inform each ItemListener in the {@link #listenerList} that an ItemEvent
* has occurred. This happens in response to any change to the {@link
- * stateMask} field.
+ * #stateMask} field.
*
* @param e The ItemEvent to fire
*/
@@ -280,9 +282,9 @@ public class DefaultButtonModel implements ButtonModel, Serializable
}
/**
- * Inform each ActionListener in the {@link listenerList} that an
+ * Inform each ActionListener in the {@link #listenerList} that an
* ActionEvent has occurred. This happens in response to the any change to
- * the {@link stateMask} field which makes the enabled, armed and pressed
+ * the {@link #stateMask} field which makes the enabled, armed and pressed
* properties all simultaneously <code>true</code>.
*
* @param e The ActionEvent to fire
@@ -296,7 +298,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
}
/**
- * Inform each ChangeListener in the {@link listenerList} that a ChangeEvent
+ * Inform each ChangeListener in the {@link #listenerList} that a ChangeEvent
* has occurred. This happens in response to the any change to a property
* of the model.
*/
@@ -309,55 +311,6 @@ public class DefaultButtonModel implements ButtonModel, Serializable
}
/**
- * Helper method to fire a ChangeEvent with the model as the event's source.
- *
- * @param stateflag DOCUMENT ME!
- * @param b DOCUMENT ME!
- */
- private void changeState(int stateflag, boolean b)
- {
- int oldstate = stateMask;
- int newstate;
-
- if (b)
- newstate = oldstate | stateflag;
- else
- newstate = oldstate & ~ stateflag;
-
- if (oldstate == newstate)
- return;
-
- if ((stateflag != SELECTED) && (stateflag != ENABLED)
- && (stateMask & ENABLED) == 0)
- return;
-
- stateMask = newstate;
-
- fireStateChanged();
-
- if ((oldstate & SELECTED) == 0 && (newstate & SELECTED) == SELECTED)
- {
- fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
- null, ItemEvent.SELECTED));
- if (group != null)
- group.setSelected(this, true);
- }
-
- else if ((oldstate & SELECTED) == SELECTED && (newstate & SELECTED) == 0)
- {
- fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
- null, ItemEvent.DESELECTED));
- if (group != null)
- group.setSelected(this, false);
- }
-
- else if (((oldstate & ARMED) == ARMED && (oldstate & PRESSED) == PRESSED)
- && ((newstate & ARMED) == ARMED && (newstate & PRESSED) == 0))
- fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
- actionCommand));
- }
-
- /**
* Get the value of the model's "armed" property.
*
* @return The current "armed" property
@@ -374,7 +327,22 @@ public class DefaultButtonModel implements ButtonModel, Serializable
*/
public void setArmed(boolean a)
{
- changeState(ARMED, a);
+ // if this call does not represent a CHANGE in state, then return
+ if ((a && isArmed()) || (!a && !isArmed()))
+ return;
+
+ // cannot change ARMED state unless button is enabled
+ if (!isEnabled())
+ return;
+
+ // make the change
+ if (a)
+ stateMask = stateMask | ARMED;
+ else
+ stateMask = stateMask & (~ARMED);
+
+ // notify interested ChangeListeners
+ fireStateChanged();
}
/**
@@ -394,7 +362,18 @@ public class DefaultButtonModel implements ButtonModel, Serializable
*/
public void setEnabled(boolean e)
{
- changeState(ENABLED, e);
+ // if this call does not represent a CHANGE in state, then return
+ if ((e && isEnabled()) || (!e && !isEnabled()))
+ return;
+
+ // make the change
+ if (e)
+ stateMask = stateMask | ENABLED;
+ else
+ stateMask = stateMask & (~ENABLED);
+
+ // notify interested ChangeListeners
+ fireStateChanged();
}
/**
@@ -404,7 +383,27 @@ public class DefaultButtonModel implements ButtonModel, Serializable
*/
public void setPressed(boolean p)
{
- changeState(PRESSED, p);
+ // if this call does not represent a CHANGE in state, then return
+ if ((p && isPressed()) || (!p && !isPressed()))
+ return;
+
+ // cannot changed PRESSED state unless button is enabled
+ if (!isEnabled())
+ return;
+
+ // make the change
+ if (p)
+ stateMask = stateMask | PRESSED;
+ else
+ stateMask = stateMask & (~PRESSED);
+
+ // if button is armed and was released, fire action event
+ if (!p && isArmed())
+ fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
+ actionCommand));
+
+ // notify interested ChangeListeners
+ fireStateChanged();
}
/**
@@ -424,7 +423,22 @@ public class DefaultButtonModel implements ButtonModel, Serializable
*/
public void setRollover(boolean r)
{
- changeState(ROLLOVER, r);
+ // if this call does not represent a CHANGE in state, then return
+ if ((r && isRollover()) || (!r && !isRollover()))
+ return;
+
+ // cannot set ROLLOVER property unless button is enabled
+ if (!isEnabled())
+ return;
+
+ // make the change
+ if (r)
+ stateMask = stateMask | ROLLOVER;
+ else
+ stateMask = stateMask & (~ROLLOVER);
+
+ // notify interested ChangeListeners
+ fireStateChanged();
}
/**
@@ -434,7 +448,34 @@ public class DefaultButtonModel implements ButtonModel, Serializable
*/
public void setSelected(boolean s)
{
- changeState(SELECTED, s);
+ // if this call does not represent a CHANGE in state, then return
+ if ((s && isSelected()) || (!s && !isSelected()))
+ return;
+
+ // make the change
+ if (s)
+ stateMask = stateMask | SELECTED;
+ else
+ stateMask = stateMask & (~SELECTED);
+
+ // notify interested ChangeListeners
+ fireStateChanged();
+
+ // fire ItemStateChanged events
+ if (s)
+ {
+ fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
+ null, ItemEvent.SELECTED));
+ if (group != null)
+ group.setSelected(this, true);
+ }
+ else
+ {
+ fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
+ null, ItemEvent.DESELECTED));
+ if (group != null)
+ group.setSelected(this, false);
+ }
}
/**
@@ -476,8 +517,8 @@ public class DefaultButtonModel implements ButtonModel, Serializable
{
if (mnemonic != key)
{
- mnemonic = key;
- fireStateChanged();
+ mnemonic = key;
+ fireStateChanged();
}
}
@@ -492,8 +533,8 @@ public class DefaultButtonModel implements ButtonModel, Serializable
{
if (actionCommand != s)
{
- actionCommand = s;
- fireStateChanged();
+ actionCommand = s;
+ fireStateChanged();
}
}
@@ -519,8 +560,8 @@ public class DefaultButtonModel implements ButtonModel, Serializable
{
if (group != g)
{
- group = g;
- fireStateChanged();
+ group = g;
+ fireStateChanged();
}
}
diff --git a/javax/swing/DefaultCellEditor.java b/javax/swing/DefaultCellEditor.java
index 26bf708be..52d2e5254 100644
--- a/javax/swing/DefaultCellEditor.java
+++ b/javax/swing/DefaultCellEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,9 +50,13 @@ import javax.swing.table.TableCellEditor;
import javax.swing.tree.TreeCellEditor;
/**
- * DefaultCellEditor
- * @author Andrew Selkirk
- * @version 1.0
+ * The default implementation of {@link TableCellEditor} and
+ * {@link TreeCellEditor}. It provides editor components for
+ * some standard object types.
+ *
+ * @author Andrew Selkirk
+ *
+ * @status mostly unimplemented
*/
public class DefaultCellEditor
extends AbstractCellEditor
@@ -61,7 +65,9 @@ public class DefaultCellEditor
private static final long serialVersionUID = 3564035141373880027L;
/**
- * EditorDelegate
+ * Delegates a couple of method calls (such as {@link #isCellEditable)
+ * to the component it contains and listens for events that indicate
+ * that editing has stopped.
*/
protected class EditorDelegate
implements ActionListener, ItemListener, Serializable
@@ -75,7 +81,6 @@ public class DefaultCellEditor
/**
* Constructor EditorDelegate
- * @param value0 TODO
*/
protected EditorDelegate()
{
@@ -83,212 +88,261 @@ public class DefaultCellEditor
/**
* setValue
+ *
* @param event TODO
*/
public void setValue(Object event)
{
}
- /**
- * getCellEditorValue
- * @returns Object
- */
- public Object getCellEditorValue() {
- return null; // TODO
- } // getCellEditorValue()
-
- /**
- * isCellEditable
- * @param event TODO
- * @returns boolean
- */
- public boolean isCellEditable(EventObject event) {
- return false; // TODO
- } // isCellEditable()
-
- /**
- * shouldSelectCell
- * @param event TODO
- * @returns boolean
- */
- public boolean shouldSelectCell(EventObject event) {
- return false; // TODO
- } // shouldSelectCell()
-
- /**
- * stopCellEditing
- * @returns boolean
- */
- public boolean stopCellEditing() {
- return false; // TODO
- } // stopCellEditing()
-
- /**
- * cancelCellEditing
- */
- public void cancelCellEditing() {
- // TODO
- } // cancelCellEditing()
-
- /**
- * startCellEditing
- * @param event TODO
- * @returns boolean
- */
- public boolean startCellEditing(EventObject event) {
- return false; // TODO
- } // startCellEditing()
-
- /**
- * actionPerformed
- * @param event TODO
- */
- public void actionPerformed(ActionEvent event) {
- // TODO
- } // actionPerformed()
-
- /**
- * itemStateChanged
- * @param event TODO
- */
- public void itemStateChanged(ItemEvent event) {
- // TODO
- } // itemStateChanged()
-
-
- } // EditorDelegate
+ /**
+ * getCellEditorValue
+ *
+ * @returns Object
+ */
+ public Object getCellEditorValue()
+ {
+ return null; // TODO
+ } // getCellEditorValue()
- /**
- * editorComponent
- */
- protected JComponent editorComponent;
+ /**
+ * isCellEditable
+ *
+ * @param event TODO
+ *
+ * @returns boolean
+ */
+ public boolean isCellEditable(EventObject event)
+ {
+ return false; // TODO
+ } // isCellEditable()
- /**
- * delegate
- */
- protected EditorDelegate delegate;
+ /**
+ * shouldSelectCell
+ *
+ * @param event TODO
+ *
+ * @returns boolean
+ */
+ public boolean shouldSelectCell(EventObject event)
+ {
+ return false; // TODO
+ } // shouldSelectCell()
- /**
- * clickCountToStart
- */
- protected int clickCountToStart;
+ /**
+ * stopCellEditing
+ *
+ * @returns boolean
+ */
+ public boolean stopCellEditing()
+ {
+ return false; // TODO
+ } // stopCellEditing()
- /**
- * Constructor DefaultCellEditor
- * @param textfield TODO
- */
- public DefaultCellEditor(JTextField textfield) {
- // TODO
- } // DefaultCellEditor()
+ /**
+ * cancelCellEditing
+ */
+ public void cancelCellEditing()
+ {
+ // TODO
+ } // cancelCellEditing()
- /**
- * Constructor DefaultCellEditor
- * @param checkbox TODO
- */
- public DefaultCellEditor(JCheckBox checkbox) {
- // TODO
- } // DefaultCellEditor()
+ /**
+ * startCellEditing
+ *
+ * @param event TODO
+ *
+ * @returns boolean
+ */
+ public boolean startCellEditing(EventObject event)
+ {
+ return false; // TODO
+ } // startCellEditing()
- /**
- * Constructor DefaultCellEditor
- * @param combobox TODO
- */
- public DefaultCellEditor(JComboBox combobox) {
- // TODO
- } // DefaultCellEditor()
+ /**
+ * actionPerformed
+ *
+ * @param event TODO
+ */
+ public void actionPerformed(ActionEvent event)
+ {
+ // TODO
+ } // actionPerformed()
- /**
- * getComponent
- * @returns Component
- */
- public Component getComponent() {
- return null; // TODO
- } // getComponent()
+ /**
+ * itemStateChanged
+ *
+ * @param event TODO
+ */
+ public void itemStateChanged(ItemEvent event)
+ {
+ // TODO
+ } // itemStateChanged()
- /**
- * getClickCountToStart
- * @returns int
- */
- public int getClickCountToStart() {
- return 0; // TODO
- } // getClickCountToStart()
+ } // EditorDelegate
/**
- * setClickCountToStart
- * @param count TODO
- */
- public void setClickCountToStart(int count) {
- // TODO
- } // setClickCountToStart()
+ * editorComponent
+ */
+ protected JComponent editorComponent;
- /**
- * getCellEditorValue
- * @returns Object
- */
- public Object getCellEditorValue() {
- return null; // TODO
- } // getCellEditorValue()
+ /**
+ * delegate
+ */
+ protected EditorDelegate delegate;
- /**
- * isCellEditable
- * @param event TODO
- * @returns boolean
- */
- public boolean isCellEditable(EventObject event) {
- return false; // TODO
- } // isCellEditable()
+ /**
+ * clickCountToStart
+ */
+ protected int clickCountToStart;
- /**
- * shouldSelectCell
- * @param event TODO
- * @returns boolean
- */
- public boolean shouldSelectCell(EventObject event) {
- return false; // TODO
- } // shouldSelectCell()
+ /**
+ * Constructor DefaultCellEditor
+ *
+ * @param textfield TODO
+ */
+ public DefaultCellEditor(JTextField textfield)
+ {
+ // TODO
+ } // DefaultCellEditor()
- /**
- * stopCellEditing
- * @returns boolean
- */
- public boolean stopCellEditing() {
- return false; // TODO
- } // stopCellEditing()
+ /**
+ * Constructor DefaultCellEditor
+ *
+ * @param checkbox TODO
+ */
+ public DefaultCellEditor(JCheckBox checkbox)
+ {
+ // TODO
+ } // DefaultCellEditor()
- /**
- * cancelCellEditing
- */
- public void cancelCellEditing() {
- // TODO
- } // cancelCellEditing()
+ /**
+ * Constructor DefaultCellEditor
+ *
+ * @param combobox TODO
+ */
+ public DefaultCellEditor(JComboBox combobox)
+ {
+ // TODO
+ } // DefaultCellEditor()
- /**
- * getTreeCellEditorComponent
- * @param tree TODO
- * @param value TODO
- * @param isSelected TODO
- * @param expanded TODO
- * @param leaf TODO
- * @param row TODO
- * @returns Component
- */
- public Component getTreeCellEditorComponent(JTree tree,
- Object value, boolean isSelected, boolean expanded,
- boolean leaf, int row) {
- return null; // TODO
- } // getTreeCellEditorComponent()
+ /**
+ * getComponent
+ *
+ * @returns Component
+ */
+ public Component getComponent()
+ {
+ return null; // TODO
+ } // getComponent()
- /**
- * getTableCellEditorComponent
- * @param tree TODO
- * @param value TODO
- * @param isSelected TODO
- * @param row TODO
- * @param column TODO
- * @returns Component
- */
- public Component getTableCellEditorComponent(JTable tree,
- Object value, boolean isSelected, int row, int column) {
- return null; // TODO
- } // getTableCellEditorComponent()
+ /**
+ * getClickCountToStart
+ *
+ * @returns int
+ */
+ public int getClickCountToStart()
+ {
+ return 0; // TODO
+ } // getClickCountToStart()
+
+ /**
+ * setClickCountToStart
+ *
+ * @param count TODO
+ */
+ public void setClickCountToStart(int count)
+ {
+ // TODO
+ } // setClickCountToStart()
+
+ /**
+ * getCellEditorValue
+ *
+ * @returns Object
+ */
+ public Object getCellEditorValue()
+ {
+ return null; // TODO
+ } // getCellEditorValue()
+
+ /**
+ * isCellEditable
+ *
+ * @param event TODO
+ *
+ * @returns boolean
+ */
+ public boolean isCellEditable(EventObject event)
+ {
+ return false; // TODO
+ } // isCellEditable()
+
+ /**
+ * shouldSelectCell
+ *
+ * @param event TODO
+ *
+ * @returns boolean
+ */
+ public boolean shouldSelectCell(EventObject event)
+ {
+ return false; // TODO
+ } // shouldSelectCell()
+
+ /**
+ * stopCellEditing
+ *
+ * @returns boolean
+ */
+ public boolean stopCellEditing()
+ {
+ return false; // TODO
+ } // stopCellEditing()
+
+ /**
+ * cancelCellEditing
+ */
+ public void cancelCellEditing()
+ {
+ // TODO
+ } // cancelCellEditing()
+
+ /**
+ * getTreeCellEditorComponent
+ *
+ * @param tree TODO
+ * @param value TODO
+ * @param isSelected TODO
+ * @param expanded TODO
+ * @param leaf TODO
+ * @param row TODO
+ *
+ * @returns Component
+ */
+ public Component getTreeCellEditorComponent(JTree tree, Object value,
+ boolean isSelected,
+ boolean expanded, boolean leaf,
+ int row)
+ {
+ return null; // TODO
+ } // getTreeCellEditorComponent()
+
+ /**
+ * getTableCellEditorComponent
+ *
+ * @param tree TODO
+ * @param value TODO
+ * @param isSelected TODO
+ * @param row TODO
+ * @param column TODO
+ *
+ * @returns Component
+ */
+ public Component getTableCellEditorComponent(JTable tree, Object value,
+ boolean isSelected, int row,
+ int column)
+ {
+ return null; // TODO
+ } // getTableCellEditorComponent()
}
diff --git a/javax/swing/DefaultComboBoxModel.java b/javax/swing/DefaultComboBoxModel.java
index 496551e00..b48b968d6 100644
--- a/javax/swing/DefaultComboBoxModel.java
+++ b/javax/swing/DefaultComboBoxModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,7 +43,8 @@ import java.util.Vector;
/**
- * DefaultComboBoxModel is a data model for JComboBox. This model keeps track
+ * The default implementation of {@link MutableComboBoxModel}.
+ * This model keeps track
* of elements contained in the JComboBox as well as the current combo box
* selection. Whenever selection in the JComboBox changes, the ComboBoxModel
* will fire ListDataEvents to ComboBox's ListDataListeners.
@@ -51,7 +52,6 @@ import java.util.Vector;
* @author Andrew Selkirk
* @author Olga Rodimina
* @author Robert Schuster
- * @version 1.0
*/
public class DefaultComboBoxModel extends AbstractListModel
implements MutableComboBoxModel, Serializable
@@ -192,9 +192,8 @@ public class DefaultComboBoxModel extends AbstractListModel
public void setSelectedItem(Object object)
{
- /* Updates the selected item only if the given object
- * is null or in the list (this is how the JDK behaves).
- */
+ // Updates the selected item only if the given object
+ // is null or in the list (this is how the JDK behaves).
if(object == null || list.contains(object)) {
selectedItem = object;
fireContentsChanged(this, -1, -1);
diff --git a/javax/swing/DefaultDesktopManager.java b/javax/swing/DefaultDesktopManager.java
index a0dd5e2d1..2b8977e9d 100644
--- a/javax/swing/DefaultDesktopManager.java
+++ b/javax/swing/DefaultDesktopManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -49,8 +49,8 @@ import java.io.Serializable;
import javax.swing.JInternalFrame.JDesktopIcon;
/**
- * DefaultDesktopManager is the default implementation of DesktopManager for
- * swing. It implements the basic beaviours for JInternalFrames in arbitrary
+ * The default implementation of DesktopManager for
+ * Swing. It implements the basic beaviours for JInternalFrames in arbitrary
* parents. The methods provided by the class are not meant to be called by
* the user, instead, the JInternalFrame methods will call these methods.
*/
@@ -189,14 +189,14 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
p.setSelectedFrame(frame);
else
{
- try
- {
- frame.setSelected(true);
- }
- catch (PropertyVetoException e)
- {
- // Do nothing.
- }
+ try
+ {
+ frame.setSelected(true);
+ }
+ catch (PropertyVetoException e)
+ {
+ // Do nothing.
+ }
}
setBoundsForFrame(frame, normalBounds.x, normalBounds.y,
@@ -217,32 +217,32 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
p.setSelectedFrame(null);
else
{
- try
- {
- frame.setSelected(false);
- }
- catch (PropertyVetoException e)
- {
- }
+ try
+ {
+ frame.setSelected(false);
+ }
+ catch (PropertyVetoException e)
+ {
+ }
}
Container c = frame.getParent();
- if (! wasIcon(frame))
+ if (!wasIcon(frame))
{
- Rectangle r = getBoundsForIconOf(frame);
- icon.setBounds(r);
- setWasIcon(frame, Boolean.TRUE);
+ Rectangle r = getBoundsForIconOf(frame);
+ icon.setBounds(r);
+ setWasIcon(frame, Boolean.TRUE);
}
if (c != null)
{
- if (icon != null)
- {
- c.add(icon);
- icon.setVisible(true);
- }
- c.remove(frame);
+ if (icon != null)
+ {
+ c.add(icon);
+ icon.setVisible(true);
+ }
+ c.remove(frame);
}
}
@@ -261,22 +261,22 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
c.add(frame);
frame.setVisible(true);
- if (! frame.isSelected())
+ if (!frame.isSelected())
{
- JDesktopPane p = frame.getDesktopPane();
- if (p != null)
- p.setSelectedFrame(frame);
- else
- {
- try
- {
- frame.setSelected(true);
- }
- catch (PropertyVetoException e)
- {
- // Do nothing.
- }
- }
+ JDesktopPane p = frame.getDesktopPane();
+ if (p != null)
+ p.setSelectedFrame(frame);
+ else
+ {
+ try
+ {
+ frame.setSelected(true);
+ }
+ catch (PropertyVetoException e)
+ {
+ // Do nothing.
+ }
+ }
}
c.invalidate();
@@ -296,13 +296,13 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
p.setSelectedFrame(frame);
else
{
- try
- {
- frame.setSelected(true);
- }
- catch (PropertyVetoException e)
- {
- }
+ try
+ {
+ frame.setSelected(true);
+ }
+ catch (PropertyVetoException e)
+ {
+ }
}
frame.toFront();
@@ -318,18 +318,18 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
JDesktopPane p = frame.getDesktopPane();
if (p != null)
{
- if (p.getSelectedFrame() == frame)
- p.setSelectedFrame(null);
+ if (p.getSelectedFrame() == frame)
+ p.setSelectedFrame(null);
}
else
{
- try
- {
- frame.setSelected(false);
- }
- catch (PropertyVetoException e)
- {
- }
+ try
+ {
+ frame.setSelected(false);
+ }
+ catch (PropertyVetoException e)
+ {
+ }
}
}
@@ -361,6 +361,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
* This method is called to drag the JInternalFrame to a new location.
*
* @param component The JComponent to drag, usually a JInternalFrame.
+ *
* @param newX The new x coordinate.
* @param newY The new y coordinate.
*/
@@ -368,16 +369,16 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
{
if (currentDragMode == JDesktopPane.OUTLINE_DRAG_MODE)
{
- // FIXME: Do outline drag mode painting.
+ // FIXME: Do outline drag mode painting.
}
else
{
- Rectangle b = component.getBounds();
- if (component instanceof JDesktopIcon)
- component.setBounds(newX, newY, b.width, b.height);
- else
- setBoundsForFrame((JInternalFrame) component, newX, newY, b.width,
- b.height);
+ Rectangle b = component.getBounds();
+ if (component instanceof JDesktopIcon)
+ component.setBounds(newX, newY, b.width, b.height);
+ else
+ setBoundsForFrame((JInternalFrame) component, newX, newY, b.width,
+ b.height);
}
}
@@ -391,10 +392,10 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
{
if (currentDragMode == JDesktopPane.OUTLINE_DRAG_MODE)
{
- setBoundsForFrame((JInternalFrame) component, dragCache.x,
- dragCache.y, dragCache.width, dragCache.height);
- pane = null;
- dragCache = null;
+ setBoundsForFrame((JInternalFrame) component, dragCache.x, dragCache.y,
+ dragCache.width, dragCache.height);
+ pane = null;
+ dragCache = null;
}
component.repaint();
}
@@ -436,7 +437,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
if (currentDragMode == JDesktopPane.OUTLINE_DRAG_MODE)
{
- // FIXME: Do outline drag painting.
+ // FIXME: Do outline drag painting.
}
else
setBoundsForFrame(component, dragCache.x, dragCache.y, dragCache.width,
@@ -454,10 +455,10 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
{
if (currentDragMode == JDesktopPane.OUTLINE_DRAG_MODE)
{
- setBoundsForFrame((JInternalFrame) component, dragCache.x,
- dragCache.y, dragCache.width, dragCache.height);
- pane = null;
- dragCache = null;
+ setBoundsForFrame((JInternalFrame) component, dragCache.x, dragCache.y,
+ dragCache.width, dragCache.height);
+ pane = null;
+ dragCache = null;
}
component.repaint();
}
@@ -516,13 +517,14 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
// The icon also must not be placed where another icon is placed
// (regardless whether that frame is an icon currently or not)
JDesktopPane desktopPane = frame.getDesktopPane();
- Rectangle paneBounds = desktopPane.getBounds();
- Insets insets = desktopPane.getInsets();
- Dimension pref = frame.getDesktopIcon().getPreferredSize();
if (desktopPane == null)
return frame.getDesktopIcon().getBounds();
+ Rectangle paneBounds = desktopPane.getBounds();
+ Insets insets = desktopPane.getInsets();
+ Dimension pref = frame.getDesktopIcon().getPreferredSize();
+
Component[] frames = desktopPane.getComponents();
int count = 0;
@@ -534,12 +536,12 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
iconRects = new Rectangle[count];
for (int i = 0, j = 0; i < frames.length; i++)
if (frames[i] instanceof JDesktopIcon)
- iconRects[--count] = frames[i].getBounds();
+ iconRects[--count] = frames[i].getBounds();
else if (frames[i] instanceof JInternalFrame
&& ((JInternalFrame) frames[i]).getWasIcon()
&& frames[i] != frame)
- iconRects[--count] = ((JInternalFrame) frames[i]).getDesktopIcon()
- .getBounds();
+ iconRects[--count] = ((JInternalFrame) frames[i])
+ .getDesktopIcon().getBounds();
int startingX = insets.left;
int startingY = paneBounds.height - insets.bottom - pref.height;
@@ -549,25 +551,25 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
while (iconRects.length > 0)
{
- clear = true;
- for (int i = 0; i < iconRects.length; i++)
- {
- if (iconRects[i] != null && iconRects[i].intersects(ideal))
- {
- clear = false;
- break;
- }
- }
- if (clear)
- return ideal;
-
- startingX += pref.width;
- if (startingX + pref.width > paneBounds.width - insets.right)
- {
- startingX = insets.left;
- startingY -= pref.height;
- }
- ideal.setBounds(startingX, startingY, pref.width, pref.height);
+ clear = true;
+ for (int i = 0; i < iconRects.length; i++)
+ {
+ if (iconRects[i] != null && iconRects[i].intersects(ideal))
+ {
+ clear = false;
+ break;
+ }
+ }
+ if (clear)
+ return ideal;
+
+ startingX += pref.width;
+ if (startingX + pref.width > paneBounds.width - insets.right)
+ {
+ startingX = insets.left;
+ startingY -= pref.height;
+ }
+ ideal.setBounds(startingX, startingY, pref.width, pref.height);
}
return ideal;
diff --git a/javax/swing/DefaultFocusManager.java b/javax/swing/DefaultFocusManager.java
index b2c8c6e99..08db65168 100644
--- a/javax/swing/DefaultFocusManager.java
+++ b/javax/swing/DefaultFocusManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,113 +43,126 @@ import java.awt.event.KeyEvent;
import java.util.Stack;
/**
- * DefaultFocusManager
- * @author Andrew Selkirk
- * @version 1.0
+ * This class has been obsoleted by the new
+ * {@link java.awt.KeyboardFocusManager} and
+ * {@link java.awt.DefaultKeyboardFocusManager} API.
+ *
+ * @author Andrew Selkirk
*/
public class DefaultFocusManager extends FocusManager {
- //-------------------------------------------------------------
- // Variables --------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * historyStack
- */
- private Stack historyStack;
-
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
/**
- * Constructor DefaultFocusManager
- */
- public DefaultFocusManager() {
- // TODO
- } // DefaultFocusManager()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
+ * historyStack
+ */
+ private Stack historyStack;
+
+ /**
+ * Constructor DefaultFocusManager
+ */
+ public DefaultFocusManager()
+ {
+ // TODO
+ } // DefaultFocusManager()
/**
- * processKeyEvent
- * @param component TODO
- * @param event TODO
- */
- public void processKeyEvent(Component component, KeyEvent event) {
- // TODO
- } // processKeyEvent()
+ * processKeyEvent
+ *
+ * @param component
+ * TODO
+ * @param event
+ * TODO
+ */
+ public void processKeyEvent(Component component, KeyEvent event)
+ {
+ // TODO
+ } // processKeyEvent()
/**
- * focusNextComponent
- * @param component TODO
- */
- public void focusNextComponent(Component component) {
- // TODO
- } // focusNextComponent()
+ * focusNextComponent
+ *
+ * @param component
+ * TODO
+ */
+ public void focusNextComponent(Component component)
+ {
+ // TODO
+ } // focusNextComponent()
/**
- * focusPreviousComponent
- * @param component TODO
- */
- public void focusPreviousComponent(Component component) {
- // TODO
- } // focusPreviousComponent()
+ * focusPreviousComponent
+ *
+ * @param component
+ * TODO
+ */
+ public void focusPreviousComponent(Component component)
+ {
+ // TODO
+ } // focusPreviousComponent()
/**
- * getFirstComponent
- * @param container TODO
- * @returns Component
- */
- public Component getFirstComponent(Container container) {
- return null; // TODO
- } // getFirstComponent()
+ * getFirstComponent
+ *
+ * @param container
+ * TODO
+ * @returns Component
+ */
+ public Component getFirstComponent(Container container)
+ {
+ return null; // TODO
+ } // getFirstComponent()
/**
- * getLastComponent
- * @param container TODO
- * @returns Component
- */
- public Component getLastComponent(Container container) {
- return null; // TODO
- } // getLastComponent()
+ * getLastComponent
+ *
+ * @param container
+ * TODO
+ * @returns Component
+ */
+ public Component getLastComponent(Container container)
+ {
+ return null; // TODO
+ } // getLastComponent()
/**
- * getComponentBefore
- * @param container TODO
- * @param component TODO
- * @returns Component
- */
- public Component getComponentBefore(Container container,
- Component component) {
- return null; // TODO
- } // getComponentBefore()
+ * getComponentBefore
+ *
+ * @param container
+ * TODO
+ * @param component
+ * TODO
+ * @returns Component
+ */
+ public Component getComponentBefore(Container container, Component component)
+ {
+ return null; // TODO
+ } // getComponentBefore()
/**
- * getComponentAfter
- * @param container TODO
- * @param component TODO
- * @returns Component
- */
- public Component getComponentAfter(Container container,
- Component component) {
- return null; // TODO
- } // getComponentAfter()
+ * getComponentAfter
+ *
+ * @param container
+ * TODO
+ * @param component
+ * TODO
+ * @returns Component
+ */
+ public Component getComponentAfter(Container container, Component component)
+ {
+ return null; // TODO
+ } // getComponentAfter()
/**
- * compareTabOrder
- * @param component1 TODO
- * @param component2 TODO
- * @returns boolean
- */
- public boolean compareTabOrder(Component component1,
- Component component2) {
- return false; // TODO
- } // compareTabOrder()
-
+ * compareTabOrder
+ *
+ * @param component1
+ * TODO
+ * @param component2
+ * TODO
+ * @returns boolean
+ */
+ public boolean compareTabOrder(Component component1, Component component2)
+ {
+ return false; // TODO
+ } // compareTabOrder()
} // DefaultFocusManager
diff --git a/javax/swing/DefaultListCellRenderer.java b/javax/swing/DefaultListCellRenderer.java
index 91b8a8a2e..5a34ba7aa 100644
--- a/javax/swing/DefaultListCellRenderer.java
+++ b/javax/swing/DefaultListCellRenderer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,17 +46,23 @@ import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
/**
- * DefaultListCellRenderer. This class is responsible for rendering list
- * cells.
+ * The default implementation {@link ListCellRenderer}. It provides a standard
+ * renderer for data objects of all types via {@link Object#toString()}.
*
* @author Andrew Selkirk
- * @version 1.0
*/
public class DefaultListCellRenderer extends JLabel
implements ListCellRenderer, Serializable
{
private static final long serialVersionUID = 7708947179685189462L;
+ /**
+ * Subclasses <code>DefaultListCellRenderers</code> and implements
+ * {@link javax.swing.plaf.UIResource}. This is used by
+ * {@link javax.swing.plaf.ListUI} subclasses to provide a default for
+ * the <code>List.cellRenderer</code> property. If you want to override
+ * this property, use <code>DefaultListCellRenderer</code> or a subclass.
+ */
public static class UIResource extends DefaultListCellRenderer
implements javax.swing.plaf.UIResource
{
@@ -93,21 +99,21 @@ public class DefaultListCellRenderer extends JLabel
if (isSelected)
{
- setBackground(list.getSelectionBackground());
- setForeground(list.getSelectionForeground());
+ setBackground(list.getSelectionBackground());
+ setForeground(list.getSelectionForeground());
}
else
{
- setBackground(list.getBackground());
- setForeground(list.getForeground());
+ setBackground(list.getBackground());
+ setForeground(list.getForeground());
}
setEnabled(list.isEnabled());
setFont(list.getFont());
- // Use focusCellHighlightBorder when renderer has focus and
+ // Use focusCellHighlightBorder when renderer has focus and
// noFocusBorder otherwise
-
+
if (cellHasFocus)
setBorder(UIManager.getBorder("List.focusCellHighlightBorder"));
else
diff --git a/javax/swing/DefaultListModel.java b/javax/swing/DefaultListModel.java
index c3704dbea..fdbbb562c 100644
--- a/javax/swing/DefaultListModel.java
+++ b/javax/swing/DefaultListModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,7 +41,7 @@ import java.util.Enumeration;
import java.util.Vector;
/**
- * This is a default subclass of the {@link AbstractListModel}, used by
+ * The default implementation of {@link AbstractListModel}, used by
* {@link javax.swing.JList} and similar objects as the model of a list of
* values. The implementation is based on an underlying {@link
* java.util.Vector}.
@@ -67,7 +67,7 @@ public class DefaultListModel extends AbstractListModel
* @return The object at the given index
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds of the list <code>[0, size())</code>
+ * outside the bounds of the list <code>[0, size())</code>
*/
public Object elementAt(int index)
{
@@ -90,9 +90,9 @@ public class DefaultListModel extends AbstractListModel
* @param element The element to search for
*
* @return The first index in the list at which an object
- * <code>obj</code> exists such that <code>obj.equals(element)</code> is
- * <code>true</code>; if no such object exists, the method returns
- * <code>-1</code>
+ * <code>obj</code> exists such that <code>obj.equals(element)</code> is
+ * <code>true</code>; if no such object exists, the method returns
+ * <code>-1</code>
*/
public int indexOf(Object element)
{
@@ -107,9 +107,9 @@ public class DefaultListModel extends AbstractListModel
* @param startIndex The index to begin searching at
*
* @return The first index in the list, greater than or equal to
- * <code>startIndex</code>, at which an object <code>obj</code> exists
- * such that <code>obj.equals(element)</code> is <code>true</code>; if no
- * such object exists, the method returns <code>-1</code>
+ * <code>startIndex</code>, at which an object <code>obj</code> exists
+ * such that <code>obj.equals(element)</code> is <code>true</code>; if no
+ * such object exists, the method returns <code>-1</code>
*/
public int indexOf(Object element, int startIndex)
{
@@ -122,9 +122,9 @@ public class DefaultListModel extends AbstractListModel
* @param element The element to search for
*
* @return The last index in the list at which an object
- * <code>obj</code> exists such that <code>obj.equals(element)</code> is
- * <code>true</code>; if no such object exists, the method returns
- * <code>-1</code>
+ * <code>obj</code> exists such that <code>obj.equals(element)</code> is
+ * <code>true</code>; if no such object exists, the method returns
+ * <code>-1</code>
*/
public int lastIndexOf(Object element)
{
@@ -139,9 +139,9 @@ public class DefaultListModel extends AbstractListModel
* @param endIndex The index to finish searching at
*
* @return The last index in the list, less than to or equal to
- * <code>endIndexIndex</code>, at which an object <code>obj</code> exists
- * such that <code>obj.equals(element)</code> is <code>true</code>; if no
- * such object exists, the method returns <code>-1</code>
+ * <code>endIndexIndex</code>, at which an object <code>obj</code> exists
+ * such that <code>obj.equals(element)</code> is <code>true</code>; if no
+ * such object exists, the method returns <code>-1</code>
*/
public int lastIndexOf(Object element, int endIndex)
{
@@ -156,7 +156,7 @@ public class DefaultListModel extends AbstractListModel
* @return The list value at the provided index
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds of the list <code>[0, size())</code>
+ * outside the bounds of the list <code>[0, size())</code>
*/
public Object get(int index)
{
@@ -172,7 +172,7 @@ public class DefaultListModel extends AbstractListModel
* @return The value previously held at the specified index
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds of the list <code>[0, size())</code>
+ * outside the bounds of the list <code>[0, size())</code>
*/
public Object set(int index, Object element)
{
@@ -193,7 +193,7 @@ public class DefaultListModel extends AbstractListModel
* @param element The element to insert at the index
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds <code>[0, size()]</code>
+ * outside the bounds <code>[0, size()]</code>
*/
public void add(int index, Object element)
{
@@ -228,7 +228,7 @@ public class DefaultListModel extends AbstractListModel
* Gets an array containing the elements of the list.
*
* @return An array of the objects in the list, in the order they occur
- * in the list
+ * in the list
*/
public Object[] toArray()
{
@@ -241,7 +241,7 @@ public class DefaultListModel extends AbstractListModel
* @param element The element to search for
*
* @return <code>true</code> if <code>element</code> is a member of the
- * list, otherwise <code>false</code>
+ * list, otherwise <code>false</code>
*/
public boolean contains(Object element)
{
@@ -255,7 +255,7 @@ public class DefaultListModel extends AbstractListModel
* @param array The array to copy the list into
*
* @throws IndexOutOfBoundsException if the array is too small to hold the
- * elements of the list
+ * elements of the list
*/
public void copyInto(Object[] array)
{
@@ -283,7 +283,7 @@ public class DefaultListModel extends AbstractListModel
* @return The value at the index, which has been removed from the list
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds of the list <code>[0, size())</code>
+ * outside the bounds of the list <code>[0, size())</code>
*/
public Object remove(int index)
{
@@ -297,7 +297,7 @@ public class DefaultListModel extends AbstractListModel
* Determines whether the list is empty.
*
* @return <code>true</code> if the list is empty, otherwise
- * <code>false</code>
+ * <code>false</code>
*/
public boolean isEmpty()
{
@@ -348,14 +348,14 @@ public class DefaultListModel extends AbstractListModel
{
int oldSize = elements.size();
elements.setSize(size);
- if (oldSize < size)
- {
- fireIntervalAdded(this, oldSize, size - 1);
- }
- else if (oldSize > size)
- {
- this.fireIntervalRemoved(this, size, oldSize - 1);
- }
+ if (oldSize < size)
+ {
+ fireIntervalAdded(this, oldSize, size - 1);
+ }
+ else if (oldSize > size)
+ {
+ this.fireIntervalRemoved(this, size, oldSize - 1);
+ }
}
/**
@@ -396,7 +396,7 @@ public class DefaultListModel extends AbstractListModel
* @param index The list index at which to set a value
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds of the list <code>[0, size())</code>
+ * outside the bounds of the list <code>[0, size())</code>
*/
public void setElementAt(Object element, int index)
{
@@ -410,7 +410,7 @@ public class DefaultListModel extends AbstractListModel
* @param index The index of the element to remove
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds of the list <code>[0, size())</code>
+ * outside the bounds of the list <code>[0, size())</code>
*/
public void removeElementAt(int index)
{
@@ -429,7 +429,7 @@ public class DefaultListModel extends AbstractListModel
* @param index The index to insert the element at
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds <code>[0, size()]</code>
+ * outside the bounds <code>[0, size()]</code>
*/
public void insertElementAt(Object element, int index)
{
@@ -444,7 +444,7 @@ public class DefaultListModel extends AbstractListModel
* @param element The element to remove
*
* @return <code>true</code> if the element existed in the list (and was
- * removed), <code>false</code> otherwise
+ * removed), <code>false</code> otherwise
*/
public boolean removeElement(Object element)
{
@@ -481,8 +481,8 @@ public class DefaultListModel extends AbstractListModel
* @param endIndex The last index in the range to remove
*
* @throws ArrayIndexOutOfBoundsException if either index is outside the
- * valid range of indices for this list <code>[0, size())</code>
- * @throws IllegalArgumentException if <code>startIndex > endIndex</code>
+ * valid range of indices for this list <code>[0, size())</code>
+ * @throws IllegalArgumentException if <code>startIndex &gt; endIndex</code>
*/
public void removeRange(int startIndex, int endIndex)
{
@@ -512,7 +512,7 @@ public class DefaultListModel extends AbstractListModel
* @return The list value at the provided index
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
- * outside the bounds of the list <code>[0, size())</code>
+ * outside the bounds of the list <code>[0, size())</code>
*/
public Object getElementAt(int index)
{
diff --git a/javax/swing/DefaultListSelectionModel.java b/javax/swing/DefaultListSelectionModel.java
index 46ff27859..f8d544d9b 100644
--- a/javax/swing/DefaultListSelectionModel.java
+++ b/javax/swing/DefaultListSelectionModel.java
@@ -1,5 +1,5 @@
/* DefaultListSelectionModel.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,10 +47,10 @@ import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
/**
- * <p>This class provides a default implementation of {@link
- * ListSelectioModel}, which is used by {@link javax.swing.JList} and
+ * The default implementation of {@link ListSelectionModel},
+ * which is used by {@link javax.swing.JList} and
* similar classes to manage the selection status of a number of data
- * elements. </p>
+ * elements.
*
* <p>The class is organized <em>abstractly</em> as a set of intervals of
* integers. Each interval indicates an inclusive range of indices in a
@@ -78,7 +78,6 @@ public class DefaultListSelectionModel implements Cloneable,
*/
int selectionMode = MULTIPLE_INTERVAL_SELECTION;
-
/**
* The index of the "lead" of the most recent selection. The lead is the
* second argument in any call to {@link #setSelectionInterval}, {@link
@@ -88,7 +87,6 @@ public class DefaultListSelectionModel implements Cloneable,
*/
int leadSelectionIndex = -1;
-
/**
* The index of the "anchor" of the most recent selection. The anchor is
* the first argument in any call to {@link #setSelectionInterval},
@@ -102,12 +100,11 @@ public class DefaultListSelectionModel implements Cloneable,
*/
int anchorSelectionIndex = -1;
-
/**
* controls the range of indices provided in any {@link
* ListSelectionEvent} fired by the selectionModel. Let
* <code>[A,L]</code> be the range of indices between {@link
- * anchorSelectionIndex} and {@link leadSelectionIndex} inclusive, and
+ * #anchorSelectionIndex} and {@link #leadSelectionIndex} inclusive, and
* let <code>[i0,i1]</code> be the range of indices changed in a given
* call which generates a {@link ListSelectionEvent}. Then when this
* property is <code>true</code>, the {@link ListSelectionEvent} contains
@@ -120,7 +117,6 @@ public class DefaultListSelectionModel implements Cloneable,
*/
protected boolean leadAnchorNotificationEnabled = true;
-
/**
* Whether the selection is currently "adjusting". Any {@link
* ListSelectionEvent} events constructed in response to changes in this
@@ -140,6 +136,18 @@ public class DefaultListSelectionModel implements Cloneable,
*/
BitSet sel = new BitSet();
+ /**
+ * A variable to store the previous value of sel.
+ * Used to make sure we only fireValueChanged when the BitSet
+ * actually does change.
+ */
+ Object oldSel;
+
+ /**
+ * Whether this call of setLeadSelectionInterval was called locally
+ * from addSelectionInterval
+ */
+ boolean setLeadCalledFromAdd = false;
/**
* Gets the value of the {@link #selectionMode} property.
@@ -224,13 +232,15 @@ public class DefaultListSelectionModel implements Cloneable,
* which changed selection status between the beginning and end of the
* method.</p>
*
- * @param anchorIndex The new property value
+ * @param leadIndex The new property value
*
* @see #getAnchorSelectionIndex
*/
public void setLeadSelectionIndex(int leadIndex)
{
int oldLeadIndex = leadSelectionIndex;
+ if (setLeadCalledFromAdd == false)
+ oldSel = sel.clone();
leadSelectionIndex = leadIndex;
if (anchorSelectionIndex == -1)
@@ -240,7 +250,7 @@ public class DefaultListSelectionModel implements Cloneable,
int R2 = Math.max(anchorSelectionIndex, oldLeadIndex);
int S1 = Math.min(anchorSelectionIndex, leadIndex);
int S2 = Math.max(anchorSelectionIndex, leadIndex);
-
+
int lo = Math.min(R1, S1);
int hi = Math.max(R2, S2);
@@ -262,10 +272,9 @@ public class DefaultListSelectionModel implements Cloneable,
int beg = sel.nextSetBit(0), end = -1;
for(int i=beg; i >= 0; i=sel.nextSetBit(i+1))
- {
- end = i;
- }
- fireValueChanged(beg, end, valueIsAdjusting);
+ end = i;
+ if (sel.equals(oldSel) == false)
+ fireValueChanged(beg, end, valueIsAdjusting);
}
/**
@@ -283,16 +292,15 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* Sets the value of the {@link #leadAnchorNotificationEnabled} property.
*
- * @param flag The new property value
+ * @param l The new property value
*
- * @see #getLeadAnchorNotificationEnabled
+ * @see #isLeadAnchorNotificationEnabled
*/
public void setLeadAnchorNotificationEnabled(boolean l)
{
leadAnchorNotificationEnabled = l;
}
-
/**
* Gets the value of the {@link #valueIsAdjusting} property.
*
@@ -328,14 +336,13 @@ public class DefaultListSelectionModel implements Cloneable,
return sel.isEmpty();
}
-
/**
* Gets the smallest index which is currently a member of a selection
* interval.
*
* @return The least integer <code>i</code> such that <code>i >=
- * 0</code> and <code>i</code> is a member of a selected interval, or
- * <code>-1</code> if there are no selected intervals
+ * 0</code> and <code>i</code> is a member of a selected interval, or
+ * <code>-1</code> if there are no selected intervals
*
* @see #getMaxSelectionIndex
*/
@@ -352,8 +359,8 @@ public class DefaultListSelectionModel implements Cloneable,
* interval.
*
* @return The greatest integer <code>i</code> such that <code>i >=
- * 0</code> and <code>i</code> is a member of a selected interval, or
- * <code>-1</code> if there are no selected intervals
+ * 0</code> and <code>i</code> is a member of a selected interval, or
+ * <code>-1</code> if there are no selected intervals
*
* @see #getMinSelectionIndex
*/
@@ -377,7 +384,7 @@ public class DefaultListSelectionModel implements Cloneable,
* @param a The index to search for
*
* @return <code>true</code> if the index is a member of a selection interval,
- * otherwise <code>false</code>
+ * otherwise <code>false</code>
*/
public boolean isSelectedIndex(int a)
{
@@ -386,10 +393,14 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* If the {@link #selectionMode} property is equal to
- * <code>SINGLE_SELECTION</code> or
- * <code>SINGLE_INTERVAL_SELECTION</code>, equivalent to calling
- * <code>setSelectionInterval(index1, index2)</code>; otherwise adds the
- * range <code>[index0, index1]</code> to the selection interval set.
+ * <code>SINGLE_SELECTION</code> equivalent to calling
+ * <code>setSelectionInterval(index1, index2)</code>;
+ * If the {@link #selectionMode} property is equal to
+ * <code>SINGLE_INTERVAL_SELECTION</code> and the interval being
+ * added is not adjacent to an already selected interval,
+ * equivalent to <code>setSelectionInterval(index1, index2)</code>.
+ * Otherwise adds the range <code>[index0, index1]</code>
+ * to the selection interval set.
*
* @param index0 The beginning of the range of indices to select
* @param index1 The end of the range of indices to select
@@ -399,18 +410,54 @@ public class DefaultListSelectionModel implements Cloneable,
*/
public void addSelectionInterval(int index0, int index1)
{
- if (selectionMode == SINGLE_SELECTION
- || selectionMode == SINGLE_INTERVAL_SELECTION)
+ int lo = Math.min(index0, index1);
+ int hi = Math.max(index0, index1);
+ oldSel = sel.clone();
+
+ if (selectionMode == SINGLE_SELECTION)
sel.clear();
+
+ // COMPAT: Like Sun (but not like IBM), we allow calls to
+ // addSelectionInterval when selectionMode is
+ // SINGLE_SELECTION_INTERVAL iff the interval being added
+ // is adjacent to an already selected interval
+ if (selectionMode == SINGLE_INTERVAL_SELECTION)
+ if (!(isSelectedIndex(index0) ||
+ isSelectedIndex(index1) ||
+ isSelectedIndex(Math.max(lo-1,0)) ||
+ isSelectedIndex(Math.min(hi+1,sel.size()))))
+ sel.clear();
if (selectionMode == SINGLE_SELECTION)
index0 = index1;
- int lo = Math.min(index0, index1);
- int hi = Math.max(index0, index1);
-
- sel.set(lo, hi+1);
- fireValueChanged(lo, hi, valueIsAdjusting);
+ // We have to update the anchorSelectionIndex and leadSelectionIndex
+ // variables
+
+ // The next if statements breaks down to "if this selection is adjacent
+ // to the previous selection and going in the same direction"
+ if ((isSelectedIndex(leadSelectionIndex))
+ && ((index0 - 1 == leadSelectionIndex
+ && (index1 >= index0)
+ && (leadSelectionIndex >= anchorSelectionIndex))
+ || (index0 + 1 == leadSelectionIndex && (index1 <= index0)
+ && (leadSelectionIndex <= anchorSelectionIndex)))
+ && (anchorSelectionIndex != -1 || leadSelectionIndex != -1))
+ {
+ // setting setLeadCalledFromAdd to true tells setLeadSelectionIndex
+ // not to update oldSel
+ setLeadCalledFromAdd = true;
+ setLeadSelectionIndex(index1);
+ setLeadCalledFromAdd = false;
+ }
+ else
+ {
+ leadSelectionIndex = index1;
+ anchorSelectionIndex = index0;
+ sel.set(lo, hi+1);
+ if (sel.equals(oldSel) == false)
+ fireValueChanged(lo, hi, valueIsAdjusting);
+ }
}
@@ -427,10 +474,24 @@ public class DefaultListSelectionModel implements Cloneable,
public void removeSelectionInterval(int index0,
int index1)
{
+ oldSel = sel.clone();
int lo = Math.min(index0, index1);
int hi = Math.max(index0, index1);
+
+ // if selectionMode is SINGLE_INTERVAL_SELECTION and removing the interval
+ // (index0,index1) would leave two disjoint selection intervals, remove all
+ // selected indices from lo to the last selected index
+ if (getMinSelectionIndex() > 0 && getMinSelectionIndex() < lo &&
+ selectionMode == SINGLE_INTERVAL_SELECTION)
+ hi = sel.size() - 1;
+
sel.clear(lo, hi+1);
- fireValueChanged(lo, hi, valueIsAdjusting);
+ //update anchorSelectionIndex and leadSelectionIndex variables
+ //TODO: will probably need MouseDragged to test properly and know if this works
+ setAnchorSelectionIndex(index0);
+ leadSelectionIndex = index1;
+ if (sel.equals(oldSel) == false)
+ fireValueChanged(lo, hi, valueIsAdjusting);
}
/**
@@ -438,9 +499,11 @@ public class DefaultListSelectionModel implements Cloneable,
*/
public void clearSelection()
{
+ oldSel = sel.clone();
int sz = sel.size();
sel.clear();
- fireValueChanged(0, sz, valueIsAdjusting);
+ if (sel.equals(oldSel) == false)
+ fireValueChanged(0, sz, valueIsAdjusting);
}
/**
@@ -454,6 +517,7 @@ public class DefaultListSelectionModel implements Cloneable,
*/
public void setSelectionInterval(int index0, int index1)
{
+ oldSel = sel.clone();
sel.clear();
if (selectionMode == SINGLE_SELECTION)
index0 = index1;
@@ -461,7 +525,11 @@ public class DefaultListSelectionModel implements Cloneable,
int lo = Math.min(index0, index1);
int hi = Math.max(index0, index1);
sel.set(lo, hi+1);
- fireValueChanged(lo, hi, valueIsAdjusting);
+ // update the anchorSelectionIndex and leadSelectionIndex variables
+ setAnchorSelectionIndex(index0);
+ leadSelectionIndex=index1;
+ if (sel.equals(oldSel) == false)
+ fireValueChanged(lo, hi, valueIsAdjusting);
}
/**
@@ -474,7 +542,7 @@ public class DefaultListSelectionModel implements Cloneable,
* @param index The position to insert indices at
* @param length The number of indices to insert
* @param before Indicates whether to insert the indices before the index
- * or after it
+ * or after it
*/
public void insertIndexInterval(int index,
int length,
@@ -520,7 +588,7 @@ public class DefaultListSelectionModel implements Cloneable,
* indicate that a series of adjustment has just ended.
*
* The values of {@link #getMinSelectionIndex} and
- * {@link getMaxSelectionIndex} are used in the {@link ListSelectionEvent}
+ * {@link #getMaxSelectionIndex} are used in the {@link ListSelectionEvent}
* that gets fired.
*
* @param isAdjusting <code>true</code> if this is the final change
@@ -551,7 +619,7 @@ public class DefaultListSelectionModel implements Cloneable,
* @param firstIndex The low index of the changed range
* @param lastIndex The high index of the changed range
* @param isAdjusting Whether this change is part of a seqence of adjustments
- * made to the selection, such as during interactive scrolling
+ * made to the selection, such as during interactive scrolling
*/
protected void fireValueChanged(int firstIndex, int lastIndex,
boolean isAdjusting)
@@ -568,8 +636,8 @@ public class DefaultListSelectionModel implements Cloneable,
*
* @param listener The listener to add
*
- * @see removeListSelectionListener
- * @see getListSelectionListeners
+ * @see #removeListSelectionListener
+ * @see #getListSelectionListeners
*/
public void addListSelectionListener(ListSelectionListener listener)
{
@@ -581,8 +649,8 @@ public class DefaultListSelectionModel implements Cloneable,
*
* @param listener The listener to remove
*
- * @see addListSelectionListener
- * @see getListSelectionListeners
+ * @see #addListSelectionListener
+ * @see #getListSelectionListeners
*/
public void removeListSelectionListener(ListSelectionListener listener)
{
@@ -596,7 +664,7 @@ public class DefaultListSelectionModel implements Cloneable,
*
* @return The array
*
- * @see getListSelectionListener
+ * @see #getListSelectionListeners
* @since 1.3
*/
public EventListener[] getListeners(Class listenerType)
@@ -609,9 +677,9 @@ public class DefaultListSelectionModel implements Cloneable,
*
* @return the array
*
- * @see addListSelectionListener
- * @see removeListSelectionListener
- * @see getListeners
+ * @see #addListSelectionListener
+ * @see #removeListSelectionListener
+ * @see #getListeners
* @since 1.4
*/
public ListSelectionListener[] getListSelectionListeners()
diff --git a/javax/swing/DefaultSingleSelectionModel.java b/javax/swing/DefaultSingleSelectionModel.java
index 63611f4a0..8f4d405f9 100644
--- a/javax/swing/DefaultSingleSelectionModel.java
+++ b/javax/swing/DefaultSingleSelectionModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,7 +46,8 @@ import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
/**
- * DefaultSingleSelectionModel
+ * The default implementation of {@link SingleSelectionModel}, used in
+ * {@link JTabbedPane}, {@link JMenuBar} and {@link JPopupMenu}.
*
* @author Andrew Selkirk
*/
diff --git a/javax/swing/DesktopManager.java b/javax/swing/DesktopManager.java
index 7fbc972c3..300d66517 100644
--- a/javax/swing/DesktopManager.java
+++ b/javax/swing/DesktopManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/FocusManager.java b/javax/swing/FocusManager.java
index 419c4d4e0..179fa6f82 100644
--- a/javax/swing/FocusManager.java
+++ b/javax/swing/FocusManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,17 +40,19 @@ package javax.swing;
import java.awt.Component;
import java.awt.DefaultKeyboardFocusManager;
+import java.awt.KeyboardFocusManager;
import java.awt.event.KeyEvent;
/**
- * FocusManager
- * @author Andrew Selkirk
- * @version 1.0
+ * This class has been obsoleted by the new
+ * {@link java.awt.KeyboardFocusManager} and
+ * {@link java.awt.DefaultKeyboardFocusManager} API.
+ *
+ * @author Andrew Selkirk
*/
public abstract class FocusManager
extends DefaultKeyboardFocusManager
{
-
/**
* DisabledFocusManager
*/
@@ -95,7 +97,6 @@ public abstract class FocusManager
}
}
-
/**
* FOCUS_MANAGER_CLASS_PROPERTY
*/
@@ -107,7 +108,7 @@ public abstract class FocusManager
*/
public FocusManager()
{
- // TODO
+ super();
}
/**
@@ -116,7 +117,20 @@ public abstract class FocusManager
*/
public static FocusManager getCurrentManager()
{
- return null; // TODO
+ KeyboardFocusManager fm =
+ KeyboardFocusManager.getCurrentKeyboardFocusManager();
+ if (fm instanceof FocusManager)
+ return (FocusManager) fm;
+ else
+ {
+ System.err.println("The Swing FocusManager API has been obsoleted by");
+ System.err.println("the new KeyboardFocusManager system.");
+ System.err.println("You should either not use the Swing FocusManager");
+ System.err.println("API or set the system property");
+ System.err.println
+ ("gnu.java.awt.FocusManager=javax.swing.FocusManager");
+ }
+ return null;
}
/**
@@ -125,7 +139,7 @@ public abstract class FocusManager
*/
public static void setCurrentManager(FocusManager manager)
{
- // TODO
+ KeyboardFocusManager.setCurrentKeyboardFocusManager(manager);
}
/**
@@ -146,24 +160,4 @@ public abstract class FocusManager
{
return false; // TODO
}
-
- /**
- * processKeyEvent
- * @param component TODO
- * @param event TODO
- */
- public abstract void processKeyEvent(Component component, KeyEvent event);
-
- /**
- * focusNextComponent
- * @param component TODO
- */
- public abstract void focusNextComponent(Component component);
-
- /**
- * focusPreviousComponent
- * @param component TODO
- */
- public abstract void focusPreviousComponent(Component component);
-
}
diff --git a/javax/swing/GrayFilter.java b/javax/swing/GrayFilter.java
index 73302ad19..b920b088a 100644
--- a/javax/swing/GrayFilter.java
+++ b/javax/swing/GrayFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,13 +43,20 @@ import java.awt.Toolkit;
import java.awt.image.FilteredImageSource;
import java.awt.image.RGBImageFilter;
+/**
+ * Produces grayscale images out of colored images. This is used to provide
+ * default disabled icons for buttons.
+ *
+ * @author original author unknown
+ */
public class GrayFilter extends RGBImageFilter
{
private boolean b;
- private int p;
+ private double p;
/**
- * Create a GrayFilter. If b is true then brighten. Also, indicate how much gray.
+ * Create a GrayFilter. If b is true then brighten. Also, indicate how much
+ * gray.
*
* @param b if brighten
* @param p percent of gray, 0 - 100
@@ -57,7 +64,7 @@ public class GrayFilter extends RGBImageFilter
public GrayFilter(boolean b, int p)
{
this.b = b; //FIXME - HANDLE THIS
- this.p = p;
+ this.p = (1. - (p / 100.)) / 3.;
}
/**
@@ -71,7 +78,7 @@ public class GrayFilter extends RGBImageFilter
{
return (Toolkit.getDefaultToolkit().
createImage(new FilteredImageSource(src.getSource(),
- new GrayFilter(false, 100))));
+ new GrayFilter(true, 0))));
}
/**
@@ -79,7 +86,13 @@ public class GrayFilter extends RGBImageFilter
*/
public int filterRGB(int x, int y, int rgb)
{
- return (int) (p * (0.299 * ((0xff0000 & rgb) >> 16)
- + 0.587 * ((0xff00 & rgb) >> 8) + 0.114 * (0xff & rgb)));
+ int alpha = 0xff000000 & rgb;
+ int red = (0xff0000 & rgb) >> 16;
+ int green = (0xff00 & rgb) >> 8;
+ int blue = (0xff & rgb);
+ int gray = (int) ((0.299 * red + 0.587 * green + 0.114 * blue) * p);
+ if (b)
+ gray = Math.min(gray + 128, 255);
+ return gray | gray << 8 | gray << 16 | alpha ;
}
}
diff --git a/javax/swing/Icon.java b/javax/swing/Icon.java
index da2ba74ef..c73ad2d40 100644
--- a/javax/swing/Icon.java
+++ b/javax/swing/Icon.java
@@ -1,5 +1,5 @@
/* Icon.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,9 +40,34 @@ package javax.swing;
import java.awt.Component;
import java.awt.Graphics;
+/**
+ * Defines the methods that an object must implement if it should be used
+ * as an icon in Swing.
+ */
public interface Icon
{
+ /**
+ * Returns the height of the icon.
+ *
+ * @return The height of the icon.
+ */
int getIconHeight();
+
+ /**
+ * Returns the width of the icon.
+ *
+ * @return The width of the icon.
+ */
int getIconWidth();
+
+ /**
+ * Draws the icon at the location (x, y) on the specified graphics device.
+ *
+ * @param c a component related to the icon in some way (can be ignored by
+ some implementing classes).
+ * @param g the graphics device.
+ * @param x the x-coordinate.
+ * @param y the y-coordinate.
+ */
void paintIcon(Component c, Graphics g, int x, int y);
}
diff --git a/javax/swing/ImageIcon.java b/javax/swing/ImageIcon.java
index 062c5d8a0..4cedd276b 100644
--- a/javax/swing/ImageIcon.java
+++ b/javax/swing/ImageIcon.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,6 +53,11 @@ import javax.accessibility.AccessibleIcon;
import javax.accessibility.AccessibleRole;
import javax.accessibility.AccessibleStateSet;
+/**
+ * An {@link Icon} implementation that is backed by an {@link Image}.
+ *
+ * @author original author unknown
+ */
public class ImageIcon
implements Icon, Serializable, Accessible
{
@@ -319,17 +324,17 @@ public class ImageIcon
{
try
{
- tracker.addImage(image, id);
- id++;
- tracker.waitForID(id - 1);
+ tracker.addImage(image, id);
+ id++;
+ tracker.waitForID(id - 1);
}
catch (InterruptedException ex)
{
- ; // ignore this for now
+ ; // ignore this for now
}
finally
{
- loadStatus = tracker.statusID(id - 1, false);
+ loadStatus = tracker.statusID(id - 1, false);
}
}
@@ -338,9 +343,9 @@ public class ImageIcon
*
* @return the load status of the icon image
*
- * @see {@link MediaTracker.COMPLETE}
- * @see {@link MediaTracker.ABORTED}
- * @see {@link MediaTracker.ERRORED}
+ * @see MediaTracker#COMPLETE
+ * @see MediaTracker#ABORTED
+ * @see MediaTracker#ERRORED
*/
public int getImageLoadStatus()
{
diff --git a/javax/swing/InputMap.java b/javax/swing/InputMap.java
index 53be5b1b1..a7ec38c41 100644
--- a/javax/swing/InputMap.java
+++ b/javax/swing/InputMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -49,6 +49,14 @@ import java.util.Set;
/**
+ * Maps {@link KeyStroke}s to arbitrary objects, usually Strings. This
+ * is used in combination with {@link ActionMap}s.
+ *
+ * If a component receives an input event, this is looked up in
+ * the component's <code>InputMap</code>. The result is an object which
+ * serves as a key to the components <code>ActionMap</code>. Finally
+ * the <code>Action</code> that is stored is executed.
+ *
* @author Andrew Selkirk
* @author Michael Koch
*
@@ -80,7 +88,7 @@ public class InputMap
/**
* Returns the binding for keystroke.
*
- * @param key the key of the enty
+ * @param keystroke the key of the enty
*
* @return the binding associated with keystroke may be null
*/
@@ -111,7 +119,7 @@ public class InputMap
/**
* Remove an entry from the <code>InputMap</code>.
*
- * @param key the key of the entry to remove
+ * @param keystroke the key of the entry to remove
*/
public void remove(KeyStroke keystroke)
{
diff --git a/javax/swing/InputVerifier.java b/javax/swing/InputVerifier.java
index ccd13d285..8e02ab813 100644
--- a/javax/swing/InputVerifier.java
+++ b/javax/swing/InputVerifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,9 +39,12 @@ package javax.swing;
/**
- * InputVerifier
+ * Verifies the user input on a component before the focus is shifted.
+ * It is sometimes necessary that input components have a valid state before
+ * they loose focus. Such components can have a <code>InputVerifier</code>
+ * subclass registered, that permits or vetos a focus change request.
+ *
* @author Andrew Selkirk
- * @version 1.0
*/
public abstract class InputVerifier
{
diff --git a/javax/swing/InternalFrameFocusTraversalPolicy.java b/javax/swing/InternalFrameFocusTraversalPolicy.java
index 0ac701446..4780a67c5 100644
--- a/javax/swing/InternalFrameFocusTraversalPolicy.java
+++ b/javax/swing/InternalFrameFocusTraversalPolicy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,11 +42,16 @@ import java.awt.Component;
import java.awt.FocusTraversalPolicy;
/**
+ * A {@link FocusTraversalPolicy} that provides the additional capability
+ * to determine a {@link JInternalFrame}'s initially focused component
+ * when it is selected.
+ *
* @author Michael Koch
*
* @since 1.4
*/
-public abstract class InternalFrameFocusTraversalPolicy extends FocusTraversalPolicy
+public abstract class InternalFrameFocusTraversalPolicy
+ extends FocusTraversalPolicy
{
public Component getInitialComponent(JInternalFrame frame)
{
diff --git a/javax/swing/JApplet.java b/javax/swing/JApplet.java
index 8446e27b1..cafb2dabb 100644
--- a/javax/swing/JApplet.java
+++ b/javax/swing/JApplet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -49,18 +49,35 @@ import java.awt.event.KeyEvent;
import javax.accessibility.AccessibleContext;
+/**
+ * A top-level container that is usually used in web browsers.
+ *
+ * @author original author unknown
+ */
public class JApplet extends Applet
implements RootPaneContainer
{
private static final long serialVersionUID = 7269359214497372587L;
protected JRootPane rootPane;
- protected boolean rootPaneCheckingEnabled;
+
+ /**
+ * @specnote rootPaneCheckingEnabled is false to comply with J2SE 5.0
+ */
+ protected boolean rootPaneCheckingEnabled=false;
+
+ /**
+ * Tells us if we're in the initialization stage.
+ * If so, adds go to top-level Container, otherwise they go
+ * to the content pane for this container
+ */
+ private boolean initStageDone = false;
public JApplet()
{
super.setLayout(new BorderLayout(1, 1));
- getRootPane(); // will do set/create
+ getRootPane(); // Will do set/create.
+ initStageDone = true; // Init stage is now over.
}
public Dimension getPreferredSize()
@@ -70,7 +87,17 @@ public class JApplet extends Applet
public void setLayout(LayoutManager manager)
{
- super.setLayout(manager);
+ // Check if we're in initialization stage. If so, call super.setLayout
+ // otherwise, valid calls go to the content pane
+ if (initStageDone)
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Cannot set layout. Use getContentPane().setLayout()"
+ + "instead.");
+ getContentPane().setLayout(manager);
+ }
+ else
+ super.setLayout(manager);
}
public void setLayeredPane(JLayeredPane layeredPane)
@@ -126,7 +153,17 @@ public class JApplet extends Applet
protected void addImpl(Component comp, Object constraints, int index)
{
- super.addImpl(comp, constraints, index);
+ // If we're adding in the initialization stage use super.add.
+ // Otherwise pass the add onto the content pane.
+ if (!initStageDone)
+ super.addImpl(comp, constraints, index);
+ else
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Do not use add() on JApplet directly. Use "
+ + "getContentPane().add() instead");
+ getContentPane().add(comp, constraints, index);
+ }
}
public AccessibleContext getAccessibleContext()
@@ -156,7 +193,12 @@ public class JApplet extends Applet
public void remove(Component comp)
{
- getContentPane().remove(comp);
+ // If we're removing the root pane, use super.remove. Otherwise
+ // pass it on to the content pane instead
+ if (comp == rootPane)
+ super.remove(rootPane);
+ else
+ getContentPane().remove(comp);
}
protected boolean isRootPaneCheckingEnabled()
diff --git a/javax/swing/JButton.java b/javax/swing/JButton.java
index eca53750e..5653fbf42 100644
--- a/javax/swing/JButton.java
+++ b/javax/swing/JButton.java
@@ -1,5 +1,5 @@
/* JButton.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,21 +39,45 @@ package javax.swing;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
+import javax.accessibility.AccessibleRole;
import javax.swing.plaf.ButtonUI;
/**
- * An instance of JButton can be added to a panel, frame etc
+ * A general purpose push button. <code>JButton</code>s can display a label,
+ * an {@link Icon} or both.
*
* @author Ronald Veldema (rveldema@cs.vu.nl)
*/
public class JButton extends AbstractButton
implements Accessible
{
+
+ /**
+ * Accessibility support for JButtons.
+ */
+ protected class AccessibleJButton
+ extends AbstractButton.AccessibleAbstractButton
+ {
+ /**
+ * Returns the accessible role that this component represents.
+ * This is {@link AccessibleRole#PUSH_BUTTON} for <code>JButton</code>s.
+ *
+ * @return the accessible role that this component represents
+ */
+ public AccessibleRole getAccessibleRole()
+ {
+ return AccessibleRole.PUSH_BUTTON;
+ }
+ }
+
private static final long serialVersionUID = -1907255238954382202L;
boolean def;
boolean is_def;
+ /** The AccessibleContext for this JButton. */
+ AccessibleJButton accessibleContext;
+
public JButton()
{
this(null, null);
@@ -77,9 +101,9 @@ public class JButton extends AbstractButton
public JButton(String text, Icon icon)
{
- super(text, icon);
+ super();
+ init(text, icon);
setModel(new DefaultButtonModel());
- setActionCommand(text);
}
public Object[] getSelectedObjects()
@@ -89,37 +113,49 @@ public class JButton extends AbstractButton
protected void configurePropertiesFromAction(Action a)
{
- //Factory method which sets the AbstractButton's properties according to values from the Action instance.
+ // Factory method which sets the AbstractButton's properties according to
+ // values from the Action instance.
super.configurePropertiesFromAction(a);
}
public AccessibleContext getAccessibleContext()
{
- //Gets the AccessibleContext associated with this JButton.
- return null;
+ if (accessibleContext == null)
+ accessibleContext = new AccessibleJButton();
+ return accessibleContext;
}
public String getUIClassID()
{
- //Returns a string that specifies the name of the L&F class that renders this component.
+ // Returns a string that specifies the name of the L&F class that renders
+ // this component.
return "ButtonUI";
}
public boolean isDefaultButton()
{
- //Returns whether or not this button is the default button on the RootPane.
+ // Returns whether or not this button is the default button on the
+ // RootPane.
return is_def;
}
public boolean isDefaultCapable()
{
- //Returns whether or not this button is capable of being the default button on the RootPane.
+ // Returns whether or not this button is capable of being the default
+ // button on the RootPane.
return def;
}
protected String paramString()
{
- return "JButton";
+ String superParam = super.paramString();
+
+ // 41 is the maximum number of chars which may be needed.
+ StringBuffer sb = new StringBuffer(41);
+ sb.append(",defaultButton=").append(is_def);
+ sb.append(",defaultCapable=").append(def);
+
+ return superParam + sb.toString();
}
/**
diff --git a/javax/swing/JCheckBox.java b/javax/swing/JCheckBox.java
index a8506e5f8..a743308dc 100644
--- a/javax/swing/JCheckBox.java
+++ b/javax/swing/JCheckBox.java
@@ -1,5 +1,5 @@
/* JCheckBox.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,7 +41,16 @@ package javax.swing;
import javax.accessibility.AccessibleContext;
/**
- * An instance of JCheckbox can be added to a panel, frame etc
+ * A small box that displays a check or not, depending on it's
+ * <code>selected</code> state. This works very similar to
+ * {@link JToggleButton} and {@link JRadioButton}, but in UI design it
+ * has different semantics. <code>JCheckBox</code>es are usually
+ * used in multiple-choice scenarios, where a user can select 0..n
+ * of n different options. (This is in contrast to the general RadioButton
+ * semantics where the user can select exactly one of n options).
+ *
+ * Note however that this semantics is in no way enforced by the
+ * <code>JCheckBox</code>.
*
* @author Ronald Veldema (rveldema@cs.vu.nl)
*/
@@ -127,7 +136,7 @@ public class JCheckBox extends JToggleButton
protected String paramString()
{
- return "JCheckBox";
+ return super.paramString() + ",borderPaintedFlat=" + borderPaintedFlat;
}
public boolean isBorderPaintedFlat()
diff --git a/javax/swing/JCheckBoxMenuItem.java b/javax/swing/JCheckBoxMenuItem.java
index 090c3c204..39fbc191c 100644
--- a/javax/swing/JCheckBoxMenuItem.java
+++ b/javax/swing/JCheckBoxMenuItem.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,11 +46,14 @@ import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleRole;
/**
- * This class represents JCheckBoxMenuItem. Its behaviour is very similar
- * to JCheckBoxButton. Just like the JCheckBoxButton, user can check and
- * uncheck this menu item by clicking on it. Also setSelected()/setState()
- * can be use used for the same purpose. JCheckBoxMenuItem uses
- * ToggleButtonModel to keep track of its selection.
+ * A menu item that displays a checkbox. Its behaviour is very similar
+ * to {@link JCheckBox}. Just like the <code>JCheckBox</code>, user can check
+ * and uncheck this menu item by clicking on it. Also {@link #setSelected()}
+ * and {@link #setState()} can be use used for the same purpose.
+ * <code>JCheckBoxMenuItem</code> uses
+ * <code>ToggleButtonModel</code> to keep track of its selection.
+ *
+ * @author original author unknown
*/
public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
Accessible
@@ -121,10 +124,11 @@ public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
/**
* Creates a new JCheckBoxMenuItem object using specified label and
- * marked as checked if given 'state' is true
+ * marked as checked if given 'state' is true.
*
* @param text Label for this menu item
- * @param state True if this item should be in checked state and false otherwise
+ * @param state <code>true</code> if this item should be in checked state and
+ * <code>false</code> otherwise
*/
public JCheckBoxMenuItem(String text, boolean state)
{
@@ -133,11 +137,12 @@ public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
/**
* Creates a new JCheckBoxMenuItem object with given label, icon,
- * and marked as checked if given 'state' is true
+ * and marked as checked if given 'state' is true.
*
* @param text Label for this menu item
* @param icon icon for this menu item
- * @param state True if this item should be in checked state and false otherwise
+ * @param state <code>true</code> if this item should be in checked state and
+ * false otherwise
*/
public JCheckBoxMenuItem(String text, Icon icon, boolean state)
{
@@ -178,7 +183,6 @@ public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
* and uncheck this menu item otherwise.
*
* @param state new state for this menu item
- *
*/
public synchronized void setState(boolean state)
{
@@ -190,7 +194,7 @@ public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
* menu item if it is selected and null otherwise.
*
* @return Array containing label of this
- * menu item if this menu item is selected or null otherwise.
+ * menu item if this menu item is selected or null otherwise.
*/
public Object[] getSelectedObjects()
{
@@ -231,6 +235,9 @@ public class JCheckBoxMenuItem extends JMenuItem implements SwingConstants,
return accessibleContext;
}
+ /**
+ * Accessibility support for <code>JCheckBoxMenuItem</code>.
+ */
protected class AccessibleJCheckBoxMenuItem extends AccessibleJMenuItem
{
private static final long serialVersionUID = 1079958073579370777L;
diff --git a/javax/swing/JColorChooser.java b/javax/swing/JColorChooser.java
index 1ae4ed195..4016b82f3 100644
--- a/javax/swing/JColorChooser.java
+++ b/javax/swing/JColorChooser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -58,13 +58,15 @@ import javax.swing.plaf.ColorChooserUI;
/**
- * The JColorChooser is a Swing widget that offers users different ways to
+ * A Swing widget that offers users different ways to
* select a color. By default, three different panels are presented to the
* user that are capable of changing the selected color. There are three ways
* to utilize JColorChooser. The first is to build a JColorChooser and add it
* to the content pane. The second is to use the createDialog method to
* create a JDialog that holds a JColorChooser. The third is to show a
* JColorChooser in a JDialog directly using the showDialog method.
+ *
+ * @author original author unknown
*/
public class JColorChooser extends JComponent implements Accessible
{
@@ -72,7 +74,7 @@ public class JColorChooser extends JComponent implements Accessible
private static final long serialVersionUID = 9168066781620640889L;
/**
- * AccessibleJColorChooser
+ * Accessibility support for <code>JColorChooser</code>.
*/
protected class AccessibleJColorChooser
extends JComponent.AccessibleJComponent
@@ -237,11 +239,11 @@ public class JColorChooser extends JComponent implements Accessible
{
try
{
- synchronized (dialog)
- {
- while (dialog.isVisible())
- dialog.wait();
- }
+ synchronized (dialog)
+ {
+ while (dialog.isVisible())
+ dialog.wait();
+ }
}
catch (InterruptedException e)
{
@@ -393,9 +395,9 @@ public class JColorChooser extends JComponent implements Accessible
{
if (component != previewPanel)
{
- JComponent old = previewPanel;
- previewPanel = component;
- firePropertyChange(PREVIEW_PANEL_PROPERTY, old, previewPanel);
+ JComponent old = previewPanel;
+ previewPanel = component;
+ firePropertyChange(PREVIEW_PANEL_PROPERTY, old, previewPanel);
}
} // setPreviewPanel()
@@ -421,10 +423,8 @@ public class JColorChooser extends JComponent implements Accessible
if (panel == null)
return;
AbstractColorChooserPanel[] old = chooserPanels;
- AbstractColorChooserPanel[] newPanels = new AbstractColorChooserPanel[(old == null)
- ? 1
- : old.length
- + 1];
+ AbstractColorChooserPanel[] newPanels =
+ new AbstractColorChooserPanel[(old == null) ? 1 : old.length + 1];
if (old != null)
System.arraycopy(old, 0, newPanels, 0, old.length);
newPanels[newPanels.length - 1] = panel;
@@ -447,8 +447,8 @@ public class JColorChooser extends JComponent implements Accessible
for (int i = 0; i < chooserPanels.length; i++)
if (panel == chooserPanels[i])
{
- index = i;
- break;
+ index = i;
+ break;
}
if (index == -1)
@@ -459,12 +459,12 @@ public class JColorChooser extends JComponent implements Accessible
chooserPanels = null;
else
{
- AbstractColorChooserPanel[] newPanels = new AbstractColorChooserPanel[chooserPanels.length
- - 1];
- System.arraycopy(chooserPanels, 0, newPanels, 0, index);
- System.arraycopy(chooserPanels, index, newPanels, index - 1,
- chooserPanels.length - index);
- chooserPanels = newPanels;
+ AbstractColorChooserPanel[] newPanels =
+ new AbstractColorChooserPanel[chooserPanels.length - 1];
+ System.arraycopy(chooserPanels, 0, newPanels, 0, index);
+ System.arraycopy(chooserPanels, index, newPanels, index - 1,
+ chooserPanels.length - index);
+ chooserPanels = newPanels;
}
panel.uninstallChooserPanel(this);
firePropertyChange(CHOOSER_PANELS_PROPERTY, old, chooserPanels);
@@ -480,20 +480,20 @@ public class JColorChooser extends JComponent implements Accessible
{
if (panels != chooserPanels)
{
- if (chooserPanels != null)
- for (int i = 0; i < chooserPanels.length; i++)
- if (chooserPanels[i] != null)
- chooserPanels[i].uninstallChooserPanel(this);
+ if (chooserPanels != null)
+ for (int i = 0; i < chooserPanels.length; i++)
+ if (chooserPanels[i] != null)
+ chooserPanels[i].uninstallChooserPanel(this);
- AbstractColorChooserPanel[] old = chooserPanels;
- chooserPanels = panels;
+ AbstractColorChooserPanel[] old = chooserPanels;
+ chooserPanels = panels;
- if (panels != null)
- for (int i = 0; i < panels.length; i++)
- if (panels[i] != null)
- panels[i].installChooserPanel(this);
+ if (panels != null)
+ for (int i = 0; i < panels.length; i++)
+ if (panels[i] != null)
+ panels[i].installChooserPanel(this);
- firePropertyChange(CHOOSER_PANELS_PROPERTY, old, chooserPanels);
+ firePropertyChange(CHOOSER_PANELS_PROPERTY, old, chooserPanels);
}
} // setChooserPanels()
diff --git a/javax/swing/JComboBox.java b/javax/swing/JComboBox.java
index 078c77df4..47d18323a 100644
--- a/javax/swing/JComboBox.java
+++ b/javax/swing/JComboBox.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -61,10 +61,10 @@ import javax.swing.event.PopupMenuListener;
import javax.swing.plaf.ComboBoxUI;
/**
- * JComboBox. JComboBox is a container, that keeps track of elements added to
- * it by the user. JComboBox allows user to select any item in its list and
- * displays the selected item to the user. JComboBox also can show/hide popup
- * menu containing its list of item whenever the mouse is pressed over it.
+ * A component that allows a user to select any item in its list and
+ * displays the selected item to the user. JComboBox also can show/hide a
+ * popup menu containing its list of item whenever the mouse is pressed
+ * over it.
*
* @author Andrew Selkirk
* @author Olga Rodimina
@@ -79,7 +79,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
private static final long serialVersionUID = 5654585963292734470L;
/**
- * KeySelectionManager interface. Class implementing this interface are
+ * Classes implementing this interface are
* responsible for matching key characters typed by the user with combo
* box's items.
*/
@@ -95,7 +95,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
private static final int DEFAULT_MAXIMUM_ROW_COUNT = 8;
/**
- * dataModel used by JComboBox to keep track of its list data and currently
+ * Data model used by JComboBox to keep track of its list data and currently
* selected element in the list.
*/
protected ComboBoxModel dataModel;
@@ -290,16 +290,16 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void setModel(ComboBoxModel newDataModel)
{
-
// dataModel is null if it this method is called from inside the constructors.
- if(dataModel != null) {
- // Prevents unneccessary updates.
- if (dataModel == newDataModel)
- return;
+ if (dataModel != null)
+ {
+ // Prevents unneccessary updates.
+ if (dataModel == newDataModel)
+ return;
- // Removes itself (as DataListener) from the to-be-replaced model.
- dataModel.removeListDataListener(this);
- }
+ // Removes itself (as DataListener) from the to-be-replaced model.
+ dataModel.removeListDataListener(this);
+ }
/* Adds itself as a DataListener to the new model.
* It is intentioned that this operation will fail with a NullPointerException if the
@@ -366,8 +366,8 @@ public class JComboBox extends JComponent implements ItemSelectable,
{
if (isEditable != editable)
{
- isEditable = editable;
- firePropertyChange("editable", ! isEditable, isEditable);
+ isEditable = editable;
+ firePropertyChange("editable", !isEditable, isEditable);
}
}
@@ -383,10 +383,10 @@ public class JComboBox extends JComponent implements ItemSelectable,
{
if (maximumRowCount != rowCount)
{
- int oldMaximumRowCount = maximumRowCount;
- maximumRowCount = rowCount;
- firePropertyChange("maximumRowCount",
- oldMaximumRowCount, maximumRowCount);
+ int oldMaximumRowCount = maximumRowCount;
+ maximumRowCount = rowCount;
+ firePropertyChange("maximumRowCount", oldMaximumRowCount,
+ maximumRowCount);
}
}
@@ -415,10 +415,9 @@ public class JComboBox extends JComponent implements ItemSelectable,
{
if (renderer != aRenderer)
{
- ListCellRenderer oldRenderer = renderer;
- renderer = aRenderer;
- firePropertyChange("renderer", oldRenderer,
- renderer);
+ ListCellRenderer oldRenderer = renderer;
+ renderer = aRenderer;
+ firePropertyChange("renderer", oldRenderer, renderer);
}
}
@@ -501,52 +500,52 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void setSelectedIndex(int index)
{
- if(index < -1 || index >= dataModel.getSize()) {
- // Fails because index is out of bounds.
- throw new IllegalArgumentException("illegal index: " + index);
- } else {
- /* Selects the item at the given index or clears the selection if the
- * index value is -1.
- */
- setSelectedItem((index == -1) ? null : dataModel.getElementAt(index));
- }
+ if (index < -1 || index >= dataModel.getSize())
+ // Fails because index is out of bounds.
+ throw new IllegalArgumentException("illegal index: " + index);
+ else
+ // Selects the item at the given index or clears the selection if the
+ // index value is -1.
+ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index));
}
/**
- * Returns index of the item that is currently selected in the combo box.
- * If no item is currently selected, then -1 is returned.
- *
- * <p>Note: For performance reasons you should minimize invocation of this
+ * Returns index of the item that is currently selected in the combo box. If
+ * no item is currently selected, then -1 is returned.
+ * <p>
+ * Note: For performance reasons you should minimize invocation of this
* method. If the data model is not an instance of
- * <code>DefaultComboBoxModel</code> the complexity is O(n) where
- * n is the number of elements in the combo box.</p>
- *
- * @return int Index specifying location of the currently selected item in
- * the combo box or -1 if nothing is selected in the combo box.
+ * <code>DefaultComboBoxModel</code> the complexity is O(n) where n is the
+ * number of elements in the combo box.
+ * </p>
+ *
+ * @return int Index specifying location of the currently selected item in the
+ * combo box or -1 if nothing is selected in the combo box.
*/
public int getSelectedIndex()
{
Object selectedItem = getSelectedItem();
-
- if (selectedItem != null) {
-
- if(dataModel instanceof DefaultComboBoxModel) {
- // Uses special method of DefaultComboBoxModel to retrieve the index.
- return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem);
- } else {
- // Iterates over all items to retrieve the index.
- int size = dataModel.getSize();
-
- for(int i=0; i < size; i++) {
- Object o = dataModel.getElementAt(i);
-
- // XXX: Is special handling of ComparableS neccessary?
- if((selectedItem != null) ? selectedItem.equals(o) : o == null) {
- return i;
- }
- }
- }
- }
+
+ if (selectedItem != null)
+ {
+ if (dataModel instanceof DefaultComboBoxModel)
+ // Uses special method of DefaultComboBoxModel to retrieve the index.
+ return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem);
+ else
+ {
+ // Iterates over all items to retrieve the index.
+ int size = dataModel.getSize();
+
+ for (int i = 0; i < size; i++)
+ {
+ Object o = dataModel.getElementAt(i);
+
+ // XXX: Is special handling of ComparableS neccessary?
+ if ((selectedItem != null) ? selectedItem.equals(o) : o == null)
+ return i;
+ }
+ }
+ }
// returns that no item is currently selected
return -1;
@@ -571,11 +570,12 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void addItem(Object element)
{
- if(dataModel instanceof MutableComboBoxModel) {
- ((MutableComboBoxModel) dataModel).addElement(element);
- } else {
- throw new RuntimeException("Unable to add the item because the data model it is not an instance of MutableComboBoxModel.");
- }
+ if (dataModel instanceof MutableComboBoxModel)
+ ((MutableComboBoxModel) dataModel).addElement(element);
+ else
+ throw new RuntimeException("Unable to add the item because the data "
+ + "model it is not an instance of "
+ + "MutableComboBoxModel.");
}
/**
@@ -588,11 +588,12 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void insertItemAt(Object element, int index)
{
- if(dataModel instanceof MutableComboBoxModel) {
- ((MutableComboBoxModel) dataModel).insertElementAt(element, index);
- } else {
- throw new RuntimeException("Unable to insert the item because the data model it is not an instance of MutableComboBoxModel.");
- }
+ if (dataModel instanceof MutableComboBoxModel)
+ ((MutableComboBoxModel) dataModel).insertElementAt(element, index);
+ else
+ throw new RuntimeException("Unable to insert the item because the data "
+ + "model it is not an instance of "
+ + "MutableComboBoxModel.");
}
/**
@@ -604,11 +605,12 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void removeItem(Object element)
{
- if(dataModel instanceof MutableComboBoxModel) {
- ((MutableComboBoxModel) dataModel).removeElement(element);
- } else {
- throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel.");
- }
+ if (dataModel instanceof MutableComboBoxModel)
+ ((MutableComboBoxModel) dataModel).removeElement(element);
+ else
+ throw new RuntimeException("Unable to remove the item because the data "
+ + "model it is not an instance of "
+ + "MutableComboBoxModel.");
}
/**
@@ -621,40 +623,40 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void removeItemAt(int index)
{
- if(dataModel instanceof MutableComboBoxModel) {
- ((MutableComboBoxModel) dataModel).removeElementAt(index);
- } else {
- throw new RuntimeException("Unable to remove the item because the data model it is not an instance of MutableComboBoxModel.");
- }
+ if (dataModel instanceof MutableComboBoxModel)
+ ((MutableComboBoxModel) dataModel).removeElementAt(index);
+ else
+ throw new RuntimeException("Unable to remove the item because the data "
+ + "model it is not an instance of "
+ + "MutableComboBoxModel.");
}
/**
* This method removes all elements from this JComboBox.
- * <p>A <code>RuntimeException</code> is thrown if the data model is not
- * an instance of {@link MutableComboBoxModel}.</p>
- *
+ * <p>
+ * A <code>RuntimeException</code> is thrown if the data model is not an
+ * instance of {@link MutableComboBoxModel}.
+ * </p>
*/
public void removeAllItems()
{
- if (dataModel instanceof DefaultComboBoxModel) {
- // Uses special method if we have a DefaultComboBoxModel.
- ((DefaultComboBoxModel) dataModel).removeAllElements();
- } else if(dataModel instanceof MutableComboBoxModel){
- // Iterates over all items and removes each.
- MutableComboBoxModel mcbm = (MutableComboBoxModel) dataModel;
-
- /* We intentionally remove the items backwards to support
- * models which shift their content to the beginning (e.g.
- * linked lists)
- */
- for(int i=mcbm.getSize()-1; i >= 0; i--) {
- mcbm.removeElementAt(i);
- }
-
- } else {
- throw new RuntimeException("Unable to remove the items because the data model it is not an instance of MutableComboBoxModel.");
- }
-
+ if (dataModel instanceof DefaultComboBoxModel)
+ // Uses special method if we have a DefaultComboBoxModel.
+ ((DefaultComboBoxModel) dataModel).removeAllElements();
+ else if (dataModel instanceof MutableComboBoxModel)
+ {
+ // Iterates over all items and removes each.
+ MutableComboBoxModel mcbm = (MutableComboBoxModel) dataModel;
+
+ // We intentionally remove the items backwards to support models which
+ // shift their content to the beginning (e.g. linked lists)
+ for (int i = mcbm.getSize() - 1; i >= 0; i--)
+ mcbm.removeElementAt(i);
+ }
+ else
+ throw new RuntimeException("Unable to remove the items because the data "
+ +"model it is not an instance of "
+ + "MutableComboBoxModel.");
}
/**
@@ -755,13 +757,13 @@ public class JComboBox extends JComponent implements ItemSelectable,
{
if (a == null)
{
- setEnabled(true);
- setToolTipText(null);
+ setEnabled(true);
+ setToolTipText(null);
}
else
{
- setEnabled(a.isEnabled());
- setToolTipText((String) (a.getValue(Action.SHORT_DESCRIPTION)));
+ setEnabled(a.isEnabled());
+ setToolTipText((String) (a.getValue(Action.SHORT_DESCRIPTION)));
}
}
@@ -771,18 +773,18 @@ public class JComboBox extends JComponent implements ItemSelectable,
*
* @param action action to listen to for property changes
*
- * @return $PropertyChangeListener$ Listener that listens to changes in
+ * @return a PropertyChangeListener that listens to changes in
* action properties.
*/
protected PropertyChangeListener createActionPropertyChangeListener(Action action)
{
return new PropertyChangeListener()
{
- public void propertyChange(PropertyChangeEvent e)
- {
- Action act = (Action) (e.getSource());
- configurePropertiesFromAction(act);
- }
+ public void propertyChange(PropertyChangeEvent e)
+ {
+ Action act = (Action) (e.getSource());
+ configurePropertiesFromAction(act);
+ }
};
}
@@ -936,8 +938,8 @@ public class JComboBox extends JComponent implements ItemSelectable,
boolean oldEnabled = super.isEnabled();
if (enabled != oldEnabled)
{
- super.setEnabled(enabled);
- firePropertyChange("enabled", oldEnabled, enabled);
+ super.setEnabled(enabled);
+ firePropertyChange("enabled", oldEnabled, enabled);
}
}
@@ -1136,7 +1138,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
/**
- * AccessibleJComboBox
+ * Accessibility support for <code>JComboBox</code>.
*/
protected class AccessibleJComboBox extends AccessibleJComponent
implements AccessibleAction, AccessibleSelection
diff --git a/javax/swing/JComponent.java b/javax/swing/JComponent.java
index 08f13ed0f..ed81443fa 100644
--- a/javax/swing/JComponent.java
+++ b/javax/swing/JComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -44,8 +44,10 @@ import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
+import java.awt.FocusTraversalPolicy;
import java.awt.Font;
import java.awt.Graphics;
+import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Insets;
import java.awt.Point;
@@ -70,6 +72,7 @@ import java.io.Serializable;
import java.util.EventListener;
import java.util.Hashtable;
import java.util.Locale;
+import java.util.Set;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
@@ -85,7 +88,7 @@ import javax.swing.event.SwingPropertyChangeSupport;
import javax.swing.plaf.ComponentUI;
/**
- * Every component in swing inherits from this class (JLabel, JButton, etc).
+ * The base class of all Swing components.
* It contains generic methods to manage events, properties and sizes. Actual
* drawing of the component is channeled to a look-and-feel class that is
* implemented elsewhere.
@@ -100,13 +103,19 @@ public abstract class JComponent extends Container implements Serializable
/**
* Accessibility support is currently missing.
*/
-
protected AccessibleContext accessibleContext;
+ /**
+ * Basic accessibility support for <code>JComponent</code> derived
+ * widgets.
+ */
public abstract class AccessibleJComponent
extends AccessibleAWTContainer
implements AccessibleExtendedComponent
{
+ /**
+ * Accessibility support for <code>JComponent</code>'s focus handler.
+ */
protected class AccessibleFocusHandler
implements FocusListener
{
@@ -115,6 +124,9 @@ public abstract class JComponent extends Container implements Serializable
public void focusLost(FocusEvent valevent){}
}
+ /**
+ * Accessibility support for <code>JComponent</code>'s container handler.
+ */
protected class AccessibleContainerHandler
implements ContainerListener
{
@@ -164,7 +176,6 @@ public abstract class JComponent extends Container implements Serializable
*/
Dimension maximumSize;
-
/**
* A value between 0.0 and 1.0 indicating the preferred horizontal
* alignment of the component, relative to its siblings. The values
@@ -274,7 +285,7 @@ public abstract class JComponent extends Container implements Serializable
* repainting of the component are usually delegated to this object.
*
* @see #setUI
- * @see #getUI
+ * @see #getUIClassID
* @see #updateUI
*/
protected ComponentUI ui;
@@ -348,7 +359,6 @@ public abstract class JComponent extends Container implements Serializable
*/
private static final Object paintLock = new Object();
-
/**
* The default locale of the component.
*
@@ -363,7 +373,7 @@ public abstract class JComponent extends Container implements Serializable
* Constant used to indicate that no condition has been assigned to a
* particular action.
*
- * @see #registerKeyboardAction
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
*/
public static final int UNDEFINED_CONDITION = -1;
@@ -371,7 +381,7 @@ public abstract class JComponent extends Container implements Serializable
* Constant used to indicate that an action should be performed only when
* the component has focus.
*
- * @see #registerKeyboardAction
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
*/
public static final int WHEN_FOCUSED = 0;
@@ -379,7 +389,7 @@ public abstract class JComponent extends Container implements Serializable
* Constant used to indicate that an action should be performed only when
* the component is an ancestor of the component which has focus.
*
- * @see #registerKeyboardAction
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
*/
public static final int WHEN_ANCESTOR_OF_FOCUSED_COMPONENT = 1;
@@ -387,11 +397,10 @@ public abstract class JComponent extends Container implements Serializable
* Constant used to indicate that an action should be performed only when
* the component is in the window which has focus.
*
- * @see #registerKeyboardAction
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
*/
public static final int WHEN_IN_FOCUSED_WINDOW = 2;
-
/**
* Creates a new <code>JComponent</code> instance.
*/
@@ -452,7 +461,10 @@ public abstract class JComponent extends Container implements Serializable
*/
public final void putClientProperty(Object key, Object value)
{
- getClientProperties().put(key, value);
+ if (value != null)
+ getClientProperties().put(key, value);
+ else
+ getClientProperties().remove(key);
}
/**
@@ -460,7 +472,7 @@ public abstract class JComponent extends Container implements Serializable
*
* @param listener The listener to unregister
*
- * @see addAncestorListener
+ * @see #addAncestorListener
*/
public void removeAncestorListener(AncestorListener listener)
{
@@ -472,7 +484,7 @@ public abstract class JComponent extends Container implements Serializable
*
* @param listener The listener to register
*
- * @see #addPropertyChangeListener
+ * @see #addPropertyChangeListener(PropertyChangeListener)
* @see #changeSupport
*/
public void removePropertyChangeListener(PropertyChangeListener listener)
@@ -487,7 +499,7 @@ public abstract class JComponent extends Container implements Serializable
* @param propertyName The property name to unregister the listener from
* @param listener The listener to unregister
*
- * @see #addPropertyChangeListener
+ * @see #addPropertyChangeListener(String, PropertyChangeListener)
* @see #changeSupport
*/
public void removePropertyChangeListener(String propertyName,
@@ -529,7 +541,7 @@ public abstract class JComponent extends Container implements Serializable
*
* @param listener The listener to register
*
- * @see #removePropertyChangeListener
+ * @see #removePropertyChangeListener(PropertyChangeListener)
* @see #changeSupport
*/
public void addPropertyChangeListener(PropertyChangeListener listener)
@@ -547,7 +559,7 @@ public abstract class JComponent extends Container implements Serializable
* @param propertyName The property name to listen to
* @param listener The listener to register
*
- * @see #removePropertyChangeListener
+ * @see #removePropertyChangeListener(String, PropertyChangeListener)
* @see #changeSupport
*/
public void addPropertyChangeListener(String propertyName,
@@ -613,12 +625,12 @@ public abstract class JComponent extends Container implements Serializable
* @param property The property to return the listeners of
*
* @return The set of <code>PropertyChangeListener</code> objects in
- * {@link #changeSupport} registered to listen on the specified propert
+ * {@link #changeSupport} registered to listen on the specified property
*/
public PropertyChangeListener[] getPropertyChangeListeners(String property)
{
return changeSupport == null ? new PropertyChangeListener[0]
- : changeSupport.getPropertyChangeListeners(property);
+ : changeSupport.getPropertyChangeListeners(property);
}
/**
@@ -715,8 +727,8 @@ public abstract class JComponent extends Container implements Serializable
* @param newValue The new value of the property
*
* @see #changeSupport
- * @see #addPropertyChangeListener
- * @see #removePropertyChangeListener
+ * @see #addPropertyChangeListener(PropertyChangeListener)
+ * @see #removePropertyChangeListener(PropertyChangeListener)
*/
protected void firePropertyChange(String propertyName, Object oldValue,
Object newValue)
@@ -748,17 +760,17 @@ public abstract class JComponent extends Container implements Serializable
*
* @throws PropertyVetoException if the change was vetoed by a listener
*
- * @see addVetoableChangeListener
- * @see removeVetoableChangeListener
+ * @see #addVetoableChangeListener
+ * @see #removeVetoableChangeListener
*/
protected void fireVetoableChange(String propertyName, Object oldValue,
Object newValue)
throws PropertyVetoException
{
VetoableChangeListener[] listeners = getVetoableChangeListeners();
-
+
PropertyChangeEvent evt = new PropertyChangeEvent(this, propertyName, oldValue, newValue);
-
+
for (int i = 0; i < listeners.length; i++)
listeners[i].vetoableChange(evt);
}
@@ -773,7 +785,6 @@ public abstract class JComponent extends Container implements Serializable
return null;
}
-
/**
* Get the value of the {@link #alignmentX} property.
*
@@ -811,8 +822,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Set the value of the {@link #border} property, revalidate
- * and repaint this component.
+ * Set the value of the {@link #border} property.
*
* @param newBorder The new value of the property
*
@@ -823,8 +833,6 @@ public abstract class JComponent extends Container implements Serializable
Border oldBorder = border;
border = newBorder;
firePropertyChange("border", oldBorder, newBorder);
- revalidate();
- repaint();
}
/**
@@ -876,13 +884,11 @@ public abstract class JComponent extends Container implements Serializable
*/
protected Graphics getComponentGraphics(Graphics g)
{
- Graphics g2 = g.create();
- g2.setFont(this.getFont());
- g2.setColor(this.getForeground());
- return g2;
+ g.setFont (this.getFont());
+ g.setColor (this.getForeground());
+ return g;
}
-
/**
* Get the value of the {@link #debugGraphicsOptions} property.
*
@@ -954,7 +960,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Get the component's maximum size. If the {@link #maximumSize} property
* has been explicitly set, it is returned. If the {@link #maximumSize}
- * property has not been set but the {@link ui} property has been, the
+ * property has not been set but the {@link #ui} property has been, the
* result of {@link ComponentUI#getMaximumSize} is returned. If neither
* property has been set, the result of {@link Container#getMaximumSize}
* is returned.
@@ -983,7 +989,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Get the component's minimum size. If the {@link #minimumSize} property
* has been explicitly set, it is returned. If the {@link #minimumSize}
- * property has not been set but the {@link ui} property has been, the
+ * property has not been set but the {@link #ui} property has been, the
* result of {@link ComponentUI#getMinimumSize} is returned. If neither
* property has been set, the result of {@link Container#getMinimumSize}
* is returned.
@@ -1012,7 +1018,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Get the component's preferred size. If the {@link #preferredSize}
* property has been explicitly set, it is returned. If the {@link
- * #preferredSize} property has not been set but the {@link ui} property
+ * #preferredSize} property has not been set but the {@link #ui} property
* has been, the result of {@link ComponentUI#getPreferredSize} is
* returned. If neither property has been set, the result of {@link
* Container#getPreferredSize} is returned.
@@ -1024,17 +1030,26 @@ public abstract class JComponent extends Container implements Serializable
*/
public Dimension getPreferredSize()
{
+ Dimension prefSize = null;
if (preferredSize != null)
- return preferredSize;
+ prefSize = preferredSize;
- if (ui != null)
+ else if (ui != null)
{
Dimension s = ui.getPreferredSize(this);
if (s != null)
- return s;
+ prefSize = s;
}
- Dimension p = super.getPreferredSize();
- return p;
+
+ if (prefSize == null)
+ prefSize = super.getPreferredSize();
+ // make sure that prefSize is not smaller than minSize
+ if (minimumSize != null && prefSize != null
+ && (minimumSize.width > prefSize.width
+ || minimumSize.height > prefSize.height))
+ prefSize = new Dimension(Math.max(minimumSize.width, prefSize.width),
+ Math.max(minimumSize.height, prefSize.height));
+ return prefSize;
}
/**
@@ -1077,7 +1092,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Return the value of the {@link #nextFocusableComponent} property.
+ * Return the value of the <code>nextFocusableComponent</code> property.
*
* @return The current value of the property, or <code>null</code>
* if none has been set.
@@ -1132,7 +1147,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Return the {@link #toolTip} property of this component, creating it and
+ * Return the <code>toolTip</code> property of this component, creating it and
* setting it if it is currently <code>null</code>. This method can be
* overridden in subclasses which wish to control the exact form of
* tooltip created.
@@ -1141,21 +1156,21 @@ public abstract class JComponent extends Container implements Serializable
*/
public JToolTip createToolTip()
{
- JToolTip toolTip = new JToolTip();
- toolTip.setComponent(this);
- toolTip.setTipText(toolTipText);
-
+ JToolTip toolTip = new JToolTip();
+ toolTip.setComponent(this);
+ toolTip.setTipText(toolTipText);
+
return toolTip;
}
/**
- * Return the location at which the {@link #toolTip} property should be
+ * Return the location at which the {@link #toolTipText} property should be
* displayed, when triggered by a particular mouse event.
*
* @param event The event the tooltip is being presented in response to
*
* @return The point at which to display a tooltip, or <code>null</code>
- * if swing is to choose a default location.
+ * if swing is to choose a default location.
*/
public Point getToolTipLocation(MouseEvent event)
{
@@ -1167,7 +1182,7 @@ public abstract class JComponent extends Container implements Serializable
*
* @param text The new property value
*
- * @see #getToolTipText
+ * @see #getToolTipText()
*/
public void setToolTipText(String text)
{
@@ -1177,14 +1192,14 @@ public abstract class JComponent extends Container implements Serializable
toolTipText = null;
return;
}
-
+
// XXX: The tip text doesn't get updated unless you set it to null
// and then to something not-null. This is consistent with the behaviour
// of Sun's ToolTipManager.
-
+
String oldText = toolTipText;
toolTipText = text;
-
+
if (oldText == null)
ToolTipManager.sharedInstance().registerComponent(this);
}
@@ -1218,7 +1233,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Return the top level ancestral container (usually a {@link
- * java.awt.Window} or {@link java.awt.Applet}) which this component is
+ * java.awt.Window} or {@link java.applet.Applet}) which this component is
* contained within, or <code>null</code> if no ancestors exist.
*
* @return The top level container, if it exists
@@ -1275,9 +1290,9 @@ public abstract class JComponent extends Container implements Serializable
* displayable, focusable, visible components.</p>
*
* <p>This method should not be called by clients; it is intended for
- * focus implementations. Use {@link Component#requestFocus} instead.</p>
+ * focus implementations. Use {@link Component#requestFocus()} instead.</p>
*
- * @see {@link Component#requestFocus}
+ * @see Component#requestFocus()
*/
public void grabFocus()
{
@@ -1315,10 +1330,10 @@ public abstract class JComponent extends Container implements Serializable
* <code>CTRL+TAB</code> and <code>CTRL+SHIFT+TAB</code>.
*
* @return <code>true</code> if you want this component to manage its own
- * focus, otherwise (by default) <code>false</code>
+ * focus, otherwise (by default) <code>false</code>
*
- * @deprecated 1.4 Use {@link Component.setFocusTraversalKeys(int,Set)} and
- * {@link Container.setFocusCycleRoot(boolean)} instead
+ * @deprecated 1.4 Use {@link Component#setFocusTraversalKeys(int, Set)} and
+ * {@link Container#setFocusCycleRoot(boolean)} instead
*/
public boolean isManagingFocus()
{
@@ -1326,7 +1341,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Return the current value of the {@link opaque} property.
+ * Return the current value of the {@link #opaque} property.
*
* @return The current property value
*/
@@ -1370,10 +1385,10 @@ public abstract class JComponent extends Container implements Serializable
/**
* Return <code>true</code> if this component is a validation root; this
- * will cause calls to {@link #invalidate} in this component's children
+ * will cause calls to {@link #invalidate()} in this component's children
* to be "captured" at this component, and not propagate to its parents.
* For most components this should return <code>false</code>, but some
- * components such as {@link JViewPort} will want to return
+ * components such as {@link JViewport} will want to return
* <code>true</code>.
*
* @return Whether this component is a validation root
@@ -1386,7 +1401,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* <p>Paint the component. This is a delicate process, and should only be
* called from the repaint thread, under control of the {@link
- * RepaintManager}. Client code should usually call {@link #repaint} to
+ * RepaintManager}. Client code should usually call {@link #repaint()} to
* trigger painting.</p>
*
* <p>This method will acquire a double buffer from the {@link
@@ -1405,12 +1420,12 @@ public abstract class JComponent extends Container implements Serializable
* one of these methods rather than <code>paint</code>.</p>
*
* <p>For more details on the painting sequence, see <a
- * href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">this
- * article</a>.</p>
+ * href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">
+ * this article</a>.</p>
*
* @param g The graphics context to paint with
*
- * @see #paintImmediately
+ * @see #paintImmediately(Rectangle)
*/
public void paint(Graphics g)
{
@@ -1497,7 +1512,14 @@ public abstract class JComponent extends Container implements Serializable
protected void paintComponent(Graphics g)
{
if (ui != null)
- ui.update(g, this);
+ {
+ Graphics g2 = g;
+ if (!(g instanceof Graphics2D))
+ g2 = g.create();
+ ui.update(getComponentGraphics(g2), this);
+ if (!(g instanceof Graphics2D))
+ g2.dispose();
+ }
}
/**
@@ -1596,7 +1618,6 @@ public abstract class JComponent extends Container implements Serializable
* sun-private solution so I will only immitate it as much as it matters
* to external observers.
*/
-
private static class ActionListenerProxy
extends AbstractAction
{
@@ -1627,18 +1648,18 @@ public abstract class JComponent extends Container implements Serializable
* to fetch mapping tables from keystrokes to commands, and commands to
* actions, respectively, and modify those mappings directly.
*
- * @param anAction The action to be registered
- * @param aCommand The command to deliver in the delivered {@link
- * java.awt.ActionEvent}
- * @param aKeyStroke The keystroke to register on
- * @param aCondition One of the values {@link #UNDEFINED_CONDITION},
- * {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}, {@link #WHEN_FOCUSED}, or
- * {@link #WHEN_IN_FOCUSED_WINDOW}, indicating the condition which must
- * be met for the action to be fired
+ * @param act The action to be registered
+ * @param cmd The command to deliver in the delivered {@link
+ * java.awt.event.ActionEvent}
+ * @param stroke The keystroke to register on
+ * @param cond One of the values {@link #UNDEFINED_CONDITION},
+ * {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}, {@link #WHEN_FOCUSED}, or
+ * {@link #WHEN_IN_FOCUSED_WINDOW}, indicating the condition which must
+ * be met for the action to be fired
*
* @see #unregisterKeyboardAction
- * @see #getConditionForKeystroke
- * @see #resetKeyboardActiond
+ * @see #getConditionForKeyStroke
+ * @see #resetKeyboardActions
*/
public void registerKeyboardAction(ActionListener act,
String cmd,
@@ -1648,8 +1669,6 @@ public abstract class JComponent extends Container implements Serializable
getInputMap(cond).put(stroke, new ActionListenerProxy(act, cmd));
}
-
-
public final void setInputMap(int condition, InputMap map)
{
enableEvents(AWTEvent.KEY_EVENT_MASK);
@@ -1720,18 +1739,18 @@ public abstract class JComponent extends Container implements Serializable
* Return the condition that determines whether a registered action
* occurs in response to the specified keystroke.
*
- * @param aKeyStroke The keystroke to return the condition of
+ * @param ks The keystroke to return the condition of
*
* @return One of the values {@link #UNDEFINED_CONDITION}, {@link
- * #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}, {@link #WHEN_FOCUSED}, or {@link
- * #WHEN_IN_FOCUSED_WINDOW}
+ * #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}, {@link #WHEN_FOCUSED}, or {@link
+ * #WHEN_IN_FOCUSED_WINDOW}
*
* @deprecated As of 1.3 KeyStrokes can be registered with multiple
- * simultaneous conditions.
+ * simultaneous conditions.
*
- * @see #registerKeyboardAction
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
* @see #unregisterKeyboardAction
- * @see #resetKeyboardActiond
+ * @see #resetKeyboardActions
*/
public int getConditionForKeyStroke(KeyStroke ks)
{
@@ -1752,7 +1771,7 @@ public abstract class JComponent extends Container implements Serializable
* Get the ActionListener (typically an {@link Action} object) which is
* associated with a particular keystroke.
*
- * @param aKeyStroke The keystroke to retrieve the action of
+ * @param ks The keystroke to retrieve the action of
*
* @return The action associated with the specified keystroke
*
@@ -1783,8 +1802,8 @@ public abstract class JComponent extends Container implements Serializable
* the swing {@link InputMap} / {@link ActionMap} system.
*
* See <a
- * href="http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">this
- * report</a> for more details, it's somewhat complex.
+ * href="http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">
+ * this report</a> for more details, it's somewhat complex.
*/
protected void processKeyEvent(KeyEvent e)
{
@@ -1829,23 +1848,24 @@ public abstract class JComponent extends Container implements Serializable
/**
* Remove a keyboard action registry.
*
- * @param stroke The keystroke to unregister
+ * @param aKeyStroke The keystroke to unregister
*
- * @see #registerKeyboardAction
- * @see #getConditionForKeystroke
- * @see #resetKeyboardActiond
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
+ * @see #getConditionForKeyStroke
+ * @see #resetKeyboardActions
*/
public void unregisterKeyboardAction(KeyStroke aKeyStroke)
{
+ // FIXME: Must be implemented.
}
/**
* Reset all keyboard action registries.
*
- * @see #registerKeyboardAction
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
* @see #unregisterKeyboardAction
- * @see #getConditionForKeystroke
+ * @see #getConditionForKeyStroke
*/
public void resetKeyboardActions()
{
@@ -1859,7 +1879,6 @@ public abstract class JComponent extends Container implements Serializable
actionMap.clear();
}
-
/**
* Mark the described region of this component as dirty in the current
* {@link RepaintManager}. This will queue an asynchronous repaint using
@@ -1898,10 +1917,10 @@ public abstract class JComponent extends Container implements Serializable
* Request focus on the default component of this component's {@link
* FocusTraversalPolicy}.
*
- * @return The result of {@link #requestFocus}
+ * @return The result of {@link #requestFocus()}
*
- * @deprecated Use {@link #requestFocus()} on the default component provided from
- * the {@link FocusTraversalPolicy} instead.
+ * @deprecated Use {@link #requestFocus()} on the default component provided
+ * from the {@link FocusTraversalPolicy} instead.
*/
public boolean requestDefaultFocus()
{
@@ -1982,8 +2001,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Set the value of the {@link #enabled} property, revalidate
- * and repaint this component.
+ * Set the value of the <code>enabled</code> property.
*
* @param enable The new value of the property
*/
@@ -1991,53 +2009,41 @@ public abstract class JComponent extends Container implements Serializable
{
boolean oldEnabled = isEnabled();
super.setEnabled(enable);
- firePropertyChange("enabeld", oldEnabled, enable);
- revalidate();
- repaint();
+ firePropertyChange("enabled", oldEnabled, enable);
}
/**
- * Set the value of the {@link #font} property, revalidate
- * and repaint this component.
+ * Set the value of the <code>font</code> property.
*
* @param f The new value of the property
*/
public void setFont(Font f)
{
super.setFont(f);
- revalidate();
- repaint();
}
/**
- * Set the value of the {@link #background} property, revalidate
- * and repaint this component.
+ * Set the value of the <code>background</code> property.
*
* @param bg The new value of the property
*/
public void setBackground(Color bg)
{
super.setBackground(bg);
- revalidate();
- repaint();
}
/**
- * Set the value of the {@link #foreground} property, revalidate
- * and repaint this component.
+ * Set the value of the <code>foreground</code> property.
*
* @param fg The new value of the property
*/
public void setForeground(Color fg)
{
super.setForeground(fg);
- revalidate();
- repaint();
}
/**
- * Set the value of the {@link #maximumSize} property, revalidate
- * and repaint this component.
+ * Set the value of the {@link #maximumSize} property.
*
* @param max The new value of the property
*/
@@ -2046,13 +2052,10 @@ public abstract class JComponent extends Container implements Serializable
Dimension oldMaximumSize = maximumSize;
maximumSize = max;
firePropertyChange("maximumSize", oldMaximumSize, maximumSize);
- revalidate();
- repaint();
}
/**
- * Set the value of the {@link #minimumSize} property, revalidate
- * and repaint this component.
+ * Set the value of the {@link #minimumSize} property.
*
* @param min The new value of the property
*/
@@ -2061,13 +2064,10 @@ public abstract class JComponent extends Container implements Serializable
Dimension oldMinimumSize = minimumSize;
minimumSize = min;
firePropertyChange("minimumSize", oldMinimumSize, minimumSize);
- revalidate();
- repaint();
}
/**
- * Set the value of the {@link #preferredSize} property, revalidate
- * and repaint this component.
+ * Set the value of the {@link #preferredSize} property.
*
* @param pref The new value of the property
*/
@@ -2106,7 +2106,7 @@ public abstract class JComponent extends Container implements Serializable
*
* @return The current value of the property
*
- * @see ComponentUI#setTransferHandler
+ * @see #setTransferHandler
*/
public TransferHandler getTransferHandler()
@@ -2119,7 +2119,7 @@ public abstract class JComponent extends Container implements Serializable
*
* @param newHandler The new value of the property
*
- * @see ComponentUI#getTransferHandler
+ * @see #getTransferHandler
*/
public void setTransferHandler(TransferHandler newHandler)
@@ -2133,8 +2133,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Set the value of the {@link #opaque} property, revalidate and repaint
- * this component.
+ * Set the value of the {@link #opaque} property.
*
* @param isOpaque The new value of the property
*
@@ -2145,25 +2144,20 @@ public abstract class JComponent extends Container implements Serializable
boolean oldOpaque = opaque;
opaque = isOpaque;
firePropertyChange("opaque", oldOpaque, opaque);
- revalidate();
- repaint();
}
/**
- * Set the value of the visible property, and revalidate / repaint the
- * component.
+ * Set the value of the visible property.
*
* @param v The new value of the property
*/
public void setVisible(boolean v)
{
super.setVisible(v);
- revalidate();
- repaint();
}
/**
- * Call {@link paint}.
+ * Call {@link #paint}.
*
* @param g The graphics context to paint into
*/
@@ -2176,7 +2170,7 @@ public abstract class JComponent extends Container implements Serializable
* Get the value of the UIClassID property. This property should be a key
* in the {@link UIDefaults} table managed by {@link UIManager}, the
* value of which is the name of a class to load for the component's
- * {@link ui} property.
+ * {@link #ui} property.
*
* @return A "symbolic" name which will map to a class to use for the
* component's UI, such as <code>"ComponentUI"</code>
@@ -2190,10 +2184,10 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Install a new UI delegate as the component's {@link ui} property. In
- * the process, this will call {@link ComponentUI.uninstallUI} on any
- * existing value for the {@link ui} property, and {@link
- * ComponentUI.installUI} on the new UI delegate.
+ * Install a new UI delegate as the component's {@link #ui} property. In
+ * the process, this will call {@link ComponentUI#uninstallUI} on any
+ * existing value for the {@link #ui} property, and {@link
+ * ComponentUI#installUI} on the new UI delegate.
*
* @param newUI The new UI delegate to install
*
@@ -2213,15 +2207,13 @@ public abstract class JComponent extends Container implements Serializable
firePropertyChange("UI", oldUI, newUI);
- revalidate();
- repaint();
}
/**
* This method should be overridden in subclasses. In JComponent, the
* method does nothing. In subclasses, it should a UI delegate
* (corresponding to the symbolic name returned from {@link
- * getUIClassID}) from the {@link UIManager}, and calls {@link setUI}
+ * #getUIClassID}) from the {@link UIManager}, and calls {@link #setUI}
* with the new delegate.
*/
public void updateUI()
@@ -2296,9 +2288,9 @@ public abstract class JComponent extends Container implements Serializable
* situations in which it is not possible to get the focus. So developers
* should not assume that the component has the focus until it receives
* a {@link java.awt.event.FocusEvent} with a value of
- * {@link java.awt.event.FocusEvent.FOCUS_GAINED}.
+ * {@link java.awt.event.FocusEvent#FOCUS_GAINED}.
*
- * @see {@link Component#requestFocus()}
+ * @see Component#requestFocus()
*/
public void requestFocus()
{
@@ -2311,15 +2303,15 @@ public abstract class JComponent extends Container implements Serializable
* by look and feel implementations.
*
* You should not use this method directly. Instead you are strongly
- * encouraged to call {@link #requestFocus} or {@link #requestFocusInWindow}
- * instead.
+ * encouraged to call {@link #requestFocus()} or
+ * {@link #requestFocusInWindow()} instead.
*
* @param temporary if the focus change is temporary
*
* @return <code>false</code> if the focus change request will definitly
* fail, <code>true</code> if it will likely succeed
*
- * @see {@link Component#requestFocus(boolean)}
+ * @see Component#requestFocus(boolean)
*
* @since 1.4
*/
@@ -2340,12 +2332,12 @@ public abstract class JComponent extends Container implements Serializable
* situations in which it is not possible to get the focus. So developers
* should not assume that the component has the focus until it receives
* a {@link java.awt.event.FocusEvent} with a value of
- * {@link java.awt.event.FocusEvent.FOCUS_GAINED}.
+ * {@link java.awt.event.FocusEvent#FOCUS_GAINED}.
*
* @return <code>false</code> if the focus change request will definitly
* fail, <code>true</code> if it will likely succeed
*
- * @see {@link Component#requestFocusInWindow()}
+ * @see Component#requestFocusInWindow()
*/
public boolean requestFocusInWindow()
{
@@ -2360,15 +2352,15 @@ public abstract class JComponent extends Container implements Serializable
* by look and feel implementations.
*
* You should not use this method directly. Instead you are strongly
- * encouraged to call {@link #requestFocus} or {@link #requestFocusInWindow}
- * instead.
+ * encouraged to call {@link #requestFocus()} or
+ * {@link #requestFocusInWindow()} instead.
*
* @param temporary if the focus change is temporary
*
* @return <code>false</code> if the focus change request will definitly
* fail, <code>true</code> if it will likely succeed
*
- * @see {@link Component#requestFocus(boolean)}
+ * @see Component#requestFocus(boolean)
*
* @since 1.4
*/
@@ -2449,7 +2441,8 @@ public abstract class JComponent extends Container implements Serializable
* has changed.
*
* This method is called before the component is actually removed from
- * its parent, so the parent is still visible through {@link #getParent}.
+ * its parent, so the parent is still visible through
+ * {@link Component#getParent}.
*/
public void removeNotify()
{
@@ -2608,7 +2601,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Prints this component to the given Graphics context. A call to this
* method results in calls to the methods {@link #printComponent},
- * {@link #printBorder} and {@link printChildren} in this order.
+ * {@link #printBorder} and {@link #printChildren} in this order.
*
* Double buffering is temporarily turned off so the painting goes directly
* to the supplied Graphics context.
diff --git a/javax/swing/JDesktopPane.java b/javax/swing/JDesktopPane.java
index 996aaf191..ff512114e 100644
--- a/javax/swing/JDesktopPane.java
+++ b/javax/swing/JDesktopPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -154,10 +154,9 @@ public class JDesktopPane extends JLayeredPane implements Accessible
// FIXME: Unsupported mode.
if (mode == OUTLINE_DRAG_MODE)
- {
- // throw new IllegalArgumentException("Outline drag modes are unsupported.");
- mode = LIVE_DRAG_MODE;
- }
+ // throw new IllegalArgumentException("Outline drag modes are
+ // unsupported.");
+ mode = LIVE_DRAG_MODE;
dragMode = mode;
}
@@ -241,22 +240,22 @@ public class JDesktopPane extends JLayeredPane implements Accessible
{
if (selectedFrame != null)
{
- try
- {
- selectedFrame.setSelected(false);
- }
- catch (PropertyVetoException e)
- {
- }
+ try
+ {
+ selectedFrame.setSelected(false);
+ }
+ catch (PropertyVetoException e)
+ {
+ }
}
selectedFrame = null;
try
{
- if (frame != null)
- frame.setSelected(true);
+ if (frame != null)
+ frame.setSelected(true);
- selectedFrame = frame;
+ selectedFrame = frame;
}
catch (PropertyVetoException e)
{
diff --git a/javax/swing/JDialog.java b/javax/swing/JDialog.java
index db9976ed3..83865f836 100644
--- a/javax/swing/JDialog.java
+++ b/javax/swing/JDialog.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -69,8 +69,12 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
/** The single RootPane in the Dialog. */
protected JRootPane rootPane;
- /** Whether checking is enabled on the RootPane */
- protected boolean rootPaneCheckingEnabled = true;
+ /**
+ * Whether checking is enabled on the RootPane.
+ *
+ * @specnote Should be false to comply with J2SE 5.0
+ */
+ protected boolean rootPaneCheckingEnabled = false;
/** The default action taken when closed. */
private int close_action = HIDE_ON_CLOSE;
@@ -79,7 +83,13 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
private static boolean decorated;
/**
- * Creates a new non-modal JDialog with no title
+ * Whether we're in the init stage or not.
+ * If so, adds and layouts are for top-level, otherwise they're for the
+ * content pane
+ */
+ private boolean initStageDone = false;
+
+ /* Creates a new non-modal JDialog with no title
* using a shared Frame as the owner.
*/
public JDialog()
@@ -224,12 +234,12 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
protected void dialogInit()
{
// FIXME: Do a check on GraphicsEnvironment.isHeadless()
- setRootPaneCheckingEnabled(false);
- setLocale(JComponent.getDefaultLocale());
- getRootPane(); // will do set/create
- setRootPaneCheckingEnabled(true);
+ setLocale(JComponent.getDefaultLocale());
+ getRootPane(); // Will do set/create.
invalidate();
-
+ // Now that initStageDone is true, adds and layouts apply to contentPane,
+ // not top-level.
+ initStageDone = true;
}
/**
@@ -298,9 +308,17 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
*/
public void setLayout(LayoutManager manager)
{
- if (isRootPaneCheckingEnabled())
- throw new Error("rootPaneChecking is enabled - cannot set layout.");
- super.setLayout(manager);
+ // Check if we're in initialization stage. If so, call super.setLayout
+ // otherwise, valid calls go to the content pane.
+ if (initStageDone)
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Cannot set top-level layout. Use"
+ + " getConentPane().setLayout instead.");
+ getContentPane().setLayout(manager);
+ }
+ else
+ super.setLayout(manager);
}
/**
@@ -420,9 +438,17 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
*/
protected void addImpl(Component comp, Object constraints, int index)
{
- if (isRootPaneCheckingEnabled())
- throw new Error("rootPaneChecking is enabled - adding components disallowed.");
- super.addImpl(comp, constraints, index);
+ // If we're adding in the initialization stage use super.add.
+ // Otherwise pass the add onto the content pane.
+ if (!initStageDone)
+ super.addImpl(comp, constraints, index);
+ else
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Do not add directly to JDialog."
+ + " Use getContentPane().add instead.");
+ getContentPane().add(comp, constraints, index);
+ }
}
/**
@@ -432,7 +458,8 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
*/
public void remove(Component comp)
{
- // The path changes if the component == root.
+ // If we're removing the root pane, use super.remove. Otherwise
+ // pass it on to the content pane instead.
if (comp == rootPane)
super.remove(rootPane);
else
@@ -520,14 +547,12 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
*/
public void setDefaultCloseOperation(int operation)
{
- if (operation == DO_NOTHING_ON_CLOSE ||
- operation == HIDE_ON_CLOSE ||
- operation == DISPOSE_ON_CLOSE)
- close_action = operation;
- else
- // accept illegal value and set the property to the default value,
- // that's what the reference implementation does
- close_action = DO_NOTHING_ON_CLOSE;
+ /* Reference implementation allows invalid operations
+ to be specified. If so, getDefaultCloseOperation
+ must return the invalid code, and the behaviour
+ defaults to DO_NOTHING_ON_CLOSE. processWindowEvent
+ above handles this */
+ close_action = operation;
}
/**
diff --git a/javax/swing/JEditorPane.java b/javax/swing/JEditorPane.java
index 2b5d9e0a4..63c79ffdf 100644
--- a/javax/swing/JEditorPane.java
+++ b/javax/swing/JEditorPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -117,8 +117,14 @@ public class JEditorPane extends JTextComponent
return getEditorKit().getContentType();
}
+ /**
+ * Returns the EditorKit. If there is no EditorKit set this method
+ * calls createDefaultEditorKit() and setEditorKit() first.
+ */
public EditorKit getEditorKit()
{
+ if (editorKit == null)
+ setEditorKit(createDefaultEditorKit());
return editorKit;
}
diff --git a/javax/swing/JFileChooser.java b/javax/swing/JFileChooser.java
index 07a67a041..17292fa4f 100644
--- a/javax/swing/JFileChooser.java
+++ b/javax/swing/JFileChooser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -357,7 +357,11 @@ public class JFileChooser extends JComponent implements Accessible
*/
public File[] getSelectedFiles()
{
- return selectedFiles;
+ if (selectedFiles != null)
+ return selectedFiles;
+ if (selectedFile != null)
+ return new File[] { selectedFile };
+ return null;
}
/**
diff --git a/javax/swing/JFormattedTextField.java b/javax/swing/JFormattedTextField.java
index 863ed204a..f8230f69f 100644
--- a/javax/swing/JFormattedTextField.java
+++ b/javax/swing/JFormattedTextField.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,7 +42,10 @@ import java.awt.event.FocusEvent;
import java.io.Serializable;
import java.text.Format;
import java.text.ParseException;
+import java.util.Date;
+import javax.swing.text.DateFormatter;
+import javax.swing.text.DefaultFormatter;
import javax.swing.text.Document;
import javax.swing.text.DocumentFilter;
import javax.swing.text.NavigationFilter;
@@ -197,7 +200,8 @@ public class JFormattedTextField extends JTextField
public Action[] getActions ()
{
- throw new InternalError ("not implemented");
+ // FIXME: Add JFormattedTextField specific actions
+ return super.getActions();
}
public int getFocusLostBehavior()
@@ -240,7 +244,10 @@ public class JFormattedTextField extends JTextField
protected void processFocusEvent (FocusEvent evt)
{
- throw new InternalError ("not implemented");
+ // it's safe to simply call super for now, until it gets clear
+ // what this method is supposed to do
+ // throw new InternalError ("not implemented");
+ super.processFocusEvent(evt);
}
public void setDocument(Document newDocument)
@@ -292,9 +299,49 @@ public class JFormattedTextField extends JTextField
{
if (value == newValue)
return;
-
+
+ // format value
+ AbstractFormatter formatter = createFormatter(newValue);
+ try
+ {
+ setText(formatter.valueToString(newValue));
+ }
+ catch (ParseException ex)
+ {
+ // TODO: what should we do with this?
+ }
+
Object oldValue = value;
value = newValue;
firePropertyChange("value", oldValue, newValue);
}
+
+ /**
+ * A helper method that attempts to create a formatter that is suitable
+ * to format objects of the type like <code>value</code>.
+ *
+ * If <code>formatterFactory</code> is not null and the returned formatter
+ * is also not <code>null</code> then this formatter is used. Otherwise we
+ * try to create one based on the type of <code>value</code>.
+ *
+ * @param value an object which should be formatted by the formatter
+ *
+ * @return a formatter able to format objects of the class of
+ * <code>value</code>
+ */
+ AbstractFormatter createFormatter(Object value)
+ {
+ AbstractFormatter formatter = null;
+ if (formatterFactory != null
+ && formatterFactory.getFormatter(this) != null)
+ formatter = formatterFactory.getFormatter(this);
+ else
+ {
+ if (value instanceof Date)
+ formatter = new DateFormatter();
+ else
+ formatter = new DefaultFormatter();
+ }
+ return formatter;
+ }
}
diff --git a/javax/swing/JFrame.java b/javax/swing/JFrame.java
index c450d0f50..bcefce22f 100644
--- a/javax/swing/JFrame.java
+++ b/javax/swing/JFrame.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,6 +45,7 @@ import java.awt.Container;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;
+import java.awt.GraphicsConfiguration;
import java.awt.LayoutManager;
import java.awt.event.KeyEvent;
import java.awt.event.WindowEvent;
@@ -65,7 +66,18 @@ public class JFrame extends Frame
private int close_action = HIDE_ON_CLOSE;
protected AccessibleContext accessibleContext;
protected JRootPane rootPane;
- protected boolean rootPaneCheckingEnabled;
+
+ /**
+ * @specnote rootPaneCheckingEnabled is false to comply with J2SE 5.0
+ */
+ protected boolean rootPaneCheckingEnabled = false;
+
+ /**
+ * Tells us if we're in the initialization stage.
+ * If so, adds go to top-level Container, otherwise they go
+ * to the content pane for this container.
+ */
+ private boolean initStageDone = false;
public JFrame()
{
@@ -79,11 +91,44 @@ public class JFrame extends Frame
frameInit();
}
+ /**
+ * Creates a new JFrame in the specified {@link GraphicsConfiguration}
+ * and with an empty title.
+ *
+ * @param gc the <code>GraphicsConfiguration</code> that is used for
+ * the new <code>JFrame</code>
+ *
+ * @see Frame#Frame(GraphicsConfiguration)
+ */
+ public JFrame(GraphicsConfiguration gc)
+ {
+ super(gc);
+ frameInit();
+ }
+
+ /**
+ * Creates a new JFrame in the specified {@link GraphicsConfiguration}
+ * and with the specified title.
+ *
+ * @param title the title for the new <code>JFrame</code>
+ * @param gc the <code>GraphicsConfiguration</code> that is used for
+ * the new <code>JFrame</code>
+ *
+ * @see Frame#Frame(String, GraphicsConfiguration)
+ */
+ public JFrame(String title, GraphicsConfiguration gc)
+ {
+ super(title, gc);
+ frameInit();
+ }
+
protected void frameInit()
{
super.setLayout(new BorderLayout(1, 1));
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
getRootPane(); // will do set/create
+ // We're now done the init stage.
+ initStageDone = true;
}
public Dimension getPreferredSize()
@@ -103,7 +148,17 @@ public class JFrame extends Frame
public void setLayout(LayoutManager manager)
{
- super.setLayout(manager);
+ // Check if we're in initialization stage. If so, call super.setLayout
+ // otherwise, valid calls go to the content pane.
+ if (initStageDone)
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Cannot set layout. Use getContentPane().setLayout()"
+ + " instead.");
+ getContentPane().setLayout(manager);
+ }
+ else
+ super.setLayout(manager);
}
public void setLayeredPane(JLayeredPane layeredPane)
@@ -159,12 +214,27 @@ public class JFrame extends Frame
protected void addImpl(Component comp, Object constraints, int index)
{
- super.addImpl(comp, constraints, index);
+ // If we're adding in the initialization stage use super.add.
+ // Otherwise pass the add onto the content pane.
+ if (!initStageDone)
+ super.addImpl(comp, constraints, index);
+ else
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("rootPaneChecking is enabled - adding components "
+ + "disallowed.");
+ getContentPane().add(comp,constraints,index);
+ }
}
public void remove(Component comp)
{
- getContentPane().remove(comp);
+ // If we're removing the root pane, use super.remove. Otherwise
+ // pass it on to the content pane instead.
+ if (comp==rootPane)
+ super.remove(rootPane);
+ else
+ getContentPane().remove(comp);
}
protected boolean isRootPaneCheckingEnabled()
@@ -272,7 +342,7 @@ public class JFrame extends Frame
if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE
&& operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE)
- throw new IllegalArgumentException("operation = " + operation);
+ throw new IllegalArgumentException("defaultCloseOperation must be EXIT_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE");
close_action = operation;
}
diff --git a/javax/swing/JInternalFrame.java b/javax/swing/JInternalFrame.java
index 8a29d2fff..b504aaaa5 100644
--- a/javax/swing/JInternalFrame.java
+++ b/javax/swing/JInternalFrame.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -430,8 +430,19 @@ public class JInternalFrame extends JComponent implements Accessible,
/** Whether the JInternalFrame can be maximized. */
protected boolean maximizable;
- /** Whether the JInternalFrame has rootPaneChecking enabled. */
- protected boolean rootPaneCheckingEnabled = true;
+ /**
+ * Whether the JInternalFrame has rootPaneChecking enabled.
+ *
+ * @specnote Should be false to comply with J2SE 5.0
+ */
+ protected boolean rootPaneCheckingEnabled = false;
+
+ /**
+ * Tells us if we're in the initialization stage.
+ * If so, adds go to top-level Container, otherwise they go
+ * to the content pane for this container.
+ */
+ private boolean initStageDone = false;
/** Whether the JInternalFrame is resizable. */
protected boolean resizable;
@@ -554,12 +565,9 @@ public class JInternalFrame extends JComponent implements Accessible,
this.maximizable = maximizable;
this.iconable = iconifiable;
storedBounds = new Rectangle();
-
- setRootPaneCheckingEnabled(false);
setRootPane(createRootPane());
-
updateUI();
- setRootPaneCheckingEnabled(true);
+ initStageDone = true; // Done the init stage, now adds go to content pane.
}
/**
@@ -576,10 +584,18 @@ public class JInternalFrame extends JComponent implements Accessible,
*/
protected void addImpl(Component comp, Object constraints, int index)
{
- if (isRootPaneCheckingEnabled())
- throw new Error("Do not use add() on JInternalPane directly. Use getContentPane().add() instead");
-
- super.addImpl(comp, constraints, index);
+ // If we're in the initialization stage use super.add. Here we add the
+ // rootPane as well as the title bar and other stuff.
+ // Otherwise pass the add onto the content pane.
+ if (!initStageDone)
+ super.addImpl(comp,constraints, index);
+ else
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Do not use add() on JInternalFrame directly. Use "
+ + "getContentPane().add() instead");
+ getContentPane().add(comp, constraints, index);
+ }
}
/**
@@ -1150,7 +1166,7 @@ public class JInternalFrame extends JComponent implements Accessible,
{
// Do nothing if they don't want to be restored first.
}
- doLayout();
+ setSize(getPreferredSize());
}
/**
@@ -1181,7 +1197,12 @@ public class JInternalFrame extends JComponent implements Accessible,
*/
public void remove(Component comp)
{
- super.remove(comp);
+ // If we're removing the root pane, use super.remove. Otherwise
+ // pass it on to the content pane instead.
+ if (comp==rootPane)
+ super.remove(comp);
+ else
+ getContentPane().remove(comp);
}
/**
@@ -1285,10 +1306,10 @@ public class JInternalFrame extends JComponent implements Accessible,
*/
public void setDefaultCloseOperation(int operation)
{
- if (operation != DO_NOTHING_ON_CLOSE
- && operation != HIDE_ON_CLOSE
- && operation != DISPOSE_ON_CLOSE)
- throw new Error("Close operation must be one of DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
+ /* Reference implementation allows invalid operations to be specified.
+ In that case, behaviour defaults to DO_NOTHING_ON_CLOSE.
+ processWindowEvent handles the behaviour. getDefaultCloseOperation
+ must return the invalid operator code. */
defaultCloseOperation = operation;
}
@@ -1466,9 +1487,17 @@ public class JInternalFrame extends JComponent implements Accessible,
*/
public void setLayout(LayoutManager manager)
{
- if (isRootPaneCheckingEnabled())
- throw new Error("Cannot set layout. Use getContentPane().setLayout() instead.");
- super.setLayout(manager);
+ // Check if we're in initialization stage. If so, call super.setLayout
+ // otherwise, valid calls go to the content pane.
+ if (initStageDone)
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Cannot set layout. Use getContentPane().setLayout()"
+ + " instead.");
+ getContentPane().setLayout(manager);
+ }
+ else
+ super.setLayout(manager);
}
/**
diff --git a/javax/swing/JLabel.java b/javax/swing/JLabel.java
index c01d8110d..2e7ad98dd 100644
--- a/javax/swing/JLabel.java
+++ b/javax/swing/JLabel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,17 +41,257 @@ package javax.swing;
import java.awt.Component;
import java.awt.Font;
import java.awt.Image;
+import java.awt.Point;
+import java.awt.Rectangle;
import java.awt.event.KeyEvent;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
+import javax.accessibility.AccessibleExtendedComponent;
+import javax.accessibility.AccessibleText;
import javax.swing.plaf.LabelUI;
+import javax.swing.text.AttributeSet;
+import javax.swing.text.SimpleAttributeSet;
/**
* A swing widget that displays a text message and/or an icon.
*/
public class JLabel extends JComponent implements Accessible, SwingConstants
{
+
+ /**
+ * Accessibility support for JLabel.
+ */
+ protected class AccessibleJLabel
+ extends JComponent.AccessibleJComponent
+ implements AccessibleText, AccessibleExtendedComponent
+ {
+ /**
+ * Returns the selected text. This is an empty string since JLabels
+ * are not selectable.
+ *
+ * @return the selected text
+ */
+ public String getSelectedText()
+ {
+ // We return "" here since JLabel's text is not selectable.
+ return "";
+ }
+
+ /**
+ * Returns the start index of the selected text.
+ *
+ * @return the start index of the selected text
+ */
+ public int getSelectionStart()
+ {
+ // TODO: Figure out what should be returned here, because JLabels don't
+ // allow selection. I guess -1 for now.
+ return -1;
+ }
+
+ /**
+ * Returns the end index of the selected text.
+ *
+ * @return the end index of the selected text
+ */
+ public int getSelectionEnd()
+ {
+ // TODO: Figure out what should be returned here, because JLabels don't
+ // allow selection. I guess -1 for now.
+ return -1;
+ }
+
+ /**
+ * Returns an {@link AttributeSet} that reflects the text attributes of
+ * the specified character. We return an empty
+ * <code>AttributeSet</code> here, because JLabels don't support text
+ * attributes (at least not yet).
+ *
+ * @param index the index of the character
+ *
+ * @return an {@link AttributeSet} that reflects the text attributes of
+ * the specified character
+ */
+ public AttributeSet getCharacterAttribute(int index)
+ {
+ return new SimpleAttributeSet();
+ }
+
+ /**
+ * Returns the character, word or sentence at the specified index. The
+ * <code>part</code> parameter determines what is returned, the character,
+ * word or sentence after the index.
+ *
+ * @param part one of {@link AccessibleText#CHARACTER},
+ * {@link AccessibleText#WORD} or
+ * {@link AccessibleText#SENTENCE}, specifying what is returned
+ * @param index the index
+ *
+ * @return the character, word or sentence after <code>index</code>
+ */
+ public String getAtIndex(int part, int index)
+ {
+ String result = "";
+ int startIndex = -1;
+ int endIndex = -1;
+ switch(part)
+ {
+ case AccessibleText.CHARACTER:
+ result = String.valueOf(text.charAt(index));
+ break;
+ case AccessibleText.WORD:
+ startIndex = text.lastIndexOf(' ', index);
+ endIndex = text.indexOf(' ', startIndex + 1);
+ if (endIndex == -1)
+ endIndex = startIndex + 1;
+ result = text.substring(startIndex + 1, endIndex);
+ break;
+ case AccessibleText.SENTENCE:
+ default:
+ startIndex = text.lastIndexOf('.', index);
+ endIndex = text.indexOf('.', startIndex + 1);
+ if (endIndex == -1)
+ endIndex = startIndex + 1;
+ result = text.substring(startIndex + 1, endIndex);
+ break;
+ }
+ return result;
+ }
+
+ /**
+ * Returns the character, word or sentence after the specified index. The
+ * <code>part</code> parameter determines what is returned, the character,
+ * word or sentence after the index.
+ *
+ * @param part one of {@link AccessibleText#CHARACTER},
+ * {@link AccessibleText#WORD} or
+ * {@link AccessibleText#SENTENCE}, specifying what is returned
+ * @param index the index
+ *
+ * @return the character, word or sentence after <code>index</code>
+ */
+ public String getAfterIndex(int part, int index)
+ {
+ String result = "";
+ int startIndex = -1;
+ int endIndex = -1;
+ switch(part)
+ {
+ case AccessibleText.CHARACTER:
+ result = String.valueOf(text.charAt(index + 1));
+ break;
+ case AccessibleText.WORD:
+ startIndex = text.indexOf(' ', index);
+ endIndex = text.indexOf(' ', startIndex + 1);
+ if (endIndex == -1)
+ endIndex = startIndex + 1;
+ result = text.substring(startIndex + 1, endIndex);
+ break;
+ case AccessibleText.SENTENCE:
+ default:
+ startIndex = text.indexOf('.', index);
+ endIndex = text.indexOf('.', startIndex + 1);
+ if (endIndex == -1)
+ endIndex = startIndex + 1;
+ result = text.substring(startIndex + 1, endIndex);
+ break;
+ }
+ return result;
+ }
+
+ /**
+ * Returns the character, word or sentence before the specified index. The
+ * <code>part</code> parameter determines what is returned, the character,
+ * word or sentence before the index.
+ *
+ * @param part one of {@link AccessibleText#CHARACTER},
+ * {@link AccessibleText#WORD} or
+ * {@link AccessibleText#SENTENCE}, specifying what is returned
+ * @param index the index
+ *
+ * @return the character, word or sentence before <code>index</code>
+ */
+ public String getBeforeIndex(int part, int index)
+ {
+ String result = "";
+ int startIndex = -1;
+ int endIndex = -1;
+ switch(part)
+ {
+ case AccessibleText.CHARACTER:
+ result = String.valueOf(text.charAt(index - 1));
+ break;
+ case AccessibleText.WORD:
+ endIndex = text.lastIndexOf(' ', index);
+ if (endIndex == -1)
+ endIndex = 0;
+ startIndex = text.lastIndexOf(' ', endIndex - 1);
+ result = text.substring(startIndex + 1, endIndex);
+ break;
+ case AccessibleText.SENTENCE:
+ default:
+ endIndex = text.lastIndexOf('.', index);
+ if (endIndex == -1)
+ endIndex = 0;
+ startIndex = text.lastIndexOf('.', endIndex - 1);
+ result = text.substring(startIndex + 1, endIndex);
+ break;
+ }
+ return result;
+ }
+
+ /**
+ * Returns the caret position. This method returns -1 because JLabel don't
+ * have a caret.
+ *
+ * @return the caret position
+ */
+ public int getCaretPosition()
+ {
+ return -1;
+ }
+
+ /**
+ * Returns the number of characters that are displayed by the JLabel.
+ *
+ * @return the number of characters that are displayed by the JLabel
+ */
+ public int getCharCount()
+ {
+ return text.length();
+ }
+
+ /**
+ * Returns the bounding box of the character at the specified index.
+ *
+ * @param index the index of the character that we return the
+ * bounds for
+ *
+ * @return the bounding box of the character at the specified index
+ */
+ public Rectangle getCharacterBounds(int index)
+ {
+ // FIXME: Implement this correctly.
+ return new Rectangle();
+ }
+
+ /**
+ * Returns the index of the character that is located at the specified
+ * point.
+ *
+ * @param point the location that we lookup the character for
+ *
+ * @return the index of the character that is located at the specified
+ * point
+ */
+ public int getIndexAtPoint(Point point)
+ {
+ // FIXME: Implement this correctly.
+ return 0;
+ }
+ }
+
/** DOCUMENT ME! */
private static final long serialVersionUID = 5496508283662221534L;
@@ -62,7 +302,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
protected Component labelFor;
/** The label's text. */
- private transient String text;
+ transient String text;
/** Where the label will be positioned horizontally. */
private transient int horizontalAlignment = LEADING;
@@ -91,18 +331,21 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/** The gap between the icon and the text. */
private transient int iconTextGap = 4;
+ /** The accessible context for this JLabel. */
+ private AccessibleJLabel accessibleContext;
+
/**
- * Creates a new horizontally and vertically centered JLabel object with no
- * text and no icon.
+ * Creates a new vertically centered, horizontally on the leading edge
+ * JLabel object with text and no icon.
*/
public JLabel()
{
- this(null, null, CENTER);
+ this(null, null, LEADING);
}
/**
- * Creates a new horizontally and vertically centered JLabel object with no
- * text and the given icon.
+ * Creates a new vertically and horizontally centered
+ * JLabel object with no text and the given icon.
*
* @param image The icon to use with the label.
*/
@@ -125,14 +368,14 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Creates a new horizontally and vertically centered JLabel object with no
- * icon and the given text.
+ * Creates a new horizontally leading and vertically centered JLabel
+ * object with no icon and the given text.
*
* @param text The text to use with the label.
*/
public JLabel(String text)
{
- this(text, null, CENTER);
+ this(text, null, LEADING);
}
/**
@@ -638,10 +881,12 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* DOCUMENT ME!
*
- * @return
+ * @return The accessible context.
*/
public AccessibleContext getAccessibleContext()
{
- return null;
+ if (accessibleContext == null)
+ accessibleContext = new AccessibleJLabel();
+ return accessibleContext;
}
}
diff --git a/javax/swing/JLayeredPane.java b/javax/swing/JLayeredPane.java
index f07d36e99..1ea39dc50 100644
--- a/javax/swing/JLayeredPane.java
+++ b/javax/swing/JLayeredPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ exception statement from your version. */
package javax.swing;
import java.awt.Component;
+import java.awt.Container;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
@@ -47,21 +48,43 @@ import java.util.TreeMap;
import javax.accessibility.Accessible;
/**
- * <p>The "Layered Pane" is a container which divides its children into 6 (or
- * more) disjoint sets. the pre-defined sets are:</p>
+ * A container that adds depth to the usual <code>Container</code> semantics.
+ * Each child component of a <code>Layered Pane</code> is placed within one
+ * of several layers. <code>JLayeredPane</code> defines a set of standard
+ * layers. The pre-defined sets are (in the order from button to top):
*
- * <ul>
- * <li>"Frame Content"</li>
- * <li>"Default"</li>
- * <li>"Palette"</li>
- * <li>"Modal"</li>
- * <li>"Popup"</li>
- * <li>"Drag"</li>
- * </ul>
+ * <dl>
+ * <dt>{@link #DEFAULT_LAYER}</dt>
+ * <dd>The layer where most of the normal components are placed. This
+ * is the bottommost layer.</dd>
+ *
+ * <dt>{@link #PALETTE_LAYER}</dt>
+ * <dd>Palette windows are placed in this layer.</dd>
+ *
+ * <dt>{@link #MODAL_LAYER}</dt>
+ * <dd>The layer where internal modal dialog windows are placed.</dd>
+ *
+ * <dt>{@link #POPUP_LAYER}</dt>
+ * <dd>The layer for popup menus</dd>
+ *
+ * <dt>{@link #DRAG_LAYER}</dt>
+ * <dd>Components that are beeing dragged are temporarily placed in
+ * this layer.</dd>
+ * </dl>
*
* <p>A child is in exactly one of these layers at any time, though there may
* be other layers if someone creates them.</p>
*
+ * <p>You can add a component to a specific layer using the
+ * {@link Container#add(Component, Object)} method. I.e.
+ * <code>layeredPane.add(comp, JLayeredPane.MODAL_LAYER)</code> will add the
+ * component <code>comp</code> to the modal layer of <code>layeredPane</code>.
+ * </p>
+ *
+ * <p>To change the layer of a component that is already a child of
+ * a <code>JLayeredPane</code>, use the {@link #setLayer(Component, int)}
+ * method.</p>
+ *
* <p>The purpose of this class is to translate this view of "layers" into a
* contiguous array of components: the one held in our ancestor,
* {@link java.awt.Container}.</p>
@@ -124,9 +147,18 @@ public class JLayeredPane extends JComponent implements Accessible
*/
public int getLayer(Component c)
{
- if (! componentToLayer.containsKey (c))
- throw new IllegalArgumentException ();
- return ((Integer) componentToLayer.get(c)).intValue();
+ Component myComp = c;
+ while(! componentToLayer.containsKey(myComp))
+ {
+ myComp = myComp.getParent();
+ if (myComp == null)
+ break;
+ }
+ if (myComp == null)
+ throw new IllegalArgumentException
+ ("component is not in this JLayeredPane");
+ Integer layerObj = (Integer) componentToLayer.get(myComp);
+ return layerObj.intValue();
}
/**
@@ -274,7 +306,7 @@ public class JLayeredPane extends JComponent implements Accessible
* @param c the component to move to the front of its layer.
* @throws IllegalArgumentException if the component is not a child of
* this container.
- * @see #moveToBack()
+ * @see #moveToBack
*/
public void moveToFront(Component c)
{
@@ -293,7 +325,7 @@ public class JLayeredPane extends JComponent implements Accessible
* @param c the component to move to the back of its layer.
* @throws IllegalArgumentException if the component is not a child of
* this container.
- * @see #moveToFront()
+ * @see #moveToFront
*/
public void moveToBack(Component c)
{
@@ -308,7 +340,7 @@ public class JLayeredPane extends JComponent implements Accessible
* @param c the component to get the position of.
* @throws IllegalArgumentException if the component is not a child of
* this container.
- * @see #setPosition()
+ * @see #setPosition
*/
public int getPosition(Component c)
{
@@ -335,7 +367,7 @@ public class JLayeredPane extends JComponent implements Accessible
* @param position the position to assign the component to.
* @throws IllegalArgumentException if the component is not a child of
* this container.
- * @see #getPosition()
+ * @see #getPosition
*/
public void setPosition(Component c, int position)
{
diff --git a/javax/swing/JList.java b/javax/swing/JList.java
index e5ca14a2a..fb8d18b85 100644
--- a/javax/swing/JList.java
+++ b/javax/swing/JList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -633,7 +633,7 @@ public class JList extends JComponent implements Accessible, Scrollable
lo = selectionModel.getMinSelectionIndex();
hi = selectionModel.getMaxSelectionIndex();
n = 0;
- for (i = lo; i < hi; ++i)
+ for (i = lo; i <= hi; ++i)
if (selectionModel.isSelectedIndex(i))
n++;
int [] v = new int[n];
diff --git a/javax/swing/JMenu.java b/javax/swing/JMenu.java
index e93ec0533..8dcad8b77 100644
--- a/javax/swing/JMenu.java
+++ b/javax/swing/JMenu.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -328,50 +328,57 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
*/
public boolean isSelected()
{
- return super.isArmed();
+ return super.isSelected();
}
/**
- * Changes this menu selected state if selected is true and false otherwise
- * This method fires menuEvents to menu's registered listeners.
- *
- * @param selected true if the menu should be selected and false otherwise
+ * A helper method to handle setSelected calls from both mouse events and
+ * direct calls to setSelected. Direct calls shouldn't expand the popup
+ * menu and should select the JMenu even if it is disabled. Mouse events
+ * only select the JMenu if it is enabled and should expand the popup menu
+ * associated with this JMenu.
+ * @param selected whether or not the JMenu was selected
+ * @param menuEnabled whether or not selecting the menu is "enabled". This
+ * is always true for direct calls, and is set to isEnabled() for mouse
+ * based calls.
+ * @param showMenu whether or not to show the popup menu
*/
- public void setSelected(boolean selected)
+ private void setSelectedHelper(boolean selected, boolean menuEnabled, boolean showMenu)
{
- // if this menu selection is true, then activate this menu and
- // display popup associated with this menu
- if (selected)
+ // If menu is selected and enabled, activates the menu and
+ // displays associated popup.
+ if (selected && menuEnabled)
{
super.setArmed(true);
super.setSelected(true);
- // FIXME: The popup menu should be shown on the screen after certain
- // number of seconds pass. The 'delay' property of this menu indicates
- // this amount of seconds. 'delay' property is 0 by default.
- if (this.isShowing())
+ // FIXME: The popup menu should be shown on the screen after certain
+ // number of seconds pass. The 'delay' property of this menu indicates
+ // this amount of seconds. 'delay' property is 0 by default.
+ if (isShowing())
{
fireMenuSelected();
-
+
int x = 0;
int y = 0;
-
- if (menuLocation == null)
- {
- // Calculate correct position of the popup. Note that location of the popup
- // passed to show() should be relative to the popup's invoker
- if (isTopLevelMenu())
- y = this.getHeight();
- else
- x = this.getWidth();
-
- getPopupMenu().show(this, x, y);
- }
- else
- getPopupMenu().show(this, menuLocation.x, menuLocation.y);
+ if (showMenu)
+ if (menuLocation == null)
+ {
+ // Calculate correct position of the popup. Note that location of the popup
+ // passed to show() should be relative to the popup's invoker
+ if (isTopLevelMenu())
+ y = this.getHeight();
+ else
+ x = this.getWidth();
+ getPopupMenu().show(this, x, y);
+ }
+ else
+ {
+ getPopupMenu().show(this, menuLocation.x, menuLocation.y);
+ }
}
}
-
+
else
{
super.setSelected(false);
@@ -382,6 +389,17 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
}
/**
+ * Changes this menu selected state if selected is true and false otherwise
+ * This method fires menuEvents to menu's registered listeners.
+ *
+ * @param selected true if the menu should be selected and false otherwise
+ */
+ public void setSelected(boolean selected)
+ {
+ setSelectedHelper(selected, true, false);
+ }
+
+ /**
* Checks if PopupMenu associated with this menu is visible
*
* @return true if the popup associated with this menu is currently visible
@@ -709,7 +727,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
{
// if this menu selection is true, then activate this menu and
// display popup associated with this menu
- setSelected(changed);
+ setSelectedHelper(changed, isEnabled(), true);
}
/**
@@ -893,4 +911,5 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
// FIXME: Need to implement
}
}
+
}
diff --git a/javax/swing/JMenuBar.java b/javax/swing/JMenuBar.java
index e14c26270..eebb1a050 100644
--- a/javax/swing/JMenuBar.java
+++ b/javax/swing/JMenuBar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -326,7 +326,7 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
* Process key events forwarded from MenuSelectionManager. This method
* doesn't do anything. It is here to conform to the MenuElement interface.
*
- * @param event event forwarded from MenuSelectionManager
+ * @param e event forwarded from MenuSelectionManager
* @param path path to the menu element from which event was generated
* @param manager MenuSelectionManager for the current menu hierarchy
*
diff --git a/javax/swing/JMenuItem.java b/javax/swing/JMenuItem.java
index c8a2931d4..069b7bc86 100644
--- a/javax/swing/JMenuItem.java
+++ b/javax/swing/JMenuItem.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -83,7 +83,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
*/
public JMenuItem()
{
- super(null, null);
+ super();
}
/**
@@ -95,7 +95,8 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
// FIXME: The requestedFocusEnabled property should
// be set to false, when only icon is set for menu item.
- super(null, icon);
+ super();
+ init(null, icon);
}
/**
@@ -105,7 +106,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
*/
public JMenuItem(String text)
{
- super(text, null);
+ this(text, null);
}
/**
@@ -115,7 +116,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
*/
public JMenuItem(Action action)
{
- super(null, null);
+ super();
super.setAction(action);
}
@@ -128,7 +129,8 @@ public class JMenuItem extends AbstractButton implements Accessible,
*/
public JMenuItem(String text, Icon icon)
{
- super(text, icon);
+ super();
+ init(text, icon);
}
/**
@@ -141,7 +143,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
*/
public JMenuItem(String text, int mnemonic)
{
- super(text, null);
+ this(text, null);
setMnemonic(mnemonic);
}
diff --git a/javax/swing/JOptionPane.java b/javax/swing/JOptionPane.java
index 0a00729b5..ad0772ab8 100644
--- a/javax/swing/JOptionPane.java
+++ b/javax/swing/JOptionPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -384,8 +384,8 @@ public class JOptionPane extends JComponent implements Accessible
}
/**
- * This method creates a new JInternalFrame that is in the JDesktopPane
- * which contains the parentComponent given. If no suitable JDesktopPane
+ * This method creates a new JInternalFrame that is in the JLayeredPane
+ * which contains the parentComponent given. If no suitable JLayeredPane
* can be found from the parentComponent given, a RuntimeException will be
* thrown.
*
@@ -395,25 +395,42 @@ public class JOptionPane extends JComponent implements Accessible
* @return A new JInternalFrame based on the JOptionPane configuration.
*
* @throws RuntimeException If no suitable JDesktopPane is found.
+ *
+ * @specnote The specification says that the internal frame is placed
+ * in the nearest <code>JDesktopPane</code> that is found in
+ * <code>parent</code>'s ancestors. The behaviour of the JDK
+ * is that it actually looks up the nearest
+ * <code>JLayeredPane</code> in <code>parent</code>'s ancestors.
+ * So do we.
*/
public JInternalFrame createInternalFrame(Component parentComponent,
String title)
throws RuntimeException
{
- JDesktopPane toUse = getDesktopPaneForComponent(parentComponent);
+ // Try to find a JDesktopPane.
+ JLayeredPane toUse = getDesktopPaneForComponent(parentComponent);
+ // If we don't have a JDesktopPane, we try to find a JLayeredPane.
+ if (toUse == null)
+ toUse = JLayeredPane.getLayeredPaneAbove(parentComponent);
+ // If this still fails, we throw a RuntimeException.
if (toUse == null)
- throw new RuntimeException("parentComponent does not have a valid parent");
+ throw new RuntimeException
+ ("parentComponent does not have a valid parent");
JInternalFrame frame = new JInternalFrame(title);
inputValue = UNINITIALIZED_VALUE;
value = UNINITIALIZED_VALUE;
+ frame.setContentPane(this);
frame.setClosable(true);
+
toUse.add(frame);
+ frame.setLayer(JLayeredPane.MODAL_LAYER);
+
+ frame.pack();
+ frame.setVisible(true);
- // FIXME: JLayeredPane broken? See bug # 16576
- // frame.setLayer(JLayeredPane.MODAL_LAYER);
return frame;
}
@@ -1102,7 +1119,7 @@ public class JOptionPane extends JComponent implements Accessible
JOptionPane pane = new JOptionPane(message);
JInternalFrame frame = pane.createInternalFrame(parentComponent, null);
- startModal(frame, pane);
+ startModal(frame);
return ((Integer) pane.getValue()).intValue();
}
@@ -1127,7 +1144,7 @@ public class JOptionPane extends JComponent implements Accessible
JOptionPane pane = new JOptionPane(message, PLAIN_MESSAGE, optionType);
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
- startModal(frame, pane);
+ startModal(frame);
return ((Integer) pane.getValue()).intValue();
}
@@ -1153,7 +1170,7 @@ public class JOptionPane extends JComponent implements Accessible
JOptionPane pane = new JOptionPane(message, messageType, optionType);
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
- startModal(frame, pane);
+ startModal(frame);
return ((Integer) pane.getValue()).intValue();
}
@@ -1181,7 +1198,7 @@ public class JOptionPane extends JComponent implements Accessible
JOptionPane pane = new JOptionPane(message, messageType, optionType, icon);
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
- startModal(frame, pane);
+ startModal(frame);
return ((Integer) pane.getValue()).intValue();
}
@@ -1204,7 +1221,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JInternalFrame frame = pane.createInternalFrame(parentComponent, null);
- startModal(frame, pane);
+ startModal(frame);
return (String) pane.getInputValue();
}
@@ -1230,7 +1247,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
- startModal(frame, pane);
+ startModal(frame);
return (String) pane.getInputValue();
}
@@ -1265,7 +1282,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setInitialSelectionValue(initialSelectionValue);
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
- startModal(frame, pane);
+ startModal(frame);
return (String) pane.getInputValue();
}
@@ -1284,7 +1301,7 @@ public class JOptionPane extends JComponent implements Accessible
JOptionPane pane = new JOptionPane(message);
JInternalFrame frame = pane.createInternalFrame(parentComponent, null);
- startModal(frame, pane);
+ startModal(frame);
}
/**
@@ -1304,7 +1321,7 @@ public class JOptionPane extends JComponent implements Accessible
JOptionPane pane = new JOptionPane(message, messageType);
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
- startModal(frame, pane);
+ startModal(frame);
}
/**
@@ -1326,7 +1343,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setIcon(icon);
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
- startModal(frame, pane);
+ startModal(frame);
}
/**
@@ -1358,7 +1375,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
- startModal(frame, pane);
+ startModal(frame);
return ((Integer) pane.getValue()).intValue();
}
@@ -1509,15 +1526,8 @@ public class JOptionPane extends JComponent implements Accessible
* @param f The JInternalFrame to make modal.
* @param pane The JOptionPane to add to the JInternalFrame.
*/
- private static void startModal(JInternalFrame f, JOptionPane pane)
+ private static void startModal(JInternalFrame f)
{
- f.getContentPane().add(pane);
- f.pack();
- f.show();
-
- Dimension pref = f.getPreferredSize();
- f.setBounds(0, 0, pref.width, pref.height);
-
synchronized (f)
{
final JInternalFrame tmp = f;
diff --git a/javax/swing/JPanel.java b/javax/swing/JPanel.java
index 34a7c9fdc..c7f7c4483 100644
--- a/javax/swing/JPanel.java
+++ b/javax/swing/JPanel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/JPasswordField.java b/javax/swing/JPasswordField.java
index 449aa82cd..f9df10217 100644
--- a/javax/swing/JPasswordField.java
+++ b/javax/swing/JPasswordField.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/JPopupMenu.java b/javax/swing/JPopupMenu.java
index f1ec51156..c4ee5fe73 100644
--- a/javax/swing/JPopupMenu.java
+++ b/javax/swing/JPopupMenu.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -232,6 +232,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
constraints.gridy = i;
super.add(items[i], constraints, i);
}
+ this.setSize(this.getPreferredSize());
}
/**
@@ -276,6 +277,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
super.add(items[i], constraints, i);
}
}
+ this.setSize(this.getPreferredSize());
}
/**
@@ -908,13 +910,13 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
*/
private class LightWeightPopup extends Container implements Popup
{
+ private Component c;
+
/**
* Creates a new LightWeightPopup menu
*
* @param c Container containing menu items
*/
- private Component c;
-
public LightWeightPopup(Container c)
{
this.c = c;
diff --git a/javax/swing/JProgressBar.java b/javax/swing/JProgressBar.java
index 3f8a45ad6..1b8fcea46 100644
--- a/javax/swing/JProgressBar.java
+++ b/javax/swing/JProgressBar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -88,8 +88,6 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Constructor AccessibleJProgressBar
- *
- * @param component TODO
*/
protected AccessibleJProgressBar()
{
@@ -200,7 +198,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
*/
public JProgressBar()
{
- this(0, 100, HORIZONTAL);
+ this(HORIZONTAL, 0, 100);
}
/**
@@ -208,10 +206,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
* a maximum of 100, and the given orientation.
*
* @param orientation The orientation of the JProgressBar.
+ *
+ * @throws IllegalArgumentException if <code>orientation</code> is not either
+ * {@link #HORIZONTAL} or {@link #VERTICAL}.
*/
public JProgressBar(int orientation)
{
- this(0, 100, orientation);
+ this(orientation, 0, 100);
}
/**
@@ -223,7 +224,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
*/
public JProgressBar(int minimum, int maximum)
{
- this(minimum, maximum, HORIZONTAL);
+ this(HORIZONTAL, minimum, maximum);
}
/**
@@ -233,8 +234,11 @@ public class JProgressBar extends JComponent implements SwingConstants,
* @param minimum The minimum of the JProgressBar.
* @param maximum The maximum of the JProgressBar.
* @param orientation The orientation of the JProgressBar.
+ *
+ * @throws IllegalArgumentException if <code>orientation</code> is not either
+ * {@link #HORIZONTAL} or {@link #VERTICAL}.
*/
- public JProgressBar(int minimum, int maximum, int orientation)
+ public JProgressBar(int orientation, int minimum, int maximum)
{
model = new DefaultBoundedRangeModel(minimum, 0, minimum, maximum);
if (orientation != HORIZONTAL && orientation != VERTICAL)
diff --git a/javax/swing/JRadioButton.java b/javax/swing/JRadioButton.java
index 10f7e81fd..66f5902e8 100644
--- a/javax/swing/JRadioButton.java
+++ b/javax/swing/JRadioButton.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -236,7 +236,7 @@ public class JRadioButton extends JToggleButton
*/
protected String paramString()
{
- return "JRadioButton";
+ return super.paramString();
}
/**
diff --git a/javax/swing/JRadioButtonMenuItem.java b/javax/swing/JRadioButtonMenuItem.java
index 2aefb3395..76a8fef64 100644
--- a/javax/swing/JRadioButtonMenuItem.java
+++ b/javax/swing/JRadioButtonMenuItem.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/JRootPane.java b/javax/swing/JRootPane.java
index ee05d27f9..cb0bafd84 100644
--- a/javax/swing/JRootPane.java
+++ b/javax/swing/JRootPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/JScrollBar.java b/javax/swing/JScrollBar.java
index 0ed7679e7..a2cc76c65 100644
--- a/javax/swing/JScrollBar.java
+++ b/javax/swing/JScrollBar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -69,8 +69,6 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
/**
* Creates a new AccessibleJSlider object.
- *
- * @param value0 DOCUMENT ME!
*/
protected AccessibleJScrollBar()
{
diff --git a/javax/swing/JScrollPane.java b/javax/swing/JScrollPane.java
index baa0a6a85..e83513f07 100644
--- a/javax/swing/JScrollPane.java
+++ b/javax/swing/JScrollPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,6 +54,9 @@ import javax.swing.plaf.ScrollPaneUI;
import javax.swing.plaf.UIResource;
/**
+ * A component that embeds another component and enables it to be scrolled
+ * both in horizontal and vertical direction.
+ *
* <table>
* <tr><th>Property </th><th>Stored in </th><th>Bound?</th></tr>
* <tr><td>columnHeader </td><td>scrollPane </td><td>yes </td></tr>
@@ -564,11 +567,23 @@ public class JScrollPane
}
+ /**
+ * Creates a new <code>JScrollPane</code> without a view. The scrollbar
+ * policy is set to {@link #VERTICAL_SCROLLBAR_AS_NEEDED} and
+ * {@link #HORIZONTAL_SCROLLBAR_AS_NEEDED}.
+ */
public JScrollPane()
{
this(null);
}
-
+
+ /**
+ * Creates a new <code>JScrollPane</code> that embeds the specified
+ * <code>view</code> component, displaying vertical and horizontal scrollbars
+ * as needed.
+ *
+ * @param view the component that is embedded inside the JScrollPane
+ */
public JScrollPane(Component view)
{
this(view,
@@ -576,11 +591,40 @@ public class JScrollPane
HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
+ /**
+ * Creates a new <code>JScrollPane</code> without a view; The scrollbar
+ * policies are set to <code>vsbPolicy</code> and <code>hsbPolicy</code>.
+ *
+ * @param vsbPolicy the vertical scrollbar policy to set
+ * @param hsbPolicy the vertical scrollbar policy to set
+ *
+ * @see ScrollPaneConstants#HORIZONTAL_SCROLLBAR_ALWAYS
+ * @see ScrollPaneConstants#HORIZONTAL_SCROLLBAR_AS_NEEDED
+ * @see ScrollPaneConstants#HORIZONTAL_SCROLLBAR_NEVER
+ * @see ScrollPaneConstants#VERTICAL_SCROLLBAR_ALWAYS
+ * @see ScrollPaneConstants#VERTICAL_SCROLLBAR_AS_NEEDED
+ * @see ScrollPaneConstants#VERTICAL_SCROLLBAR_NEVER
+ */
public JScrollPane(int vsbPolicy, int hsbPolicy)
{
this(null, vsbPolicy, hsbPolicy);
}
+ /**
+ * Creates a new <code>JScrollPane</code> that embeds the specified
+ * <code>view</code> component; The scrollbar
+ * policies are set to <code>vsbPolicy</code> and <code>hsbPolicy</code>.
+ *
+ * @param vsbPolicy the vertical scrollbar policy to set
+ * @param hsbPolicy the vertical scrollbar policy to set
+ *
+ * @see ScrollPaneConstants#HORIZONTAL_SCROLLBAR_ALWAYS
+ * @see ScrollPaneConstants#HORIZONTAL_SCROLLBAR_AS_NEEDED
+ * @see ScrollPaneConstants#HORIZONTAL_SCROLLBAR_NEVER
+ * @see ScrollPaneConstants#VERTICAL_SCROLLBAR_ALWAYS
+ * @see ScrollPaneConstants#VERTICAL_SCROLLBAR_AS_NEEDED
+ * @see ScrollPaneConstants#VERTICAL_SCROLLBAR_NEVER
+ */
public JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
{
scrollListener = createScrollListener();
@@ -588,7 +632,11 @@ public class JScrollPane
setVerticalScrollBar(createVerticalScrollBar());
setHorizontalScrollBarPolicy(hsbPolicy);
setHorizontalScrollBar(createHorizontalScrollBar());
- setViewportView(view);
+ viewport = createViewport();
+ if (view != null)
+ getViewport().setView(view);
+ viewport.addChangeListener(scrollListener);
+ add(viewport,0);
setLayout(new ScrollPaneLayout());
setOpaque(false);
updateUI();
diff --git a/javax/swing/JSeparator.java b/javax/swing/JSeparator.java
index d3edb737d..6a3b97d35 100644
--- a/javax/swing/JSeparator.java
+++ b/javax/swing/JSeparator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -59,8 +59,6 @@ public class JSeparator extends JComponent implements SwingConstants,
/**
* Constructor AccessibleJSeparator
- *
- * @param component TODO
*/
protected AccessibleJSeparator()
{
diff --git a/javax/swing/JSlider.java b/javax/swing/JSlider.java
index cfe7880df..2caf509a1 100644
--- a/javax/swing/JSlider.java
+++ b/javax/swing/JSlider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,7 @@ package javax.swing;
import java.awt.Dimension;
import java.awt.MenuContainer;
import java.awt.image.ImageObserver;
+import java.beans.PropertyChangeEvent;
import java.io.Serializable;
import java.util.Dictionary;
import java.util.Enumeration;
@@ -124,8 +125,6 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Creates a new AccessibleJSlider object.
- *
- * @param value0 DOCUMENT ME!
*/
protected AccessibleJSlider()
{
@@ -229,7 +228,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
protected int minorTickSpacing;
/** Whether the slider snaps its values to ticks. */
- protected boolean snapToTicks = true;
+ protected boolean snapToTicks = false;
/** The orientation of the slider. */
protected int orientation = HORIZONTAL;
@@ -256,7 +255,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Creates a new JSlider object with the given orientation and a minimum of
* 0, a maximum of 100, and a value of 50.
*
- * @param orientation The orientation of the slider.
+ * @param orientation The orientation of the slider ({@link #HORIZONTAL} or
+ * {@link #VERTICAL}).
+ *
+ * @throws IllegalArgumentException if <code>orientation</code> is not one of
+ * the specified values.
*/
public JSlider(int orientation)
{
@@ -293,10 +296,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Creates a new JSlider object with the given orientation, minimum,
* maximum, and value.
*
- * @param orientation The orientation of the JSlider.
+ * @param orientation The orientation of the slider ({@link #HORIZONTAL} or
+ * {@link #VERTICAL}).
* @param minimum The minimum value of the JSlider.
* @param maximum The maximum value of the JSlider.
* @param value The initial value of the JSlider.
+ *
+ * @throws IllegalArgumentException if <code>orientation</code> is not one of
+ * the specified values.
*/
public JSlider(int orientation, int minimum, int maximum, int value)
{
@@ -312,14 +319,13 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Creates a new horizontal JSlider object with the given model.
*
- * @param model The model the slider will be created with.
+ * @param model The model (<code>null</code> not permitted).
+ *
+ * @throws NullPointerException if <code>model</code> is <code>null</code>.
*/
public JSlider(BoundedRangeModel model)
{
- if (model == null)
- sliderModel = new DefaultBoundedRangeModel(50, 0, 0, 100);
- else
- sliderModel = model;
+ sliderModel = model;
changeListener = createChangeListener();
sliderModel.addChangeListener(changeListener);
updateUI();
@@ -504,7 +510,10 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
*/
public void setMinimum(int minimum)
{
+ int old = sliderModel.getMinimum();
sliderModel.setMinimum(minimum);
+ if (minimum != old)
+ firePropertyChange("minimum", old, minimum);
}
/**
@@ -524,7 +533,10 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
*/
public void setMaximum(int maximum)
{
+ int old = sliderModel.getMaximum();
sliderModel.setMaximum(maximum);
+ if (maximum != old)
+ firePropertyChange("maximum", old, maximum);
}
/**
@@ -643,9 +655,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* minimum and increase by the increment. Each label will have a text
* string indicating their integer value.
*
- * @param increment The increment to between labels.
+ * @param increment The increment between labels (must be > 0).
*
* @return A hashtable with the labels and their keys.
+ *
+ * @throws IllegalArgumentException if <code>increment</code> is not greater
+ * than zero.
*/
public Hashtable createStandardLabels(int increment)
{
@@ -656,15 +671,23 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Creates a hashtable of (Integer, JLabel) pairs that can be used as a
* label table for this slider. The labels will start from the given start
* value and increase by the increment. Each label will have a text string
- * indicating their integer value.
+ * indicating its integer value.
*
- * @param increment The increment to between labels.
+ * @param increment The increment between labels (must be > 0).
* @param start The value to start from.
*
* @return A hashtable with the labels and their keys.
+ *
+ * @throws IllegalArgumentException if <code>increment</code> is not greater
+ * than zero, or <code>start</code> is not within the range of the
+ * model.
*/
public Hashtable createStandardLabels(int increment, int start)
{
+ if (increment <= 0)
+ throw new IllegalArgumentException("Requires 'increment' > 0.");
+ if (start < getMinimum() || start > getMaximum())
+ throw new IllegalArgumentException("The 'start' value is out of range.");
Hashtable table = new Hashtable();
JLabel label;
Dimension dim;
@@ -801,7 +824,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
if (snap != snapToTicks)
{
snapToTicks = snap;
- fireStateChanged();
+ firePropertyChange("snapToTicks", !snap, snap);
}
}
@@ -847,13 +870,19 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * This method sets whether the track will be painted.
+ * Sets the flag that controls whether or not the track is painted, and
+ * sends a {@link PropertyChangeEvent} (for the "paintTrack" property) to all
+ * registered listeners.
*
* @param paint Whether the track will be painted.
*/
public void setPaintTrack(boolean paint)
{
- paintTrack = paint;
+ if (paintTrack != paint)
+ {
+ paintTrack = paint;
+ firePropertyChange("paintTrack", !paint, paint);
+ }
}
/**
@@ -875,9 +904,10 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
if (paint != paintLabels)
{
- boolean oldPaintLabels = paintLabels;
paintLabels = paint;
- firePropertyChange("paintLabels", oldPaintLabels, paintLabels);
+ if (paint && majorTickSpacing > 0)
+ labelTable = createStandardLabels(majorTickSpacing);
+ firePropertyChange("paintLabels", !paint, paint);
}
}
diff --git a/javax/swing/JSpinner.java b/javax/swing/JSpinner.java
index 4efb1c27e..fc2b13e81 100644
--- a/javax/swing/JSpinner.java
+++ b/javax/swing/JSpinner.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,17 +41,18 @@ package javax.swing;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
+import java.awt.Insets;
import java.awt.LayoutManager;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.text.DecimalFormat;
import java.text.ParseException;
+import java.text.SimpleDateFormat;
-import javax.swing.border.EtchedBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.plaf.SpinnerUI;
-
+import javax.swing.text.DateFormatter;
/**
* A JSpinner is a component which typically contains a numeric value and a
@@ -66,53 +67,15 @@ public class JSpinner extends JComponent
/**
* DOCUMENT ME!
*/
- public static class StubEditor extends JLabel implements ChangeListener
- {
- /** DOCUMENT ME! */
- private JLabel label;
-
- /** DOCUMENT ME! */
- private JButton up;
-
- /** DOCUMENT ME! */
- private JButton down;
-
- /** DOCUMENT ME! */
- private JSpinner spinner;
-
- /**
- * Creates a new StubEditor object.
- *
- * @param spinner DOCUMENT ME!
- */
- public StubEditor(JSpinner spinner)
- {
- this.spinner = spinner;
- setBorder(new EtchedBorder());
- setHorizontalAlignment(SwingConstants.TRAILING);
- stateChanged(null); /* fill in the label */
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param evt DOCUMENT ME!
- */
- public void stateChanged(ChangeEvent evt)
- {
- setText(String.valueOf(spinner.getValue()));
- }
- }
-
- /**
- * DOCUMENT ME!
- */
public static class DefaultEditor extends JPanel implements ChangeListener,
PropertyChangeListener,
LayoutManager
{
private JSpinner spinner;
-
+
+ /** The JFormattedTextField that backs the editor. */
+ JFormattedTextField ftf;
+
/**
* For compatability with Sun's JDK 1.4.2 rev. 5
*/
@@ -125,8 +88,12 @@ public class JSpinner extends JComponent
*/
public DefaultEditor(JSpinner spinner)
{
+ super();
+ setLayout(this);
this.spinner = spinner;
-
+ ftf = new JFormattedTextField();
+ add(ftf);
+ ftf.setValue(spinner.getValue());
spinner.addChangeListener(this);
}
@@ -163,8 +130,8 @@ public class JSpinner extends JComponent
*/
public JFormattedTextField getTextField()
{
- return null;
- } /* TODO */
+ return ftf;
+ }
/**
* DOCUMENT ME!
@@ -173,7 +140,12 @@ public class JSpinner extends JComponent
*/
public void layoutContainer(Container parent)
{
- } /* TODO */
+ Insets insets = getInsets();
+ Dimension size = getSize();
+ ftf.setBounds(insets.left, insets.top,
+ size.width - insets.left - insets.right,
+ size.height - insets.top - insets.bottom);
+ }
/**
* DOCUMENT ME!
@@ -184,8 +156,11 @@ public class JSpinner extends JComponent
*/
public Dimension minimumLayoutSize(Container parent)
{
- return null;
- } /* TODO */
+ Insets insets = getInsets();
+ Dimension minSize = ftf.getMinimumSize();
+ return new Dimension(minSize.width + insets.left + insets.right,
+ minSize.height + insets.top + insets.bottom);
+ }
/**
* DOCUMENT ME!
@@ -196,8 +171,11 @@ public class JSpinner extends JComponent
*/
public Dimension preferredLayoutSize(Container parent)
{
- return null;
- } /* TODO */
+ Insets insets = getInsets();
+ Dimension prefSize = ftf.getPreferredSize();
+ return new Dimension(prefSize.width + insets.left + insets.right,
+ prefSize.height + insets.top + insets.bottom);
+ }
/**
* DOCUMENT ME!
@@ -279,6 +257,95 @@ public class JSpinner extends JComponent
}
}
+ /**
+ * An editor class for a <code>JSpinner</code> that is used
+ * for displaying and editing dates (e.g. that uses
+ * <code>SpinnerDateModel</code> as model).
+ *
+ * The editor uses a {@link JTextField} with the value
+ * displayed by a {@link DateFormatter} instance.
+ */
+ public static class DateEditor extends DefaultEditor
+ {
+
+ /** The serialVersionUID. */
+ private static final long serialVersionUID = -4279356973770397815L;
+
+ /** The DateFormat instance used to format the date. */
+ SimpleDateFormat dateFormat;
+
+ /**
+ * Creates a new instance of DateEditor for the specified
+ * <code>JSpinner</code>.
+ *
+ * @param spinner the <code>JSpinner</code> for which to
+ * create a <code>DateEditor</code> instance
+ */
+ public DateEditor(JSpinner spinner)
+ {
+ super(spinner);
+ init(new SimpleDateFormat());
+ }
+
+ /**
+ * Creates a new instance of DateEditor for the specified
+ * <code>JSpinner</code> using the specified date format
+ * pattern.
+ *
+ * @param spinner the <code>JSpinner</code> for which to
+ * create a <code>DateEditor</code> instance
+ * @param dateFormatPattern the date format to use
+ *
+ * @see SimpleDateFormat#SimpleDateFormat(String)
+ */
+ public DateEditor(JSpinner spinner, String dateFormatPattern)
+ {
+ super(spinner);
+ init(new SimpleDateFormat(dateFormatPattern));
+ }
+
+ /**
+ * Initializes the JFormattedTextField for this editor.
+ *
+ * @param the date format to use in the formatted text field
+ */
+ private void init(SimpleDateFormat format)
+ {
+ dateFormat = format;
+ getTextField().setFormatterFactory(
+ new JFormattedTextField.AbstractFormatterFactory()
+ {
+ public JFormattedTextField.AbstractFormatter
+ getFormatter(JFormattedTextField ftf)
+ {
+ return new DateFormatter(dateFormat);
+ }
+ });
+ }
+
+ /**
+ * Returns the <code>SimpleDateFormat</code> instance that is used to
+ * format the date value.
+ *
+ * @return the <code>SimpleDateFormat</code> instance that is used to
+ * format the date value
+ */
+ public SimpleDateFormat getFormat()
+ {
+ return dateFormat;
+ }
+
+ /**
+ * Returns the {@link SpinnerDateModel} that is edited by this editor.
+ *
+ * @return the <code>SpinnerDateModel</code> that is edited by this editor
+ */
+ public SpinnerDateModel getModel()
+ {
+ return (SpinnerDateModel) getSpinner().getModel();
+ }
+ }
+
private static final long serialVersionUID = 3412663575706551720L;
/** DOCUMENT ME! */
@@ -544,5 +611,11 @@ public class JSpinner extends JComponent
*/
protected JComponent createEditor(SpinnerModel model)
{
- return new StubEditor(this);
- } /* TODO */}
+ if (model instanceof SpinnerDateModel)
+ return new DateEditor(this);
+ else if (model instanceof SpinnerNumberModel)
+ return new NumberEditor(this);
+ else
+ return new DefaultEditor(this);
+ }
+}
diff --git a/javax/swing/JSplitPane.java b/javax/swing/JSplitPane.java
index 9cdad16a7..cea5afef2 100644
--- a/javax/swing/JSplitPane.java
+++ b/javax/swing/JSplitPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -66,8 +66,6 @@ public class JSplitPane extends JComponent implements Accessible
/**
* Creates a new AccessibleJSplitPane object.
- *
- * @param value0 DOCUMENT ME!
*/
protected AccessibleJSplitPane()
{
diff --git a/javax/swing/JTabbedPane.java b/javax/swing/JTabbedPane.java
index 5a37d1b9b..828a69a24 100644
--- a/javax/swing/JTabbedPane.java
+++ b/javax/swing/JTabbedPane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -523,7 +523,7 @@ public class JTabbedPane extends JComponent implements Serializable,
if (index < -1 || title != null && index >= title.length())
throw new IllegalArgumentException();
- if (title == null || mnemonicKey == 0 || title.charAt(index) != mnemonicKey)
+ if (title == null || mnemonicKey == 0 || (index > -1 && title.charAt(index) != mnemonicKey))
index = -1;
underlinedChar = index;
diff --git a/javax/swing/JTable.java b/javax/swing/JTable.java
index e609e61ed..04ea714f2 100644
--- a/javax/swing/JTable.java
+++ b/javax/swing/JTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -356,10 +356,10 @@ public class JTable extends JComponent
* {@link TableColumnModel} and assign it to the {@link #columnModel}
* property when the {@link #dataModel} property is changed.
*
- * @see #setModel()
+ * @see #setModel(TableModel)
* @see #createColumnsFromModel()
- * @see #setColumnModel()
- * @see #setAutoCreateColumnsFromModel()
+ * @see #setColumnModel(TableColumnModel)
+ * @see #setAutoCreateColumnsFromModel(boolean)
* @see #getAutoCreateColumnsFromModel()
*/
protected boolean autoCreateColumnsFromModel;
@@ -371,7 +371,7 @@ public class JTable extends JComponent
* #AUTO_RESIZE_SUBSEQUENT_COLUMNS}, or {@link #AUTO_RESIZE_OFF}.
*
* @see #doLayout()
- * @see #setAutoResizeMode()
+ * @see #setAutoResizeMode(int)
* @see #getAutoResizeMode()
*/
protected int autoResizeMode;
@@ -383,21 +383,21 @@ public class JTable extends JComponent
* {@link #columnModel}.
*
* @see #getRowHeight()
- * @see #setRowHeight()
+ * @see #setRowHeight(int)
* @see TableColumn#getWidth()
- * @see TableColumn#setWidth()
+ * @see TableColumn#setWidth(int)
*/
protected int rowHeight;
/**
* The height in pixels of the gap left between any two rows of the table.
*
- * @see #setRowMargin()
+ * @see #setRowMargin(int)
* @see #getRowHeight()
* @see #getIntercellSpacing()
- * @see #setIntercellSpacing()
+ * @see #setIntercellSpacing(Dimension)
* @see TableColumnModel#getColumnMargin()
- * @see TableColumnModel#setColumnMargin()
+ * @see TableColumnModel#setColumnMargin(int)
*/
protected int rowMargin;
@@ -408,18 +408,18 @@ public class JTable extends JComponent
* selection as an independent concept, but it is now represented solely
* in terms of simultaneous row and column selection.
*
- * @see TableColumnModel#columnSelectionAllowed()
- * @see #setRowSelectionAllowed()
+ * @see TableColumnModel#getColumnSelectionAllowed()
+ * @see #setRowSelectionAllowed(boolean)
* @see #getRowSelectionAllowed()
* @see #getCellSelectionEnabled()
- * @see #setCellSelectionEnabled()
+ * @see #setCellSelectionEnabled(boolean)
*/
protected boolean rowSelectionAllowed;
/**
- * @deprecated Use {@link #rowSelectionAllowed}, {@link
- * #columnSelectionAllowed}, or the combined methods {@link
- * getCellSelectionEnabled} and {@link setCellSelectionEnabled}.
+ * @deprecated Use {@link #rowSelectionAllowed}, {@link
+ * #getColumnSelectionAllowed}, or the combined methods {@link
+ * #getCellSelectionEnabled} and {@link #setCellSelectionEnabled(boolean)}.
*/
protected boolean cellSelectionEnabled;
@@ -429,8 +429,8 @@ public class JTable extends JComponent
* property name. The table listens to its model as a {@link
* TableModelListener}.
*
- * @see #tableChanged()
- * @see TableModel#addTableModelListener()
+ * @see #tableChanged(TableModelEvent)
+ * @see TableModel#addTableModelListener(TableModelListener)
*/
protected TableModel dataModel;
@@ -444,7 +444,7 @@ public class JTable extends JComponent
*
* <p>The TableColumnModel also contains a {@link ListSelectionModel} which
* indicates which columns are currently selected. This selection model
- * works in combination with the {@link selectionModel} of the table
+ * works in combination with the {@link #selectionModel} of the table
* itself to specify a <em>table selection</em>: a combination of row and
* column selections.</p>
*
@@ -453,7 +453,7 @@ public class JTable extends JComponent
* columnModel automatically, and the table acts as a facade for most of
* the interesting properties of the columnModel anyways.</p>
*
- * @see #setColumnModel()
+ * @see #setColumnModel(TableColumnModel)
* @see #getColumnModel()
*/
protected TableColumnModel columnModel;
@@ -461,14 +461,14 @@ public class JTable extends JComponent
/**
* A model of the rows of this table which are currently selected. This
* model is used in combination with the column selection model held as a
- * member of the {@link columnModel} property, to represent the rows and
+ * member of the {@link #columnModel} property, to represent the rows and
* columns (or both: cells) of the table which are currently selected.
*
* @see #rowSelectionAllowed
- * @see #setSelectionModel()
+ * @see #setSelectionModel(ListSelectionModel)
* @see #getSelectionModel()
* @see TableColumnModel#getSelectionModel()
- * @see ListSelectionModel#addListSelectionListener()
+ * @see ListSelectionModel#addListSelectionListener(ListSelectionListener)
*/
protected ListSelectionModel selectionModel;
@@ -494,7 +494,7 @@ public class JTable extends JComponent
* The color to paint the grid lines of the table, when either {@link
* #showHorizontalLines} or {@link #showVerticalLines} is set.
*
- * @see #setGridColor()
+ * @see #setGridColor(Color)
* @see #getGridColor()
*/
protected Color gridColor;
@@ -503,7 +503,7 @@ public class JTable extends JComponent
* The size this table would prefer its viewport assume, if it is
* contained in a {@link JScrollPane}.
*
- * @see #setPreferredScrollableViewportSize()
+ * @see #setPreferredScrollableViewportSize(Dimension)
* @see #getPreferredScrollableViewportSize()
*/
protected Dimension preferredViewportSize;
@@ -513,7 +513,7 @@ public class JTable extends JComponent
* change event with name {@link #SELECTION_BACKGROUND_CHANGED_PROPERTY}
* when its value changes.
*
- * @see #setSelectionBackground()
+ * @see #setSelectionBackground(Color)
* @see #getSelectionBackground()
*/
protected Color selectionBackground;
@@ -529,7 +529,7 @@ public class JTable extends JComponent
* change event with name {@link #SELECTION_FOREGROUND_CHANGED_PROPERTY}
* when its value changes.
*
- * @see #setSelectionForeground()
+ * @see #setSelectionForeground(Color)
* @see #getSelectionForeground()
*/
protected Color selectionForeground;
@@ -616,16 +616,22 @@ public class JTable extends JComponent
*/
public JTable (TableModel dm, TableColumnModel cm, ListSelectionModel sm)
{
- this.dataModel = dm == null ? createDefaultDataModel() : dm;
+ setModel(dm == null ? createDefaultDataModel() : dm);
setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);
-
+
this.columnModel = cm;
initializeLocalVars();
+ // The next two lines are for compliance with the JDK which starts
+ // the JLists associated with a JTable with both lead selection
+ // indices at 0, rather than -1 as in regular JLists
+ selectionModel.setLeadSelectionIndex(0);
+ columnModel.getSelectionModel().setLeadSelectionIndex(0);
updateUI();
}
protected void initializeLocalVars()
{
+ setTableHeader(createDefaultTableHeader());
this.autoCreateColumnsFromModel = false;
if (columnModel == null)
{
@@ -646,14 +652,14 @@ public class JTable extends JComponent
this.rowSelectionAllowed = true;
// this.accessibleContext = new AccessibleJTable();
this.cellEditor = null;
- this.dragEnabled = false;
+ // COMPAT: Both Sun and IBM have drag enabled
+ this.dragEnabled = true;
this.preferredViewportSize = new Dimension(450,400);
this.showHorizontalLines = true;
this.showVerticalLines = true;
this.editingColumn = -1;
this.editingRow = -1;
setIntercellSpacing(new Dimension(1,1));
- setTableHeader(createDefaultTableHeader());
}
/**
@@ -671,8 +677,8 @@ public class JTable extends JComponent
{
if (column.getHeaderValue() == null)
{
- String name = getColumnName(column.getModelIndex());
- column.setHeaderValue(name);
+ String name = dataModel.getColumnName(column.getModelIndex());
+ column.setHeaderValue(name);
}
columnModel.addColumn(column);
@@ -778,6 +784,13 @@ public class JTable extends JComponent
public void tableChanged (TableModelEvent event)
{
+ // update the column model from the table model if the structure has
+ // changed and the flag autoCreateColumnsFromModel is set
+ if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW)
+ && autoCreateColumnsFromModel)
+
+ createColumnsFromModel();
+
repaint();
}
@@ -885,10 +898,11 @@ public class JTable extends JComponent
public void clearSelection()
{
selectionModel.clearSelection();
+ getColumnModel().getSelectionModel().clearSelection();
}
/**
- * Get the value of the {@link #selectedRow} property by delegation to
+ * Get the value of the selectedRow property by delegation to
* the {@link ListSelectionModel#getMinSelectionIndex} method of the
* {@link #selectionModel} field.
*
@@ -906,9 +920,7 @@ public class JTable extends JComponent
*/
public ListSelectionModel getSelectionModel()
{
- if (! rowSelectionAllowed)
- return null;
-
+ //Neither Sun nor IBM returns null if rowSelection not allowed
return selectionModel;
}
@@ -921,23 +933,21 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #scrollableTracksViewportHeight} property.
+ * Get the value of the <code>scrollableTracksViewportHeight</code> property.
*
* @return The constant value <code>false</code>
*/
-
public boolean getScrollableTracksViewportHeight()
{
return false;
}
/**
- * Get the value of the {@link #scrollableTracksViewportWidth} property.
+ * Get the value of the <code>scrollableTracksViewportWidth</code> property.
*
- * @return <code>true</code> unless the {@link autoResizeMode} prperty is
+ * @return <code>true</code> unless the {@link #autoResizeMode} property is
* <code>AUTO_RESIZE_OFF</code>
*/
-
public boolean getScrollableTracksViewportWidth()
{
if (autoResizeMode == AUTO_RESIZE_OFF)
@@ -1021,8 +1031,6 @@ public class JTable extends JComponent
{
if (vc < 0)
return vc;
- else if (vc > getColumnCount())
- return -1;
else
return columnModel.getColumn(vc).getModelIndex();
}
@@ -1132,7 +1140,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #columnCount} property by
+ * Get the value of the <code>columnCount</code> property by
* delegation to the @{link #columnModel} field.
*
* @return The current value of the columnCount property
@@ -1143,7 +1151,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #rowCount} property by
+ * Get the value of the <code>rowCount</code> property by
* delegation to the @{link #dataModel} field.
*
* @return The current value of the rowCount property
@@ -1164,7 +1172,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #selectedColumn} property by
+ * Get the value of the <code>selectedColumn</code> property by
* delegation to the @{link #columnModel} field.
*
* @return The current value of the selectedColumn property
@@ -1234,7 +1242,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #selectedColumnCount} property by
+ * Get the value of the <code>selectedColumnCount</code> property by
* delegation to the @{link #columnModel} field.
*
* @return The current value of the selectedColumnCount property
@@ -1245,7 +1253,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #selectedColumns} property by
+ * Get the value of the <code>selectedColumns</code> property by
* delegation to the @{link #columnModel} field.
*
* @return The current value of the selectedColumns property
@@ -1256,7 +1264,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #columnSelectionAllowed} property.
+ * Get the value of the <code>columnSelectionAllowed</code> property.
*
* @return The current value of the columnSelectionAllowed property
*/
@@ -1266,7 +1274,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #selectedRowCount} property by
+ * Get the value of the <code>selectedRowCount</code> property by
* delegation to the @{link #selectionModel} field.
*
* @return The current value of the selectedRowCount property
@@ -1277,7 +1285,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #selectedRows} property by
+ * Get the value of the <code>selectedRows</code> property by
* delegation to the @{link #selectionModel} field.
*
* @return The current value of the selectedRows property
@@ -1328,7 +1336,7 @@ public class JTable extends JComponent
}
/**
- * Get the value of the {@link #intercellSpacing} property.
+ * Get the value of the <code>intercellSpacing</code> property.
*
* @return The current value of the property
*/
@@ -1419,13 +1427,20 @@ public class JTable extends JComponent
}
/**
- * Set the value of the {@link #autoCreateColumnsFromModel} property.
+ * Set the value of the {@link #autoCreateColumnsFromModel} flag. If the
+ * flag changes from <code>false</code> to <code>true</code>, the
+ * {@link #createDefaultColumnsFromModel()} method is called.
*
- * @param a The new value of the autoCreateColumnsFromModel property
+ * @param autoCreate the new value of the flag.
*/
- public void setAutoCreateColumnsFromModel(boolean a)
+ public void setAutoCreateColumnsFromModel(boolean autoCreate)
{
- autoCreateColumnsFromModel = a;
+ if (autoCreateColumnsFromModel != autoCreate)
+ {
+ autoCreateColumnsFromModel = autoCreate;
+ if (autoCreate)
+ createDefaultColumnsFromModel();
+ }
}
/**
@@ -1454,7 +1469,20 @@ public class JTable extends JComponent
revalidate();
repaint();
}
-
+
+ /**
+ * Sets the value of the rowHeight property for the specified
+ * row.
+ *
+ * @param rh is the new rowHeight
+ * @param row is the row to change the rowHeight of
+ */
+ public void setRowHeight(int rh, int row)
+ {
+ setRowHeight(rh);
+ // FIXME: not implemented
+ }
+
/**
* Set the value of the {@link #rowMargin} property.
*
@@ -1557,12 +1585,18 @@ public class JTable extends JComponent
for (int i = 0; i < ncols; ++i)
columnModel.getColumn(i).setHeaderValue(dataModel.getColumnName(i));
}
+
+ // according to Sun's spec we also have to set the tableHeader's
+ // column model here
+ if (tableHeader != null)
+ tableHeader.setColumnModel(c);
+
revalidate();
repaint();
}
/**
- * Set the value of the {@link #columnSelectionAllowed} property.
+ * Set the value of the <code>columnSelectionAllowed</code> property.
*
* @param c The new value of the property
*/
@@ -1594,7 +1628,7 @@ public class JTable extends JComponent
}
/**
- * Set the value of the {@link #selectionMode} property by
+ * Set the value of the <code>selectionMode</code> property by
* delegation to the {@link #selectionModel} field. The same selection
* mode is set for row and column selection models.
*
@@ -1649,7 +1683,7 @@ public class JTable extends JComponent
}
/**
- * Set the value of the {@link #intercellSpacing} property.
+ * Set the value of the <code>intercellSpacing</code> property.
*
* @param i The new value of the intercellSpacing property
*/
@@ -1696,7 +1730,7 @@ public class JTable extends JComponent
* <p>Set the value of the {@link #selectionForeground} property.</p>
*
* <p>Fire a PropertyChangeEvent with name {@link
- * SELECTION_FOREGROUND_CHANGED_PROPERTY} to registered listeners, if
+ * #SELECTION_FOREGROUND_CHANGED_PROPERTY} to registered listeners, if
* selectionForeground changed.</p>
*
* @param s The new value of the selectionForeground property
@@ -1713,7 +1747,7 @@ public class JTable extends JComponent
}
/**
- * Set the value of the {@link #showGrid} property.
+ * Set the value of the <code>showGrid</code> property.
*
* @param s The new value of the showGrid property
*/
@@ -1936,7 +1970,8 @@ public class JTable extends JComponent
public String getColumnName(int column)
{
- return dataModel.getColumnName(column);
+ int modelColumn = columnModel.getColumn(column).getModelIndex();
+ return dataModel.getColumnName(modelColumn);
}
public int getEditingColumn()
@@ -2048,8 +2083,17 @@ public class JTable extends JComponent
public void selectAll()
{
+ // rowLead and colLead store the current lead selection indices
+ int rowLead = selectionModel.getLeadSelectionIndex();
+ int colLead = getColumnModel().getSelectionModel().getLeadSelectionIndex();
+ // the following calls to setSelectionInterval change the lead selection
+ // indices
setColumnSelectionInterval(0, getColumnCount() - 1);
setRowSelectionInterval(0, getRowCount() - 1);
+ // the following addSelectionInterval calls restore the lead selection
+ // indices to their previous values
+ addColumnSelectionInterval(colLead,colLead);
+ addRowSelectionInterval(rowLead, rowLead);
}
public Object getValueAt(int row, int column)
@@ -2066,4 +2110,88 @@ public class JTable extends JComponent
{
return columnModel.getColumn(columnModel.getColumnIndex(identifier));
}
+
+ /**
+ * Returns <code>true</code> if the specified cell is editable, and
+ * <code>false</code> otherwise.
+ *
+ * @param row the row index.
+ * @param column the column index.
+ *
+ * @return A boolean.
+ */
+ public boolean isCellEditable(int row, int column)
+ {
+ return dataModel.isCellEditable(row, convertColumnIndexToModel(column));
+ }
+
+ /**
+ * Clears any existing columns from the <code>JTable</code>'s
+ * {@link TableColumnModel} and creates new columns to match the values in
+ * the data ({@link TableModel}) used by the table.
+ *
+ * @see #setAutoCreateColumnsFromModel(boolean)
+ */
+ public void createDefaultColumnsFromModel()
+ {
+ // remove existing columns
+ int columnIndex = columnModel.getColumnCount() - 1;
+ while (columnIndex >= 0)
+ {
+ columnModel.removeColumn(columnModel.getColumn(columnIndex));
+ columnIndex--;
+ }
+
+ // add new columns to match the TableModel
+ int columnCount = dataModel.getColumnCount();
+ for (int c = 0; c < columnCount; c++)
+ {
+ TableColumn column = new TableColumn(c);
+ column.setIdentifier(dataModel.getColumnName(c));
+ columnModel.addColumn(column);
+ }
+ }
+
+ public void changeSelection (int rowIndex, int columnIndex, boolean toggle, boolean extend)
+ {
+ if (toggle && extend)
+ {
+ // Leave the selection state as is, but move the anchor
+ // index to the specified location
+ selectionModel.setAnchorSelectionIndex(rowIndex);
+ getColumnModel().getSelectionModel().setAnchorSelectionIndex(columnIndex);
+ }
+ else if (toggle)
+ {
+ // Toggle the state of the specified cell
+ if (isCellSelected(rowIndex,columnIndex))
+ {
+ selectionModel.removeSelectionInterval(rowIndex,rowIndex);
+ getColumnModel().getSelectionModel().removeSelectionInterval(columnIndex,columnIndex);
+ }
+ else
+ {
+ selectionModel.addSelectionInterval(rowIndex,rowIndex);
+ getColumnModel().getSelectionModel().addSelectionInterval(columnIndex,columnIndex);
+ }
+ }
+ else if (extend)
+ {
+ // Extend the previous selection from the anchor to the
+ // specified cell, clearing all other selections
+ selectionModel.setLeadSelectionIndex(rowIndex);
+ getColumnModel().getSelectionModel().setLeadSelectionIndex(columnIndex);
+ }
+ else
+ {
+ // Clear the previous selection and ensure the new cell
+ // is selected
+ selectionModel.clearSelection();
+ selectionModel.setSelectionInterval(rowIndex,rowIndex);
+ getColumnModel().getSelectionModel().clearSelection();
+ getColumnModel().getSelectionModel().setSelectionInterval(columnIndex, columnIndex);
+
+
+ }
+ }
}
diff --git a/javax/swing/JTextArea.java b/javax/swing/JTextArea.java
index 12e5a4e50..53591ffcc 100644
--- a/javax/swing/JTextArea.java
+++ b/javax/swing/JTextArea.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,6 +47,7 @@ import javax.swing.text.Document;
import javax.swing.text.Element;
import javax.swing.text.JTextComponent;
import javax.swing.text.PlainDocument;
+import javax.swing.text.View;
/**
* The <code>JTextArea</code> component provides a multi-line area for displaying
@@ -79,13 +80,13 @@ import javax.swing.text.PlainDocument;
* @author Michael Koch (konqueror@gmx.de)
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @see java.awt.TextArea
- * @see javax.swing.JTextComponent
+ * @see javax.swing.text.JTextComponent
* @see javax.swing.JTextField
* @see javax.swing.JTextPane
* @see javax.swing.JEditorPane
* @see javax.swing.text.Document
- * @see javax.swing.text.DocumentEvent
- * @see javax.swing.text.DocumentListener
+ * @see javax.swing.event.DocumentEvent
+ * @see javax.swing.event.DocumentListener
*/
public class JTextArea extends JTextComponent
@@ -165,7 +166,7 @@ public class JTextArea extends JTextComponent
/**
* Creates a new <code>JTextArea</code> object.
*
- * @param the document model to use
+ * @param doc the document model to use
*/
public JTextArea(Document doc)
{
@@ -175,7 +176,7 @@ public class JTextArea extends JTextComponent
/**
* Creates a new <code>JTextArea</code> object.
*
- * @param the document model to use
+ * @param doc the document model to use
* @param text the initial text
* @param rows the number of rows
* @param columns the number of cols
@@ -188,7 +189,6 @@ public class JTextArea extends JTextComponent
setText(text);
setRows(rows);
setColumns(columns);
- setPreferredSize(new Dimension(440, 150));
}
/**
@@ -235,12 +235,12 @@ public class JTextArea extends JTextComponent
/**
* Returns the increment that is needed to expose exactly one new line
* of text. This is implemented here to return the values of
- * {@link #getRowHeight} and {@link getColumnWidth}, depending on
+ * {@link #getRowHeight} and {@link #getColumnWidth}, depending on
* the value of the argument <code>direction</code>.
*
* @param visibleRect the view area that is visible in the viewport
- * @param orientation either {@link SwingConstants.VERTICAL} or
- * {@link SwingConstants.HORIZONTAL}
+ * @param orientation either {@link SwingConstants#VERTICAL} or
+ * {@link SwingConstants#HORIZONTAL}
* @param direction less than zero for up/left scrolling, greater
* than zero for down/right scrolling
*
@@ -329,7 +329,7 @@ public class JTextArea extends JTextComponent
/**
* Sets the number of rows.
*
- * @param columns number of columns
+ * @param rows number of rows
*
* @exception IllegalArgumentException if rows is negative
*/
@@ -355,7 +355,7 @@ public class JTextArea extends JTextComponent
/**
* Enables/disables line wrapping.
*
- * @param wrapping <code>true</code> to enable line wrapping,
+ * @param flag <code>true</code> to enable line wrapping,
* <code>false</code> otherwise
*/
public void setLineWrap(boolean flag)
@@ -529,4 +529,22 @@ public class JTextArea extends JTextComponent
// This cannot happen as we check offset above.
}
}
+
+ /**
+ * Returns the preferred size for the JTextArea. This is the maximum of
+ * the size that is needed to display the content and the requested size
+ * as per {@link #getColumns} and {@link #getRows}.
+ *
+ * @return the preferred size of the JTextArea
+ */
+ public Dimension getPreferredSize()
+ {
+ int reqWidth = getColumns() * getColumnWidth();
+ int reqHeight = getRows() * getRowHeight();
+ View view = getUI().getRootView(this);
+ int neededWidth = (int) view.getPreferredSpan(View.HORIZONTAL);
+ int neededHeight = (int) view.getPreferredSpan(View.VERTICAL);
+ return new Dimension(Math.max(reqWidth, neededWidth),
+ Math.max(reqHeight, neededHeight));
+ }
}
diff --git a/javax/swing/JTextField.java b/javax/swing/JTextField.java
index 4f284d8d5..5ae9c9f1a 100644
--- a/javax/swing/JTextField.java
+++ b/javax/swing/JTextField.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -197,7 +197,7 @@ public class JTextField extends JTextComponent
public void insertString(int offset, String str, AttributeSet a)
throws BadLocationException
{
- if (str.indexOf('\n') == -1)
+ if (str != null && str.indexOf('\n') == -1)
super.insertString(offset, str, a);
}
};
diff --git a/javax/swing/JTextPane.java b/javax/swing/JTextPane.java
index 95d2d5001..a845ba581 100644
--- a/javax/swing/JTextPane.java
+++ b/javax/swing/JTextPane.java
@@ -1,5 +1,5 @@
-/* JTextPane.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+/* JTextPane.java -- A powerful text widget supporting styled text
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,237 +43,374 @@ import java.io.IOException;
import java.io.ObjectOutputStream;
import javax.swing.text.AttributeSet;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Caret;
import javax.swing.text.Document;
import javax.swing.text.EditorKit;
+import javax.swing.text.Element;
import javax.swing.text.MutableAttributeSet;
+import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.Style;
import javax.swing.text.StyledDocument;
import javax.swing.text.StyledEditorKit;
/**
- * JTextPane
- * @author Andrew Selkirk
- * @version 1.0
+ * A powerful text component that supports styled content as well as
+ * embedding images and components. It is entirely based on a
+ * {@link StyledDocument} content model and a {@link StyledEditorKit}.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ * @author Andrew Selkirk
*/
-public class JTextPane extends JEditorPane {
-
- //-------------------------------------------------------------
- // Variables --------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * uiClassID
- */
- private static final String uiClassID = "TextPaneUI";
-
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * Constructor JTextPane
- */
- public JTextPane() {
- // TODO
- } // JTextPane()
-
- /**
- * Constructor JTextPane
- * @param document TODO
- */
- public JTextPane(StyledDocument document) {
- // TODO
- } // JTextPane()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * writeObject
- * @param stream TODO
- * @exception IOException TODO
- */
- private void writeObject(ObjectOutputStream stream) throws IOException {
- // TODO
- } // writeObject()
-
- /**
- * getUIClassID
- * @returns String
- */
- public String getUIClassID() {
- return uiClassID;
- } // getUIClassID()
-
- /**
- * setDocument
- * @param document TODO
- */
- public void setDocument(Document document) {
- // TODO
- } // setDocument()
-
- /**
- * getStyledDocument
- * @returns StyledDocument
- */
- public StyledDocument getStyledDocument() {
- return null; // TODO
- } // getStyledDocument()
-
- /**
- * setStyledDocument
- * @param document TODO
- */
- public void setStyledDocument(StyledDocument document) {
- // TODO
- } // setStyledDocument()
-
- /**
- * replaceSelection
- * @param content TODO
- */
- public void replaceSelection(String content) {
- // TODO
- } // replaceSelection()
-
- /**
- * insertComponent
- * @param component TODO
- */
- public void insertComponent(Component component) {
- // TODO
- } // insertComponent()
-
- /**
- * insertIcon
- * @param icon TODO
- */
- public void insertIcon(Icon icon) {
- // TODO
- } // insertIcon()
-
- /**
- * addStyle
- * @param nm TODO
- * @param parent TODO
- * @returns Style
- */
- public Style addStyle(String nm, Style parent) {
- return null; // TODO
- } // addStyle()
-
- /**
- * removeStyle
- * @param nm TODO
- */
- public void removeStyle(String nm) {
- // TODO
- } // removeStyle()
-
- /**
- * getStyle
- * @param nm TODO
- * @returns Style
- */
- public Style getStyle(String nm) {
- return null; // TODO
- } // getStyle()
-
- /**
- * getLogicalStyle
- * @returns Style
- */
- public Style getLogicalStyle() {
- return null; // TODO
- } // getLogicalStyle()
-
- /**
- * setLogicalStyle
- * @param style TODO
- */
- public void setLogicalStyle(Style style) {
- // TODO
- } // setLogicalStyle()
-
- /**
- * getCharacterAttributes
- * @returns AttributeSet
- */
- public AttributeSet getCharacterAttributes() {
- return null; // TODO
- } // getCharacterAttributes()
-
- /**
- * setCharacterAttributes
- * @param attribute TODO
- * @param replace TODO
- */
- public void setCharacterAttributes(AttributeSet attribute,
- boolean replace) {
- // TODO
- } // setCharacterAttributes()
-
- /**
- * getParagraphAttributes
- * @returns AttributeSet
- */
- public AttributeSet getParagraphAttributes() {
- return null; // TODO
- } // getParagraphAttributes()
-
- /**
- * setParagraphAttributes
- * @param attribute TODO
- * @param replace TODO
- */
- public void setParagraphAttributes(AttributeSet attribute,
- boolean replace) {
- // TODO
- } // setParagraphAttributes()
-
- /**
- * getInputAttributes
- * @returns MutableAttributeSet
- */
- public MutableAttributeSet getInputAttributes() {
- return null; // TODO
- } // getInputAttributes()
-
- /**
- * getStyledEditorKit
- * @returns StyledEditorKit
- */
- protected final StyledEditorKit getStyledEditorKit() {
- return null; // TODO
- } // getStyledEditorKit()
-
- /**
- * createDefaultEditorKit
- * @returns EditorKit
- */
- protected EditorKit createDefaultEditorKit() {
- return null; // TODO
- } // createDefaultEditorKit()
-
- /**
- * setEditorKit
- * @param editor TODO
- */
- public final void setEditorKit(EditorKit editor) {
- // TODO
- } // setEditorKit()
-
- /**
- * paramString
- * @returns String
- */
- protected String paramString() {
- return null; // TODO
- } // paramString()
-
-
-} // JTextPane
+public class JTextPane
+ extends JEditorPane
+{
+ /**
+ * Creates a new <code>JTextPane</code> with a <code>null</code> document.
+ */
+ public JTextPane()
+ {
+ setEditorKit(createDefaultEditorKit());
+ setDocument(null);
+ }
+
+ /**
+ * Creates a new <code>JTextPane</code> and sets the specified
+ * <code>document</code>.
+ *
+ * @param document the content model to use
+ */
+ public JTextPane(StyledDocument document)
+ {
+ this();
+ setStyledDocument(document);
+ }
+
+ /**
+ * Returns the UI class ID. This is <code>TextPaneUI</code>.
+ *
+ * @return <code>TextPaneUI</code>
+ */
+ public String getUIClassID()
+ {
+ return "TextPaneUI";
+ }
+
+ /**
+ * Sets the content model for this <code>JTextPane</code>.
+ * <code>JTextPane</code> can only be used with {@link StyledDocument}s,
+ * if you try to set a different type of <code>Document</code>, an
+ * <code>IllegalArgumentException</code> is thrown.
+ *
+ * @param document the content model to set
+ *
+ * @throws IllegalArgumentException if <code>document</code> is not an
+ * instance of <code>StyledDocument</code>
+ *
+ * @see {@link #setStyledDocument}
+ */
+ public void setDocument(Document document)
+ {
+ if (document != null && !(document instanceof StyledDocument))
+ throw new IllegalArgumentException
+ ("JTextPane can only handle StyledDocuments");
+
+ setStyledDocument((StyledDocument) document);
+ }
+
+ /**
+ * Returns the {@link StyledDocument} that is the content model for
+ * this <code>JTextPane</code>. This is a typed wrapper for
+ * {@link #getDocument}.
+ *
+ * @return the content model of this <code>JTextPane</code>
+ */
+ public StyledDocument getStyledDocument()
+ {
+ return (StyledDocument) super.getDocument();
+ }
+
+ /**
+ * Sets the content model for this <code>JTextPane</code>.
+ *
+ * @param document the content model to set
+ */
+ public void setStyledDocument(StyledDocument document)
+ {
+ super.setDocument(document);
+ }
+
+ /**
+ * Replaces the currently selected text with the specified
+ * <code>content</code>. If there is no selected text, this results
+ * in a simple insertion at the current caret position. If there is
+ * no <code>content</code> specified, this results in the selection
+ * beeing deleted.
+ *
+ * @param content the text with which the selection is replaced
+ */
+ public void replaceSelection(String content)
+ {
+ Caret caret = getCaret();
+ StyledDocument doc = getStyledDocument();
+
+ int dot = caret.getDot();
+ int mark = caret.getMark();
+
+ // If content is empty delete selection.
+ if (content == null)
+ {
+ caret.setDot(dot);
+ return;
+ }
+
+ try
+ {
+ int start = getSelectionStart();
+ int end = getSelectionEnd();
+ int contentLength = content.length();
+
+ // Remove selected text.
+ if (dot != mark)
+ doc.remove(start, end - start);
+
+ // Insert new text.
+ doc.insertString(start, content, null);
+ // Set attributes for inserted text
+ doc.setCharacterAttributes(start, contentLength, getInputAttributes(),
+ true);
+
+ // Set dot to new position.
+ setCaretPosition(start + contentLength);
+ }
+ catch (BadLocationException e)
+ {
+ throw new AssertionError
+ ("No BadLocationException should be thrown here");
+ }
+ }
+
+ /**
+ * Inserts an AWT or Swing component into the text at the current caret
+ * position.
+ *
+ * @param component the component to be inserted
+ */
+ public void insertComponent(Component component)
+ {
+ // TODO: One space must be inserted here with attributes set to indicate
+ // that the component must be displayed here. Have to figure out the
+ // attributes.
+ }
+
+ /**
+ * Inserts an <code>Icon</code> into the text at the current caret position.
+ *
+ * @param icon the <code>Icon</code> to be inserted
+ */
+ public void insertIcon(Icon icon)
+ {
+ // TODO: One space must be inserted here with attributes set to indicate
+ // that the icon must be displayed here. Have to figure out the
+ // attributes.
+ }
+
+ /**
+ * Adds a style into the style hierarchy. Unspecified style attributes
+ * can be resolved in the <code>parent</code> style, if one is specified.
+ *
+ * While it is legal to add nameless styles (<code>nm == null</code),
+ * you must be aware that the client application is then responsible
+ * for managing the style hierarchy, since unnamed styles cannot be
+ * looked up by their name.
+ *
+ * @param nm the name of the style or <code>null</code> if the style should
+ * be unnamed
+ * @param parent the parent in which unspecified style attributes are
+ * resolved, or <code>null</code> if that is not necessary
+ *
+ * @return the newly created <code>Style</code>
+ */
+ public Style addStyle(String nm, Style parent)
+ {
+ return getStyledDocument().addStyle(nm, parent);
+ }
+
+ /**
+ * Removes a named <code>Style</code> from the style hierarchy.
+ *
+ * @param nm the name of the <code>Style</code> to be removed
+ */
+ public void removeStyle(String nm)
+ {
+ getStyledDocument().removeStyle(nm);
+ }
+
+ /**
+ * Looks up and returns a named <code>Style</code>.
+ *
+ * @param nm the name of the <code>Style</code>
+ *
+ * @return the found <code>Style</code> of <code>null</code> if no such
+ * <code>Style</code> exists
+ */
+ public Style getStyle(String nm)
+ {
+ return getStyledDocument().getStyle(nm);
+ }
+
+ /**
+ * Returns the logical style of the paragraph at the current caret position.
+ *
+ * @return the logical style of the paragraph at the current caret position
+ */
+ public Style getLogicalStyle()
+ {
+ return getStyledDocument().getLogicalStyle(getCaretPosition());
+ }
+
+ /**
+ * Sets the logical style for the paragraph at the current caret position.
+ *
+ * @param style the style to set for the current paragraph
+ */
+ public void setLogicalStyle(Style style)
+ {
+ getStyledDocument().setLogicalStyle(getCaretPosition(), style);
+ }
+
+ /**
+ * Returns the text attributes for the character at the current caret
+ * position.
+ *
+ * @return the text attributes for the character at the current caret
+ * position
+ */
+ public AttributeSet getCharacterAttributes()
+ {
+ StyledDocument doc = getStyledDocument();
+ Element el = doc.getCharacterElement(getCaretPosition());
+ return el.getAttributes();
+ }
+
+ /**
+ * Sets text attributes for the current selection. If there is no selection
+ * the text attributes are applied to newly inserted text
+ *
+ * @param attribute the text attributes to set
+ * @param replace if <code>true</code>, the attributes of the current
+ * selection are overridden, otherwise they are merged
+ *
+ * @see {@link #getInputAttributes}
+ */
+ public void setCharacterAttributes(AttributeSet attribute,
+ boolean replace)
+ {
+ int dot = getCaret().getDot();
+ int start = getSelectionStart();
+ int end = getSelectionEnd();
+ if (start == dot && end == dot)
+ // There is no selection, update insertAttributes instead
+ {
+ MutableAttributeSet inputAttributes =
+ getStyledEditorKit().getInputAttributes();
+ inputAttributes.addAttributes(attribute);
+ }
+ else
+ getStyledDocument().setCharacterAttributes(start, end - start, attribute,
+ replace);
+ }
+
+ /**
+ * Returns the text attributes of the paragraph at the current caret
+ * position.
+ *
+ * @return the attributes of the paragraph at the current caret position
+ */
+ public AttributeSet getParagraphAttributes()
+ {
+ StyledDocument doc = getStyledDocument();
+ Element el = doc.getParagraphElement(getCaretPosition());
+ return el.getAttributes();
+ }
+
+ /**
+ * Sets text attributes for the paragraph at the current selection.
+ * If there is no selection the text attributes are applied to
+ * the paragraph at the current caret position.
+ *
+ * @param attribute the text attributes to set
+ * @param replace if <code>true</code>, the attributes of the current
+ * selection are overridden, otherwise they are merged
+ */
+ public void setParagraphAttributes(AttributeSet attribute,
+ boolean replace)
+ {
+ // TODO
+ }
+
+ /**
+ * Returns the attributes that are applied to newly inserted text.
+ * This is a {@link MutableAttributeSet}, so you can easily modify these
+ * attributes.
+ *
+ * @return the attributes that are applied to newly inserted text
+ */
+ public MutableAttributeSet getInputAttributes()
+ {
+ return getStyledEditorKit().getInputAttributes();
+ }
+
+ /**
+ * Returns the {@link StyledEditorKit} that is currently used by this
+ * <code>JTextPane</code>.
+ *
+ * @return the current <code>StyledEditorKit</code> of this
+ * <code>JTextPane</code>
+ */
+ protected final StyledEditorKit getStyledEditorKit()
+ {
+ return (StyledEditorKit) getEditorKit();
+ }
+
+ /**
+ * Creates the default {@link EditorKit} that is used in
+ * <code>JTextPane</code>s. This is an instance of {@link StyledEditorKit}.
+ *
+ * @return the default {@link EditorKit} that is used in
+ * <code>JTextPane</code>s
+ */
+ protected EditorKit createDefaultEditorKit()
+ {
+ return new StyledEditorKit();
+ }
+
+ /**
+ * Sets the {@link EditorKit} to use for this <code>JTextPane</code>.
+ * <code>JTextPane</code>s can only handle {@link StyledEditorKit}s,
+ * if client programs try to set a different type of <code>EditorKit</code>
+ * then an IllegalArgumentException is thrown
+ *
+ * @param editor the <code>EditorKit</code> to set
+ *
+ * @throws IllegalArgumentException if <code>editor</code> is no
+ * <code>StyledEditorKit</code>
+ */
+ public final void setEditorKit(EditorKit editor)
+ {
+ if (!(editor instanceof StyledEditorKit))
+ throw new IllegalArgumentException
+ ("JTextPanes can only handle StyledEditorKits");
+ super.setEditorKit(editor);
+ }
+
+ /**
+ * Returns a param string that can be used for debugging.
+ *
+ * @return a param string that can be used for debugging.
+ */
+ protected String paramString()
+ {
+ return super.paramString(); // TODO
+ }
+}
diff --git a/javax/swing/JToggleButton.java b/javax/swing/JToggleButton.java
index d5fcdd76c..25d67f59e 100644
--- a/javax/swing/JToggleButton.java
+++ b/javax/swing/JToggleButton.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package javax.swing;
+import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
@@ -133,19 +134,47 @@ public class JToggleButton extends AbstractButton implements Accessible
* Sets the pressed state of the button. The selected state
* of the button also changes follwing the button being pressed.
*
- * @param b true if the button is pressed down.
+ * @param p true if the button is pressed down.
*/
- public void setPressed(boolean b)
+ public void setPressed(boolean p)
{
+ // cannot change PRESSED state unless button is enabled
if (! isEnabled())
return;
- super.setPressed(b);
-
+ // if this call does not represent a CHANGE in state, then return
+ if ((p && isPressed()) || (!p && !isPressed()))
+ return;
+
+ // The JDK first fires events in the following order:
+ // 1. ChangeEvent for selected
+ // 2. ChangeEvent for pressed
+ // 3. ActionEvent
+ // So do we.
+
// setPressed(false) == mouse release on us,
// if we were armed, we flip the selected state.
- if (!b && isArmed())
- setSelected(! isSelected());
+ if (!p && isArmed())
+ {
+ setSelected(! isSelected());
+ }
+
+ // make the change
+ if (p)
+ stateMask = stateMask | PRESSED;
+ else
+ stateMask = stateMask & (~PRESSED);
+
+ // notify interested ChangeListeners
+ fireStateChanged();
+
+ if (!p && isArmed())
+ {
+ fireActionPerformed(new ActionEvent(this,
+ ActionEvent.ACTION_PERFORMED,
+ actionCommand));
+ }
+
}
}
@@ -242,11 +271,11 @@ public class JToggleButton extends AbstractButton implements Accessible
*/
public JToggleButton (String text, Icon icon, boolean selected)
{
- super(text, icon);
+ super();
+ init(text, icon);
setModel(new ToggleButtonModel());
model.setSelected(selected);
- model.setActionCommand("");
}
/**
@@ -287,7 +316,7 @@ public class JToggleButton extends AbstractButton implements Accessible
*/
protected String paramString()
{
- return "JToggleButton";
+ return super.paramString();
}
/**
diff --git a/javax/swing/JToolBar.java b/javax/swing/JToolBar.java
index 2b994a555..649919e06 100644
--- a/javax/swing/JToolBar.java
+++ b/javax/swing/JToolBar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/JToolTip.java b/javax/swing/JToolTip.java
index 871f15cca..8d7747827 100644
--- a/javax/swing/JToolTip.java
+++ b/javax/swing/JToolTip.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/JTree.java b/javax/swing/JTree.java
index 823c5b104..638f28ff3 100644
--- a/javax/swing/JTree.java
+++ b/javax/swing/JTree.java
@@ -1,6 +1,6 @@
-/* JTree.java --
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-
+/* JTree.java
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -35,7 +35,6 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package javax.swing;
import java.awt.Dimension;
@@ -69,1715 +68,1762 @@ import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
-
-public class JTree extends JComponent
- implements Scrollable, Accessible
+public class JTree
+ extends JComponent
+ implements Scrollable, Accessible
{
- /**
- * Listens to the model of the JTree and updates the property
- * <code>expandedState</code> if nodes are removed or changed.
- */
- protected class TreeModelHandler
- implements TreeModelListener
- {
-
- /**
- * Creates a new instance of TreeModelHandler.
- */
- protected TreeModelHandler()
- {
- }
-
- /**
- * Notifies when a node has changed in some ways. This does not include
- * that a node has changed its location or changed it's children. It
- * only means that some attributes of the node have changed that might
- * affect its presentation.
- *
- * This method is called after the actual change occured.
- *
- * @param ev the TreeModelEvent describing the change
- */
- public void treeNodesChanged(TreeModelEvent ev)
- {
- // nothing to do here
- }
-
- /**
- * Notifies when a node is inserted into the tree.
- *
- * This method is called after the actual change occured.
- *
- * @param ev the TreeModelEvent describing the change
- */
- public void treeNodesInserted(TreeModelEvent ev)
- {
- // nothing to do here
- }
-
- /**
- * Notifies when a node is removed from the tree.
- *
- * This method is called after the actual change occured.
- *
- * @param ev the TreeModelEvent describing the change
- */
- public void treeNodesRemoved(TreeModelEvent ev)
- {
- // TODO: The API docs suggest that this method should do something
- // but I cannot really see what has to be done here ...
- }
-
- /**
- * Notifies when the structure of the tree is changed.
- *
- * This method is called after the actual change occured.
- *
- * @param ev the TreeModelEvent describing the change
- */
- public void treeStructureChanged(TreeModelEvent ev)
- {
- // set state of new path
- TreePath path = ev.getTreePath();
- setExpandedState(path, isExpanded(path));
- }
- } // TreeModelHandler
-
- /**
- * This redirects TreeSelectionEvents and rewrites the source of it
- * to be this JTree. This is typically done when the tree model
- * generates an event, but the JTree object associated with that model
- * should be listed as the actual source of the event.
- */
- protected class TreeSelectionRedirector
- implements TreeSelectionListener, Serializable
- {
- /** The serial version UID. */
- private static final long serialVersionUID = -3505069663646241664L;
-
- /**
- * Creates a new instance of TreeSelectionRedirector
- */
- protected TreeSelectionRedirector()
- {
- }
-
- /**
- * Notifies when the tree selection changes.
- *
- * @param ev the TreeSelectionEvent that describes the change
- */
- public void valueChanged(TreeSelectionEvent ev)
- {
- TreeSelectionEvent rewritten =
- (TreeSelectionEvent) ev.cloneWithSource(JTree.this);
- fireValueChanged(rewritten);
- }
- } // TreeSelectionRedirector
-
- /**
- * A TreeModel that does not allow anything to be selected.
- */
- protected static class EmptySelectionModel
- extends DefaultTreeSelectionModel
- {
- /** The serial version UID. */
- private static final long serialVersionUID = -5815023306225701477L;
-
- /**
- * The shared instance of this model.
- */
- protected static final EmptySelectionModel sharedInstance =
- new EmptySelectionModel();
-
- /**
- * Creates a new instance of EmptySelectionModel.
- */
- protected EmptySelectionModel()
- {
- }
-
- /**
- * Returns the shared instance of EmptySelectionModel.
- *
- * @return the shared instance of EmptySelectionModel
- */
- public static EmptySelectionModel sharedInstance()
- {
- return sharedInstance;
- }
-
- /**
- * This catches attempts to set a selection and sets nothing
- * instead.
- *
- * @param paths not used here
- */
- public void setSelectionPaths(TreePath[] paths)
- {
- // we don't allow selections in this class
- }
-
- /**
- * This catches attempts to add something to the selection.
- *
- * @param paths not used here
- */
- public void addSelectionPaths(TreePath[] paths)
- {
- // we don't allow selections in this class
- }
-
- /**
- * This catches attempts to remove something from the selection.
- *
- * @param paths not used here
- */
- public void removeSelectionPaths(TreePath[] paths)
- {
- // we don't allow selections in this class
- }
- }// EmptySelectionModel
-
- private static final long serialVersionUID = 7559816092864483649L;
-
- public static final String CELL_EDITOR_PROPERTY = "cellEditor";
- public static final String CELL_RENDERER_PROPERTY = "cellRenderer";
- public static final String EDITABLE_PROPERTY = "editable";
- public static final String INVOKES_STOP_CELL_EDITING_PROPERTY = "invokesStopCellEditing";
- public static final String LARGE_MODEL_PROPERTY = "largeModel";
- public static final String ROOT_VISIBLE_PROPERTY = "rootVisible";
- public static final String ROW_HEIGHT_PROPERTY = "rowHeight";
- public static final String SCROLLS_ON_EXPAND_PROPERTY = "scrollsOnExpand";
- public static final String SELECTION_MODEL_PROPERTY = "selectionModel";
- public static final String SHOWS_ROOT_HANDLES_PROPERTY = "showsRootHandles";
- public static final String TOGGLE_CLICK_COUNT_PROPERTY = "toggleClickCount";
- public static final String TREE_MODEL_PROPERTY = "model";
- public static final String VISIBLE_ROW_COUNT_PROPERTY = "visibleRowCount";
-
- /** @since 1.3 */
- public static final String ANCHOR_SELECTION_PATH_PROPERTY = "anchorSelectionPath";
- /** @since 1.3 */
- public static final String LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
- /** @since 1.3 */
- public static final String EXPANDS_SELECTED_PATHS_PROPERTY = "expandsSelectedPaths";
-
- private static final Object EXPANDED = new Object();
- private static final Object COLLAPSED = new Object();
-
- private boolean dragEnabled;
- private boolean expandsSelectedPaths;
- private TreePath anchorSelectionPath;
- private TreePath leadSelectionPath;
-
- /*
- * This contains the state of all nodes in the tree. Al/ entries map the
- * TreePath of a note to to its state. Valid states are EXPANDED and
- * COLLAPSED. Nodes not in this Hashtable are assumed state COLLAPSED.
- */
- private Hashtable nodeStates;
-
- protected transient TreeCellEditor cellEditor;
- protected transient TreeCellRenderer cellRenderer;
- protected boolean editable;
- protected boolean invokesStopCellEditing;
- protected boolean largeModel;
- protected boolean rootVisible;
- protected int rowHeight;
- protected boolean scrollsOnExpand;
- protected transient TreeSelectionModel selectionModel;
- protected boolean showsRootHandles;
- protected int toggleClickCount;
- protected transient TreeModel treeModel;
- protected int visibleRowCount;
-
- /**
- * Handles TreeModelEvents to update the expandedState.
- */
- protected transient TreeModelListener treeModelListener;
-
- /**
- * Redirects TreeSelectionEvents so that the source is this JTree.
- */
- protected TreeSelectionRedirector selectionRedirector =
- new TreeSelectionRedirector();
-
- /**
- * Creates a new <code>JTree</code> object.
- */
- public JTree()
- {
- this(createTreeModel(null));
- }
-
- /**
- * Creates a new <code>JTree</code> object.
- *
- * @param value the initial nodes in the tree
- */
- public JTree(Hashtable value)
- {
- this(createTreeModel(value));
- }
-
- /**
- * Creates a new <code>JTree</code> object.
- *
- * @param value the initial nodes in the tree
- */
- public JTree(Object[] value)
- {
- this(createTreeModel(value));
- }
-
- /**
- * Creates a new <code>JTree</code> object.
- *
- * @param model the model to use
- */
- public JTree(TreeModel model)
- {
- setModel(model);
- setSelectionModel(EmptySelectionModel.sharedInstance());
- selectionModel.addTreeSelectionListener(selectionRedirector);
- setCellRenderer(new DefaultTreeCellRenderer());
- updateUI();
- }
-
- /**
- * Creates a new <code>JTree</code> object.
- *
- * @param root the root node
- */
- public JTree(TreeNode root)
- {
- this(root, false);
- }
-
- /**
- * Creates a new <code>JTree</code> object.
- *
- * @param root the root node
- * @param asksAllowChildren if false, all nodes without children are leaf nodes.
- * If true, only nodes that do not allow children are leaf nodes.
- */
- public JTree(TreeNode root, boolean asksAllowChildren)
- {
- this(new DefaultTreeModel(root, asksAllowChildren));
- }
-
- /**
- * Creates a new <code>JTree</code> object.
- *
- * @param value the initial nodes in the tree
- */
- public JTree(Vector value)
- {
- this(createTreeModel(value));
- }
-
- public static class DynamicUtilTreeNode
- extends DefaultMutableTreeNode
- {
- protected Object childValue;
- protected boolean loadedChildren;
-
- /**
- * Currently not set or used by this class.
- * It might be set and used in later versions of this class.
- */
- protected boolean hasChildren;
-
- public DynamicUtilTreeNode(Object value,
- Object children)
- {
- super(value);
- childValue = children;
- loadedChildren = false;
- }
-
- public int getChildCount()
- {
- loadChildren();
- return super.getChildCount();
- }
-
- protected void loadChildren()
- {
- if (!loadedChildren)
- {
- createChildren(this, childValue);
- loadedChildren = true;
- }
- }
-
- public Enumeration children()
- {
- loadChildren();
- return super.children();
- }
-
- /**
- * Returns the child node at position <code>pos</code>. Subclassed here
- * to load the children if necessary.
- *
- * @param pos the position of the child node to fetch
- *
- * @return the childnode at the specified position
- */
- public TreeNode getChildAt(int pos)
- {
- loadChildren();
- return super.getChildAt(pos);
- }
-
- public boolean isLeaf()
- {
- return (childValue == null ||
- !(childValue instanceof Hashtable
- || childValue instanceof Vector
- || childValue.getClass().isArray()));
- }
-
- public static void createChildren(DefaultMutableTreeNode parent,
- Object children)
- {
- if (children instanceof Hashtable)
- {
- Hashtable tab = (Hashtable) children;
- Enumeration e = tab.keys();
- while (e.hasMoreElements())
- {
- Object key = e.nextElement();
- Object val = tab.get(key);
- parent.add(new DynamicUtilTreeNode(key, val));
- }
- }
- else if (children instanceof Vector)
- {
- Iterator i = ((Vector)children).iterator();
- while (i.hasNext())
- {
- Object n = i.next();
- parent.add(new DynamicUtilTreeNode(n,n));
- }
- }
- else if (children.getClass().isArray())
- {
- Object[] arr = (Object[]) children;
- for (int i = 0; i < arr.length; ++i)
- parent.add(new DynamicUtilTreeNode(arr[i], arr[i]));
- }
- }
- }
-
- public int getRowForPath(TreePath path)
- {
- TreeUI ui = getUI();
-
- if (ui != null)
- return ui.getRowForPath(this, path);
-
- return -1;
- }
-
- public TreePath getPathForRow(int row)
- {
- TreeUI ui = getUI();
- return ui != null ? ui.getPathForRow(this, row) : null;
- }
-
- protected TreePath[] getPathBetweenRows(int index0, int index1)
- {
- TreeUI ui = getUI();
-
- if (ui == null)
- return null;
-
- int minIndex = Math.min(index0, index1);
- int maxIndex = Math.max(index0, index1);
- TreePath[] paths = new TreePath[maxIndex - minIndex + 1];
-
- for (int i = minIndex; i <= maxIndex; ++i)
- paths[i - minIndex] = ui.getPathForRow(this, i);
-
- return paths;
- }
-
- /**
- * Creates a new <code>TreeModel</code> object.
- *
- * @param value the values stored in the model
- */
- protected static TreeModel createTreeModel(Object value)
- {
- return new DefaultTreeModel(new DynamicUtilTreeNode(value, value));
- }
-
- /**
- * Return the UI associated with this <code>JTree</code> object.
- *
- * @return the associated <code>TreeUI</code> object
- */
- public TreeUI getUI()
- {
- return (TreeUI) ui;
- }
-
- /**
- * Sets the UI associated with this <code>JTree</code> object.
- *
- * @param ui the <code>TreeUI</code> to associate
- */
- public void setUI(TreeUI ui)
- {
- super.setUI(ui);
- }
-
- /**
- * This method resets the UI used to the Look and Feel defaults..
- */
- public void updateUI()
- {
- setUI((TreeUI) UIManager.getUI(this));
- revalidate();
- repaint();
- }
-
- /**
- * This method returns the String ID of the UI class of Separator.
- *
- * @return The UI class' String ID.
- */
- public String getUIClassID()
- {
- return "TreeUI";
- }
-
- /**
- * Gets the AccessibleContext associated with this <code>JToggleButton</code>.
- *
- * @return the associated context
- */
- public AccessibleContext getAccessibleContext()
- {
- return null;
- }
-
- /**
- * Returns the preferred viewport size..
- *
- * @return the preferred size
- */
- public Dimension getPreferredScrollableViewportSize()
- {
- return null;
- }
-
- public int getScrollableUnitIncrement(Rectangle visibleRect,
- int orientation, int direction)
- {
- return 1;
- }
-
- public int getScrollableBlockIncrement(Rectangle visibleRect,
- int orientation, int direction)
- {
- return 1;
- }
-
- public boolean getScrollableTracksViewportWidth()
- {
- return false;
- }
-
- public boolean getScrollableTracksViewportHeight()
- {
- return false;
- }
-
- /**
- * Adds a <code>TreeExpansionListener</code> object to the tree.
- *
- * @param listener the listener to add
- */
- public void addTreeExpansionListener(TreeExpansionListener listener)
- {
- listenerList.add(TreeExpansionListener.class, listener);
- }
-
- /**
- * Removes a <code>TreeExpansionListener</code> object from the tree.
- *
- * @param listener the listener to remove
- */
- public void removeTreeExpansionListener(TreeExpansionListener listener)
- {
- listenerList.remove(TreeExpansionListener.class, listener);
- }
-
- /**
- * Returns all added <code>TreeExpansionListener</code> objects.
- *
- * @return an array of listeners
- */
- public TreeExpansionListener[] getTreeExpansionListeners()
- {
- return (TreeExpansionListener[]) getListeners(TreeExpansionListener.class);
- }
-
- /**
- * Notifies all listeners that the tree was collapsed.
- *
- * @param path the path to the node that was collapsed
- */
- public void fireTreeCollapsed(TreePath path)
- {
- TreeExpansionEvent event = new TreeExpansionEvent(this, path);
- TreeExpansionListener[] listeners = getTreeExpansionListeners();
-
- for (int index = 0; index < listeners.length; ++index)
- listeners[index].treeCollapsed(event);
- }
-
- /**
- * Notifies all listeners that the tree was expanded.
- *
- * @param path the path to the node that was expanded
- */
- public void fireTreeExpanded(TreePath path)
- {
- TreeExpansionEvent event = new TreeExpansionEvent(this, path);
- TreeExpansionListener[] listeners = getTreeExpansionListeners();
-
- for (int index = 0; index < listeners.length; ++index)
- listeners[index].treeExpanded(event);
- }
-
- /**
- * Adds a <code>TreeSelctionListener</code> object to the tree.
- *
- * @param listener the listener to add
- */
- public void addTreeSelectionListener(TreeSelectionListener listener)
- {
- listenerList.add(TreeSelectionListener.class, listener);
- }
-
- /**
- * Removes a <code>TreeSelectionListener</code> object from the tree.
- *
- * @param listener the listener to remove
- */
- public void removeTreeSelectionListener(TreeSelectionListener listener)
- {
- listenerList.remove(TreeSelectionListener.class, listener);
- }
-
- /**
- * Returns all added <code>TreeSelectionListener</code> objects.
- *
- * @return an array of listeners
- */
- public TreeSelectionListener[] getTreeSelectionListeners()
- {
- return (TreeSelectionListener[]) getListeners(TreeSelectionListener.class);
- }
-
- /**
- * Notifies all listeners when the selection of the tree changed.
- *
- * @param event the event to send
- */
- protected void fireValueChanged(TreeSelectionEvent event)
- {
- TreeSelectionListener[] listeners = getTreeSelectionListeners();
-
- for (int index = 0; index < listeners.length; ++index)
- listeners[index].valueChanged(event);
- }
-
- /**
- * Adds a <code>TreeWillExpandListener</code> object to the tree.
- *
- * @param listener the listener to add
- */
- public void addTreeWillExpandListener(TreeWillExpandListener listener)
- {
- listenerList.add(TreeWillExpandListener.class, listener);
- }
-
- /**
- * Removes a <code>TreeWillExpandListener</code> object from the tree.
- *
- * @param listener the listener to remove
- */
- public void removeTreeWillExpandListener(TreeWillExpandListener listener)
- {
- listenerList.remove(TreeWillExpandListener.class, listener);
- }
-
- /**
- * Returns all added <code>TreeWillExpandListener</code> objects.
- *
- * @return an array of listeners
- */
- public TreeWillExpandListener[] getTreeWillExpandListeners()
- {
- return (TreeWillExpandListener[]) getListeners(TreeWillExpandListener.class);
- }
-
- /**
- * Notifies all listeners that the tree will collapse.
- *
- * @param path the path to the node that will collapse
- */
- public void fireTreeWillCollapse(TreePath path)
- throws ExpandVetoException
- {
- TreeExpansionEvent event = new TreeExpansionEvent(this, path);
- TreeWillExpandListener[] listeners = getTreeWillExpandListeners();
-
- for (int index = 0; index < listeners.length; ++index)
- listeners[index].treeWillCollapse(event);
- }
-
- /**
- * Notifies all listeners that the tree will expand.
- *
- * @param path the path to the node that will expand
- */
- public void fireTreeWillExpand(TreePath path)
- throws ExpandVetoException
- {
- TreeExpansionEvent event = new TreeExpansionEvent(this, path);
- TreeWillExpandListener[] listeners = getTreeWillExpandListeners();
-
- for (int index = 0; index < listeners.length; ++index)
- listeners[index].treeWillExpand(event);
- }
-
- /**
- * Returns the model of this <code>JTree</code> object.
- *
- * @return the associated <code>TreeModel</code>
- */
- public TreeModel getModel()
- {
- return treeModel;
- }
-
- /**
- * Sets the model to use in <code>JTree</code>.
- *
- * @param model the <code>TreeModel</code> to use
- */
- public void setModel(TreeModel model)
- {
- if (treeModel == model)
- return;
-
- TreeModel oldValue = treeModel;
- treeModel = model;
- firePropertyChange(TREE_MODEL_PROPERTY, oldValue, model);
-
- // add treeModelListener to the new model
- if (treeModelListener == null)
- treeModelListener = createTreeModelListener();
- model.addTreeModelListener(treeModelListener);
- }
-
- /**
- * Checks if this <code>JTree</code> object is editable.
- *
- * @return <code>true</code> if this tree object is editable,
- * <code>false</code> otherwise
- */
- public boolean isEditable()
- {
- return editable;
- }
-
- /**
- * Sets the <code>editable</code> property.
- *
- * @param flag <code>true</code> to make this tree object editable,
- * <code>false</code> otherwise
- */
- public void setEditable(boolean flag)
- {
- if (editable == flag)
- return;
-
- boolean oldValue = editable;
- editable = flag;
- firePropertyChange(EDITABLE_PROPERTY, oldValue, editable);
- }
-
- /**
- * Checks if the root element is visible.
- *
- * @return <code>true</code> if the root element is visible,
- * <code>false</code> otherwise
- */
- public boolean isRootVisible()
- {
- return rootVisible;
- }
-
- public void setRootVisible(boolean flag)
- {
- if (rootVisible == flag)
- return;
-
- boolean oldValue = rootVisible;
- rootVisible = flag;
- firePropertyChange(ROOT_VISIBLE_PROPERTY, oldValue, flag);
- }
-
- public boolean getShowsRootHandles()
- {
- return showsRootHandles;
- }
-
- public void setShowsRootHandles(boolean flag)
- {
- if (showsRootHandles == flag)
- return;
-
- boolean oldValue = showsRootHandles;
- showsRootHandles = flag;
- firePropertyChange(SHOWS_ROOT_HANDLES_PROPERTY, oldValue, flag);
- }
-
- public TreeCellEditor getCellEditor()
- {
- return cellEditor;
- }
-
- public void setCellEditor(TreeCellEditor editor)
- {
- if (cellEditor == editor)
- return;
-
- TreeCellEditor oldValue = cellEditor;
- cellEditor = editor;
- firePropertyChange(CELL_EDITOR_PROPERTY, oldValue, editor);
- }
-
- public TreeCellRenderer getCellRenderer()
- {
- return cellRenderer;
- }
-
- public void setCellRenderer(TreeCellRenderer newRenderer)
- {
- if (cellRenderer == newRenderer)
- return;
-
- TreeCellRenderer oldValue = cellRenderer;
- cellRenderer = newRenderer;
- firePropertyChange(CELL_RENDERER_PROPERTY, oldValue, newRenderer);
- }
-
- public TreeSelectionModel getSelectionModel()
- {
- return selectionModel;
- }
-
- public void setSelectionModel(TreeSelectionModel model)
- {
- if (selectionModel == model)
- return;
-
- TreeSelectionModel oldValue = selectionModel;
- selectionModel = model;
- firePropertyChange(SELECTION_MODEL_PROPERTY, oldValue, model);
- }
-
- public int getVisibleRowCount()
- {
- return visibleRowCount;
- }
-
- public void setVisibleRowCount(int rows)
- {
- if (visibleRowCount == rows)
- return;
-
- int oldValue = visibleRowCount;
- visibleRowCount = rows;
- firePropertyChange(VISIBLE_ROW_COUNT_PROPERTY, oldValue, rows);
- }
-
- public boolean isLargeModel()
- {
- return largeModel;
- }
-
- public void setLargeModel(boolean large)
- {
- if (largeModel == large)
- return;
-
- boolean oldValue = largeModel;
- largeModel = large;
- firePropertyChange(LARGE_MODEL_PROPERTY, oldValue, large);
- }
-
- public int getRowHeight()
- {
- return rowHeight;
- }
-
- public void setRowHeight(int height)
- {
- if (rowHeight == height)
- return;
-
- int oldValue = rowHeight;
- rowHeight = height;
- firePropertyChange(ROW_HEIGHT_PROPERTY, oldValue, height);
- }
-
- public boolean isFixedRowHeight()
- {
- return rowHeight > 0;
- }
-
- public boolean getInvokesStopCellEditing()
- {
- return invokesStopCellEditing;
- }
-
- public void setInvokesStopCellEditing(boolean invoke)
- {
- if (invokesStopCellEditing == invoke)
- return;
-
- boolean oldValue = invokesStopCellEditing;
- invokesStopCellEditing = invoke;
- firePropertyChange(INVOKES_STOP_CELL_EDITING_PROPERTY, oldValue, invoke);
- }
-
- /**
- * @since 1.3
- */
- public int getToggleClickCount()
- {
- return toggleClickCount;
- }
-
- /**
- * @since 1.3
- */
- public void setToggleClickCount(int count)
- {
- if (toggleClickCount == count)
- return;
-
- int oldValue = toggleClickCount;
- toggleClickCount = count;
- firePropertyChange(TOGGLE_CLICK_COUNT_PROPERTY, oldValue, count);
- }
-
- public void scrollPathToVisible(TreePath path)
- {
- if (path == null)
- return;
-
- Rectangle rect = getPathBounds(path);
-
- if (rect == null)
- return;
-
- scrollRectToVisible(rect);
- }
-
- public void scrollRowToVisible(int row)
- {
- scrollPathToVisible(getPathForRow(row));
- }
-
- public boolean getScrollsOnExpand()
- {
- return scrollsOnExpand;
- }
-
- public void setScrollsOnExpand(boolean scroll)
- {
- if (scrollsOnExpand == scroll)
- return;
-
- boolean oldValue = scrollsOnExpand;
- scrollsOnExpand = scroll;
- firePropertyChange(SCROLLS_ON_EXPAND_PROPERTY, oldValue, scroll);
- }
-
- public void setSelectionPath(TreePath path)
- {
- selectionModel.setSelectionPath(path);
- }
-
- public void setSelectionPaths(TreePath[] paths)
- {
- selectionModel.setSelectionPaths(paths);
- }
-
- public void setSelectionRow(int row)
- {
- TreePath path = getPathForRow(row);
-
- if (path != null)
- selectionModel.setSelectionPath(path);
- }
-
- public void setSelectionRows(int[] rows)
- {
- // Make sure we have an UI so getPathForRow() does not return null.
- if (rows == null || getUI() == null)
- return;
-
- TreePath[] paths = new TreePath[rows.length];
-
- for (int i = rows.length - 1; i >= 0; --i)
- paths[i] = getPathForRow(rows[i]);
-
- setSelectionPaths(paths);
- }
-
- public void setSelectionInterval(int index0, int index1)
- {
- TreePath[] paths = getPathBetweenRows(index0, index1);
-
- if (paths != null)
- setSelectionPaths(paths);
- }
-
- public void addSelectionPath(TreePath path)
- {
- selectionModel.addSelectionPath(path);
- }
-
- public void addSelectionPaths(TreePath[] paths)
- {
- selectionModel.addSelectionPaths(paths);
- }
-
- public void addSelectionRow(int row)
- {
- TreePath path = getPathForRow(row);
-
- if (path != null)
- selectionModel.addSelectionPath(path);
- }
-
- public void addSelectionRows(int[] rows)
- {
- // Make sure we have an UI so getPathForRow() does not return null.
- if (rows == null || getUI() == null)
- return;
-
- TreePath[] paths = new TreePath[rows.length];
-
- for (int i = rows.length - 1; i >= 0; --i)
- paths[i] = getPathForRow(rows[i]);
-
- addSelectionPaths(paths);
- }
-
- public void addSelectionInterval(int index0, int index1)
- {
- TreePath[] paths = getPathBetweenRows(index0, index1);
-
- if (paths != null)
- addSelectionPaths(paths);
- }
-
- public void removeSelectionPath(TreePath path)
- {
- selectionModel.removeSelectionPath(path);
- }
-
- public void removeSelectionPaths(TreePath[] paths)
- {
- selectionModel.removeSelectionPaths(paths);
- }
-
- public void removeSelectionRow(int row)
- {
- TreePath path = getPathForRow(row);
-
- if (path != null)
- selectionModel.removeSelectionPath(path);
- }
-
- public void removeSelectionRows(int[] rows)
- {
- // Make sure we have an UI so getPathForRow() does not return null.
- if (rows == null || getUI() == null)
- return;
-
- TreePath[] paths = new TreePath[rows.length];
-
- for (int i = rows.length - 1; i >= 0; --i)
- paths[i] = getPathForRow(rows[i]);
-
- removeSelectionPaths(paths);
- }
-
- public void removeSelectionInterval(int index0, int index1)
- {
- TreePath[] paths = getPathBetweenRows(index0, index1);
-
- if (paths != null)
- removeSelectionPaths(paths);
- }
-
- public void clearSelection()
- {
- selectionModel.clearSelection();
- }
-
- public TreePath getLeadSelectionPath()
- {
- return leadSelectionPath;
- }
-
- /**
- * @since 1.3
- */
- public void setLeadSelectionPath(TreePath path)
- {
- if (leadSelectionPath == path)
- return;
-
- TreePath oldValue = leadSelectionPath;
- leadSelectionPath = path;
- firePropertyChange(LEAD_SELECTION_PATH_PROPERTY, oldValue, path);
- }
-
- /**
- * @since 1.3
- */
- public TreePath getAnchorSelectionPath()
- {
- return anchorSelectionPath;
- }
-
- /**
- * @since 1.3
- */
- public void setAnchorSelectionPath(TreePath path)
- {
- if (anchorSelectionPath == path)
- return;
-
- TreePath oldValue = anchorSelectionPath;
- anchorSelectionPath = path;
- firePropertyChange(ANCHOR_SELECTION_PATH_PROPERTY, oldValue, path);
- }
-
- public int getLeadSelectionRow()
- {
- return selectionModel.getLeadSelectionRow();
- }
-
- public int getMaxSelectionRow()
- {
- return selectionModel.getMaxSelectionRow();
- }
-
- public int getMinSelectionRow()
- {
- return selectionModel.getMinSelectionRow();
- }
-
- public int getSelectionCount()
- {
- return selectionModel.getSelectionCount();
- }
-
- public TreePath getSelectionPath()
- {
- return selectionModel.getSelectionPath();
- }
-
- public TreePath[] getSelectionPaths()
- {
- return selectionModel.getSelectionPaths();
- }
-
- public int[] getSelectionRows()
- {
- return selectionModel.getSelectionRows();
- }
-
- public boolean isPathSelected(TreePath path)
- {
- return selectionModel.isPathSelected(path);
- }
-
- public boolean isRowSelected(int row)
- {
- return selectionModel.isRowSelected(row);
- }
-
- public boolean isSelectionEmpty()
- {
- return selectionModel.isSelectionEmpty();
- }
-
- /**
- * Return the value of the <code>dragEnabled</code> property.
- *
- * @return the value
- *
- * @since 1.4
- */
- public boolean getDragEnabled()
- {
- return dragEnabled;
- }
-
- /**
- * Set the <code>dragEnabled</code> property.
- *
- * @param enabled new value
- *
- * @since 1.4
- */
- public void setDragEnabled(boolean enabled)
- {
- dragEnabled = enabled;
- }
-
- public int getRowCount()
- {
- TreeUI ui = getUI();
-
- if (ui != null)
- return ui.getRowCount(this);
-
- return 0;
- }
-
- public void collapsePath(TreePath path)
- {
- setExpandedState(path, false);
- }
-
- public void collapseRow(int row)
- {
- if (row < 0 || row >= getRowCount())
- return;
-
- TreePath path = getPathForRow(row);
-
- if (path != null)
- collapsePath(path);
- }
-
- public void expandPath(TreePath path)
- {
- // Don't expand if last path component is a leaf node.
- if ((path == null)
- || (treeModel.isLeaf(path.getLastPathComponent())))
- return;
-
- setExpandedState(path, true);
- }
-
- public void expandRow(int row)
- {
- if (row < 0 || row >= getRowCount())
- return;
-
- TreePath path = getPathForRow(row);
-
- if (path != null)
- expandPath(path);
- }
-
- public boolean isCollapsed(TreePath path)
- {
- return ! isExpanded(path);
- }
-
- public boolean isCollapsed(int row)
- {
- if (row < 0 || row >= getRowCount())
- return false;
-
- TreePath path = getPathForRow(row);
-
- if (path != null)
- return isCollapsed(path);
-
- return false;
- }
-
- public boolean isExpanded(TreePath path)
- {
- if (path == null)
- return false;
-
- Object state = nodeStates.get(path);
-
- if ((state == null) || (state != EXPANDED))
- return false;
-
- TreePath parent = path.getParentPath();
-
- if (parent != null)
- return isExpanded(parent);
-
- return true;
- }
-
- public boolean isExpanded(int row)
- {
- if (row < 0 || row >= getRowCount())
- return false;
-
- TreePath path = getPathForRow(row);
-
- if (path != null)
- return isExpanded(path);
-
- return false;
- }
-
- /**
- * @since 1.3
- */
- public boolean getExpandsSelectedPaths()
- {
- return expandsSelectedPaths;
- }
-
- /**
- * @since 1.3
- */
- public void setExpandsSelectedPaths(boolean flag)
- {
- if (expandsSelectedPaths == flag)
- return;
-
- boolean oldValue = expandsSelectedPaths;
- expandsSelectedPaths = flag;
- firePropertyChange(EXPANDS_SELECTED_PATHS_PROPERTY, oldValue, flag);
- }
-
- public Rectangle getPathBounds(TreePath path)
- {
- TreeUI ui = getUI();
-
- if (ui == null)
- return null;
-
- return ui.getPathBounds(this, path);
- }
-
- public Rectangle getRowBounds(int row)
- {
- TreePath path = getPathForRow(row);
+ /**
+ * Listens to the model of the JTree and updates the property
+ * <code>expandedState</code> if nodes are removed or changed.
+ */
+ protected class TreeModelHandler
+ implements
+ TreeModelListener
+ {
+
+ /**
+ * Creates a new instance of TreeModelHandler.
+ */
+ protected TreeModelHandler()
+ {
+ }
+
+ /**
+ * Notifies when a node has changed in some ways. This does not include
+ * that a node has changed its location or changed it's children. It
+ * only means that some attributes of the node have changed that might
+ * affect its presentation.
+ *
+ * This method is called after the actual change occured.
+ *
+ * @param ev the TreeModelEvent describing the change
+ */
+ public void treeNodesChanged(TreeModelEvent ev)
+ {
+ // nothing to do here
+ }
+
+ /**
+ * Notifies when a node is inserted into the tree.
+ *
+ * This method is called after the actual change occured.
+ *
+ * @param ev the TreeModelEvent describing the change
+ */
+ public void treeNodesInserted(TreeModelEvent ev)
+ {
+ // nothing to do here
+ }
+
+ /**
+ * Notifies when a node is removed from the tree.
+ *
+ * This method is called after the actual change occured.
+ *
+ * @param ev the TreeModelEvent describing the change
+ */
+ public void treeNodesRemoved(TreeModelEvent ev)
+ {
+ // TODO: The API docs suggest that this method should do something
+ // but I cannot really see what has to be done here ...
+ }
+
+ /**
+ * Notifies when the structure of the tree is changed.
+ *
+ * This method is called after the actual change occured.
+ *
+ * @param ev the TreeModelEvent describing the change
+ */
+ public void treeStructureChanged(TreeModelEvent ev)
+ {
+ // set state of new path
+ TreePath path = ev.getTreePath();
+ setExpandedState(path, isExpanded(path));
+ }
+ } // TreeModelHandler
+
+ /**
+ * This redirects TreeSelectionEvents and rewrites the source of it to be
+ * this JTree. This is typically done when the tree model generates an
+ * event, but the JTree object associated with that model should be listed
+ * as the actual source of the event.
+ */
+ protected class TreeSelectionRedirector
+ implements
+ TreeSelectionListener,
+ Serializable
+ {
+ /** The serial version UID. */
+ private static final long serialVersionUID = -3505069663646241664L;
+
+ /**
+ * Creates a new instance of TreeSelectionRedirector
+ */
+ protected TreeSelectionRedirector()
+ {
+ }
+
+ /**
+ * Notifies when the tree selection changes.
+ *
+ * @param ev the TreeSelectionEvent that describes the change
+ */
+ public void valueChanged(TreeSelectionEvent ev)
+ {
+ TreeSelectionEvent rewritten = (TreeSelectionEvent) ev
+ .cloneWithSource(JTree.this);
+ fireValueChanged(rewritten);
+ JTree.this.repaint();
+ }
+ } // TreeSelectionRedirector
+
+ /**
+ * A TreeModel that does not allow anything to be selected.
+ */
+ protected static class EmptySelectionModel
+ extends
+ DefaultTreeSelectionModel
+ {
+ /** The serial version UID. */
+ private static final long serialVersionUID = -5815023306225701477L;
+
+ /**
+ * The shared instance of this model.
+ */
+ protected static final EmptySelectionModel sharedInstance = new EmptySelectionModel();
+
+ /**
+ * Creates a new instance of EmptySelectionModel.
+ */
+ protected EmptySelectionModel()
+ {
+ }
+
+ /**
+ * Returns the shared instance of EmptySelectionModel.
+ *
+ * @return the shared instance of EmptySelectionModel
+ */
+ public static EmptySelectionModel sharedInstance()
+ {
+ return sharedInstance;
+ }
+
+ /**
+ * This catches attempts to set a selection and sets nothing instead.
+ *
+ * @param paths not used here
+ */
+ public void setSelectionPaths(TreePath[] paths)
+ {
+ // we don't allow selections in this class
+ }
+
+ /**
+ * This catches attempts to add something to the selection.
+ *
+ * @param paths not used here
+ */
+ public void addSelectionPaths(TreePath[] paths)
+ {
+ // we don't allow selections in this class
+ }
+
+ /**
+ * This catches attempts to remove something from the selection.
+ *
+ * @param paths not used here
+ */
+ public void removeSelectionPaths(TreePath[] paths)
+ {
+ // we don't allow selections in this class
+ }
+ }// EmptySelectionModel
+
+ private static final long serialVersionUID = 7559816092864483649L;
+ public static final String CELL_EDITOR_PROPERTY = "cellEditor";
+ public static final String CELL_RENDERER_PROPERTY = "cellRenderer";
+ public static final String EDITABLE_PROPERTY = "editable";
+ public static final String INVOKES_STOP_CELL_EDITING_PROPERTY = "invokesStopCellEditing";
+ public static final String LARGE_MODEL_PROPERTY = "largeModel";
+ public static final String ROOT_VISIBLE_PROPERTY = "rootVisible";
+ public static final String ROW_HEIGHT_PROPERTY = "rowHeight";
+ public static final String SCROLLS_ON_EXPAND_PROPERTY = "scrollsOnExpand";
+ public static final String SELECTION_MODEL_PROPERTY = "selectionModel";
+ public static final String SHOWS_ROOT_HANDLES_PROPERTY = "showsRootHandles";
+ public static final String TOGGLE_CLICK_COUNT_PROPERTY = "toggleClickCount";
+ public static final String TREE_MODEL_PROPERTY = "model";
+ public static final String VISIBLE_ROW_COUNT_PROPERTY = "visibleRowCount";
+
+ /** @since 1.3 */
+ public static final String ANCHOR_SELECTION_PATH_PROPERTY = "anchorSelectionPath";
+
+ /** @since 1.3 */
+ public static final String LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
+
+ /** @since 1.3 */
+ public static final String EXPANDS_SELECTED_PATHS_PROPERTY = "expandsSelectedPaths";
+ private static final Object EXPANDED = new Object();
+ private static final Object COLLAPSED = new Object();
+ private boolean dragEnabled;
+ private boolean expandsSelectedPaths;
+ private TreePath anchorSelectionPath;
+ private TreePath leadSelectionPath;
+
+ /*
+ * This contains the state of all nodes in the tree. Al/ entries map the
+ * TreePath of a note to to its state. Valid states are EXPANDED and
+ * COLLAPSED. Nodes not in this Hashtable are assumed state COLLAPSED.
+ */
+ private Hashtable nodeStates = new Hashtable();
+ protected transient TreeCellEditor cellEditor;
+ protected transient TreeCellRenderer cellRenderer;
+ protected boolean editable;
+ protected boolean invokesStopCellEditing;
+ protected boolean largeModel;
+ protected boolean rootVisible;
+ protected int rowHeight;
+ protected boolean scrollsOnExpand;
+ protected transient TreeSelectionModel selectionModel;
+ protected boolean showsRootHandles;
+ protected int toggleClickCount;
+ protected transient TreeModel treeModel;
+ protected int visibleRowCount;
+
+ /**
+ * Handles TreeModelEvents to update the expandedState.
+ */
+ protected transient TreeModelListener treeModelListener;
+
+ /**
+ * Redirects TreeSelectionEvents so that the source is this JTree.
+ */
+ protected TreeSelectionRedirector selectionRedirector =
+ new TreeSelectionRedirector();
+
+ /**
+ * Creates a new <code>JTree</code> object.
+ */
+ public JTree()
+ {
+ this(createTreeModel(null));
+ }
+
+ /**
+ * Creates a new <code>JTree</code> object.
+ *
+ * @param value the initial nodes in the tree
+ */
+ public JTree(Hashtable value)
+ {
+ this(createTreeModel(value));
+ }
+
+ /**
+ * Creates a new <code>JTree</code> object.
+ *
+ * @param value the initial nodes in the tree
+ */
+ public JTree(Object[] value)
+ {
+ this(createTreeModel(value));
+ }
+
+ /**
+ * Creates a new <code>JTree</code> object.
+ *
+ * @param model the model to use
+ */
+ public JTree(TreeModel model)
+ {
+ setModel(model);
+ setSelectionModel(EmptySelectionModel.sharedInstance());
+ selectionModel.addTreeSelectionListener(selectionRedirector);
+ setCellRenderer(new DefaultTreeCellRenderer());
+ updateUI();
+ }
+
+ /**
+ * Creates a new <code>JTree</code> object.
+ *
+ * @param root the root node
+ */
+ public JTree(TreeNode root)
+ {
+ this(root, false);
+ }
+
+ /**
+ * Creates a new <code>JTree</code> object.
+ *
+ * @param root the root node
+ * @param asksAllowChildren if false, all nodes without children are leaf
+ * nodes. If true, only nodes that do not allow children are leaf
+ * nodes.
+ */
+ public JTree(TreeNode root, boolean asksAllowChildren)
+ {
+ this(new DefaultTreeModel(root, asksAllowChildren));
+ }
+
+ /**
+ * Creates a new <code>JTree</code> object.
+ *
+ * @param value the initial nodes in the tree
+ */
+ public JTree(Vector value)
+ {
+ this(createTreeModel(value));
+ }
+
+ public static class DynamicUtilTreeNode
+ extends
+ DefaultMutableTreeNode
+ {
+ protected Object childValue;
+ protected boolean loadedChildren;
+
+ /**
+ * Currently not set or used by this class. It might be set and used in
+ * later versions of this class.
+ */
+ protected boolean hasChildren;
+
+ public DynamicUtilTreeNode(Object value, Object children)
+ {
+ super(value);
+ childValue = children;
+ loadedChildren = false;
+ }
+
+ public int getChildCount()
+ {
+ loadChildren();
+ return super.getChildCount();
+ }
+
+ protected void loadChildren()
+ {
+ if (!loadedChildren)
+ {
+ createChildren(this, childValue);
+ loadedChildren = true;
+ }
+ }
+
+ public Enumeration children()
+ {
+ loadChildren();
+ return super.children();
+ }
+
+ /**
+ * Returns the child node at position <code>pos</code>. Subclassed
+ * here to load the children if necessary.
+ *
+ * @param pos the position of the child node to fetch
+ *
+ * @return the childnode at the specified position
+ */
+ public TreeNode getChildAt(int pos)
+ {
+ loadChildren();
+ return super.getChildAt(pos);
+ }
+
+ public boolean isLeaf()
+ {
+ return (childValue == null || !(childValue instanceof Hashtable
+ || childValue instanceof Vector || childValue.getClass()
+ .isArray()));
+ }
+
+ public static void createChildren(DefaultMutableTreeNode parent,
+ Object children)
+ {
+ if (children instanceof Hashtable)
+ {
+ Hashtable tab = (Hashtable) children;
+ Enumeration e = tab.keys();
+ while (e.hasMoreElements())
+ {
+ Object key = e.nextElement();
+ Object val = tab.get(key);
+ parent.add(new DynamicUtilTreeNode(key, val));
+ }
+ } else if (children instanceof Vector)
+ {
+ Iterator i = ((Vector) children).iterator();
+ while (i.hasNext())
+ {
+ Object n = i.next();
+ parent.add(new DynamicUtilTreeNode(n, n));
+ }
+ } else if (children != null && children.getClass().isArray())
+ {
+ Object[] arr = (Object[]) children;
+ for (int i = 0; i < arr.length; ++i)
+ parent.add(new DynamicUtilTreeNode(arr[i], arr[i]));
+ }
+ }
+ }
+
+ public int getRowForPath(TreePath path)
+ {
+ TreeUI ui = getUI();
+
+ if (ui != null)
+ return ui.getRowForPath(this, path);
+
+ return -1;
+ }
+
+ public TreePath getPathForRow(int row)
+ {
+ TreeUI ui = getUI();
+ return ui != null ? ui.getPathForRow(this, row) : null;
+ }
+
+ protected TreePath[] getPathBetweenRows(int index0, int index1)
+ {
+ TreeUI ui = getUI();
+
+ if (ui == null)
+ return null;
+
+ int minIndex = Math.min(index0, index1);
+ int maxIndex = Math.max(index0, index1);
+ TreePath[] paths = new TreePath[maxIndex - minIndex + 1];
+
+ for (int i = minIndex; i <= maxIndex; ++i)
+ paths[i - minIndex] = ui.getPathForRow(this, i);
+
+ return paths;
+ }
+
+ /**
+ * Creates a new <code>TreeModel</code> object.
+ *
+ * @param value the values stored in the model
+ */
+ protected static TreeModel createTreeModel(Object value)
+ {
+ return new DefaultTreeModel(new DynamicUtilTreeNode(value, value));
+ }
+
+ /**
+ * Return the UI associated with this <code>JTree</code> object.
+ *
+ * @return the associated <code>TreeUI</code> object
+ */
+ public TreeUI getUI()
+ {
+ return (TreeUI) ui;
+ }
+
+ /**
+ * Sets the UI associated with this <code>JTree</code> object.
+ *
+ * @param ui the <code>TreeUI</code> to associate
+ */
+ public void setUI(TreeUI ui)
+ {
+ super.setUI(ui);
+ }
+
+ /**
+ * This method resets the UI used to the Look and Feel defaults..
+ */
+ public void updateUI()
+ {
+ setUI((TreeUI) UIManager.getUI(this));
+ revalidate();
+ repaint();
+ }
+
+ /**
+ * This method returns the String ID of the UI class of Separator.
+ *
+ * @return The UI class' String ID.
+ */
+ public String getUIClassID()
+ {
+ return "TreeUI";
+ }
+
+ /**
+ * Gets the AccessibleContext associated with this
+ * <code>JToggleButton</code>.
+ *
+ * @return the associated context
+ */
+ public AccessibleContext getAccessibleContext()
+ {
+ return null;
+ }
+
+ /**
+ * Returns the preferred viewport size..
+ *
+ * @return the preferred size
+ */
+ public Dimension getPreferredScrollableViewportSize()
+ {
+ return null;
+ }
+
+ public int getScrollableUnitIncrement(Rectangle visibleRect,
+ int orientation, int direction)
+ {
+ return 1;
+ }
+
+ public int getScrollableBlockIncrement(Rectangle visibleRect,
+ int orientation, int direction)
+ {
+ return 1;
+ }
+
+ public boolean getScrollableTracksViewportWidth()
+ {
+ return false;
+ }
+
+ public boolean getScrollableTracksViewportHeight()
+ {
+ return false;
+ }
+
+ /**
+ * Adds a <code>TreeExpansionListener</code> object to the tree.
+ *
+ * @param listener the listener to add
+ */
+ public void addTreeExpansionListener(TreeExpansionListener listener)
+ {
+ listenerList.add(TreeExpansionListener.class, listener);
+ }
+
+ /**
+ * Removes a <code>TreeExpansionListener</code> object from the tree.
+ *
+ * @param listener the listener to remove
+ */
+ public void removeTreeExpansionListener(TreeExpansionListener listener)
+ {
+ listenerList.remove(TreeExpansionListener.class, listener);
+ }
+
+ /**
+ * Returns all added <code>TreeExpansionListener</code> objects.
+ *
+ * @return an array of listeners
+ */
+ public TreeExpansionListener[] getTreeExpansionListeners()
+ {
+ return (TreeExpansionListener[]) getListeners(TreeExpansionListener.class);
+ }
+
+ /**
+ * Notifies all listeners that the tree was collapsed.
+ *
+ * @param path the path to the node that was collapsed
+ */
+ public void fireTreeCollapsed(TreePath path)
+ {
+ TreeExpansionEvent event = new TreeExpansionEvent(this, path);
+ TreeExpansionListener[] listeners = getTreeExpansionListeners();
+
+ for (int index = 0; index < listeners.length; ++index)
+ listeners[index].treeCollapsed(event);
+ }
+
+ /**
+ * Notifies all listeners that the tree was expanded.
+ *
+ * @param path the path to the node that was expanded
+ */
+ public void fireTreeExpanded(TreePath path)
+ {
+ TreeExpansionEvent event = new TreeExpansionEvent(this, path);
+ TreeExpansionListener[] listeners = getTreeExpansionListeners();
+
+ for (int index = 0; index < listeners.length; ++index)
+ listeners[index].treeExpanded(event);
+ }
+
+ /**
+ * Adds a <code>TreeSelctionListener</code> object to the tree.
+ *
+ * @param listener the listener to add
+ */
+ public void addTreeSelectionListener(TreeSelectionListener listener)
+ {
+ listenerList.add(TreeSelectionListener.class, listener);
+ }
+
+ /**
+ * Removes a <code>TreeSelectionListener</code> object from the tree.
+ *
+ * @param listener the listener to remove
+ */
+ public void removeTreeSelectionListener(TreeSelectionListener listener)
+ {
+ listenerList.remove(TreeSelectionListener.class, listener);
+ }
+
+ /**
+ * Returns all added <code>TreeSelectionListener</code> objects.
+ *
+ * @return an array of listeners
+ */
+ public TreeSelectionListener[] getTreeSelectionListeners()
+ {
+ return (TreeSelectionListener[])
+ getListeners(TreeSelectionListener.class);
+ }
+
+ /**
+ * Notifies all listeners when the selection of the tree changed.
+ *
+ * @param event the event to send
+ */
+ protected void fireValueChanged(TreeSelectionEvent event)
+ {
+ TreeSelectionListener[] listeners = getTreeSelectionListeners();
+
+ for (int index = 0; index < listeners.length; ++index)
+ listeners[index].valueChanged(event);
+ }
+
+ /**
+ * Adds a <code>TreeWillExpandListener</code> object to the tree.
+ *
+ * @param listener the listener to add
+ */
+ public void addTreeWillExpandListener(TreeWillExpandListener listener)
+ {
+ listenerList.add(TreeWillExpandListener.class, listener);
+ }
+
+ /**
+ * Removes a <code>TreeWillExpandListener</code> object from the tree.
+ *
+ * @param listener the listener to remove
+ */
+ public void removeTreeWillExpandListener(TreeWillExpandListener listener)
+ {
+ listenerList.remove(TreeWillExpandListener.class, listener);
+ }
+
+ /**
+ * Returns all added <code>TreeWillExpandListener</code> objects.
+ *
+ * @return an array of listeners
+ */
+ public TreeWillExpandListener[] getTreeWillExpandListeners()
+ {
+ return (TreeWillExpandListener[])
+ getListeners(TreeWillExpandListener.class);
+ }
+
+ /**
+ * Notifies all listeners that the tree will collapse.
+ *
+ * @param path the path to the node that will collapse
+ */
+ public void fireTreeWillCollapse(TreePath path) throws ExpandVetoException
+ {
+ TreeExpansionEvent event = new TreeExpansionEvent(this, path);
+ TreeWillExpandListener[] listeners = getTreeWillExpandListeners();
+
+ for (int index = 0; index < listeners.length; ++index)
+ listeners[index].treeWillCollapse(event);
+ }
+
+ /**
+ * Notifies all listeners that the tree will expand.
+ *
+ * @param path the path to the node that will expand
+ */
+ public void fireTreeWillExpand(TreePath path) throws ExpandVetoException
+ {
+ TreeExpansionEvent event = new TreeExpansionEvent(this, path);
+ TreeWillExpandListener[] listeners = getTreeWillExpandListeners();
+
+ for (int index = 0; index < listeners.length; ++index)
+ listeners[index].treeWillExpand(event);
+ }
+
+ /**
+ * Returns the model of this <code>JTree</code> object.
+ *
+ * @return the associated <code>TreeModel</code>
+ */
+ public TreeModel getModel()
+ {
+ return treeModel;
+ }
+
+ /**
+ * Sets the model to use in <code>JTree</code>.
+ *
+ * @param model the <code>TreeModel</code> to use
+ */
+ public void setModel(TreeModel model)
+ {
+ if (treeModel == model)
+ return;
+
+ TreeModel oldValue = treeModel;
+ treeModel = model;
+
+ firePropertyChange(TREE_MODEL_PROPERTY, oldValue, model);
+
+ // add treeModelListener to the new model
+ if (treeModelListener == null)
+ treeModelListener = createTreeModelListener();
+ model.addTreeModelListener(treeModelListener);
+ }
+
+ /**
+ * Checks if this <code>JTree</code> object is editable.
+ *
+ * @return <code>true</code> if this tree object is editable,
+ * <code>false</code> otherwise
+ */
+ public boolean isEditable()
+ {
+ return editable;
+ }
+
+ /**
+ * Sets the <code>editable</code> property.
+ *
+ * @param flag <code>true</code> to make this tree object editable,
+ * <code>false</code> otherwise
+ */
+ public void setEditable(boolean flag)
+ {
+ if (editable == flag)
+ return;
+
+ boolean oldValue = editable;
+ editable = flag;
+ firePropertyChange(EDITABLE_PROPERTY, oldValue, editable);
+ }
+
+ /**
+ * Checks if the root element is visible.
+ *
+ * @return <code>true</code> if the root element is visible,
+ * <code>false</code> otherwise
+ */
+ public boolean isRootVisible()
+ {
+ return rootVisible;
+ }
+
+ public void setRootVisible(boolean flag)
+ {
+ if (rootVisible == flag)
+ return;
+
+ boolean oldValue = rootVisible;
+ rootVisible = flag;
+ firePropertyChange(ROOT_VISIBLE_PROPERTY, oldValue, flag);
+ }
+
+ public boolean getShowsRootHandles()
+ {
+ return showsRootHandles;
+ }
+
+ public void setShowsRootHandles(boolean flag)
+ {
+ if (showsRootHandles == flag)
+ return;
+
+ boolean oldValue = showsRootHandles;
+ showsRootHandles = flag;
+ firePropertyChange(SHOWS_ROOT_HANDLES_PROPERTY, oldValue, flag);
+ }
+
+ public TreeCellEditor getCellEditor()
+ {
+
+ return cellEditor;
+ }
+
+ public void setCellEditor(TreeCellEditor editor)
+ {
+ if (cellEditor == editor)
+ return;
+
+ TreeCellEditor oldValue = cellEditor;
+ cellEditor = editor;
+ firePropertyChange(CELL_EDITOR_PROPERTY, oldValue, editor);
+ }
+
+ public TreeCellRenderer getCellRenderer()
+ {
+ return cellRenderer;
+ }
+
+ public void setCellRenderer(TreeCellRenderer newRenderer)
+ {
+ if (cellRenderer == newRenderer)
+ return;
+
+ TreeCellRenderer oldValue = cellRenderer;
+ cellRenderer = newRenderer;
+ firePropertyChange(CELL_RENDERER_PROPERTY, oldValue, newRenderer);
+ }
+
+ public TreeSelectionModel getSelectionModel()
+ {
+ return selectionModel;
+ }
+
+ public void setSelectionModel(TreeSelectionModel model)
+ {
+ if (selectionModel == model)
+ return;
+
+ if (selectionModel != null)
+ selectionModel.removeTreeSelectionListener(selectionRedirector);
+
+ TreeSelectionModel oldValue = selectionModel;
+ selectionModel = model;
+
+ if (selectionModel != null)
+ selectionModel.addTreeSelectionListener(selectionRedirector);
+
+ firePropertyChange(SELECTION_MODEL_PROPERTY, oldValue, model);
+ revalidate();
+ repaint();
+ }
+
+ public int getVisibleRowCount()
+ {
+ return visibleRowCount;
+ }
+
+ public void setVisibleRowCount(int rows)
+ {
+ if (visibleRowCount == rows)
+ return;
+
+ int oldValue = visibleRowCount;
+ visibleRowCount = rows;
+ firePropertyChange(VISIBLE_ROW_COUNT_PROPERTY, oldValue, rows);
+ }
+
+ public boolean isLargeModel()
+ {
+ return largeModel;
+ }
+
+ public void setLargeModel(boolean large)
+ {
+ if (largeModel == large)
+ return;
+
+ boolean oldValue = largeModel;
+ largeModel = large;
+ firePropertyChange(LARGE_MODEL_PROPERTY, oldValue, large);
+ }
+
+ public int getRowHeight()
+ {
+
+ return rowHeight;
+ }
+
+ public void setRowHeight(int height)
+ {
+ if (rowHeight == height)
+ return;
+
+ int oldValue = rowHeight;
+ rowHeight = height;
+ firePropertyChange(ROW_HEIGHT_PROPERTY, oldValue, height);
+ }
+
+ public boolean isFixedRowHeight()
+ {
+ return rowHeight > 0;
+ }
+
+ public boolean getInvokesStopCellEditing()
+ {
+ return invokesStopCellEditing;
+ }
+
+ public void setInvokesStopCellEditing(boolean invoke)
+ {
+ if (invokesStopCellEditing == invoke)
+ return;
+
+ boolean oldValue = invokesStopCellEditing;
+ invokesStopCellEditing = invoke;
+ firePropertyChange(INVOKES_STOP_CELL_EDITING_PROPERTY,
+ oldValue, invoke);
+ }
+
+ /**
+ * @since 1.3
+ */
+ public int getToggleClickCount()
+ {
+ return toggleClickCount;
+ }
+
+ /**
+ * @since 1.3
+ */
+ public void setToggleClickCount(int count)
+ {
+ if (toggleClickCount == count)
+ return;
+
+ int oldValue = toggleClickCount;
+ toggleClickCount = count;
+ firePropertyChange(TOGGLE_CLICK_COUNT_PROPERTY, oldValue, count);
+ }
+
+ public void scrollPathToVisible(TreePath path)
+ {
+ if (path == null)
+ return;
+
+ Rectangle rect = getPathBounds(path);
+
+ if (rect == null)
+ return;
+
+ scrollRectToVisible(rect);
+ }
+
+ public void scrollRowToVisible(int row)
+ {
+ scrollPathToVisible(getPathForRow(row));
+ }
+
+ public boolean getScrollsOnExpand()
+ {
+ return scrollsOnExpand;
+ }
+
+ public void setScrollsOnExpand(boolean scroll)
+ {
+ if (scrollsOnExpand == scroll)
+ return;
+
+ boolean oldValue = scrollsOnExpand;
+ scrollsOnExpand = scroll;
+ firePropertyChange(SCROLLS_ON_EXPAND_PROPERTY, oldValue, scroll);
+ }
+
+ public void setSelectionPath(TreePath path)
+ {
+ selectionModel.setSelectionPath(path);
+ }
+
+ public void setSelectionPaths(TreePath[] paths)
+ {
+ selectionModel.setSelectionPaths(paths);
+ }
+
+ public void setSelectionRow(int row)
+ {
+ TreePath path = getPathForRow(row);
+
+ if (path != null)
+ selectionModel.setSelectionPath(path);
+ }
+
+ public void setSelectionRows(int[] rows)
+ {
+ // Make sure we have an UI so getPathForRow() does not return null.
+ if (rows == null || getUI() == null)
+ return;
+
+ TreePath[] paths = new TreePath[rows.length];
+
+ for (int i = rows.length - 1; i >= 0; --i)
+ paths[i] = getPathForRow(rows[i]);
+
+ setSelectionPaths(paths);
+ }
+
+ public void setSelectionInterval(int index0, int index1)
+ {
+ TreePath[] paths = getPathBetweenRows(index0, index1);
+
+ if (paths != null)
+ setSelectionPaths(paths);
+ }
+
+ public void addSelectionPath(TreePath path)
+ {
+ selectionModel.addSelectionPath(path);
+ }
+
+ public void addSelectionPaths(TreePath[] paths)
+ {
+ selectionModel.addSelectionPaths(paths);
+ }
+
+ public void addSelectionRow(int row)
+ {
+ TreePath path = getPathForRow(row);
+
+ if (path != null)
+ selectionModel.addSelectionPath(path);
+ }
+
+ public void addSelectionRows(int[] rows)
+ {
+ // Make sure we have an UI so getPathForRow() does not return null.
+ if (rows == null || getUI() == null)
+ return;
+
+ TreePath[] paths = new TreePath[rows.length];
+
+ for (int i = rows.length - 1; i >= 0; --i)
+ paths[i] = getPathForRow(rows[i]);
+
+ addSelectionPaths(paths);
+ }
+
+ public void addSelectionInterval(int index0, int index1)
+ {
+ TreePath[] paths = getPathBetweenRows(index0, index1);
+
+ if (paths != null)
+ addSelectionPaths(paths);
+ }
+
+ public void removeSelectionPath(TreePath path)
+ {
+ selectionModel.removeSelectionPath(path);
+ }
+
+ public void removeSelectionPaths(TreePath[] paths)
+ {
+ selectionModel.removeSelectionPaths(paths);
+ }
+
+ public void removeSelectionRow(int row)
+ {
+ TreePath path = getPathForRow(row);
+
+ if (path != null)
+ selectionModel.removeSelectionPath(path);
+ }
+
+ public void removeSelectionRows(int[] rows)
+ {
+ if (rows == null || getUI() == null)
+ return;
+
+ TreePath[] paths = new TreePath[rows.length];
+
+ for (int i = rows.length - 1; i >= 0; --i)
+ paths[i] = getPathForRow(rows[i]);
+
+ removeSelectionPaths(paths);
+ }
+
+ public void removeSelectionInterval(int index0, int index1)
+ {
+ TreePath[] paths = getPathBetweenRows(index0, index1);
+
+ if (paths != null)
+ removeSelectionPaths(paths);
+ }
+
+ public void clearSelection()
+ {
+ selectionModel.clearSelection();
+ setLeadSelectionPath(null);
+ }
+
+ public TreePath getLeadSelectionPath()
+ {
+ return leadSelectionPath;
+ }
+
+ /**
+ * @since 1.3
+ */
+ public void setLeadSelectionPath(TreePath path)
+ {
+ if (leadSelectionPath == path)
+ return;
+
+ TreePath oldValue = leadSelectionPath;
+ leadSelectionPath = path;
+ firePropertyChange(LEAD_SELECTION_PATH_PROPERTY, oldValue, path);
+ }
+
+ /**
+ * @since 1.3
+ */
+ public TreePath getAnchorSelectionPath()
+ {
+ return anchorSelectionPath;
+ }
+
+ /**
+ * @since 1.3
+ */
+ public void setAnchorSelectionPath(TreePath path)
+ {
+ if (anchorSelectionPath == path)
+ return;
+
+ TreePath oldValue = anchorSelectionPath;
+ anchorSelectionPath = path;
+ firePropertyChange(ANCHOR_SELECTION_PATH_PROPERTY, oldValue, path);
+ }
+
+ public int getLeadSelectionRow()
+ {
+ return selectionModel.getLeadSelectionRow();
+ }
+
+ public int getMaxSelectionRow()
+ {
+ return selectionModel.getMaxSelectionRow();
+ }
+
+ public int getMinSelectionRow()
+ {
+ return selectionModel.getMinSelectionRow();
+ }
+
+ public int getSelectionCount()
+ {
+ return selectionModel.getSelectionCount();
+ }
+
+ public TreePath getSelectionPath()
+ {
+ return selectionModel.getSelectionPath();
+ }
+
+ public TreePath[] getSelectionPaths()
+ {
+ return selectionModel.getSelectionPaths();
+ }
+
+ public int[] getSelectionRows()
+ {
+ return selectionModel.getSelectionRows();
+ }
+
+ public boolean isPathSelected(TreePath path)
+ {
+ return selectionModel.isPathSelected(path);
+ }
+
+ public boolean isRowSelected(int row)
+ {
+ return selectionModel.isPathSelected(getPathForRow(row));
+ }
+
+ public boolean isSelectionEmpty()
+ {
+ return selectionModel.isSelectionEmpty();
+ }
+
+ /**
+ * Return the value of the <code>dragEnabled</code> property.
+ *
+ * @return the value
+ *
+ * @since 1.4
+ */
+ public boolean getDragEnabled()
+ {
+ return dragEnabled;
+ }
+
+ /**
+ * Set the <code>dragEnabled</code> property.
+ *
+ * @param enabled new value
+ *
+ * @since 1.4
+ */
+ public void setDragEnabled(boolean enabled)
+ {
+
+ dragEnabled = enabled;
+ }
+
+ public int getRowCount()
+ {
+ TreeUI ui = getUI();
+
+ if (ui != null)
+ return ui.getRowCount(this);
+
+ return 0;
+ }
+
+ public void collapsePath(TreePath path)
+ {
+ setExpandedState(path, false);
+ }
+
+ public void collapseRow(int row)
+ {
+ if (row < 0 || row >= getRowCount())
+ return;
+
+ TreePath path = getPathForRow(row);
+
+ if (path != null)
+ collapsePath(path);
+ }
+
+ public void expandPath(TreePath path)
+ {
+ // Don't expand if last path component is a leaf node.
+ if ((path == null) || (treeModel.isLeaf(path.getLastPathComponent())))
+ return;
+
+ setExpandedState(path, true);
+ }
+
+ public void expandRow(int row)
+ {
+ if (row < 0 || row >= getRowCount())
+ return;
+
+ TreePath path = getPathForRow(row);
+
+ if (path != null)
+ expandPath(path);
+ }
+
+ public boolean isCollapsed(TreePath path)
+ {
+ return !isExpanded(path);
+ }
+
+ public boolean isCollapsed(int row)
+ {
+ if (row < 0 || row >= getRowCount())
+ return false;
+
+ TreePath path = getPathForRow(row);
+
+ if (path != null)
+ return isCollapsed(path);
+
+ return false;
+ }
+
+ public boolean isExpanded(TreePath path)
+ {
+ if (path == null)
+ return false;
+
+ Object state = nodeStates.get(path);
+
+ if ((state == null) || (state != EXPANDED))
+ return false;
+
+ TreePath parent = path.getParentPath();
+
+ if (parent != null)
+ return isExpanded(parent);
+
+ return true;
+ }
+
+ public boolean isExpanded(int row)
+ {
+ if (row < 0 || row >= getRowCount())
+ return false;
+
+ TreePath path = getPathForRow(row);
+
+ if (path != null)
+ return isExpanded(path);
+
+ return false;
+ }
+
+ /**
+ * @since 1.3
+ */
+ public boolean getExpandsSelectedPaths()
+ {
+ return expandsSelectedPaths;
+ }
+
+ /**
+ * @since 1.3
+ */
+ public void setExpandsSelectedPaths(boolean flag)
+ {
+ if (expandsSelectedPaths == flag)
+ return;
+
+ boolean oldValue = expandsSelectedPaths;
+ expandsSelectedPaths = flag;
+ firePropertyChange(EXPANDS_SELECTED_PATHS_PROPERTY, oldValue, flag);
+ }
+
+ public Rectangle getPathBounds(TreePath path)
+ {
+ TreeUI ui = getUI();
+
+ if (ui == null)
+ return null;
+
+ return ui.getPathBounds(this, path);
+ }
+
+ public Rectangle getRowBounds(int row)
+ {
+ TreePath path = getPathForRow(row);
+
+ if (path != null)
+ return getPathBounds(path);
+
+ return null;
+ }
+
+ public boolean isEditing()
+ {
+ TreeUI ui = getUI();
+
+ if (ui != null)
+ return ui.isEditing(this);
+
+ return false;
+ }
+
+ public boolean stopEditing()
+ {
+ TreeUI ui = getUI();
+
+ if (ui != null)
+ return ui.stopEditing(this);
+
+ return false;
+ }
+
+ public void cancelEditing()
+ {
+ TreeUI ui = getUI();
+
+ if (ui != null)
+ ui.cancelEditing(this);
+ }
+
+ public void startEditingAtPath(TreePath path)
+ {
+ TreeUI ui = getUI();
+
+ if (ui != null)
+ ui.startEditingAtPath(this, path);
+ }
+
+ public TreePath getEditingPath()
+ {
+ TreeUI ui = getUI();
+
+ if (ui != null)
+ return ui.getEditingPath(this);
+
+ return null;
+ }
+
+ public TreePath getPathForLocation(int x, int y)
+ {
+ TreePath path = getClosestPathForLocation(x, y);
+
+ if (path != null)
+ {
+ Rectangle rect = getPathBounds(path);
+
+ if ((rect != null) && rect.contains(x, y))
+ return path;
+ }
+
+ return null;
+ }
+
+ public int getRowForLocation(int x, int y)
+ {
+ TreePath path = getPathForLocation(x, y);
+
+ if (path != null)
+ return getRowForPath(path);
- if (path != null)
- return getPathBounds(path);
+ return -1;
+ }
- return null;
- }
+ public TreePath getClosestPathForLocation(int x, int y)
+ {
+ TreeUI ui = getUI();
- public boolean isEditing()
- {
- TreeUI ui = getUI();
+ if (ui != null)
+ return ui.getClosestPathForLocation(this, x, y);
- if (ui != null)
- return ui.isEditing(this);
+ return null;
+ }
- return false;
- }
+ public int getClosestRowForLocation(int x, int y)
+ {
+ TreePath path = getClosestPathForLocation(x, y);
- public boolean stopEditing()
- {
- TreeUI ui = getUI();
+ if (path != null)
+ return getRowForPath(path);
- if (ui != null)
- return ui.stopEditing(this);
+ return -1;
+ }
- return false;
- }
+ public Object getLastSelectedPathComponent()
+ {
+ TreePath path = getSelectionPath();
- public void cancelEditing()
- {
- TreeUI ui = getUI();
+ if (path != null)
+ return path.getLastPathComponent();
- if (ui != null)
- ui.cancelEditing(this);
- }
+ return null;
+ }
- public void startEditingAtPath(TreePath path)
- {
- TreeUI ui = getUI();
+ private void checkExpandParents(TreePath path) throws ExpandVetoException
+ {
- if (ui != null)
- ui.startEditingAtPath(this, path);
- }
-
- public TreePath getEditingPath()
- {
- TreeUI ui = getUI();
-
- if (ui != null)
- return ui.getEditingPath(this);
-
- return null;
- }
-
- public TreePath getPathForLocation(int x, int y)
- {
- TreePath path = getClosestPathForLocation(x, y);
-
- if (path != null)
- {
- Rectangle rect = getPathBounds(path);
-
- if ((rect != null) && rect.contains(x, y))
- return path;
- }
-
- return null;
- }
-
- public int getRowForLocation(int x, int y)
- {
- TreePath path = getPathForLocation(x, y);
-
- if (path != null)
- return getRowForPath(path);
-
- return -1;
- }
-
- public TreePath getClosestPathForLocation(int x, int y)
- {
- TreeUI ui = getUI();
+ TreePath parent = path.getParentPath();
- if (ui != null)
- return ui.getClosestPathForLocation(this, x, y);
-
- return null;
- }
-
- public int getClosestRowForLocation(int x, int y)
- {
- TreePath path = getClosestPathForLocation(x, y);
+ if (parent != null)
+ checkExpandParents(parent);
- if (path != null)
- return getRowForPath(path);
+ fireTreeWillExpand(path);
+ }
- return -1;
- }
+ private void doExpandParents(TreePath path, boolean state)
+ {
+ TreePath parent = path.getParentPath();
+
+ if (isExpanded(parent))
+ {
+ nodeStates.put(path, state ? EXPANDED : COLLAPSED);
+ return;
+ }
- public Object getLastSelectedPathComponent()
- {
- TreePath path = getSelectionPath();
-
- if (path != null)
- return path.getLastPathComponent();
-
- return null;
- }
-
- private void checkExpandParents(TreePath path)
- throws ExpandVetoException
- {
- TreePath parent = path.getParentPath();
-
- if (parent != null)
- checkExpandParents(parent);
-
- fireTreeWillExpand(path);
- }
-
- private void doExpandParents(TreePath path, boolean state)
- {
- TreePath parent = path.getParentPath();
-
- if (isExpanded(parent))
- return;
-
- if (parent != null)
- doExpandParents(parent, false);
-
- nodeStates.put(path, state ? EXPANDED : COLLAPSED);
- }
-
- protected void setExpandedState(TreePath path, boolean state)
- {
- if (path == null)
- return;
-
- TreePath parent = path.getParentPath();
-
- try
- {
- while (parent != null)
- checkExpandParents(parent);
- }
- catch (ExpandVetoException e)
- {
- // Expansion vetoed.
- return;
- }
-
- doExpandParents(path, state);
- }
-
- protected void clearToggledPaths()
- {
- nodeStates.clear();
- }
-
- protected Enumeration getDescendantToggledPaths(TreePath parent)
- {
- if (parent == null)
- return null;
-
- Enumeration nodes = nodeStates.keys();
- Vector result = new Vector();
-
- while (nodes.hasMoreElements())
- {
- TreePath path = (TreePath) nodes.nextElement();
-
- if (path.isDescendant(parent))
- result.addElement(path);
- }
-
- return result.elements();
- }
-
- public boolean hasBeenExpanded(TreePath path)
- {
- if (path == null)
- return false;
-
- return nodeStates.get(path) != null;
- }
-
- public boolean isVisible(TreePath path)
- {
- if (path == null)
- return false;
-
- TreePath parent = path.getParentPath();
-
- if (parent == null)
- return true; // Is root node.
-
- return isExpanded(parent);
- }
-
- public void makeVisible(TreePath path)
- {
- if (path == null)
- return;
-
- expandPath(path.getParentPath());
- }
-
- public boolean isPathEditable(TreePath path)
- {
- return isEditable();
- }
-
- /**
- * Creates and returns an instance of {@link TreeModelHandler}.
- *
- * @returns an instance of {@link TreeModelHandler}
- */
- protected TreeModelListener createTreeModelListener()
- {
- return new TreeModelHandler();
- }
-
- /**
- * Returns a sample TreeModel that can be used in a JTree. This can
- * be used in Bean- or GUI-Builders to show something interesting.
- *
- * @return a sample TreeModel that can be used in a JTree
- */
- protected static TreeModel getDefaultTreeModel()
- {
- DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root node");
- DefaultMutableTreeNode child1 = new DefaultMutableTreeNode("Child node 1");
- DefaultMutableTreeNode child11 =
- new DefaultMutableTreeNode("Child node 1.1");
- DefaultMutableTreeNode child12 =
- new DefaultMutableTreeNode("Child node 1.2");
- DefaultMutableTreeNode child13 =
- new DefaultMutableTreeNode("Child node 1.3");
- DefaultMutableTreeNode child2 = new DefaultMutableTreeNode("Child node 2");
- DefaultMutableTreeNode child21 =
- new DefaultMutableTreeNode("Child node 2.1");
- DefaultMutableTreeNode child22 =
- new DefaultMutableTreeNode("Child node 2.2");
- DefaultMutableTreeNode child23 =
- new DefaultMutableTreeNode("Child node 2.3");
- DefaultMutableTreeNode child24 =
- new DefaultMutableTreeNode("Child node 2.4");
-
- DefaultMutableTreeNode child3 = new DefaultMutableTreeNode("Child node 3");
- root.add(child1);
- root.add(child2);
- root.add(child3);
- child1.add(child11);
- child1.add(child12);
- child1.add(child13);
- child2.add(child21);
- child2.add(child22);
- child2.add(child23);
- child2.add(child24);
- return new DefaultTreeModel(root);
- }
-
- /**
- * Converts the specified value to a String. This is used by the
- * renderers of this JTree and its nodes.
- *
- * This implementation simply returns <code>value.toString()</code> and
- * ignores all other parameters.
- * Subclass this method to control the conversion.
- *
- * @param value the value that is converted to a String
- * @param selected indicates if that value is selected or not
- * @param expanded indicates if that value is expanded or not
- * @param leaf indicates if that value is a leaf node or not
- * @param row the row of the node
- * @param hasFocus indicates if that node has focus or not
- */
- public String convertValueToText(Object value, boolean selected,
- boolean expanded, boolean leaf, int row,
- boolean hasFocus)
- {
- return value.toString();
- }
-
- /**
- * A String representation of this JTree. This is intended to be used
- * for debugging. The returned string may be empty but may not be
- * <code>null</code>.
- *
- * @return a String representation of this JTree
- */
- public String paramString()
- {
- // TODO: this is completely legal, but it would possibly be nice
- // to return some more content, like the tree structure, some properties
- // etc ...
- return "";
- }
-
- /**
- * Returns all TreePath objects which are a descendants of
- * the given path and are exapanded at the moment of the
- * execution of this method. If the state of any node
- * is beeing toggled while this method is executing this
- * change may be left unaccounted.
- *
- * @param path The parent of this request
- * @return An Enumeration containing TreePath objects
- */
- public Enumeration getExpandedDescendants(TreePath path)
- {
- Enumeration paths = nodeStates.keys();
- Vector relevantPaths = new Vector();
- while(paths.hasMoreElements())
- {
- TreePath nextPath = (TreePath) paths.nextElement();
- if(nodeStates.get(nextPath) == EXPANDED &&
- path.isDescendant(nextPath))
- {
- relevantPaths.add(nextPath);
- }
- }
- return relevantPaths.elements();
- }
-
- /**
- * Returns the next table element (beginning from the row
- * <code>startingRow</code>
- * that starts with <code>prefix</code>. Searching is done in the direction
- * specified by <code>bias</code>.
- *
- * @param prefix the prefix to search for in the cell values
- * @param startingRow the index of the row where to start searching from
- * @param bias the search direction, either {@link Position.Bias.Forward}
- * or {@link Position.Bias.Backward}
- *
- * @return the path to the found element or -1 if no such element has
- * been found
- *
- * @throws IllegalArgumentException if prefix is <code>null</code> or
- * startingRow is not valid
- *
- * @since 1.4
- */
- public TreePath getNextMatch(String prefix, int startingRow,
- Position.Bias bias)
- {
- if (prefix == null)
- throw new IllegalArgumentException("The argument 'prefix' must not be"
- + " null.");
- if (startingRow < 0)
- throw new IllegalArgumentException("The argument 'startingRow' must not"
- + " be less than zero.");
-
- int size = getRowCount();
- if (startingRow > size)
- throw new IllegalArgumentException("The argument 'startingRow' must not"
- + " be greater than the number of"
- + " elements in the TreeModel.");
-
- TreePath foundPath = null;
- if (bias == Position.Bias.Forward)
- {
- for (int i = startingRow; i < size; i++)
- {
- TreePath path = getPathForRow(i);
- Object o = path.getLastPathComponent();
- // FIXME: in the following call to convertValueToText the
- // last argument (hasFocus) should be done right.
- String item = convertValueToText(o, isRowSelected(i),
- isExpanded(i),
- treeModel.isLeaf(o), i, false);
- if (item.startsWith(prefix))
- {
- foundPath = path;
- break;
- }
- }
- }
- else
- {
- for (int i = startingRow; i >= 0; i--)
- {
- TreePath path = getPathForRow(i);
- Object o = path.getLastPathComponent();
- // FIXME: in the following call to convertValueToText the
- // last argument (hasFocus) should be done right.
- String item = convertValueToText(o, isRowSelected(i),
- isExpanded(i),
- treeModel.isLeaf(o), i, false);
- if (item.startsWith(prefix))
- {
- foundPath = path;
- break;
- }
- }
- }
- return foundPath;
- }
+ if (parent != null)
+ doExpandParents(parent, false);
+
+ nodeStates.put(path, state ? EXPANDED : COLLAPSED);
+ }
+
+ protected void setExpandedState(TreePath path, boolean state)
+ {
+ if (path == null)
+ return;
+
+ TreePath parent = path.getParentPath();
+
+ try
+ {
+ if (parent != null)
+ checkExpandParents(parent);
+ }
+ catch (ExpandVetoException e)
+ {
+ // Expansion vetoed.
+ return;
+ }
+
+ doExpandParents(path, state);
+ }
+
+ protected void clearToggledPaths()
+ {
+ nodeStates.clear();
+ }
+
+ protected Enumeration getDescendantToggledPaths(TreePath parent)
+ {
+ if (parent == null)
+ return null;
+
+ Enumeration nodes = nodeStates.keys();
+ Vector result = new Vector();
+
+ while (nodes.hasMoreElements())
+ {
+ TreePath path = (TreePath) nodes.nextElement();
+
+ if (path.isDescendant(parent))
+ result.addElement(path);
+ }
+
+ return result.elements();
+ }
+
+ public boolean hasBeenExpanded(TreePath path)
+ {
+ if (path == null)
+ return false;
+
+ return nodeStates.get(path) != null;
+ }
+
+ public boolean isVisible(TreePath path)
+ {
+ if (path == null)
+ return false;
+
+ TreePath parent = path.getParentPath();
+
+ if (parent == null)
+ return true; // Is root node.
+
+ return isExpanded(parent);
+ }
+
+ public void makeVisible(TreePath path)
+ {
+ if (path == null)
+ return;
+
+ expandPath(path.getParentPath());
+ }
+
+ public boolean isPathEditable(TreePath path)
+ {
+ return isEditable();
+ }
+
+ /**
+ * Creates and returns an instance of {@link TreeModelHandler}.
+ *
+ * @returns an instance of {@link TreeModelHandler}
+ */
+ protected TreeModelListener createTreeModelListener()
+ {
+ return new TreeModelHandler();
+ }
+
+ /**
+ * Returns a sample TreeModel that can be used in a JTree. This can be used
+ * in Bean- or GUI-Builders to show something interesting.
+ *
+ * @return a sample TreeModel that can be used in a JTree
+ */
+ protected static TreeModel getDefaultTreeModel()
+ {
+ DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root node");
+ DefaultMutableTreeNode child1 = new DefaultMutableTreeNode(
+ "Child node 1");
+ DefaultMutableTreeNode child11 = new DefaultMutableTreeNode(
+ "Child node 1.1");
+ DefaultMutableTreeNode child12 = new DefaultMutableTreeNode(
+ "Child node 1.2");
+ DefaultMutableTreeNode child13 = new DefaultMutableTreeNode(
+ "Child node 1.3");
+ DefaultMutableTreeNode child2 = new DefaultMutableTreeNode(
+ "Child node 2");
+ DefaultMutableTreeNode child21 = new DefaultMutableTreeNode(
+ "Child node 2.1");
+ DefaultMutableTreeNode child22 = new DefaultMutableTreeNode(
+ "Child node 2.2");
+ DefaultMutableTreeNode child23 = new DefaultMutableTreeNode(
+ "Child node 2.3");
+ DefaultMutableTreeNode child24 = new DefaultMutableTreeNode(
+ "Child node 2.4");
+
+ DefaultMutableTreeNode child3 = new DefaultMutableTreeNode(
+ "Child node 3");
+ root.add(child1);
+ root.add(child2);
+ root.add(child3);
+ child1.add(child11);
+ child1.add(child12);
+ child1.add(child13);
+ child2.add(child21);
+ child2.add(child22);
+ child2.add(child23);
+ child2.add(child24);
+ return new DefaultTreeModel(root);
+ }
+
+ /**
+ * Converts the specified value to a String. This is used by the renderers
+ * of this JTree and its nodes.
+ *
+ * This implementation simply returns <code>value.toString()</code> and
+ * ignores all other parameters. Subclass this method to control the
+ * conversion.
+ *
+ * @param value the value that is converted to a String
+ * @param selected indicates if that value is selected or not
+ * @param expanded indicates if that value is expanded or not
+ * @param leaf indicates if that value is a leaf node or not
+ * @param row the row of the node
+ * @param hasFocus indicates if that node has focus or not
+ */
+ public String convertValueToText(Object value, boolean selected,
+ boolean expanded, boolean leaf, int row, boolean hasFocus)
+ {
+ return value.toString();
+ }
+
+ /**
+ * A String representation of this JTree. This is intended to be used for
+ * debugging. The returned string may be empty but may not be
+ * <code>null</code>.
+ *
+ * @return a String representation of this JTree
+ */
+ public String paramString()
+ {
+ // TODO: this is completely legal, but it would possibly be nice
+ // to return some more content, like the tree structure, some properties
+ // etc ...
+ return "";
+ }
+
+ /**
+ * Returns all TreePath objects which are a descendants of the given path
+ * and are exapanded at the moment of the execution of this method. If the
+ * state of any node is beeing toggled while this method is executing this
+ * change may be left unaccounted.
+ *
+ * @param path The parent of this request
+ * @return An Enumeration containing TreePath objects
+ */
+ public Enumeration getExpandedDescendants(TreePath path)
+ {
+ Enumeration paths = nodeStates.keys();
+ Vector relevantPaths = new Vector();
+ while (paths.hasMoreElements())
+ {
+ TreePath nextPath = (TreePath) paths.nextElement();
+ if (nodeStates.get(nextPath) == EXPANDED
+ && path.isDescendant(nextPath))
+ {
+ relevantPaths.add(nextPath);
+ }
+ }
+ return relevantPaths.elements();
+ }
+
+ /**
+ * Returns the next table element (beginning from the row
+ * <code>startingRow</code> that starts with <code>prefix</code>.
+ * Searching is done in the direction specified by <code>bias</code>.
+ *
+ * @param prefix the prefix to search for in the cell values
+ * @param startingRow the index of the row where to start searching from
+ * @param bias the search direction, either {@link Position.Bias#Forward} or
+ * {@link Position.Bias#Backward}
+ *
+ * @return the path to the found element or -1 if no such element has been
+ * found
+ *
+ * @throws IllegalArgumentException if prefix is <code>null</code> or
+ * startingRow is not valid
+ *
+ * @since 1.4
+ */
+ public TreePath getNextMatch(String prefix, int startingRow,
+ Position.Bias bias)
+ {
+ if (prefix == null)
+ throw new IllegalArgumentException(
+ "The argument 'prefix' must not be" + " null.");
+ if (startingRow < 0)
+ throw new IllegalArgumentException(
+ "The argument 'startingRow' must not"
+ + " be less than zero.");
+
+ int size = getRowCount();
+ if (startingRow > size)
+ throw new IllegalArgumentException(
+ "The argument 'startingRow' must not"
+ + " be greater than the number of"
+ + " elements in the TreeModel.");
+
+ TreePath foundPath = null;
+ if (bias == Position.Bias.Forward)
+ {
+ for (int i = startingRow; i < size; i++)
+ {
+ TreePath path = getPathForRow(i);
+ Object o = path.getLastPathComponent();
+ // FIXME: in the following call to convertValueToText the
+ // last argument (hasFocus) should be done right.
+ String item = convertValueToText(o, isRowSelected(i),
+ isExpanded(i), treeModel.isLeaf(o), i, false);
+ if (item.startsWith(prefix))
+ {
+ foundPath = path;
+ break;
+ }
+ }
+ } else
+ {
+ for (int i = startingRow; i >= 0; i--)
+ {
+ TreePath path = getPathForRow(i);
+ Object o = path.getLastPathComponent();
+ // FIXME: in the following call to convertValueToText the
+ // last argument (hasFocus) should be done right.
+ String item = convertValueToText(o, isRowSelected(i),
+ isExpanded(i), treeModel.isLeaf(o), i, false);
+ if (item.startsWith(prefix))
+ {
+ foundPath = path;
+ break;
+ }
+ }
+ }
+ return foundPath;
+ }
+
+ /**
+ * Removes any paths in the current set of selected paths that are
+ * descendants of <code>path</code>. If <code>includePath</code> is set
+ * to <code>true</code> and <code>path</code> itself is selected, then
+ * it will be removed too.
+ *
+ * @param path the path from which selected descendants are to be removed
+ * @param includeSelected if <code>true</code> then <code>path</code> itself
+ * will also be remove if it's selected
+ *
+ * @return <code>true</code> if something has been removed,
+ * <code>false</code> otherwise
+ *
+ * @since 1.3
+ */
+ protected boolean removeDescendantSelectedPaths(TreePath path,
+ boolean includeSelected)
+ {
+ boolean removedSomething = false;
+ TreePath[] selected = getSelectionPaths();
+ for (int index = 0; index < selected.length; index++)
+ {
+ if ((selected[index] == path && includeSelected)
+ || (selected[index].isDescendant(path)))
+ {
+ removeSelectionPath(selected[index]);
+ removedSomething = true;
+ }
+ }
+ return removedSomething;
+ }
}
diff --git a/javax/swing/JViewport.java b/javax/swing/JViewport.java
index d097081fb..f5eee8a19 100644
--- a/javax/swing/JViewport.java
+++ b/javax/swing/JViewport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -89,7 +89,7 @@ import javax.swing.plaf.ViewportUI;
*
* <p>But in terms of drawing its child, the viewport thinks of itself as
* covering a particular position <em>of the view's coordinate space</em>.
- * For example, the {@link javax.JViewPort.getViewPosition} method returns
+ * For example, the {@link #getViewPosition} method returns
* the position <code>(VX,VY)</code> shown above, which is an position in
* "view space", even though this is <em>implemented</em> by positioning
* the underlying child at position <code>(-VX,-VY)</code></p>
@@ -487,4 +487,47 @@ public class JViewport extends JComponent
{
return new ViewportLayout();
}
+
+ /**
+ * Scrolls the view so that contentRect becomes visible.
+ *
+ * @param contentRect the rectangle to make visible within the view
+ */
+ public void scrollRectToVisible(Rectangle contentRect)
+ {
+ Point pos = getViewPosition();
+ Rectangle viewBounds = getView().getBounds();
+ Rectangle portBounds = getBounds();
+
+ // FIXME: should validate the view if it is not valid, however
+ // this may cause excessive validation when the containment
+ // hierarchy is being created.
+
+ // if contentRect is larger than the portBounds, center the view
+ if (contentRect.height > portBounds.height ||
+ contentRect.width > portBounds.width)
+ {
+ setViewPosition(new Point(contentRect.x, contentRect.y));
+ return;
+ }
+
+ // Y-DIRECTION
+ if (contentRect.y + viewBounds.y < portBounds.y)
+ setViewPosition(new Point(pos.x, contentRect.y));
+ else if (contentRect.y + viewBounds.y + contentRect.height >
+ (portBounds.y+portBounds.height))
+ setViewPosition (new Point(pos.x, contentRect.y -
+ (portBounds.height - contentRect.height) -
+ portBounds.y));
+
+ // X-DIRECTION
+ pos = getViewPosition();
+ if (contentRect.x + viewBounds.x < portBounds.x)
+ setViewPosition(new Point(contentRect.x, pos.y));
+ else if (contentRect.x + viewBounds.x + contentRect.width >
+ (portBounds.x + portBounds.height))
+ setViewPosition (new Point(contentRect.x -
+ (portBounds.width - contentRect.width)
+ - portBounds.x, pos.y));
+ }
}
diff --git a/javax/swing/JWindow.java b/javax/swing/JWindow.java
index 94efa3aa7..449900370 100644
--- a/javax/swing/JWindow.java
+++ b/javax/swing/JWindow.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -63,9 +63,21 @@ public class JWindow extends Window implements Accessible, RootPaneContainer
private static final long serialVersionUID = 5420698392125238833L;
protected JRootPane rootPane;
- protected boolean rootPaneCheckingEnabled;
+
+ /**
+ * @specnote rootPaneCheckingEnabled is false to comply with J2SE 5.0
+ */
+ protected boolean rootPaneCheckingEnabled = false;
+
protected AccessibleContext accessibleContext;
+ /**
+ * Tells us if we're in the initialization stage.
+ * If so, adds go to top-level Container, otherwise they go
+ * to the content pane for this container.
+ */
+ private boolean initStageDone = false;
+
public JWindow()
{
super(SwingUtilities.getOwnerFrame());
@@ -100,6 +112,8 @@ public class JWindow extends Window implements Accessible, RootPaneContainer
{
super.setLayout(new BorderLayout(1, 1));
getRootPane(); // will do set/create
+ // Now we're done init stage, adds and layouts go to content pane.
+ initStageDone = true;
}
public Dimension getPreferredSize()
@@ -109,7 +123,17 @@ public class JWindow extends Window implements Accessible, RootPaneContainer
public void setLayout(LayoutManager manager)
{
- super.setLayout(manager);
+ // Check if we're in initialization stage. If so, call super.setLayout
+ // otherwise, valid calls go to the content pane.
+ if (initStageDone)
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Cannot set layout. Use getContentPane().setLayout()"
+ + " instead.");
+ getContentPane().setLayout(manager);
+ }
+ else
+ super.setLayout(manager);
}
public void setLayeredPane(JLayeredPane layeredPane)
@@ -163,14 +187,30 @@ public class JWindow extends Window implements Accessible, RootPaneContainer
getRootPane().setGlassPane(glassPane);
}
+
protected void addImpl(Component comp, Object constraints, int index)
{
- super.addImpl(comp, constraints, index);
+ // If we're adding in the initialization stage use super.add.
+ // otherwise pass the add onto the content pane.
+ if (!initStageDone)
+ super.addImpl(comp, constraints, index);
+ else
+ {
+ if (isRootPaneCheckingEnabled())
+ throw new Error("Do not use add() on JWindow directly. Use "
+ + "getContentPane().add() instead");
+ getContentPane().add(comp, constraints, index);
+ }
}
public void remove(Component comp)
{
- getContentPane().remove(comp);
+ // If we're removing the root pane, use super.remove. Otherwise
+ // pass it on to the content pane instead.
+ if (comp == rootPane)
+ super.remove(rootPane);
+ else
+ getContentPane().remove(comp);
}
protected boolean isRootPaneCheckingEnabled()
diff --git a/javax/swing/KeyStroke.java b/javax/swing/KeyStroke.java
index 239c8dd1f..12a280c21 100644
--- a/javax/swing/KeyStroke.java
+++ b/javax/swing/KeyStroke.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/LayoutFocusTraversalPolicy.java b/javax/swing/LayoutFocusTraversalPolicy.java
index e61f724eb..2d135157d 100644
--- a/javax/swing/LayoutFocusTraversalPolicy.java
+++ b/javax/swing/LayoutFocusTraversalPolicy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/ListCellRenderer.java b/javax/swing/ListCellRenderer.java
index 34c250cb9..6ce115ea7 100644
--- a/javax/swing/ListCellRenderer.java
+++ b/javax/swing/ListCellRenderer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,9 @@ package javax.swing;
import java.awt.Component;
+/**
+ * Renders the cells of a {@link JList}.
+ */
public interface ListCellRenderer
{
Component getListCellRendererComponent(JList list,
diff --git a/javax/swing/ListModel.java b/javax/swing/ListModel.java
index 405df0e65..736627e85 100644
--- a/javax/swing/ListModel.java
+++ b/javax/swing/ListModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,8 +40,7 @@ package javax.swing;
import javax.swing.event.ListDataListener;
/**
- * This is an interface to general list-like data, typically used as the
- * model object of a {@link JList} component.
+ * The data model that is typically used in {@link JList}.
*
* @author Graydon Hoare (graydon@redhat.com)
*/
diff --git a/javax/swing/ListSelectionModel.java b/javax/swing/ListSelectionModel.java
index c2e9648ac..f4680d737 100644
--- a/javax/swing/ListSelectionModel.java
+++ b/javax/swing/ListSelectionModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,6 +40,10 @@ package javax.swing;
import javax.swing.event.ListSelectionListener;
+/**
+ * The model that is used in {@link JList} to define the selected/not-selected
+ * cells of that list.
+ */
public interface ListSelectionModel
{
int SINGLE_SELECTION = 0;
diff --git a/javax/swing/LookAndFeel.java b/javax/swing/LookAndFeel.java
index a2508386d..885874271 100644
--- a/javax/swing/LookAndFeel.java
+++ b/javax/swing/LookAndFeel.java
@@ -1,5 +1,5 @@
/* LookAndFeel.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,16 +56,32 @@ public abstract class LookAndFeel
return null;
}
+ /**
+ * Returns a description of the look and feel.
+ *
+ * @return A description of the look and feel.
+ */
public abstract String getDescription();
- public static Object getDesktopPropertyValue(String systemPropertyName, Object fallbackValue)
+ public static Object getDesktopPropertyValue(String systemPropertyName,
+ Object fallbackValue)
{
Object value = Toolkit.getDefaultToolkit().getDesktopProperty(systemPropertyName);
return value != null ? value : fallbackValue;
}
+ /**
+ * Returns an identifier for the look and feel.
+ *
+ * @return An identifier for the look and feel.
+ */
public abstract String getID();
+ /**
+ * Returns the name for the look and feel.
+ *
+ * @return The name for the look and feel.
+ */
public abstract String getName();
/**
@@ -118,8 +134,25 @@ public abstract class LookAndFeel
{
}
+ /**
+ * Returns <code>true</code> if the look and feel is the "native" look and
+ * feel for the current platform, and <code>false</code> otherwise.
+ *
+ * @return A flag indicating whether or not this is the native look and feel
+ * for the current platform.
+ */
public abstract boolean isNativeLookAndFeel();
+ /**
+ * Returns <code>true</code> if the look and feel is supported on the
+ * current operating system, and <code>false</code> otherwise. This
+ * mechanism is provided so that it is possible to prevent a look and feel
+ * from being used on some operating systems (usually for legal, not
+ * technical, reasons).
+ *
+ * @return A flag indicating whether or not the look and feel is supported
+ * on the current platform.
+ */
public abstract boolean isSupportedLookAndFeel();
/**
diff --git a/javax/swing/MenuElement.java b/javax/swing/MenuElement.java
index 60ae1afa6..46eb8c2a5 100644
--- a/javax/swing/MenuElement.java
+++ b/javax/swing/MenuElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,9 +42,10 @@ import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
/**
- * MenuElement
- * @author Andrew Selkirk
- * @version 1.0
+ * Defines the methods that any menu element in a {@link JMenu} must
+ * implement.
+ *
+ * @author Andrew Selkirk
*/
public interface MenuElement {
diff --git a/javax/swing/MenuSelectionManager.java b/javax/swing/MenuSelectionManager.java
index f01d8b837..32d56b958 100644
--- a/javax/swing/MenuSelectionManager.java
+++ b/javax/swing/MenuSelectionManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -211,17 +211,18 @@ public class MenuSelectionManager
public boolean isComponentPartOfCurrentMenu(Component c)
{
MenuElement[] subElements;
- for (int i = 0; i < selectedPath.size(); i++)
+ for (int i = 0; i < selectedPath.size(); i++)
{
- subElements = ((MenuElement) selectedPath.get(i)).getSubElements();
- for (int j = 0; j < subElements.length; j++)
- {
- if ((subElements[j].getComponent()).equals(c))
- return true;
- }
+ subElements = ((MenuElement) selectedPath.get(i)).getSubElements();
+ for (int j = 0; j < subElements.length; j++)
+ {
+ MenuElement me = subElements[j];
+ if (me != null && (me.getComponent()).equals(c))
+ return true;
+ }
}
- return false;
+ return false;
}
/**
diff --git a/javax/swing/MutableComboBoxModel.java b/javax/swing/MutableComboBoxModel.java
index 2c0f4149d..ee79dac03 100644
--- a/javax/swing/MutableComboBoxModel.java
+++ b/javax/swing/MutableComboBoxModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,14 +38,13 @@ exception statement from your version. */
package javax.swing;
/**
- * MutableComboBoxModel is interface for data model that keeps track of the
+ * A data model used in {@link JComboBox}es that keeps track of the
* components data and provides methods to insert and remove elements from
- * it. The Classes implementing this interface should fire appropriate
- * events indicating the undergoing change in the data model.
+ * it. The classes implementing this interface should
+ * fire appropriate events indicating the undergoing change in the data model.
*
* @author Andrew Selkirk
* @author Olga Rodimina
- * @version 1.0
*/
public interface MutableComboBoxModel extends ComboBoxModel
{
diff --git a/javax/swing/OverlayLayout.java b/javax/swing/OverlayLayout.java
index 706ffe2a2..e8aef98a5 100644
--- a/javax/swing/OverlayLayout.java
+++ b/javax/swing/OverlayLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/Popup.java b/javax/swing/Popup.java
index 1b8d08e33..69e1f5168 100644
--- a/javax/swing/Popup.java
+++ b/javax/swing/Popup.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/PopupFactory.java b/javax/swing/PopupFactory.java
index 571de22d0..29cf86d55 100644
--- a/javax/swing/PopupFactory.java
+++ b/javax/swing/PopupFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/ProgressMonitor.java b/javax/swing/ProgressMonitor.java
index aec483c3e..844258f1b 100644
--- a/javax/swing/ProgressMonitor.java
+++ b/javax/swing/ProgressMonitor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/ProgressMonitorInputStream.java b/javax/swing/ProgressMonitorInputStream.java
index 56ae3bcf7..2022a1c24 100644
--- a/javax/swing/ProgressMonitorInputStream.java
+++ b/javax/swing/ProgressMonitorInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/Renderer.java b/javax/swing/Renderer.java
index 1f1a30052..c803e38fc 100644
--- a/javax/swing/Renderer.java
+++ b/javax/swing/Renderer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,9 +40,14 @@ package javax.swing;
import java.awt.Component;
/**
- * Renderer
- * @author Andrew Selkirk
- * @version 1.0
+ * This interface is not used and exists only for compatibility.
+ * It probably has been replaced by {@link ListCellRenderer}, {@link
+ * javax.swing.table.TableCellRenderer} and {@link
+ * javax.swing.tree.TreeCellRenderer}.
+ *
+ * @specnote This interface is not used and exists only for compatibility.
+ *
+ * @author Andrew Selkirk
*/
public interface Renderer {
diff --git a/javax/swing/RepaintManager.java b/javax/swing/RepaintManager.java
index b6611bfdb..698dbe8e8 100644
--- a/javax/swing/RepaintManager.java
+++ b/javax/swing/RepaintManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,6 +42,7 @@ import java.awt.Component;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Rectangle;
+import java.awt.image.VolatileImage;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
@@ -72,7 +73,7 @@ public class RepaintManager
* typically only one of these objects active at any time. When the
* {@link RepaintManager} is told to queue a repaint, it checks to see if
* a {@link RepaintWorker} is "live" in the system event queue, and if
- * not it inserts one using {@link SwingUtilities.invokeLater}.</p>
+ * not it inserts one using {@link SwingUtilities#invokeLater}.</p>
*
* <p>When the {@link RepaintWorker} comes to the head of the system
* event queue, its {@link RepaintWorker#run} method is executed by the
@@ -235,7 +236,7 @@ public class RepaintManager
*
* @param manager The new value of the shared instance
*
- * @see #currentManager
+ * @see #currentManager(JComponent)
*/
public static void setCurrentManager(RepaintManager manager)
{
@@ -501,7 +502,7 @@ public class RepaintManager
*
* @since 1.4
*
- * @see {@link VolatileImage}
+ * @see VolatileImage
*/
public Image getVolatileOffscreenBuffer(Component comp, int proposedWidth,
int proposedHeight)
@@ -542,7 +543,7 @@ public class RepaintManager
*
* @param buffer The new value of the property
*
- * @see #getDoubleBufferingEnabled
+ * @see #isDoubleBufferingEnabled
*/
public void setDoubleBufferingEnabled(boolean buffer)
{
diff --git a/javax/swing/RootPaneContainer.java b/javax/swing/RootPaneContainer.java
index d2eff356c..b121f958a 100644
--- a/javax/swing/RootPaneContainer.java
+++ b/javax/swing/RootPaneContainer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,9 +42,11 @@ import java.awt.Component;
import java.awt.Container;
/**
- * RootPaneContainer
- * @author Andrew Selkirk
- * @version 1.0
+ * Components that contain a single {@link JRootPane} as only child
+ * implement this interface, typically this is implemented by the
+ * Swing top-level containers.
+ *
+ * @author Andrew Selkirk
*/
public interface RootPaneContainer {
diff --git a/javax/swing/ScrollPaneConstants.java b/javax/swing/ScrollPaneConstants.java
index b4e24be01..b5860609f 100644
--- a/javax/swing/ScrollPaneConstants.java
+++ b/javax/swing/ScrollPaneConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,9 +38,10 @@ exception statement from your version. */
package javax.swing;
/**
- * ScrollPaneConstants
- * @author Andrew Selkirk
- * @version 1.0
+ * Defines some constants that are used in {@link JScrollPane} and related
+ * components.
+ *
+ * @author Andrew Selkirk
*/
public interface ScrollPaneConstants
{
diff --git a/javax/swing/ScrollPaneLayout.java b/javax/swing/ScrollPaneLayout.java
index 6fbb3048a..75a6f9aa2 100644
--- a/javax/swing/ScrollPaneLayout.java
+++ b/javax/swing/ScrollPaneLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/Scrollable.java b/javax/swing/Scrollable.java
index a69e34712..197321923 100644
--- a/javax/swing/Scrollable.java
+++ b/javax/swing/Scrollable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,6 +40,12 @@ package javax.swing;
import java.awt.Dimension;
import java.awt.Rectangle;
+/**
+ * Defines the method that a component should implement to behave nicely
+ * in {@link JScrollPane}s. Note that this is not required for a component
+ * to be used in a <code>JScrollPane</code>, but can highly improve the
+ * user experience when scrolling the component.
+ */
public interface Scrollable
{
Dimension getPreferredScrollableViewportSize();
diff --git a/javax/swing/SingleSelectionModel.java b/javax/swing/SingleSelectionModel.java
index c2683921f..b5380c857 100644
--- a/javax/swing/SingleSelectionModel.java
+++ b/javax/swing/SingleSelectionModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,9 +40,11 @@ package javax.swing;
import javax.swing.event.ChangeListener;
/**
- * SingleSelectionModel
- * @author Andrew Selkirk
- * @version 1.0
+ * A data model that is used in components that support at most one
+ * selected element, like {@link JTabbedPane}, {@link JMenu} and
+ * {@link JPopupMenu}.
+ *
+ * @author Andrew Selkirk
*/
public interface SingleSelectionModel {
diff --git a/javax/swing/SizeRequirements.java b/javax/swing/SizeRequirements.java
index 8de16b16b..77b42db1c 100644
--- a/javax/swing/SizeRequirements.java
+++ b/javax/swing/SizeRequirements.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -295,7 +295,6 @@ public class SizeRequirements implements Serializable
* @param allocated the amount of allocated space
* @param total the total size requirements of the components
* @param children the size requirement of each component
- * @param offsets will hold the offset values for each component
* @param spans will hold the span values for each component
* @param forward whether the components should be placed in the forward
* direction (left-right or top-bottom) or reverse direction
diff --git a/javax/swing/SizeSequence.java b/javax/swing/SizeSequence.java
index d03699f18..cf6e5f042 100644
--- a/javax/swing/SizeSequence.java
+++ b/javax/swing/SizeSequence.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/SortingFocusTraversalPolicy.java b/javax/swing/SortingFocusTraversalPolicy.java
index 07a4e6561..fada17c63 100644
--- a/javax/swing/SortingFocusTraversalPolicy.java
+++ b/javax/swing/SortingFocusTraversalPolicy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -89,7 +89,7 @@ public class SortingFocusTraversalPolicy
* Creates a new <code>SortingFocusTraversalPolicy</code> with the given
* comparator set.
*
- * @param the comparator to set
+ * @param comparator the comparator to set
*/
public SortingFocusTraversalPolicy(Comparator comparator)
{
@@ -306,12 +306,12 @@ public class SortingFocusTraversalPolicy
}
/**
- * Return the current value of the {@link implicitDownCycleTraversal}
+ * Return the current value of the {@link #implicitDownCycleTraversal}
* property.
*
* @return the current value of the property
*
- * @see setImplicitDownCycleTraversal
+ * @see #setImplicitDownCycleTraversal
*/
public boolean getImplicitDownCycleTraversal()
{
@@ -319,12 +319,12 @@ public class SortingFocusTraversalPolicy
}
/**
- * Set the current value of the {@link implicitDownCycleTraversal}
+ * Set the current value of the {@link #implicitDownCycleTraversal}
* property.
*
* @param down the new value of the property
*
- * @see getImplicitDownCycleTraversal
+ * @see #getImplicitDownCycleTraversal
*/
public void setImplicitDownCycleTraversal(boolean down)
{
diff --git a/javax/swing/SpinnerDateModel.java b/javax/swing/SpinnerDateModel.java
index 8e577fad5..c0de7d55c 100644
--- a/javax/swing/SpinnerDateModel.java
+++ b/javax/swing/SpinnerDateModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/SpinnerListModel.java b/javax/swing/SpinnerListModel.java
index 9b2667182..85dc4efa6 100644
--- a/javax/swing/SpinnerListModel.java
+++ b/javax/swing/SpinnerListModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,6 +42,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import javax.swing.event.ChangeEvent;
+
/**
* An implementation of <code>SpinnerModel</code> which uses the values
* contained within a list or an array. The backing list or array is
diff --git a/javax/swing/SpinnerModel.java b/javax/swing/SpinnerModel.java
index ea5f431d4..4ad962bbf 100644
--- a/javax/swing/SpinnerModel.java
+++ b/javax/swing/SpinnerModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,8 @@ package javax.swing;
import javax.swing.event.ChangeListener;
/**
+ * The data model that is used in {@link JSpinner}s.
+ *
* @since 1.4
*/
public interface SpinnerModel
diff --git a/javax/swing/SpinnerNumberModel.java b/javax/swing/SpinnerNumberModel.java
index 370007cb8..2274c9ec0 100644
--- a/javax/swing/SpinnerNumberModel.java
+++ b/javax/swing/SpinnerNumberModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/Spring.java b/javax/swing/Spring.java
index aa47e20e1..69c88c77d 100644
--- a/javax/swing/Spring.java
+++ b/javax/swing/Spring.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -189,9 +189,9 @@ public abstract class Spring
/**
* Creates a new SimpleSpring object.
*
- * @param min the constant minimum value.
- * @param pref the constant preferred value.
- * @param max the constant maximum value.
+ * @param newMin the constant minimum value.
+ * @param newPref the constant preferred value.
+ * @param newMax the constant maximum value.
*/
public SimpleSpring(int newMin, int newPref, int newMax)
{
diff --git a/javax/swing/SpringLayout.java b/javax/swing/SpringLayout.java
index 07357dcc8..df9ddffb6 100644
--- a/javax/swing/SpringLayout.java
+++ b/javax/swing/SpringLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -152,7 +152,7 @@ public class SpringLayout implements LayoutManager2
/**
* Returns the constraint for the edge with the <code>edgeName</code>.
* This is expected to be one of
- * {@link #EAST}, {@link #WEST}, {@link NORTH} or {@link SOUTH}.
+ * {@link #EAST}, {@link #WEST}, {@link #NORTH} or {@link #SOUTH}.
*
* @param edgeName the name of the edge.
* @return the constraint for the specified edge.
@@ -246,7 +246,7 @@ public class SpringLayout implements LayoutManager2
* the mathematics still hold true.
*
* @param edgeName the name of the edge, one of {@link #EAST},
- * {@link #WEST}, {@link NORTH} or {@link SOUTH}.
+ * {@link #WEST}, {@link #NORTH} or {@link #SOUTH}.
* @param s the constraint to be set.
*/
public void setConstraint(String edgeName, Spring s)
@@ -361,8 +361,8 @@ public class SpringLayout implements LayoutManager2
* Method. This method does nothing, since SpringLayout does not manage
* String-indexed components.
*
- * @param component the component to be added.
- * @param constraint the constraint to be set.
+ * @param name the name.
+ * @param c the component to be added.
*/
public void addLayoutComponent(String name, Component c)
{
@@ -374,7 +374,7 @@ public class SpringLayout implements LayoutManager2
*
* @param c the component from which to get the constraint.
* @param edgeName the name of the edge, one of {@link #EAST},
- * {@link #WEST}, {@link NORTH} or {@link SOUTH}.
+ * {@link #WEST}, {@link #NORTH} or {@link #SOUTH}.
* @return the constraint of the edge <code>edgeName</code> of the
* component c.
*/
diff --git a/javax/swing/SwingConstants.java b/javax/swing/SwingConstants.java
index f3e90977f..bed8a467b 100644
--- a/javax/swing/SwingConstants.java
+++ b/javax/swing/SwingConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,9 @@ exception statement from your version. */
package javax.swing;
+/**
+ * Defines constant values that are used throughout the Swing packages.
+ */
public interface SwingConstants
{
int CENTER = 0;
diff --git a/javax/swing/SwingUtilities.java b/javax/swing/SwingUtilities.java
index 13470f304..3425fc97d 100644
--- a/javax/swing/SwingUtilities.java
+++ b/javax/swing/SwingUtilities.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -63,7 +63,7 @@ import javax.swing.plaf.ActionMapUIResource;
import javax.swing.plaf.InputMapUIResource;
/**
- * This class contains a number of static utility functions which are
+ * A number of static utility functions which are
* useful when drawing swing components, dispatching events, or calculating
* regions which need painting.
*
@@ -848,8 +848,14 @@ public class SwingUtilities
}
else
{
+ int fromIndex = 0;
textR.width = fm.stringWidth(text);
textR.height = fm.getHeight();
+ while (text.indexOf('\n', fromIndex) != -1)
+ {
+ textR.height += fm.getHeight();
+ fromIndex = text.indexOf('\n', fromIndex) + 1;
+ }
}
// Work out the position of text and icon, assuming the top-left coord
diff --git a/javax/swing/Timer.java b/javax/swing/Timer.java
index 5b5380f87..87f420a43 100644
--- a/javax/swing/Timer.java
+++ b/javax/swing/Timer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/ToolTipManager.java b/javax/swing/ToolTipManager.java
index 667e26094..616937638 100644
--- a/javax/swing/ToolTipManager.java
+++ b/javax/swing/ToolTipManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -424,6 +424,10 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
insideTimer.stop();
hideTip();
}
+
+ if (currentComponent == null)
+ currentComponent = (Component) event.getSource();
+
currentComponent.invalidate();
currentComponent.validate();
currentComponent.repaint();
diff --git a/javax/swing/TransferHandler.java b/javax/swing/TransferHandler.java
index 85d4a8c4d..96cb9d42a 100644
--- a/javax/swing/TransferHandler.java
+++ b/javax/swing/TransferHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/UIDefaults.java b/javax/swing/UIDefaults.java
index b679ff352..ab78ca644 100644
--- a/javax/swing/UIDefaults.java
+++ b/javax/swing/UIDefaults.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -74,6 +74,13 @@ public class UIDefaults extends Hashtable
/** We use this for firing PropertyChangeEvents. */
private PropertyChangeSupport propertyChangeSupport;
+ /**
+ * Used for lazy instantiation of UIDefaults values so that they are not
+ * all loaded when a Swing application starts up, but only the values that
+ * are really needed. An <code>ActiveValue</code> is newly instantiated
+ * every time when the value is requested, as opposed to the normal
+ * {@link LazyValue} that is only instantiated once.
+ */
public static interface ActiveValue
{
Object createValue(UIDefaults table);
@@ -98,6 +105,13 @@ public class UIDefaults extends Hashtable
}
}
+ /**
+ * Used for lazy instantiation of UIDefaults values so that they are not
+ * all loaded when a Swing application starts up, but only the values that
+ * are really needed. A <code>LazyValue</code> is only instantiated once,
+ * as opposed to the {@link ActiveValue} that is newly created every time
+ * it is requested.
+ */
public static interface LazyValue
{
Object createValue(UIDefaults table);
@@ -407,9 +421,9 @@ public class UIDefaults extends Hashtable
* @return the font entry for <code>key</code> or null if no such entry
* exists
*/
- public Font getFont(Object key, Locale l)
+ public Font getFont(Object key, Locale locale)
{
- Object o = get(key, l);
+ Object o = get(key, locale);
return o instanceof Font ? (Font) o : null;
}
@@ -436,9 +450,9 @@ public class UIDefaults extends Hashtable
* @return the color entry for <code>key</code> or null if no such entry
* exists
*/
- public Color getColor(Object key, Locale l)
+ public Color getColor(Object key, Locale locale)
{
- Object o = get(key, l);
+ Object o = get(key, locale);
return o instanceof Color ? (Color) o : null;
}
@@ -465,9 +479,9 @@ public class UIDefaults extends Hashtable
* @return the icon entry for <code>key</code> or null if no such entry
* exists
*/
- public Icon getIcon(Object key, Locale l)
+ public Icon getIcon(Object key, Locale locale)
{
- Object o = get(key, l);
+ Object o = get(key, locale);
return o instanceof Icon ? (Icon) o : null;
}
@@ -494,9 +508,9 @@ public class UIDefaults extends Hashtable
* @return the border entry for <code>key</code> or null if no such entry
* exists
*/
- public Border getBorder(Object key, Locale l)
+ public Border getBorder(Object key, Locale locale)
{
- Object o = get(key, l);
+ Object o = get(key, locale);
return o instanceof Border ? (Border) o : null;
}
@@ -523,9 +537,9 @@ public class UIDefaults extends Hashtable
* @return the string entry for <code>key</code> or null if no such entry
* exists
*/
- public String getString(Object key, Locale l)
+ public String getString(Object key, Locale locale)
{
- Object o = get(key, l);
+ Object o = get(key, locale);
return o instanceof String ? (String) o : null;
}
@@ -552,9 +566,9 @@ public class UIDefaults extends Hashtable
* @return the integer entry for <code>key</code> or null if no such entry
* exists
*/
- public int getInt(Object key, Locale l)
+ public int getInt(Object key, Locale locale)
{
- Object o = get(key, l);
+ Object o = get(key, locale);
return o instanceof Integer ? ((Integer) o).intValue() : 0;
}
@@ -580,9 +594,9 @@ public class UIDefaults extends Hashtable
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
- public boolean getBoolean(Object key, Locale l)
+ public boolean getBoolean(Object key, Locale locale)
{
- return Boolean.TRUE.equals(get(key, l));
+ return Boolean.TRUE.equals(get(key, locale));
}
/**
@@ -608,9 +622,9 @@ public class UIDefaults extends Hashtable
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
- public Insets getInsets(Object key, Locale l)
+ public Insets getInsets(Object key, Locale locale)
{
- Object o = get(key, l);
+ Object o = get(key, locale);
return o instanceof Insets ? (Insets) o : null;
}
@@ -637,9 +651,9 @@ public class UIDefaults extends Hashtable
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
- public Dimension getDimension(Object key, Locale l)
+ public Dimension getDimension(Object key, Locale locale)
{
- Object o = get(key, l);
+ Object o = get(key, locale);
return o instanceof Dimension ? (Dimension) o : null;
}
diff --git a/javax/swing/UIManager.java b/javax/swing/UIManager.java
index 056e944be..46f6e959d 100644
--- a/javax/swing/UIManager.java
+++ b/javax/swing/UIManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/UnsupportedLookAndFeelException.java b/javax/swing/UnsupportedLookAndFeelException.java
index 2e032cd94..5abe45fe1 100644
--- a/javax/swing/UnsupportedLookAndFeelException.java
+++ b/javax/swing/UnsupportedLookAndFeelException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/ViewportLayout.java b/javax/swing/ViewportLayout.java
index 3abf31da3..18b491257 100644
--- a/javax/swing/ViewportLayout.java
+++ b/javax/swing/ViewportLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/WindowConstants.java b/javax/swing/WindowConstants.java
index 3f9936c18..5e3644344 100644
--- a/javax/swing/WindowConstants.java
+++ b/javax/swing/WindowConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,9 +38,10 @@ exception statement from your version. */
package javax.swing;
/**
- * WindowConstants
- * @author Andrew Selkirk
- * @version 1.0
+ * Defines some constants that are used in Swing's top-level
+ * containers.
+ *
+ * @author Andrew Selkirk
*/
public interface WindowConstants {
diff --git a/javax/swing/border/AbstractBorder.java b/javax/swing/border/AbstractBorder.java
index 9c1f06be7..951debd52 100644
--- a/javax/swing/border/AbstractBorder.java
+++ b/javax/swing/border/AbstractBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -118,7 +118,7 @@ public abstract class AbstractBorder
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets (Component c, Insets insets)
{
diff --git a/javax/swing/border/BevelBorder.java b/javax/swing/border/BevelBorder.java
index dd5a52b01..fcdc1c646 100644
--- a/javax/swing/border/BevelBorder.java
+++ b/javax/swing/border/BevelBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -172,7 +172,7 @@ public class BevelBorder
* @throws NullPointerException if <code>highlight</code> or
* <code>shadow</code> is <code>null</code>.
*
- * @see java.awt.Color.brighter()
+ * @see java.awt.Color#brighter()
*/
public BevelBorder(int bevelType, Color highlight, Color shadow)
{
@@ -289,7 +289,7 @@ public class BevelBorder
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
diff --git a/javax/swing/border/Border.java b/javax/swing/border/Border.java
index a9ad6e5b0..11bddfe78 100644
--- a/javax/swing/border/Border.java
+++ b/javax/swing/border/Border.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/border/CompoundBorder.java b/javax/swing/border/CompoundBorder.java
index d75f4c0dc..2130a0e34 100644
--- a/javax/swing/border/CompoundBorder.java
+++ b/javax/swing/border/CompoundBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/border/EmptyBorder.java b/javax/swing/border/EmptyBorder.java
index 6360063ff..0f3b7b693 100644
--- a/javax/swing/border/EmptyBorder.java
+++ b/javax/swing/border/EmptyBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/border/EtchedBorder.java b/javax/swing/border/EtchedBorder.java
index 859e5f832..0bd76ff0f 100644
--- a/javax/swing/border/EtchedBorder.java
+++ b/javax/swing/border/EtchedBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -246,7 +246,7 @@ public class EtchedBorder
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
diff --git a/javax/swing/border/LineBorder.java b/javax/swing/border/LineBorder.java
index 2b8c8bae9..c34e38c57 100644
--- a/javax/swing/border/LineBorder.java
+++ b/javax/swing/border/LineBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -287,7 +287,7 @@ public class LineBorder
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
diff --git a/javax/swing/border/MatteBorder.java b/javax/swing/border/MatteBorder.java
index b95814b45..f7ff1ca01 100644
--- a/javax/swing/border/MatteBorder.java
+++ b/javax/swing/border/MatteBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/border/SoftBevelBorder.java b/javax/swing/border/SoftBevelBorder.java
index 341954c3c..379ecb65a 100644
--- a/javax/swing/border/SoftBevelBorder.java
+++ b/javax/swing/border/SoftBevelBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -120,7 +120,7 @@ public class SoftBevelBorder
* @throws NullPointerException if <code>highlight</code> or
* <code>shadow</code> is <code>null</code>.
*
- * @see java.awt.Color.brighter()
+ * @see java.awt.Color#brighter()
*/
public SoftBevelBorder(int bevelType, Color highlight, Color shadow)
{
@@ -235,7 +235,7 @@ public class SoftBevelBorder
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
diff --git a/javax/swing/border/TitledBorder.java b/javax/swing/border/TitledBorder.java
index b257ce1c7..ceae2b1c9 100644
--- a/javax/swing/border/TitledBorder.java
+++ b/javax/swing/border/TitledBorder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -675,7 +675,7 @@ public class TitledBorder
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
@@ -1117,7 +1117,7 @@ public class TitledBorder
/**
* Determines the insets of the nested component when it has a
* TitledBorder as its border. Used by {@link
- * TitledBorder#getBorderInsets()}.
+ * TitledBorder#getBorderInsets(Component, Insets)}.
*
* @param i an Insets object for storing the results into, or
* <code>null</code> to cause the creation of a
@@ -1140,7 +1140,7 @@ public class TitledBorder
/**
* Calculates the minimum size needed for displaying the border
- * and its title. Used by {@link TitledBorder#getMiminumSize()}.
+ * and its title. Used by {@link TitledBorder#getMinimumSize(Component)}.
*/
public Dimension getMinimumSize()
{
diff --git a/javax/swing/border/package.html b/javax/swing/border/package.html
index 23b95d478..de8479a6a 100644
--- a/javax/swing/border/package.html
+++ b/javax/swing/border/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.border</title></head>
<body>
-<p></p>
+<p>Provides borders for use by components in the <code>javax.swing</code>
+package.</p>
</body>
</html>
diff --git a/javax/swing/colorchooser/AbstractColorChooserPanel.java b/javax/swing/colorchooser/AbstractColorChooserPanel.java
index 4ecfab4a3..d55346aaf 100644
--- a/javax/swing/colorchooser/AbstractColorChooserPanel.java
+++ b/javax/swing/colorchooser/AbstractColorChooserPanel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/colorchooser/ColorChooserComponentFactory.java b/javax/swing/colorchooser/ColorChooserComponentFactory.java
index 6e7ca33d7..77e319c70 100644
--- a/javax/swing/colorchooser/ColorChooserComponentFactory.java
+++ b/javax/swing/colorchooser/ColorChooserComponentFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/colorchooser/ColorSelectionModel.java b/javax/swing/colorchooser/ColorSelectionModel.java
index 2dc0e87c5..5f3070813 100644
--- a/javax/swing/colorchooser/ColorSelectionModel.java
+++ b/javax/swing/colorchooser/ColorSelectionModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/colorchooser/DefaultColorSelectionModel.java b/javax/swing/colorchooser/DefaultColorSelectionModel.java
index 8852935e5..aae2bed68 100644
--- a/javax/swing/colorchooser/DefaultColorSelectionModel.java
+++ b/javax/swing/colorchooser/DefaultColorSelectionModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/colorchooser/DefaultHSBChooserPanel.java b/javax/swing/colorchooser/DefaultHSBChooserPanel.java
index ea18e4296..71d6c75b5 100644
--- a/javax/swing/colorchooser/DefaultHSBChooserPanel.java
+++ b/javax/swing/colorchooser/DefaultHSBChooserPanel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/colorchooser/DefaultPreviewPanel.java b/javax/swing/colorchooser/DefaultPreviewPanel.java
index e1e7aa91f..2462add3d 100644
--- a/javax/swing/colorchooser/DefaultPreviewPanel.java
+++ b/javax/swing/colorchooser/DefaultPreviewPanel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/colorchooser/DefaultRGBChooserPanel.java b/javax/swing/colorchooser/DefaultRGBChooserPanel.java
index 7cd9bfe3a..39a173250 100644
--- a/javax/swing/colorchooser/DefaultRGBChooserPanel.java
+++ b/javax/swing/colorchooser/DefaultRGBChooserPanel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/colorchooser/DefaultSwatchChooserPanel.java b/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
index 505de95dc..f28af4cac 100644
--- a/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
+++ b/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/colorchooser/package.html b/javax/swing/colorchooser/package.html
index 67ca509d7..c04e96ebb 100644
--- a/javax/swing/colorchooser/package.html
+++ b/javax/swing/colorchooser/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.event package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.colorchooser</title></head>
<body>
-<p></p>
+<p>Provides support classes for the {@link javax.swing.JColorChooser}
+component.</p>
</body>
</html>
diff --git a/javax/swing/event/AncestorEvent.java b/javax/swing/event/AncestorEvent.java
index 63f00a4e5..d06c6e396 100644
--- a/javax/swing/event/AncestorEvent.java
+++ b/javax/swing/event/AncestorEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/AncestorListener.java b/javax/swing/event/AncestorListener.java
index bc0f91d85..61d5aedb7 100644
--- a/javax/swing/event/AncestorListener.java
+++ b/javax/swing/event/AncestorListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/CaretEvent.java b/javax/swing/event/CaretEvent.java
index 876bf4f7e..c4870a800 100644
--- a/javax/swing/event/CaretEvent.java
+++ b/javax/swing/event/CaretEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/CaretListener.java b/javax/swing/event/CaretListener.java
index 5765b634b..aeee434e5 100644
--- a/javax/swing/event/CaretListener.java
+++ b/javax/swing/event/CaretListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/CellEditorListener.java b/javax/swing/event/CellEditorListener.java
index abbb1039e..d2dd5bab8 100644
--- a/javax/swing/event/CellEditorListener.java
+++ b/javax/swing/event/CellEditorListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/ChangeEvent.java b/javax/swing/event/ChangeEvent.java
index 1d2d4e14f..f75c15aac 100644
--- a/javax/swing/event/ChangeEvent.java
+++ b/javax/swing/event/ChangeEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/ChangeListener.java b/javax/swing/event/ChangeListener.java
index b952fc10f..1e58b1d82 100644
--- a/javax/swing/event/ChangeListener.java
+++ b/javax/swing/event/ChangeListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/DocumentEvent.java b/javax/swing/event/DocumentEvent.java
index eccc9d3e5..6a005ea7a 100644
--- a/javax/swing/event/DocumentEvent.java
+++ b/javax/swing/event/DocumentEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/DocumentListener.java b/javax/swing/event/DocumentListener.java
index 7593880f6..df5e784e4 100644
--- a/javax/swing/event/DocumentListener.java
+++ b/javax/swing/event/DocumentListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/EventListenerList.java b/javax/swing/event/EventListenerList.java
index 226cac179..3b9f4c807 100644
--- a/javax/swing/event/EventListenerList.java
+++ b/javax/swing/event/EventListenerList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -133,7 +133,7 @@ public class EventListenerList
* @throws IllegalArgumentException if <code>listener</code> is not
* an instance of <code>t</code> (or a subclass thereof).
*
- * @throws Exception if <code>t</code> is <code>null</code>.
+ * @throws NullPointerException if <code>t</code> is <code>null</code>.
*/
public void add(Class t, EventListener listener)
{
@@ -246,7 +246,7 @@ public class EventListenerList
* @throws IllegalArgumentException if <code>listener</code> is not
* an instance of <code>t</code> (or a subclass thereof).
*
- * @throws Exception if <code>t</code> is <code>null</code>.
+ * @throws NullPointerException if <code>t</code> is <code>null</code>.
*/
public void remove(Class t, EventListener listener)
{
diff --git a/javax/swing/event/HyperlinkEvent.java b/javax/swing/event/HyperlinkEvent.java
index a3a155a31..4afa009f4 100644
--- a/javax/swing/event/HyperlinkEvent.java
+++ b/javax/swing/event/HyperlinkEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/HyperlinkListener.java b/javax/swing/event/HyperlinkListener.java
index 3e448ce54..5dede993f 100644
--- a/javax/swing/event/HyperlinkListener.java
+++ b/javax/swing/event/HyperlinkListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/InternalFrameAdapter.java b/javax/swing/event/InternalFrameAdapter.java
index 76f3d89da..a2878e76e 100644
--- a/javax/swing/event/InternalFrameAdapter.java
+++ b/javax/swing/event/InternalFrameAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/InternalFrameEvent.java b/javax/swing/event/InternalFrameEvent.java
index 9f0311677..badfa80ac 100644
--- a/javax/swing/event/InternalFrameEvent.java
+++ b/javax/swing/event/InternalFrameEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/InternalFrameListener.java b/javax/swing/event/InternalFrameListener.java
index 7b297846d..d1b2812a8 100644
--- a/javax/swing/event/InternalFrameListener.java
+++ b/javax/swing/event/InternalFrameListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/ListDataEvent.java b/javax/swing/event/ListDataEvent.java
index c86e86abe..2a6e6dbe9 100644
--- a/javax/swing/event/ListDataEvent.java
+++ b/javax/swing/event/ListDataEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/ListDataListener.java b/javax/swing/event/ListDataListener.java
index eeaf07ada..7ce17d86f 100644
--- a/javax/swing/event/ListDataListener.java
+++ b/javax/swing/event/ListDataListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/ListSelectionEvent.java b/javax/swing/event/ListSelectionEvent.java
index c2289f014..e5e4c33ba 100644
--- a/javax/swing/event/ListSelectionEvent.java
+++ b/javax/swing/event/ListSelectionEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/ListSelectionListener.java b/javax/swing/event/ListSelectionListener.java
index 17293bd4e..4ebf58304 100644
--- a/javax/swing/event/ListSelectionListener.java
+++ b/javax/swing/event/ListSelectionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/MenuDragMouseEvent.java b/javax/swing/event/MenuDragMouseEvent.java
index 8d3a0a542..997616706 100644
--- a/javax/swing/event/MenuDragMouseEvent.java
+++ b/javax/swing/event/MenuDragMouseEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/MenuDragMouseListener.java b/javax/swing/event/MenuDragMouseListener.java
index 226d291d2..bfca315e3 100644
--- a/javax/swing/event/MenuDragMouseListener.java
+++ b/javax/swing/event/MenuDragMouseListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/MenuEvent.java b/javax/swing/event/MenuEvent.java
index de8174473..35bb5b97b 100644
--- a/javax/swing/event/MenuEvent.java
+++ b/javax/swing/event/MenuEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/MenuKeyEvent.java b/javax/swing/event/MenuKeyEvent.java
index aecc99268..511cb2254 100644
--- a/javax/swing/event/MenuKeyEvent.java
+++ b/javax/swing/event/MenuKeyEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -76,7 +76,7 @@ public class MenuKeyEvent extends KeyEvent {
* @param when Time
* @param modifiers Modifier keys
* @param keyCode Key code
- * @param keyhar Key char
+ * @param keyChar Key char
* @param path Path
* @param manager MenuSelectionManager
*/
diff --git a/javax/swing/event/MenuKeyListener.java b/javax/swing/event/MenuKeyListener.java
index bb956f4e4..7a1eb89b4 100644
--- a/javax/swing/event/MenuKeyListener.java
+++ b/javax/swing/event/MenuKeyListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/MenuListener.java b/javax/swing/event/MenuListener.java
index 6e37c34cd..dba704a8e 100644
--- a/javax/swing/event/MenuListener.java
+++ b/javax/swing/event/MenuListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/MouseInputAdapter.java b/javax/swing/event/MouseInputAdapter.java
index b94b5f8d9..2da5543eb 100644
--- a/javax/swing/event/MouseInputAdapter.java
+++ b/javax/swing/event/MouseInputAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/MouseInputListener.java b/javax/swing/event/MouseInputListener.java
index 35d79cd4e..3c3ca2347 100644
--- a/javax/swing/event/MouseInputListener.java
+++ b/javax/swing/event/MouseInputListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/PopupMenuEvent.java b/javax/swing/event/PopupMenuEvent.java
index b51f74b51..055555086 100644
--- a/javax/swing/event/PopupMenuEvent.java
+++ b/javax/swing/event/PopupMenuEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/PopupMenuListener.java b/javax/swing/event/PopupMenuListener.java
index 84cc25199..dc917d241 100644
--- a/javax/swing/event/PopupMenuListener.java
+++ b/javax/swing/event/PopupMenuListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/SwingPropertyChangeSupport.java b/javax/swing/event/SwingPropertyChangeSupport.java
index b2c6a4e4d..ddbb48658 100644
--- a/javax/swing/event/SwingPropertyChangeSupport.java
+++ b/javax/swing/event/SwingPropertyChangeSupport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TableColumnModelEvent.java b/javax/swing/event/TableColumnModelEvent.java
index 17a71e409..2ca4148aa 100644
--- a/javax/swing/event/TableColumnModelEvent.java
+++ b/javax/swing/event/TableColumnModelEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TableColumnModelListener.java b/javax/swing/event/TableColumnModelListener.java
index 4234ba93d..90e1b29cc 100644
--- a/javax/swing/event/TableColumnModelListener.java
+++ b/javax/swing/event/TableColumnModelListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TableModelEvent.java b/javax/swing/event/TableModelEvent.java
index ba8a36d3b..e15174cc6 100644
--- a/javax/swing/event/TableModelEvent.java
+++ b/javax/swing/event/TableModelEvent.java
@@ -1,5 +1,5 @@
/* TableModelEvent.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,38 +43,74 @@ import java.util.EventObject;
import javax.swing.table.TableModel;
/**
+ * An event that describes changes to a {@link TableModel}.
+ *
+ * @see javax.swing.event.TableModelListener
+ *
* @author Andrew Selkirk
*/
public class TableModelEvent extends EventObject
{
private static final long serialVersionUID = -7849342674552212824L;
+ /** A column index representing all columns. */
public static final int ALL_COLUMNS = -1;
+
+ /**
+ * An event type indicating that one or more rows have been deleted from the
+ * model.
+ */
public static final int DELETE = -1;
+
+ /** A row index representing the header row. */
public static final int HEADER_ROW = -1;
+
+ /**
+ * An event type indicating that one or more rows have been inserted into the
+ * model.
+ */
public static final int INSERT = 1;
+
+ /** An event type indicating that data has been updated in the model. */
public static final int UPDATE = 0;
+ /** The column in the table model that the event relates to. */
protected int column = 0;
+
+ /** The first row in the table model that the event relates to. */
protected int firstRow = 0;
+
+ /** The last row in the table model that the event relates to. */
protected int lastRow = 0;
+
+ /**
+ * The event type (one of {@link #UPDATE}, {@link #INSERT}, {@link #DELETE}).
+ */
protected int type = 0;
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
+ * to the data in all columns and rows.
+ *
+ * @param source the source object (<code>null</code> not permitted).
*
- * @param source The source object
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
public TableModelEvent(TableModel source)
{
- this(source, 0, source.getRowCount(), ALL_COLUMNS, UPDATE);
+ this(source, 0, Integer.MAX_VALUE, ALL_COLUMNS, UPDATE);
}
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
+ * to the data in a single row across all columns.
+ *
+ * @param source the source object (<code>null</code> not permitted).
+ * @param row the updated row.
*
- * @param source The source object
- * @param row The updated row
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
public TableModelEvent(TableModel source, int row)
{
@@ -82,11 +118,15 @@ public class TableModelEvent extends EventObject
}
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
+ * to the data in the specified rows across all columns.
*
- * @param source The source object
- * @param firstRow The first row of update
- * @param lastRow The last row of update
+ * @param source the source object (<code>null</code> not permitted).
+ * @param firstRow the first row of update.
+ * @param lastRow the last row of update.
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
public TableModelEvent(TableModel source, int firstRow, int lastRow)
{
@@ -94,28 +134,41 @@ public class TableModelEvent extends EventObject
}
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
+ * to the data in the specified rows and column. Use {@link #ALL_COLUMNS}
+ * for the <code>column</code> argument to indicate all columns.
*
- * @param source The source object
- * @param firstRow The first row of update
- * @param lastRow The last row of update
- * @param column The affected column
+ * @param source the source object (<code>null</code> not permitted).
+ * @param firstRow the first row of update.
+ * @param lastRow the last row of update.
+ * @param column the affected column.
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
- public TableModelEvent(TableModel source, int firstRow, int lastRow, int column)
+ public TableModelEvent(TableModel source, int firstRow, int lastRow,
+ int column)
{
this(source, firstRow, lastRow, column, UPDATE);
}
/**
- * Creates a <code>TableModelEvent</code> event.
+ * Creates a new <code>TableModelEvent</code> indicating an operation of
+ * the specified <code>type</code> on the data in the specified rows and
+ * column. The event type is usually one of {@link #UPDATE}, {@link #INSERT},
+ * and {@link #DELETE}.
+ *
+ * @param source the source object (<code>null</code> not permitted).
+ * @param firstRow the first row of update.
+ * @param lastRow the last row of update.
+ * @param column the affected column.
+ * @param type the type of change.
*
- * @param source The source object
- * @param firstRow The first row of update
- * @param lastRow The last row of update
- * @param column The affected column
- * @param type The type of change
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
- public TableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type)
+ public TableModelEvent(TableModel source, int firstRow, int lastRow,
+ int column, int type)
{
super(source);
this.firstRow = firstRow;
@@ -126,6 +179,8 @@ public class TableModelEvent extends EventObject
/**
* Returns the affected column of this event.
+ *
+ * @return The column index.
*/
public int getColumn()
{
@@ -134,6 +189,8 @@ public class TableModelEvent extends EventObject
/**
* Returns the first affected row of this event.
+ *
+ * @return The row index.
*/
public int getFirstRow()
{
@@ -142,6 +199,8 @@ public class TableModelEvent extends EventObject
/**
* Returns the last affected row of this event.
+ *
+ * @return The row index.
*/
public int getLastRow()
{
@@ -149,7 +208,10 @@ public class TableModelEvent extends EventObject
}
/**
- * Returns the type of change of this event.
+ * Returns the type of change indicated by this event (usually one of
+ * {@link #UPDATE}, {@link #INSERT}, {@link #DELETE}).
+ *
+ * @return The type.
*/
public int getType()
{
diff --git a/javax/swing/event/TableModelListener.java b/javax/swing/event/TableModelListener.java
index 9b6122286..c8d6e8f8d 100644
--- a/javax/swing/event/TableModelListener.java
+++ b/javax/swing/event/TableModelListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TreeExpansionEvent.java b/javax/swing/event/TreeExpansionEvent.java
index 40d08f027..c4b331346 100644
--- a/javax/swing/event/TreeExpansionEvent.java
+++ b/javax/swing/event/TreeExpansionEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TreeExpansionListener.java b/javax/swing/event/TreeExpansionListener.java
index 621963b3c..08507a0ff 100644
--- a/javax/swing/event/TreeExpansionListener.java
+++ b/javax/swing/event/TreeExpansionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TreeModelEvent.java b/javax/swing/event/TreeModelEvent.java
index 7dbbc7953..a217e3b40 100644
--- a/javax/swing/event/TreeModelEvent.java
+++ b/javax/swing/event/TreeModelEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TreeModelListener.java b/javax/swing/event/TreeModelListener.java
index 7a46fa936..57b5c511b 100644
--- a/javax/swing/event/TreeModelListener.java
+++ b/javax/swing/event/TreeModelListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TreeSelectionEvent.java b/javax/swing/event/TreeSelectionEvent.java
index 6d2f461e9..9b87667a3 100644
--- a/javax/swing/event/TreeSelectionEvent.java
+++ b/javax/swing/event/TreeSelectionEvent.java
@@ -1,5 +1,5 @@
/* TreeSelectionEvent.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -49,142 +49,151 @@ import javax.swing.tree.TreePath;
*/
public class TreeSelectionEvent extends EventObject {
- //-------------------------------------------------------------
- // Variables --------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * paths
- */
- protected TreePath[] paths;
-
- /**
- * areNew
- */
- protected boolean[] areNew;
-
- /**
- * oldLeadSelectionPath
- */
- protected TreePath oldLeadSelectionPath;
-
- /**
- * newLeadSelectionPath
- */
- protected TreePath newLeadSelectionPath;
-
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * Constructor TreeSelectionEvent
- * @param source TODO
- * @param paths TODO
- * @param areNew TODO
- * @param oldLeadSelectionPath TODO
- * @param newLeadSelectionPath TODO
- */
- public TreeSelectionEvent(Object source, TreePath[] paths,
- boolean[] areNew, TreePath oldLeadSelectionPath,
- TreePath newLeadSelectionPath) {
- super(source);
- this.paths = paths;
- this.areNew = areNew;
- this.oldLeadSelectionPath = oldLeadSelectionPath;
- this.newLeadSelectionPath = newLeadSelectionPath;
- } // TreeSelectionEvent()
-
- /**
- * Constructor TreeSelectionEvent
- * @param source TODO
- * @param paths TODO
- * @param areNew TODO
- * @param oldLeadSelectionPath TODO
- * @param newLeadSelectionPath TODO
- */
- public TreeSelectionEvent(Object source, TreePath path,
- boolean isNew, TreePath oldLeadSelectionPath,
- TreePath newLeadSelectionPath) {
- super(source);
-//TODO this.paths = new TreePath[1]{path};
-//TODO this.areNew = new boolean[1]{isNew};
- this.oldLeadSelectionPath = oldLeadSelectionPath;
- this.newLeadSelectionPath = newLeadSelectionPath;
- } // TreeSelectionEvent()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * getPath
- * @returns TreePath
- */
- public TreePath getPath() {
- return paths[0];
- } // getPath()
-
- /**
- * getPaths
- * @returns TreePath[]
- */
- public TreePath[] getPaths() {
- return paths;
- } // getPaths()
-
- /**
- * isAddedPath
- * @returns boolean
- */
- public boolean isAddedPath() {
- return false; // TODO
- } // isAddedPath()
-
- /**
- * isAddedPath
- * @param path TODO
- * @returns boolean
- */
- public boolean isAddedPath(TreePath path) {
- return false; // TODO
- } // isAddedPath()
-
- /**
- * isAddedPath
- * @param index TODO
- * @returns boolean
- */
- public boolean isAddedPath(int index) {
- return false; // TODO
- } // isAddedPath()
-
- /**
- * getOldLeadSelectionPath
- * @returns TreePath
- */
- public TreePath getOldLeadSelectionPath() {
- return oldLeadSelectionPath;
- } // getOldLeadSelectionPath()
-
- /**
- * getNewLeadSelectionPath
- * @returns TreePath
- */
- public TreePath getNewLeadSelectionPath() {
- return newLeadSelectionPath;
- } // getNewLeadSelectionPath()
-
- /**
- * cloneWithSource
- * @param source TODO
- * @returns Object
- */
- public Object cloneWithSource(Object source) {
- return null; // TODO
- } // cloneWithSource()
+ //-------------------------------------------------------------
+ // Variables --------------------------------------------------
+ //-------------------------------------------------------------
+
+ /**
+ * paths
+ */
+ protected TreePath[] paths;
+
+ /**
+ * areNew
+ */
+ protected boolean[] areNew;
+
+ /**
+ * oldLeadSelectionPath
+ */
+ protected TreePath oldLeadSelectionPath;
+
+ /**
+ * newLeadSelectionPath
+ */
+ protected TreePath newLeadSelectionPath;
+
+
+ //-------------------------------------------------------------
+ // Initialization ---------------------------------------------
+ //-------------------------------------------------------------
+
+ /**
+ * Constructor TreeSelectionEvent
+ * @param source TODO
+ * @param paths TODO
+ * @param areNew TODO
+ * @param oldLeadSelectionPath TODO
+ * @param newLeadSelectionPath TODO
+ */
+ public TreeSelectionEvent(Object source, TreePath[] paths,
+ boolean[] areNew, TreePath oldLeadSelectionPath,
+ TreePath newLeadSelectionPath)
+ {
+ super(source);
+ this.paths = paths;
+ this.areNew = areNew;
+ this.oldLeadSelectionPath = oldLeadSelectionPath;
+ this.newLeadSelectionPath = newLeadSelectionPath;
+ } // TreeSelectionEvent()
+
+ /**
+ * Constructor TreeSelectionEvent
+ * @param source TODO
+ * @param path TODO
+ * @param isNew TODO
+ * @param oldLeadSelectionPath TODO
+ * @param newLeadSelectionPath TODO
+ */
+ public TreeSelectionEvent(Object source, TreePath path,
+ boolean isNew, TreePath oldLeadSelectionPath,
+ TreePath newLeadSelectionPath)
+ {
+ super(source);
+ this.paths = new TreePath[]{path};
+ this.areNew = new boolean[]{isNew};
+ this.oldLeadSelectionPath = oldLeadSelectionPath;
+ this.newLeadSelectionPath = newLeadSelectionPath;
+ } // TreeSelectionEvent()
+
+
+ //-------------------------------------------------------------
+ // Methods ----------------------------------------------------
+ //-------------------------------------------------------------
+
+ /**
+ * @returns the first path element
+ */
+ public TreePath getPath()
+ {
+ return paths[0];
+ } // getPath()
+
+ /**
+ *
+ * @returns the paths with selection changed
+ */
+ public TreePath[] getPaths()
+ {
+ return (TreePath[]) paths.clone();
+ } // getPaths()
+
+ /**
+ * @return true if the first path is added to the selection, false otherwise
+ */
+ public boolean isAddedPath()
+ {
+ return areNew[0];
+ } // isAddedPath()
+
+ /**
+ * @param path the path to check
+ * @return true if the path is added to the selection, false otherwise
+ */
+ public boolean isAddedPath(TreePath path)
+ {
+ for (int i = paths.length - 1; i >= 0; i--)
+ if (paths[i].equals(path))
+ return areNew[i];
+
+ return false;
+ } // isAddedPath()
+
+ /**
+ * @param index the index'th path
+ * @return true if the path is added to the selection, false otherwise
+ */
+ public boolean isAddedPath(int index)
+ {
+ return areNew[index];
+ } // isAddedPath()
+
+ /**
+ * @return the previous lead selection path
+ */
+ public TreePath getOldLeadSelectionPath()
+ {
+ return oldLeadSelectionPath;
+ } // getOldLeadSelectionPath()
+
+ /**
+ * @returns the current lead selection path
+ */
+ public TreePath getNewLeadSelectionPath()
+ {
+ return newLeadSelectionPath;
+ } // getNewLeadSelectionPath()
+
+ /**
+ * @param source the new event source
+ * @return a cloned event with another event source
+ */
+ public Object cloneWithSource(Object source)
+ {
+ return new TreeSelectionEvent (source, paths, areNew,
+ oldLeadSelectionPath,
+ newLeadSelectionPath);
+ } // cloneWithSource()
} // TreeSelectionEvent
diff --git a/javax/swing/event/TreeSelectionListener.java b/javax/swing/event/TreeSelectionListener.java
index 78d138aa2..b844a6e0b 100644
--- a/javax/swing/event/TreeSelectionListener.java
+++ b/javax/swing/event/TreeSelectionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/TreeWillExpandListener.java b/javax/swing/event/TreeWillExpandListener.java
index 35364b9fb..89d3764f3 100644
--- a/javax/swing/event/TreeWillExpandListener.java
+++ b/javax/swing/event/TreeWillExpandListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/UndoableEditEvent.java b/javax/swing/event/UndoableEditEvent.java
index 9e989d1a4..147c2e5b1 100644
--- a/javax/swing/event/UndoableEditEvent.java
+++ b/javax/swing/event/UndoableEditEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/UndoableEditListener.java b/javax/swing/event/UndoableEditListener.java
index 9031afe62..13eecf51a 100644
--- a/javax/swing/event/UndoableEditListener.java
+++ b/javax/swing/event/UndoableEditListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/event/package.html b/javax/swing/event/package.html
index 3625b0738..faef7e15a 100644
--- a/javax/swing/event/package.html
+++ b/javax/swing/event/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.event package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.event</title></head>
<body>
-<p></p>
+<p>Provides events and listeners used by components in the
+<code>javax.swing</code> package.</p>
</body>
</html>
diff --git a/javax/swing/filechooser/FileFilter.java b/javax/swing/filechooser/FileFilter.java
index 7e0be6d1b..42770d981 100644
--- a/javax/swing/filechooser/FileFilter.java
+++ b/javax/swing/filechooser/FileFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/filechooser/FileSystemView.java b/javax/swing/filechooser/FileSystemView.java
index 6be4773aa..ffa41ca07 100644
--- a/javax/swing/filechooser/FileSystemView.java
+++ b/javax/swing/filechooser/FileSystemView.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -134,7 +134,7 @@ public abstract class FileSystemView
*/
public File[] getFiles(File dir, boolean useFileHiding)
{
- if (dir == null)
+ if (dir == null || dir.listFiles() == null)
return null;
File[] files = dir.listFiles();
if (! useFileHiding)
diff --git a/javax/swing/filechooser/FileView.java b/javax/swing/filechooser/FileView.java
index f680e8fec..c431fd461 100644
--- a/javax/swing/filechooser/FileView.java
+++ b/javax/swing/filechooser/FileView.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/filechooser/UnixFileSystemView.java b/javax/swing/filechooser/UnixFileSystemView.java
index ccf054305..f2360ec52 100644
--- a/javax/swing/filechooser/UnixFileSystemView.java
+++ b/javax/swing/filechooser/UnixFileSystemView.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/filechooser/package.html b/javax/swing/filechooser/package.html
index 228233151..bf897abb5 100644
--- a/javax/swing/filechooser/package.html
+++ b/javax/swing/filechooser/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.event package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.filechooser</title></head>
<body>
-<p></p>
+<p>Provides support classes for the {@link javax.swing.JFileChooser}
+component.</p>
</body>
</html>
diff --git a/javax/swing/package.html b/javax/swing/package.html
index 1e4db5952..30ceb88bf 100644
--- a/javax/swing/package.html
+++ b/javax/swing/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing</title></head>
<body>
-<p></p>
+<p>Provides a collection of cross-platform user interface
+components.</p>
</body>
</html>
diff --git a/javax/swing/plaf/ActionMapUIResource.java b/javax/swing/plaf/ActionMapUIResource.java
index 640f3a756..f6af0880d 100644
--- a/javax/swing/plaf/ActionMapUIResource.java
+++ b/javax/swing/plaf/ActionMapUIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/BorderUIResource.java b/javax/swing/plaf/BorderUIResource.java
index 6b61f48a0..4402bbb48 100644
--- a/javax/swing/plaf/BorderUIResource.java
+++ b/javax/swing/plaf/BorderUIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -556,7 +556,7 @@ public class BorderUIResource
* @param shadow the color that will be used for painting
* the shadow part of the border.
*
- * @see #EtchedBorderUIResource(int, Color, Color)
+ * @see EtchedBorderUIResource#EtchedBorderUIResource(int, Color, Color)
*/
public EtchedBorderUIResource(Color highlight, Color shadow)
{
@@ -684,7 +684,7 @@ public class BorderUIResource
* @param left the width of the border at its left edge.
* @param bottom the width of the border at its bottom edge.
* @param right the width of the border at its right edge.
- * @param matteColor the color for filling the border.
+ * @param color the color for filling the border.
*/
public MatteBorderUIResource(int top, int left,
int bottom, int right,
diff --git a/javax/swing/plaf/ButtonUI.java b/javax/swing/plaf/ButtonUI.java
index 4fdaee505..197299e0c 100644
--- a/javax/swing/plaf/ButtonUI.java
+++ b/javax/swing/plaf/ButtonUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ColorChooserUI.java b/javax/swing/plaf/ColorChooserUI.java
index e290a972a..68ffd916d 100644
--- a/javax/swing/plaf/ColorChooserUI.java
+++ b/javax/swing/plaf/ColorChooserUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ColorUIResource.java b/javax/swing/plaf/ColorUIResource.java
index caa644c49..33b1676e0 100644
--- a/javax/swing/plaf/ColorUIResource.java
+++ b/javax/swing/plaf/ColorUIResource.java
@@ -1,5 +1,5 @@
/* ColorUIResource.java
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -63,6 +63,9 @@ public class ColorUIResource
* @param r the red intensity, which must be in the range [0 .. 255].
* @param g the green intensity, which must be in the range [0 .. 255].
* @param b the blue intensity, which must be in the range [0 .. 255].
+ *
+ * @throws IllegalArgumentException if any of the values is outside the
+ * specified range.
*/
public ColorUIResource(int r, int g, int b)
{
@@ -71,7 +74,7 @@ public class ColorUIResource
/**
- * Consructs a <code>ColorUIResource</code> using the specified
+ * Constructs a <code>ColorUIResource</code> using the specified
* RGB value. The blue value is in bits 0-7, green in bits 8-15, and
* red in bits 16-23. The other bits are ignored. The alpha value is set
* to 255, meaning that the color is fully opaque.
@@ -93,6 +96,9 @@ public class ColorUIResource
* @param r the red intensity, which must be in the range [0.0 .. 1.0].
* @param g the green intensity, which must be in the range [0.0 .. 1.0].
* @param b the blue intensity, which must be in the range [0.0 .. 1.0].
+ *
+ * @throws IllegalArgumentException if any of the values is outside the
+ * specified range.
*/
public ColorUIResource(float r, float g, float b)
{
@@ -105,7 +111,10 @@ public class ColorUIResource
* of another color.
*
* @param c the color whose intensities will be considered when
- * constructing this <code>ColorUIResource</code>.
+ * constructing this <code>ColorUIResource</code> (<code>null</code>
+ * not permitted).
+ *
+ * @throws NullPointerException if <code>c</code> is <code>null</code>.
*/
public ColorUIResource(Color c)
{
diff --git a/javax/swing/plaf/ComboBoxUI.java b/javax/swing/plaf/ComboBoxUI.java
index 83286d95b..9498a4815 100644
--- a/javax/swing/plaf/ComboBoxUI.java
+++ b/javax/swing/plaf/ComboBoxUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ComponentInputMapUIResource.java b/javax/swing/plaf/ComponentInputMapUIResource.java
index 40a70552e..e1418710f 100644
--- a/javax/swing/plaf/ComponentInputMapUIResource.java
+++ b/javax/swing/plaf/ComponentInputMapUIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ComponentUI.java b/javax/swing/plaf/ComponentUI.java
index 80e60c8f1..0e7680542 100644
--- a/javax/swing/plaf/ComponentUI.java
+++ b/javax/swing/plaf/ComponentUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/DesktopIconUI.java b/javax/swing/plaf/DesktopIconUI.java
index dfe69cc63..2e44088ca 100644
--- a/javax/swing/plaf/DesktopIconUI.java
+++ b/javax/swing/plaf/DesktopIconUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/DesktopPaneUI.java b/javax/swing/plaf/DesktopPaneUI.java
index 6943bf30f..de553eaf4 100644
--- a/javax/swing/plaf/DesktopPaneUI.java
+++ b/javax/swing/plaf/DesktopPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/DimensionUIResource.java b/javax/swing/plaf/DimensionUIResource.java
index 06ec16670..63c6838c4 100644
--- a/javax/swing/plaf/DimensionUIResource.java
+++ b/javax/swing/plaf/DimensionUIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/FileChooserUI.java b/javax/swing/plaf/FileChooserUI.java
index 903718154..8b661e399 100644
--- a/javax/swing/plaf/FileChooserUI.java
+++ b/javax/swing/plaf/FileChooserUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -98,7 +98,7 @@ public abstract class FileChooserUI
* @param chooser the <code>JFileChooser</code> whose
* button text is requested.
*
- * @see javax.swing.JFileChoose#getApproveButtonText
+ * @see javax.swing.JFileChooser#getApproveButtonText
*/
public abstract String getApproveButtonText(JFileChooser chooser);
@@ -111,7 +111,7 @@ public abstract class FileChooserUI
* @param chooser the <code>JFileChooser</code> whose
* dialog title is requested.
*
- * @see javax.swing.JFileChoose#getDialogtitle
+ * @see javax.swing.JFileChooser#getDialogTitle
*/
public abstract String getDialogTitle(JFileChooser chooser);
diff --git a/javax/swing/plaf/FontUIResource.java b/javax/swing/plaf/FontUIResource.java
index a4a45de72..1c1731048 100644
--- a/javax/swing/plaf/FontUIResource.java
+++ b/javax/swing/plaf/FontUIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/IconUIResource.java b/javax/swing/plaf/IconUIResource.java
index 3af16b757..1b09ed31f 100644
--- a/javax/swing/plaf/IconUIResource.java
+++ b/javax/swing/plaf/IconUIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/InputMapUIResource.java b/javax/swing/plaf/InputMapUIResource.java
index f638dd7b8..ae032e51f 100644
--- a/javax/swing/plaf/InputMapUIResource.java
+++ b/javax/swing/plaf/InputMapUIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/InsetsUIResource.java b/javax/swing/plaf/InsetsUIResource.java
index ad2eb1b21..755d8add1 100644
--- a/javax/swing/plaf/InsetsUIResource.java
+++ b/javax/swing/plaf/InsetsUIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/InternalFrameUI.java b/javax/swing/plaf/InternalFrameUI.java
index 69bfb6506..fd1e3374c 100644
--- a/javax/swing/plaf/InternalFrameUI.java
+++ b/javax/swing/plaf/InternalFrameUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/LabelUI.java b/javax/swing/plaf/LabelUI.java
index bda4448b9..8fc1d711b 100644
--- a/javax/swing/plaf/LabelUI.java
+++ b/javax/swing/plaf/LabelUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ListUI.java b/javax/swing/plaf/ListUI.java
index 1639c41d3..66d5cf588 100644
--- a/javax/swing/plaf/ListUI.java
+++ b/javax/swing/plaf/ListUI.java
@@ -1,5 +1,5 @@
/* ListUI.java --
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -75,7 +75,7 @@ public abstract class ListUI
* @return the index of the closest cell, or -1 if the list model
* is empty.
*/
- public abstract int locationToIndex(JList index, Point location);
+ public abstract int locationToIndex(JList list, Point location);
/**
diff --git a/javax/swing/plaf/MenuBarUI.java b/javax/swing/plaf/MenuBarUI.java
index fa350b660..8835571ac 100644
--- a/javax/swing/plaf/MenuBarUI.java
+++ b/javax/swing/plaf/MenuBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/MenuItemUI.java b/javax/swing/plaf/MenuItemUI.java
index c44d1f441..31d73194a 100644
--- a/javax/swing/plaf/MenuItemUI.java
+++ b/javax/swing/plaf/MenuItemUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/OptionPaneUI.java b/javax/swing/plaf/OptionPaneUI.java
index 8a954537a..13d1caa6a 100644
--- a/javax/swing/plaf/OptionPaneUI.java
+++ b/javax/swing/plaf/OptionPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/PanelUI.java b/javax/swing/plaf/PanelUI.java
index d39d2e547..b1171b80d 100644
--- a/javax/swing/plaf/PanelUI.java
+++ b/javax/swing/plaf/PanelUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/PopupMenuUI.java b/javax/swing/plaf/PopupMenuUI.java
index 7e71a4b2e..c70ad2a4e 100644
--- a/javax/swing/plaf/PopupMenuUI.java
+++ b/javax/swing/plaf/PopupMenuUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ProgressBarUI.java b/javax/swing/plaf/ProgressBarUI.java
index 28ea6f3a9..79c1b95a3 100644
--- a/javax/swing/plaf/ProgressBarUI.java
+++ b/javax/swing/plaf/ProgressBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/RootPaneUI.java b/javax/swing/plaf/RootPaneUI.java
index 0943c9882..ff7d0a6e7 100644
--- a/javax/swing/plaf/RootPaneUI.java
+++ b/javax/swing/plaf/RootPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ScrollBarUI.java b/javax/swing/plaf/ScrollBarUI.java
index 37c0cf783..3cad39327 100644
--- a/javax/swing/plaf/ScrollBarUI.java
+++ b/javax/swing/plaf/ScrollBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ScrollPaneUI.java b/javax/swing/plaf/ScrollPaneUI.java
index 7d0bb892a..14d2ac61e 100644
--- a/javax/swing/plaf/ScrollPaneUI.java
+++ b/javax/swing/plaf/ScrollPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/SeparatorUI.java b/javax/swing/plaf/SeparatorUI.java
index 03778b95d..6855bd035 100644
--- a/javax/swing/plaf/SeparatorUI.java
+++ b/javax/swing/plaf/SeparatorUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/SliderUI.java b/javax/swing/plaf/SliderUI.java
index 2a839f802..775f19620 100644
--- a/javax/swing/plaf/SliderUI.java
+++ b/javax/swing/plaf/SliderUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/SpinnerUI.java b/javax/swing/plaf/SpinnerUI.java
index 497fdb237..fb4a3b13a 100644
--- a/javax/swing/plaf/SpinnerUI.java
+++ b/javax/swing/plaf/SpinnerUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/SplitPaneUI.java b/javax/swing/plaf/SplitPaneUI.java
index 146db7664..ea9af2b17 100644
--- a/javax/swing/plaf/SplitPaneUI.java
+++ b/javax/swing/plaf/SplitPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/TabbedPaneUI.java b/javax/swing/plaf/TabbedPaneUI.java
index f0cf69919..6ab823b50 100644
--- a/javax/swing/plaf/TabbedPaneUI.java
+++ b/javax/swing/plaf/TabbedPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/TableHeaderUI.java b/javax/swing/plaf/TableHeaderUI.java
index 26bc9e29b..f23ca74d7 100644
--- a/javax/swing/plaf/TableHeaderUI.java
+++ b/javax/swing/plaf/TableHeaderUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/TableUI.java b/javax/swing/plaf/TableUI.java
index 7062b93cc..e56bcd131 100644
--- a/javax/swing/plaf/TableUI.java
+++ b/javax/swing/plaf/TableUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/TextUI.java b/javax/swing/plaf/TextUI.java
index b28dd372e..dcabdfcdb 100644
--- a/javax/swing/plaf/TextUI.java
+++ b/javax/swing/plaf/TextUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,6 +40,7 @@ package javax.swing.plaf;
import java.awt.Point;
import java.awt.Rectangle;
+import java.awt.Shape;
import javax.swing.text.BadLocationException;
import javax.swing.text.EditorKit;
@@ -83,9 +84,7 @@ public abstract class TextUI
* @throws BadLocationException if <code>pos</code> does not
* designate a valid position in the document model.
*
- * @see javax.swing.text.View#modelToView(int,
- * javax.swing.text.Position.Bias, int,
- * javax.swing.text.position.Bias, java.awt.Shape)
+ * @see javax.swing.text.ComponentView#modelToView(int, Shape, Position.Bias)
*/
public abstract Rectangle modelToView(JTextComponent tc, int pos)
throws BadLocationException;
@@ -113,9 +112,7 @@ public abstract class TextUI
* @throws BadLocationException if <code>pos</code> does not
* designate a valid position in the document model.
*
- * @see javax.swing.text.View#modelToView(int,
- * javax.swing.text.Position.Bias, int,
- * javax.swing.text.position.Bias, java.awt.Shape)
+ * @see javax.swing.text.ComponentView#modelToView(int, Shape, Position.Bias)
*/
public abstract Rectangle modelToView(JTextComponent tc, int pos,
Position.Bias bias)
@@ -126,10 +123,10 @@ public abstract class TextUI
* Finds the caret position which is closest to the specified visual
* location.
*
- * @param tc the <code>JTextComponent</code> for which this
+ * @param t the <code>JTextComponent</code> for which this
* delegate object provides the user interface.
*
- * @param loc the position in view coordinates.
+ * @param pt the position in view coordinates.
*
* @return the caret position which is closest to <code>loc</code>.
*
@@ -191,7 +188,7 @@ public abstract class TextUI
*
* @throws IllegalArgumentException if <code>direction</code>
* is not one of <code>Position.Bias.Forward</code>
- * or <code>Position.Biad.Backward</code>.
+ * or <code>Position.Bias.Backward</code>.
*/
public abstract int getNextVisualPositionFrom(JTextComponent tc,
int pos,
diff --git a/javax/swing/plaf/ToolBarUI.java b/javax/swing/plaf/ToolBarUI.java
index 18b27d3ae..730cf4887 100644
--- a/javax/swing/plaf/ToolBarUI.java
+++ b/javax/swing/plaf/ToolBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/ToolTipUI.java b/javax/swing/plaf/ToolTipUI.java
index 4f332a635..4383d0edd 100644
--- a/javax/swing/plaf/ToolTipUI.java
+++ b/javax/swing/plaf/ToolTipUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/TreeUI.java b/javax/swing/plaf/TreeUI.java
index d4bee57cf..e32952de7 100644
--- a/javax/swing/plaf/TreeUI.java
+++ b/javax/swing/plaf/TreeUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/UIResource.java b/javax/swing/plaf/UIResource.java
index 1fff8488c..59edf5666 100644
--- a/javax/swing/plaf/UIResource.java
+++ b/javax/swing/plaf/UIResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,7 @@ package javax.swing.plaf;
/**
* This public interface is used to designate which objects were created by
- * <code>ComponentUI</code> delegates. When uninstalling the user public interface
+ * {@link ComponentUI} delegates. When uninstalling the user public interface
* renderer with <code>ComponentUI.uninstallUI()</code> the renderer
* property is set to <code>null</code>.
* <br>
@@ -50,6 +50,6 @@ package javax.swing.plaf;
* they are initialized or set to <code>null</code>.
*
* @author Brian Jones
- * @see java.lang.ComponentUI
+ * @see ComponentUI
*/
public interface UIResource { }
diff --git a/javax/swing/plaf/ViewportUI.java b/javax/swing/plaf/ViewportUI.java
index 3b2892049..087938f1e 100644
--- a/javax/swing/plaf/ViewportUI.java
+++ b/javax/swing/plaf/ViewportUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicArrowButton.java b/javax/swing/plaf/basic/BasicArrowButton.java
index 0526961a9..4da4691f6 100644
--- a/javax/swing/plaf/basic/BasicArrowButton.java
+++ b/javax/swing/plaf/basic/BasicArrowButton.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicBorders.java b/javax/swing/plaf/basic/BasicBorders.java
index dd668e353..e7d6e4338 100644
--- a/javax/swing/plaf/basic/BasicBorders.java
+++ b/javax/swing/plaf/basic/BasicBorders.java
@@ -1,5 +1,5 @@
/* BasicBorders.java --
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -89,9 +89,9 @@ public class BasicBorders
* height="170" alt="[A screen shot of the returned border]" />
*
* @return a {@link
- * javax.swing.plaf.BorderUIResource#CompoundBorderUIResource}
- * whose outer border is a {@link #ButtonBorder} and whose
- * inner border is a {@link #MarginBorder}.
+ * javax.swing.plaf.BorderUIResource.CompoundBorderUIResource}
+ * whose outer border is a {@link ButtonBorder} and whose
+ * inner border is a {@link MarginBorder}.
*/
public static Border getButtonBorder()
{
@@ -139,9 +139,9 @@ public class BasicBorders
* height="135" alt="[A screen shot of the returned border]" />
*
* @return a {@link
- * javax.swing.plaf.BorderUIResource#CompoundBorderUIResource}
- * whose outer border is a {@link #RadioButtonBorder} and whose
- * inner border is a {@link #MarginBorder}.
+ * javax.swing.plaf.BorderUIResource.CompoundBorderUIResource}
+ * whose outer border is a {@link RadioButtonBorder} and whose
+ * inner border is a {@link MarginBorder}.
*/
public static Border getRadioButtonBorder()
{
@@ -191,9 +191,9 @@ public class BasicBorders
* height="135" alt="[A screen shot of the returned border]" />
*
* @return a {@link
- * javax.swing.plaf.BorderUIResource#CompoundBorderUIResource}
- * whose outer border is a {@link #ToggleButtonBorder} and whose
- * inner border is a {@link #MarginBorder}.
+ * javax.swing.plaf.BorderUIResource.CompoundBorderUIResource}
+ * whose outer border is a {@link ToggleButtonBorder} and whose
+ * inner border is a {@link MarginBorder}.
*/
public static Border getToggleButtonBorder()
{
@@ -241,7 +241,7 @@ public class BasicBorders
* <p><img src="doc-files/BasicBorders.MenuBarBorder-1.png" width="500"
* height="140" alt="[A screen shot of a JMenuBar with this border]" />
*
- * @return a {@link #MenuBarBorder}.
+ * @return a {@link MenuBarBorder}.
*
* @see javax.swing.JMenuBar
*/
@@ -272,7 +272,7 @@ public class BasicBorders
* <p><img src="doc-files/BasicBorders.SplitPaneBorder-2.png" width="520"
* height="200" alt="[A screen shot for JSplitPane.VERTICAL_SPLIT]" />
*
- * @return a {@link #SplitPaneBorder}.
+ * @return a {@link SplitPaneBorder}.
*
* @see javax.swing.JSplitPane
* @see #getSplitPaneDividerBorder()
@@ -339,8 +339,7 @@ public class BasicBorders
* height="200" alt="[A screen shot of a border returned by
* this method]" />
*
- * @return an instance of
- * {@link javax.swing.plaf.basic.BasicBorders$FieldBorder}.
+ * @return an instance of {@link FieldBorder}.
*
* @see javax.swing.JTextField
* @see javax.swing.text.JTextComponent
@@ -592,7 +591,7 @@ public class BasicBorders
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
@@ -756,7 +755,7 @@ public class BasicBorders
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
@@ -1020,7 +1019,7 @@ public class BasicBorders
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
@@ -1176,7 +1175,7 @@ public class BasicBorders
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
@@ -1230,7 +1229,7 @@ public class BasicBorders
* Paints the border around a rollover button. If <code>c</code>
* is not an {@link javax.swing.AbstractButton} whose model
* returns <code>true</code> for {@link
- * javax.swing.ButtonModel#isRollver}, nothing gets painted at
+ * javax.swing.ButtonModel#isRollover}, nothing gets painted at
* all.
*
* @param c the button whose border is to be painted.
@@ -1309,8 +1308,8 @@ public class BasicBorders
* appearance of the Sun reference implementation. A bug report has
* been filed with Sun (review ID 188774).
*
- * @see {@link #getSplitPaneBorder()}
- * @see {@link #getSplitPaneDividerBorder()}
+ * @see #getSplitPaneBorder()
+ * @see #getSplitPaneDividerBorder()
*
* @author Sascha Brawer (brawer@dandelis.ch)
*/
@@ -1797,7 +1796,7 @@ public class BasicBorders
*
* @return the same object that was passed for <code>insets</code>.
*
- * @see #getBorderInsets()
+ * @see #getBorderInsets(Component)
*/
public Insets getBorderInsets(Component c, Insets insets)
{
diff --git a/javax/swing/plaf/basic/BasicButtonListener.java b/javax/swing/plaf/basic/BasicButtonListener.java
index 3a81e3ff9..5349f5240 100644
--- a/javax/swing/plaf/basic/BasicButtonListener.java
+++ b/javax/swing/plaf/basic/BasicButtonListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -87,9 +87,6 @@ public class BasicButtonListener
if (e.getSource() instanceof AbstractButton)
{
AbstractButton button = (AbstractButton) e.getSource();
- ButtonModel model = button.getModel();
- model.setArmed(false);
-
if (button.isFocusPainted())
button.repaint();
}
diff --git a/javax/swing/plaf/basic/BasicButtonUI.java b/javax/swing/plaf/basic/BasicButtonUI.java
index 6c0ac38b8..0c069da0f 100644
--- a/javax/swing/plaf/basic/BasicButtonUI.java
+++ b/javax/swing/plaf/basic/BasicButtonUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -200,7 +200,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Calculate the preferred size of this component, by delegating to
- * {@link BasicGraphicsUtils.getPreferredButtonSize}.
+ * {@link BasicGraphicsUtils#getPreferredButtonSize}.
*
* @param c The component to measure
*
@@ -285,7 +285,8 @@ public class BasicButtonUI extends ButtonUI
paintIcon(g, c, ir);
if (text != null)
paintText(g, b, tr, text);
- paintFocus(g, b, vr, tr, ir);
+ if (b.isFocusOwner())
+ paintFocus(g, b, vr, tr, ir);
}
/**
@@ -300,21 +301,14 @@ public class BasicButtonUI extends ButtonUI
* @param tr Text rectangle, contained in visible rectangle
* @param ir Icon rectangle, contained in visible rectangle
*
- * @see AbstractButton.isFocusPainted()
- * @see JComponent.hasFocus()
+ * @see AbstractButton#isFocusPainted()
+ * @see JComponent#hasFocus()
*/
protected void paintFocus(Graphics g, AbstractButton b, Rectangle vr,
Rectangle tr, Rectangle ir)
{
- if (b.hasFocus() && b.isFocusPainted())
- {
- Color saved_color = g.getColor();
- g.setColor(focusColor);
- Rectangle focusRect = ir.union(tr);
- g.drawRect(focusRect.x, focusRect.y,
- focusRect.width, focusRect.height);
- g.setColor(saved_color);
- }
+ // In the BasicLookAndFeel no focus border is drawn. This can be
+ // overridden in subclasses to implement such behaviour.
}
/**
diff --git a/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java b/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
index 5d7bbcd2c..da11898bf 100644
--- a/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
+++ b/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicCheckBoxUI.java b/javax/swing/plaf/basic/BasicCheckBoxUI.java
index 5e1e0f5a9..e3167327c 100644
--- a/javax/swing/plaf/basic/BasicCheckBoxUI.java
+++ b/javax/swing/plaf/basic/BasicCheckBoxUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicColorChooserUI.java b/javax/swing/plaf/basic/BasicColorChooserUI.java
index 5b876284c..4e6d38154 100644
--- a/javax/swing/plaf/basic/BasicColorChooserUI.java
+++ b/javax/swing/plaf/basic/BasicColorChooserUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicComboBoxEditor.java b/javax/swing/plaf/basic/BasicComboBoxEditor.java
index a55e13c95..dd867f0dc 100644
--- a/javax/swing/plaf/basic/BasicComboBoxEditor.java
+++ b/javax/swing/plaf/basic/BasicComboBoxEditor.java
@@ -1,5 +1,5 @@
/* BasicComboBoxEditor.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -81,17 +81,20 @@ public class BasicComboBoxEditor extends Object implements ComboBoxEditor,
}
/**
- * Sets item that should be editted when any editting operation is performed
+ * Sets item that should be edited when any editing operation is performed
* by the user. The value is always equal to the currently selected value
* in the combo box. Thus whenever a different value is selected from the
- * combo box list then this method should be called to change editting
+ * combo box list then this method should be called to change editing
* item to the new selected item.
*
- * @param selectedItem item that is currently selected in the combo box
+ * @param item item that is currently selected in the combo box
*/
public void setItem(Object item)
{
- editor.setText(item.toString());
+ if (item == null)
+ editor.setText("");
+ else
+ editor.setText(item.toString());
}
/**
diff --git a/javax/swing/plaf/basic/BasicComboBoxRenderer.java b/javax/swing/plaf/basic/BasicComboBoxRenderer.java
index 9f61e0d18..e4fbb8352 100644
--- a/javax/swing/plaf/basic/BasicComboBoxRenderer.java
+++ b/javax/swing/plaf/basic/BasicComboBoxRenderer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicComboBoxUI.java b/javax/swing/plaf/basic/BasicComboBoxUI.java
index 572902ec3..68e18a6ab 100644
--- a/javax/swing/plaf/basic/BasicComboBoxUI.java
+++ b/javax/swing/plaf/basic/BasicComboBoxUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicComboPopup.java b/javax/swing/plaf/basic/BasicComboPopup.java
index 2acc21fa7..73aac8d4e 100644
--- a/javax/swing/plaf/basic/BasicComboPopup.java
+++ b/javax/swing/plaf/basic/BasicComboPopup.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicDesktopIconUI.java b/javax/swing/plaf/basic/BasicDesktopIconUI.java
index 2a87761ee..561b497f1 100644
--- a/javax/swing/plaf/basic/BasicDesktopIconUI.java
+++ b/javax/swing/plaf/basic/BasicDesktopIconUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicDesktopPaneUI.java b/javax/swing/plaf/basic/BasicDesktopPaneUI.java
index a9e7ffceb..b15700d6f 100644
--- a/javax/swing/plaf/basic/BasicDesktopPaneUI.java
+++ b/javax/swing/plaf/basic/BasicDesktopPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicDirectoryModel.java b/javax/swing/plaf/basic/BasicDirectoryModel.java
index f83887e69..a694f3280 100644
--- a/javax/swing/plaf/basic/BasicDirectoryModel.java
+++ b/javax/swing/plaf/basic/BasicDirectoryModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicEditorPaneUI.java b/javax/swing/plaf/basic/BasicEditorPaneUI.java
index 18cacab11..d5b34d9ee 100644
--- a/javax/swing/plaf/basic/BasicEditorPaneUI.java
+++ b/javax/swing/plaf/basic/BasicEditorPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,30 +39,69 @@ exception statement from your version. */
package javax.swing.plaf.basic;
import javax.swing.JComponent;
+import javax.swing.JEditorPane;
import javax.swing.plaf.ComponentUI;
+import javax.swing.text.EditorKit;
import javax.swing.text.Element;
+import javax.swing.text.JTextComponent;
import javax.swing.text.PlainView;
import javax.swing.text.View;
+/**
+ * The UI class for {@link JEditorPane}s.
+ *
+ * @author original author unknown
+ * @author Roman Kennke (roman@kennke.org)
+ */
public class BasicEditorPaneUI extends BasicTextUI
{
+ /**
+ * Creates an instance of <code>BasicEditorPaneUI</code> for the text
+ * component <code>comp</code>.
+ *
+ * @param comp the component for which to create an UI
+ *
+ * @return the UI for <code>comp</code>
+ */
public static ComponentUI createUI(JComponent comp)
{
return new BasicEditorPaneUI();
}
+ /**
+ * Creates a new <code>BasicEditorPaneUI</code>
+ */
public BasicEditorPaneUI()
{
// Do nothing here.
}
+ // FIXME: Should not be overridden here but instead be handled by the
+ // JEditorPane's EditorKit. However, as long as we don't have styles in
+ // place this doesn't make much sense.
public View create(Element elem)
{
return new PlainView(elem);
}
+ /**
+ * Returns the property prefix to be used by this UI class. This is
+ * <code>EditorPane</code> in this case.
+ *
+ * @return <code>EditorPane</code>
+ */
protected String getPropertyPrefix()
{
return "EditorPane";
}
+
+ /**
+ * Gets the EditorKit for the text component.
+ *
+ * @param textComponent the text component for which to fetch the editor kit
+ */
+ public EditorKit getEditorKit(JTextComponent textComponent)
+ {
+ return ((JEditorPane) textComponent).getEditorKit();
+ }
}
diff --git a/javax/swing/plaf/basic/BasicFileChooserUI.java b/javax/swing/plaf/basic/BasicFileChooserUI.java
index d425ad324..fd34fbd62 100644
--- a/javax/swing/plaf/basic/BasicFileChooserUI.java
+++ b/javax/swing/plaf/basic/BasicFileChooserUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -152,8 +152,9 @@ public class BasicFileChooserUI extends FileChooserUI
{
File f = filechooser.getFileSystemView().createFileObject(obj
.toString());
- if (filechooser.isTraversable(f))
- filechooser.setCurrentDirectory(f);
+ if (filechooser.isTraversable(f) &&
+ filechooser.getFileSelectionMode() == JFileChooser.FILES_ONLY)
+ filechooser.setCurrentDirectory(f);
else
{
filechooser.setSelectedFile(f);
@@ -873,76 +874,74 @@ public class BasicFileChooserUI extends FileChooserUI
}
};
- // -- begin private --
+ // -- begin private, but package local since used in inner classes --
- /** DOCUMENT ME! */
- private JFileChooser filechooser;
+ JFileChooser filechooser;
/** DOCUMENT ME! */
- private JList filelist;
+ JList filelist;
/** DOCUMENT ME! */
- private JComboBox filters;
+ JComboBox filters;
/** DOCUMENT ME! */
- private BasicDirectoryModel model;
+ BasicDirectoryModel model;
/** DOCUMENT ME! */
- private FileFilter acceptAll = new AcceptAllFileFilter();
+ FileFilter acceptAll = new AcceptAllFileFilter();
/** DOCUMENT ME! */
- private FileView fv = new BasicFileView();
+ FileView fv = new BasicFileView();
/** DOCUMENT ME! */
- private static final int ICON_SIZE = 24;
+ static final int ICON_SIZE = 24;
/** DOCUMENT ME! */
- private JComboBox parents;
+ JComboBox parents;
/** DOCUMENT ME! */
- private String filename;
+ String filename;
/** DOCUMENT ME! */
- private JButton accept;
+ JButton accept;
/** DOCUMENT ME! */
- private JButton cancel;
+ JButton cancel;
/** DOCUMENT ME! */
- private JButton upFolderButton;
+ JButton upFolderButton;
/** DOCUMENT ME! */
- private JButton newFolderButton;
+ JButton newFolderButton;
/** DOCUMENT ME! */
- private JButton homeFolderButton;
+ JButton homeFolderButton;
/** DOCUMENT ME! */
- private JPanel accessoryPanel;
+ JPanel accessoryPanel;
/** DOCUMENT ME! */
- private PropertyChangeListener propertyChangeListener;
+ PropertyChangeListener propertyChangeListener;
/** DOCUMENT ME! */
- private String acceptAllFileFilterText;
+ String acceptAllFileFilterText;
/** DOCUMENT ME! */
- private String dirDescText;
+ String dirDescText;
/** DOCUMENT ME! */
- private String fileDescText;
+ String fileDescText;
/** DOCUMENT ME! */
- private boolean dirSelected = false;
+ boolean dirSelected = false;
/** DOCUMENT ME! */
- private File currDir = null;
+ File currDir = null;
- /** DOCUMENT ME! */
- private JPanel bottomPanel;
+ JPanel bottomPanel;
/** DOCUMENT ME! */
- private JPanel closePanel;
+ JPanel closePanel;
// -- end private --
private class ListLabelRenderer
@@ -1028,10 +1027,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
}
- /**
- * DOCUMENT ME!
- */
- private void closeDialog()
+ void closeDialog()
{
Window owner = SwingUtilities.windowForComponent(filechooser);
if (owner instanceof JDialog)
@@ -1167,10 +1163,7 @@ public class BasicFileChooserUI extends FileChooserUI
};
}
- /**
- * DOCUMENT ME!
- */
- private void filterEntries()
+ void filterEntries()
{
FileFilter[] list = filechooser.getChoosableFileFilters();
if (filters.getItemCount() > 0)
diff --git a/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java b/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
index c61dc40a5..3abd76fe2 100644
--- a/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
+++ b/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicGraphicsUtils.java b/javax/swing/plaf/basic/BasicGraphicsUtils.java
index 7eef7760f..78ee62f95 100644
--- a/javax/swing/plaf/basic/BasicGraphicsUtils.java
+++ b/javax/swing/plaf/basic/BasicGraphicsUtils.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,6 +51,8 @@ import java.awt.font.TextLayout;
import java.awt.geom.Rectangle2D;
import javax.swing.AbstractButton;
+import javax.swing.Icon;
+import javax.swing.JComponent;
import javax.swing.SwingUtilities;
@@ -585,7 +587,9 @@ public class BasicGraphicsUtils
* and <code>height</code> fields indicate the preferred
* extent in pixels.
*
- * @see javax.swing.SwingUtilities#layoutCompoundLabel
+ * @see javax.swing.SwingUtilities#layoutCompoundLabel(JComponent,
+ * FontMetrics, String, Icon, int, int, int, int, Rectangle, Rectangle,
+ * Rectangle, int)
*/
public static Dimension getPreferredButtonSize(AbstractButton b,
int textIconGap)
diff --git a/javax/swing/plaf/basic/BasicIconFactory.java b/javax/swing/plaf/basic/BasicIconFactory.java
index a2acc8116..43380c203 100644
--- a/javax/swing/plaf/basic/BasicIconFactory.java
+++ b/javax/swing/plaf/basic/BasicIconFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -70,10 +70,100 @@ public class BasicIconFactory implements Serializable
}
}
+ /**
+ * The icon used for CheckBoxes in the BasicLookAndFeel. This is an empty
+ * icon with a size of 13x13 pixels.
+ */
+ static class CheckBoxIcon
+ implements Icon
+ {
+ /**
+ * Returns the height of the icon. The BasicLookAndFeel CheckBox icon
+ * has a height of 13 pixels.
+ *
+ * @return the height of the icon
+ */
+ public int getIconHeight()
+ {
+ return 13;
+ }
- public BasicIconFactory()
+ /**
+ * Returns the width of the icon. The BasicLookAndFeel CheckBox icon
+ * has a width of 13 pixels.
+ *
+ * @return the height of the icon
+ */
+ public int getIconWidth()
+ {
+ return 13;
+ }
+
+ /**
+ * Paints the icon. The BasicLookAndFeel CheckBox icon is empty and does
+ * not need to be painted.
+ *
+ * @param c the component to be painted
+ * @param g the Graphics context to be painted with
+ * @param x the x position of the icon
+ * @param y the y position of the icon
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ // The icon is empty and needs no painting.
+ }
+ }
+
+ /**
+ * The icon used for RadioButtons in the BasicLookAndFeel. This is an empty
+ * icon with a size of 13x13 pixels.
+ */
+ static class RadioButtonIcon
+ implements Icon
{
+ /**
+ * Returns the height of the icon. The BasicLookAndFeel RadioButton icon
+ * has a height of 13 pixels.
+ *
+ * @return the height of the icon
+ */
+ public int getIconHeight()
+ {
+ return 13;
+ }
+
+ /**
+ * Returns the width of the icon. The BasicLookAndFeel RadioButton icon
+ * has a width of 13 pixels.
+ *
+ * @return the height of the icon
+ */
+ public int getIconWidth()
+ {
+ return 13;
+ }
+
+ /**
+ * Paints the icon. The BasicLookAndFeel RadioButton icon is empty and does
+ * not need to be painted.
+ *
+ * @param c the component to be painted
+ * @param g the Graphics context to be painted with
+ * @param x the x position of the icon
+ * @param y the y position of the icon
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ // The icon is empty and needs no painting.
+ }
}
+
+ /** The cached CheckBoxIcon instance. */
+ private static CheckBoxIcon checkBoxIcon;
+
+ /** The cached CheckBoxIcon instance. */
+ private static RadioButtonIcon radioButtonIcon;
+
public static Icon getMenuItemCheckIcon()
{
return new DummyIcon();
@@ -114,115 +204,34 @@ public class BasicIconFactory implements Serializable
};
}
+ /**
+ * Returns an icon for CheckBoxes in the BasicLookAndFeel. CheckBox icons
+ * in the Basic L&amp;F are empty and have a size of 13x13 pixels.
+ * This method returns a shared single instance of this icon.
+ *
+ * @return an icon for CheckBoxes in the BasicLookAndFeel
+ */
public static Icon getCheckBoxIcon()
{
- return new Icon()
- {
- public int getIconHeight()
- {
- return 10;
- }
- public int getIconWidth()
- {
- return 10;
- }
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- if (c instanceof AbstractButton)
- {
- UIDefaults defaults;
- defaults = UIManager.getLookAndFeelDefaults();
- Color hi = defaults.getColor("CheckBox.highlight");
- Color low = defaults.getColor("CheckBox.darkShadow");
- Color sel = defaults.getColor("CheckBox.foreground");
- Color dim = defaults.getColor("CheckBox.shadow");
- Polygon check = new Polygon(new int[] {x+3, x+3, x+8},
- new int[] {y+5, y+9, y+3}, 3);
- AbstractButton b = (AbstractButton) c;
- Color saved = g.getColor();
- if (b.isEnabled())
- {
- g.setColor(low);
- g.drawRect(x, y, 10, 10);
- g.setColor(hi);
- g.drawRect(x+1, y+1, 10, 10);
- if (b.isSelected())
- {
- g.setColor(sel);
- if (b.isSelected())
- {
- g.drawLine(x+3, y+5, x+3, y+8);
- g.drawLine(x+4, y+5, x+4, y+8);
- g.drawLine(x+3, y+8, x+8, y+3);
- g.drawLine(x+4, y+8, x+8, y+3);
- }
- }
- }
- else
- {
- g.setColor(hi);
- g.drawRect(x, y, 10, 10);
- if (b.isSelected())
- {
- g.drawLine(x+3, y+5, x+3, y+9);
- g.drawLine(x+3, y+9, x+8, y+3);
- }
- }
- g.setColor(saved);
- }
- }
- };
+ if (checkBoxIcon == null)
+ checkBoxIcon = new CheckBoxIcon();
+ return checkBoxIcon;
}
+ /**
+ * Returns an icon for RadioButtons in the BasicLookAndFeel. RadioButton
+ * icons in the Basic L&amp;F are empty and have a size of 13x13 pixels.
+ * This method returns a shared single instance of this icon.
+ *
+ * @return an icon for RadioButtons in the BasicLookAndFeel
+ */
public static Icon getRadioButtonIcon()
{
- return new Icon()
- {
- public int getIconHeight()
- {
- return 12;
- }
- public int getIconWidth()
- {
- return 12;
- }
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- UIDefaults defaults;
- defaults = UIManager.getLookAndFeelDefaults();
- Color hi = defaults.getColor("RadioButton.highlight");
- Color low = defaults.getColor("RadioButton.darkShadow");
- Color sel = defaults.getColor("RadioButton.foreground");
- Color dim = defaults.getColor("RadioButton.shadow");
-
- if (c instanceof AbstractButton)
- {
- AbstractButton b = (AbstractButton) c;
- Color saved = g.getColor();
- if (b.isEnabled())
- {
- g.setColor(low);
- g.drawOval(x, y, 12, 12);
- g.setColor(hi);
- g.drawOval(x+1, y+1, 12, 12);
- if (b.isSelected())
- {
- g.setColor(sel);
- g.fillOval(x+4, y+4, 6, 6);
- }
- }
- else
- {
- g.setColor(hi);
- g.drawOval(x, y, 12, 12);
- if (b.isSelected())
- g.fillOval(x+4, y+4, 6, 6);
- }
- g.setColor(saved);
- }
- }
- };
+ if (radioButtonIcon == null)
+ radioButtonIcon = new RadioButtonIcon();
+ return radioButtonIcon;
}
+
public static Icon getCheckBoxMenuItemIcon()
{
return getCheckBoxIcon();
diff --git a/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java b/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
index f3939ac6b..92a6ea0bf 100644
--- a/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+++ b/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -253,11 +253,29 @@ public class BasicInternalFrameTitlePane extends JComponent
*/
public void propertyChange(PropertyChangeEvent evt)
{
- // The title and frameIcon are taken care of during painting time.
- // The only other thing this will care about are the "is----izable"
- // properties. So we call enable actions to properly handle the
- // buttons and menu items for us.
- enableActions();
+ String propName = evt.getPropertyName();
+ if (propName.equals("closable"))
+ {
+ if (evt.getNewValue().equals(Boolean.TRUE))
+ closeButton.setVisible(true);
+ else
+ closeButton.setVisible(false);
+ }
+ else if (propName.equals("iconifiable"))
+ {
+ if (evt.getNewValue().equals(Boolean.TRUE))
+ iconButton.setVisible(true);
+ else
+ iconButton.setVisible(false);
+ }
+ else if (propName.equals("maximizable"))
+ {
+ if (evt.getNewValue().equals(Boolean.TRUE))
+ maxButton.setVisible(true);
+ else
+ maxButton.setVisible(false);
+ }
+
}
}
@@ -349,48 +367,36 @@ public class BasicInternalFrameTitlePane extends JComponent
*/
public void layoutContainer(Container c)
{
- enableActions();
-
+ Dimension size = c.getSize();
Insets insets = c.getInsets();
- int width = c.getBounds().width - insets.left - insets.right;
- int height = c.getBounds().height - insets.top - insets.bottom;
+ int width = size.width - insets.left - insets.right;
+ int height = size.height - insets.top - insets.bottom;
// MenuBar is always present and located at the top left corner.
Dimension menupref = menuBar.getPreferredSize();
menuBar.setBounds(insets.left, insets.top, menupref.width, height);
- int loc = width + insets.left;
-
- Insets i = closeButton.getInsets();
- Dimension prefs = new Dimension(iconSize + i.left + i.right,
- iconSize + i.top + i.bottom);
- int top = insets.top + (height - prefs.height) / 2;
- if (closeAction.isEnabled())
+ int loc = width + insets.left - 1;
+ int top = insets.top + 1;
+ int buttonWidth = height - 2;
+ int buttonHeight = height - 4;
+ if (closeButton.isVisible())
{
- loc -= prefs.width;
- closeButton.setVisible(true);
- closeButton.setBounds(loc, top, prefs.width, prefs.height);
+ loc -= buttonWidth + 2;
+ closeButton.setBounds(loc, top, buttonWidth, buttonHeight);
}
- else
- closeButton.setVisible(false);
- if (maximizeAction.isEnabled())
+ if (maxButton.isVisible())
{
- loc -= prefs.width;
- maxButton.setVisible(true);
- maxButton.setBounds(loc, top, prefs.width, prefs.height);
+ loc -= buttonWidth + 2;
+ maxButton.setBounds(loc, top, buttonWidth, buttonHeight);
}
- else
- maxButton.setVisible(false);
- if (iconifyAction.isEnabled())
+ if (iconButton.isVisible())
{
- loc -= prefs.width;
- iconButton.setVisible(true);
- iconButton.setBounds(loc, top, prefs.width, prefs.height);
+ loc -= buttonWidth + 2;
+ iconButton.setBounds(loc, top, buttonWidth, buttonHeight);
}
- else
- iconButton.setVisible(false);
if (title != null)
title.setBounds(insets.left + menupref.width, insets.top,
@@ -420,26 +426,7 @@ public class BasicInternalFrameTitlePane extends JComponent
*/
public Dimension preferredLayoutSize(Container c)
{
- Insets frameInsets = frame.getInsets();
-
- // Height is the max of the preferredHeights of all components
- // inside the pane
- int height = 0;
- int width = 0;
- Dimension d;
-
- Component[] components = BasicInternalFrameTitlePane.this.getComponents();
- for (int i = 0; i < components.length; i++)
- {
- d = components[i].getPreferredSize();
- height = Math.max(height, d.height);
- width += d.width;
- }
-
- Insets insets = BasicInternalFrameTitlePane.this.getInsets();
- height += insets.top + insets.bottom;
-
- return new Dimension(width, height);
+ return new Dimension(22, 18);
}
/**
@@ -468,7 +455,6 @@ public class BasicInternalFrameTitlePane extends JComponent
{
super(a);
setMargin(new Insets(0, 0, 0, 0));
- setBorder(null);
}
/**
@@ -540,110 +526,14 @@ public class BasicInternalFrameTitlePane extends JComponent
/** Inactive foreground color. */
protected Color inactiveFGColor;
- // FIXME: These icons need to be moved to MetalIconFactory.
-
- /** The size of the icons in the buttons. */
- private static final int iconSize = 16;
-
- /** The icon displayed in the close button. */
- protected Icon closeIcon = new Icon()
- {
- public int getIconHeight()
- {
- return iconSize;
- }
-
- public int getIconWidth()
- {
- return iconSize;
- }
-
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.BLACK);
-
- int four = iconSize / 4;
- int six = iconSize * 6 / 16;
- int ten = iconSize * 10 / 16;
- int twelve = iconSize * 12 / 16;
-
- Polygon a = new Polygon(new int[] { four, six, ten, twelve },
- new int[] { six, four, twelve, ten }, 4);
- Polygon b = new Polygon(new int[] { four, six, ten, twelve },
- new int[] { ten, twelve, four, six }, 4);
-
- g.fillPolygon(a);
- g.fillPolygon(b);
-
- g.setColor(saved);
- g.translate(-x, -y);
- }
- };
-
- // FIXME: Create new icon.
-
/** The icon displayed in the restore button. */
- protected Icon minIcon;
+ protected Icon minIcon = BasicIconFactory.createEmptyFrameIcon();
/** The icon displayed in the maximize button. */
- protected Icon maxIcon = new Icon()
- {
- public int getIconHeight()
- {
- return iconSize;
- }
-
- public int getIconWidth()
- {
- return iconSize;
- }
-
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.BLACK);
-
- int four = iconSize / 4;
- int two = four / 2;
- int six = iconSize * 6 / 16;
- int eight = four * 2;
-
- g.fillRect(four, four, eight, two);
- g.drawRect(four, six, eight, six);
-
- g.setColor(saved);
- g.translate(-x, -y);
- }
- };
+ protected Icon maxIcon = BasicIconFactory.createEmptyFrameIcon();
/** The icon displayed in the iconify button. */
- protected Icon iconIcon = new Icon()
- {
- public int getIconHeight()
- {
- return iconSize;
- }
-
- public int getIconWidth()
- {
- return iconSize;
- }
-
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.BLACK);
-
- g.fillRect(iconSize / 4, iconSize * 10 / 16, iconSize / 2, iconSize / 8);
-
- g.setColor(saved);
- g.translate(-x, -y);
- }
- };
+ protected Icon iconIcon = BasicIconFactory.createEmptyFrameIcon();
/** The JInternalFrame that this TitlePane is used in. */
protected JInternalFrame frame;
@@ -702,6 +592,7 @@ public class BasicInternalFrameTitlePane extends JComponent
setOpaque(true);
setBackground(Color.LIGHT_GRAY);
+ setOpaque(true);
installTitlePane();
}
@@ -813,26 +704,23 @@ public class BasicInternalFrameTitlePane extends JComponent
protected void createButtons()
{
closeButton = new PaneButton(closeAction);
- closeButton.setOpaque(false);
-
+ if (!frame.isClosable())
+ closeButton.setVisible(false);
iconButton = new PaneButton(iconifyAction);
- iconButton.setOpaque(false);
-
+ if (!frame.isIconifiable())
+ iconButton.setVisible(false);
maxButton = new PaneButton(maximizeAction);
- maxButton.setOpaque(false);
+ if (!frame.isMaximizable())
+ maxButton.setVisible(false);
}
/**
- * This method sets the icons in the buttons.
+ * This method sets the icons in the buttons. This is a no-op method here, it
+ * can be overridden by subclasses to set icons for the minimize-, maximize-
+ * and close-buttons.
*/
protected void setButtonIcons()
{
- if (closeButton != null)
- closeButton.setIcon(closeIcon);
- if (iconButton != null)
- iconButton.setIcon(iconIcon);
- if (maxButton != null)
- maxButton.setIcon(maxIcon);
}
/**
diff --git a/javax/swing/plaf/basic/BasicInternalFrameUI.java b/javax/swing/plaf/basic/BasicInternalFrameUI.java
index 088c26272..3febe58f4 100644
--- a/javax/swing/plaf/basic/BasicInternalFrameUI.java
+++ b/javax/swing/plaf/basic/BasicInternalFrameUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,7 +53,10 @@ import java.awt.event.ComponentListener;
import java.awt.event.MouseEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.beans.PropertyVetoException;
+import java.beans.VetoableChangeListener;
+import javax.swing.BorderFactory;
import javax.swing.DefaultDesktopManager;
import javax.swing.DesktopManager;
import javax.swing.JComponent;
@@ -62,11 +65,16 @@ import javax.swing.JInternalFrame;
import javax.swing.KeyStroke;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
import javax.swing.border.AbstractBorder;
+import javax.swing.border.BevelBorder;
+import javax.swing.border.Border;
import javax.swing.event.InternalFrameEvent;
import javax.swing.event.InternalFrameListener;
import javax.swing.event.MouseInputAdapter;
import javax.swing.event.MouseInputListener;
+import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.InternalFrameUI;
import javax.swing.plaf.UIResource;
@@ -642,6 +650,9 @@ public class BasicInternalFrameUI extends InternalFrameUI
/** The last component entered. */
private transient Component lastComponentEntered;
+ /** Used to store/reset lastComponentEntered. */
+ private transient Component tempComponent;
+
/** The number of presses. */
private transient int pressCount;
@@ -762,8 +773,9 @@ public class BasicInternalFrameUI extends InternalFrameUI
tp.x, tp.y, me.getClickCount(),
me.isPopupTrigger(),
me.getButton());
- lastComponentEntered.dispatchEvent(exited);
+ tempComponent = lastComponentEntered;
lastComponentEntered = null;
+ tempComponent.dispatchEvent(exited);
}
// If we have a candidate, maybe enter it.
@@ -864,8 +876,32 @@ public class BasicInternalFrameUI extends InternalFrameUI
* JInternalFrame.
*/
public class InternalFramePropertyChangeListener
- implements PropertyChangeListener
+ implements PropertyChangeListener, VetoableChangeListener
{
+
+ /**
+ * This method is called when one of the JInternalFrame's properties
+ * change. This method is to allow JInternalFrame to veto an attempt
+ * to close the internal frame. This allows JInternalFrame to honour
+ * its defaultCloseOperation if that is DO_NOTHING_ON_CLOSE.
+ */
+ public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException
+ {
+ if (e.getPropertyName().equals(JInternalFrame.IS_CLOSED_PROPERTY))
+ {
+ if (frame.getDefaultCloseOperation() == JInternalFrame.HIDE_ON_CLOSE)
+ {
+ frame.setVisible(false);
+ frame.getDesktopPane().repaint();
+ throw new PropertyVetoException ("close operation is HIDE_ON_CLOSE\n", e);
+ }
+ else if (frame.getDefaultCloseOperation() == JInternalFrame.DISPOSE_ON_CLOSE)
+ closeFrame(frame);
+ else
+ throw new PropertyVetoException ("close operation is DO_NOTHING_ON_CLOSE\n", e);
+ }
+ }
+
/**
* This method is called when one of the JInternalFrame's properties
* change.
@@ -881,8 +917,6 @@ public class BasicInternalFrameUI extends InternalFrameUI
else
minimizeFrame(frame);
}
- else if (evt.getPropertyName().equals(JInternalFrame.IS_CLOSED_PROPERTY))
- closeFrame(frame);
else if (evt.getPropertyName().equals(JInternalFrame.IS_ICON_PROPERTY))
{
if (frame.isIcon())
@@ -1031,6 +1065,13 @@ public class BasicInternalFrameUI extends InternalFrameUI
*/
protected PropertyChangeListener propertyChangeListener;
+ /**
+ * The VetoableChangeListener. Listens to PropertyChangeEvents
+ * from the JInternalFrame and allows the JInternalFrame to
+ * veto attempts to close it.
+ */
+ private VetoableChangeListener internalFrameVetoableChangeListener;
+
/** The InternalFrameListener that listens to the JInternalFrame. */
private transient BasicInternalFrameListener internalFrameListener;
@@ -1109,7 +1150,6 @@ public class BasicInternalFrameUI extends InternalFrameUI
installKeyboardActions();
frame.setOpaque(true);
- titlePane.setOpaque(true);
frame.invalidate();
}
}
@@ -1137,9 +1177,31 @@ public class BasicInternalFrameUI extends InternalFrameUI
* This method installs the defaults specified by the look and feel.
*/
protected void installDefaults()
- {
- // FIXME: Move border to MetalBorders
- frame.setBorder(new InternalFrameBorder());
+ {
+ // This is the border of InternalFrames in the BasicLookAndFeel.
+ // Note that there exist entries for various border colors in
+ // BasicLookAndFeel's defaults, but obviously they differ
+ // from the colors that are actually used by the JDK.
+ UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+ Color borderColor = defaults.getColor("InternalFrame.borderColor");
+ Border inner = BorderFactory.createLineBorder(borderColor, 1);
+ Color borderDarkShadow = defaults.getColor
+ ("InternalFrame.borderDarkShadow");
+ Color borderHighlight = defaults.getColor
+ ("InternalFrame.borderHighlight");
+ Color borderShadow = defaults.getColor("InternalFrame.borderShadow");
+ Color borderLight = defaults.getColor("InternalFrame.borderLight");
+ Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
+ borderShadow,
+ borderHighlight,
+ borderDarkShadow,
+ borderShadow);
+ Border border = new BorderUIResource.CompoundBorderUIResource(outer,
+ inner);
+ frame.setBorder(border);
+ frame.setFrameIcon(defaults.getIcon("InternalFrame.icon"));
+ // InternalFrames are invisible by default.
+ frame.setVisible(false);
}
/**
@@ -1171,12 +1233,13 @@ public class BasicInternalFrameUI extends InternalFrameUI
borderListener = createBorderListener(frame);
componentListener = createComponentListener();
propertyChangeListener = createPropertyChangeListener();
+ internalFrameVetoableChangeListener = new InternalFramePropertyChangeListener();
frame.addMouseListener(borderListener);
frame.addMouseMotionListener(borderListener);
frame.addInternalFrameListener(internalFrameListener);
frame.addPropertyChangeListener(propertyChangeListener);
-
+ frame.addVetoableChangeListener(internalFrameVetoableChangeListener);
frame.getRootPane().getGlassPane().addMouseListener(glassPaneDispatcher);
frame.getRootPane().getGlassPane().addMouseMotionListener(glassPaneDispatcher);
}
@@ -1552,7 +1615,10 @@ public class BasicInternalFrameUI extends InternalFrameUI
*/
protected DesktopManager getDesktopManager()
{
- DesktopManager value = frame.getDesktopPane().getDesktopManager();
+ DesktopManager value = null;
+ JDesktopPane pane = frame.getDesktopPane();
+ if (pane != null)
+ value = frame.getDesktopPane().getDesktopManager();
if (value == null)
value = createDesktopManager();
return value;
diff --git a/javax/swing/plaf/basic/BasicLabelUI.java b/javax/swing/plaf/basic/BasicLabelUI.java
index b278f1f59..e71e82f03 100644
--- a/javax/swing/plaf/basic/BasicLabelUI.java
+++ b/javax/swing/plaf/basic/BasicLabelUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -92,7 +92,8 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
/**
* Returns the preferred size of this component as calculated by the
- * {@link layoutCL} method.
+ * {@link #layoutCL(JLabel, FontMetrics, String, Icon, Rectangle, Rectangle,
+ * Rectangle)} method.
*
* @param c This {@link JComponent} to get a preferred size for.
*
@@ -350,8 +351,6 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
c.setForeground(defaults.getColor("Label.foreground"));
c.setBackground(defaults.getColor("Label.background"));
c.setFont(defaults.getFont("Label.font"));
- c.setBorder(defaults.getBorder("Label.border"));
- c.setOpaque(true);
//XXX: There are properties we don't use called disabledForeground
//and disabledShadow.
}
@@ -367,7 +366,6 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
c.setForeground(null);
c.setBackground(null);
c.setFont(null);
- c.setBorder(null);
}
/**
diff --git a/javax/swing/plaf/basic/BasicListUI.java b/javax/swing/plaf/basic/BasicListUI.java
index baaa04655..841bd670f 100644
--- a/javax/swing/plaf/basic/BasicListUI.java
+++ b/javax/swing/plaf/basic/BasicListUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -49,6 +49,9 @@ import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
@@ -93,7 +96,7 @@ public class BasicListUI extends ListUI
}
/**
- * A helper class which listens for {@link FocusEvents}
+ * A helper class which listens for {@link FocusEvent}s
* from the JList.
*/
public class FocusHandler implements FocusListener
@@ -131,7 +134,7 @@ public class BasicListUI extends ListUI
* A helper class which listens for {@link ListDataEvent}s generated by
* the {@link JList}'s {@link ListModel}.
*
- * @see javax.swing.JList#model
+ * @see javax.swing.JList#getModel()
*/
public class ListDataHandler implements ListDataListener
{
@@ -184,6 +187,138 @@ public class BasicListUI extends ListUI
}
/**
+ * A helper class which listens for {@link KeyEvents}s
+ * from the {@link JList}.
+ */
+ private class KeyHandler extends KeyAdapter
+ {
+ public KeyHandler()
+ {
+ }
+
+ public void keyPressed( KeyEvent evt )
+ {
+ int lead = BasicListUI.this.list.getLeadSelectionIndex();
+ int max = BasicListUI.this.list.getModel().getSize() - 1;
+ // Do nothing if list is empty
+ if (max == -1)
+ return;
+
+ // Process the key event. Bindings can be found in
+ // javax.swing.plaf.basic.BasicLookAndFeel.java
+ if ((evt.getKeyCode() == KeyEvent.VK_DOWN)
+ || (evt.getKeyCode() == KeyEvent.VK_KP_DOWN))
+ {
+ if (evt.getModifiers() == 0)
+ {
+ BasicListUI.this.list.clearSelection();
+ BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max));
+ }
+ else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ {
+ BasicListUI.this.list.getSelectionModel().
+ setLeadSelectionIndex(Math.min(lead+1,max));
+ }
+ }
+ else if ((evt.getKeyCode() == KeyEvent.VK_UP)
+ || (evt.getKeyCode() == KeyEvent.VK_KP_UP))
+ {
+ if (evt.getModifiers() == 0)
+ {
+ BasicListUI.this.list.clearSelection();
+ BasicListUI.this.list.setSelectedIndex(Math.max(lead-1,0));
+ }
+ else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ {
+ BasicListUI.this.list.getSelectionModel().
+ setLeadSelectionIndex(Math.max(lead-1,0));
+ }
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_PAGE_UP)
+ {
+ int target;
+ if (lead == BasicListUI.this.list.getFirstVisibleIndex())
+ {
+ target = Math.max
+ (0, lead - (BasicListUI.this.list.getLastVisibleIndex() -
+ BasicListUI.this.list.getFirstVisibleIndex() + 1));
+ }
+ else
+ {
+ target = BasicListUI.this.list.getFirstVisibleIndex();
+ }
+ if (evt.getModifiers() == 0)
+ BasicListUI.this.list.setSelectedIndex(target);
+ else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ BasicListUI.this.list.getSelectionModel().
+ setLeadSelectionIndex(target);
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_PAGE_DOWN)
+ {
+ int target;
+ if (lead == BasicListUI.this.list.getLastVisibleIndex())
+ {
+ target = Math.min
+ (max, lead + (BasicListUI.this.list.getLastVisibleIndex() -
+ BasicListUI.this.list.getFirstVisibleIndex() + 1));
+ }
+ else
+ {
+ target = BasicListUI.this.list.getLastVisibleIndex();
+ }
+ if (evt.getModifiers() == 0)
+ BasicListUI.this.list.setSelectedIndex(target);
+ else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ BasicListUI.this.list.getSelectionModel().
+ setLeadSelectionIndex(target);
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_BACK_SLASH
+ && (evt.getModifiers() == InputEvent.CTRL_MASK))
+ {
+ BasicListUI.this.list.clearSelection();
+ }
+ else if ((evt.getKeyCode() == KeyEvent.VK_HOME)
+ || evt.getKeyCode() == KeyEvent.VK_END)
+ {
+ if (evt.getModifiers() != 0 &&
+ evt.getModifiers() != InputEvent.SHIFT_MASK)
+ return;
+ // index is either 0 for HOME, or last cell for END
+ int index = (evt.getKeyCode() == KeyEvent.VK_HOME) ? 0 : max;
+
+ if (!evt.isShiftDown() ||(BasicListUI.this.list.getSelectionMode()
+ == ListSelectionModel.SINGLE_SELECTION))
+ BasicListUI.this.list.setSelectedIndex(index);
+ else if (BasicListUI.this.list.getSelectionMode() ==
+ ListSelectionModel.SINGLE_INTERVAL_SELECTION)
+ BasicListUI.this.list.setSelectionInterval
+ (BasicListUI.this.list.getAnchorSelectionIndex(), index);
+ else
+ BasicListUI.this.list.getSelectionModel().
+ setLeadSelectionIndex(index);
+ }
+ else if ((evt.getKeyCode() == KeyEvent.VK_A || evt.getKeyCode()
+ == KeyEvent.VK_SLASH) && (evt.getModifiers() ==
+ InputEvent.CTRL_MASK))
+ {
+ BasicListUI.this.list.setSelectionInterval(0, max);
+ // this next line is to restore the lead selection index to the old
+ // position, because select-all should not change the lead index
+ BasicListUI.this.list.addSelectionInterval(lead, lead);
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_SPACE &&
+ (evt.getModifiers() == InputEvent.CTRL_MASK))
+ {
+ BasicListUI.this.list.getSelectionModel().
+ setLeadSelectionIndex(Math.min(lead+1,max));
+ }
+
+ BasicListUI.this.list.ensureIndexIsVisible
+ (BasicListUI.this.list.getLeadSelectionIndex());
+ }
+ }
+
+ /**
* A helper class which listens for {@link MouseEvent}s
* from the {@link JList}.
*/
@@ -197,6 +332,49 @@ public class BasicListUI extends ListUI
*/
public void mouseClicked(MouseEvent event)
{
+ Point click = event.getPoint();
+ int index = BasicListUI.this.locationToIndex(list, click);
+ if (index == -1)
+ return;
+ if (event.isShiftDown())
+ {
+ if (BasicListUI.this.list.getSelectionMode() ==
+ ListSelectionModel.SINGLE_SELECTION)
+ BasicListUI.this.list.setSelectedIndex(index);
+ else if (BasicListUI.this.list.getSelectionMode() ==
+ ListSelectionModel.SINGLE_INTERVAL_SELECTION)
+ // COMPAT: the IBM VM is compatible with the following line of code.
+ // However, compliance with Sun's VM would correspond to replacing
+ // getAnchorSelectionIndex() with getLeadSelectionIndex().This is
+ // both unnatural and contradictory to the way they handle other
+ // similar UI interactions.
+ BasicListUI.this.list.setSelectionInterval
+ (BasicListUI.this.list.getAnchorSelectionIndex(), index);
+ else
+ // COMPAT: both Sun and IBM are compatible instead with:
+ // BasicListUI.this.list.setSelectionInterval
+ // (BasicListUI.this.list.getLeadSelectionIndex(),index);
+ // Note that for IBM this is contradictory to what they did in
+ // the above situation for SINGLE_INTERVAL_SELECTION.
+ // The most natural thing to do is the following:
+ BasicListUI.this.list.getSelectionModel().
+ setLeadSelectionIndex(index);
+ }
+ else if (event.isControlDown())
+ {
+ if (BasicListUI.this.list.getSelectionMode() ==
+ ListSelectionModel.SINGLE_SELECTION)
+ BasicListUI.this.list.setSelectedIndex(index);
+ else if (BasicListUI.this.list.isSelectedIndex(index))
+ BasicListUI.this.list.removeSelectionInterval(index,index);
+ else
+ BasicListUI.this.list.addSelectionInterval(index,index);
+ }
+ else
+ BasicListUI.this.list.setSelectedIndex(index);
+
+ BasicListUI.this.list.ensureIndexIsVisible
+ (BasicListUI.this.list.getLeadSelectionIndex());
}
/**
@@ -207,12 +385,6 @@ public class BasicListUI extends ListUI
*/
public void mousePressed(MouseEvent event)
{
- Point click = event.getPoint();
- int index = BasicListUI.this.locationToIndex(list, click);
- if (index == -1)
- return;
-
- BasicListUI.this.list.setSelectedIndex(index);
}
/**
@@ -315,6 +487,9 @@ public class BasicListUI extends ListUI
/** The mouse listener listening to the list. */
protected MouseInputListener mouseInputListener;
+ /** The key listener listening to the list */
+ private KeyHandler keyListener;
+
/** The property change listener listening to the list. */
protected PropertyChangeListener propertyChangeListener;
@@ -499,8 +674,6 @@ public class BasicListUI extends ListUI
void damageLayout()
{
updateLayoutStateNeeded = 1;
- if (list != null)
- list.revalidate();
}
/**
@@ -525,6 +698,7 @@ public class BasicListUI extends ListUI
listDataListener = new ListDataHandler();
listSelectionListener = new ListSelectionHandler();
mouseInputListener = new MouseInputHandler();
+ keyListener = new KeyHandler();
propertyChangeListener = new PropertyChangeHandler();
componentListener = new ComponentHandler();
updateLayoutStateNeeded = 1;
@@ -572,6 +746,7 @@ public class BasicListUI extends ListUI
list.getModel().addListDataListener(listDataListener);
list.addListSelectionListener(listSelectionListener);
list.addMouseListener(mouseInputListener);
+ list.addKeyListener(keyListener);
list.addMouseMotionListener(mouseInputListener);
list.addPropertyChangeListener(propertyChangeListener);
list.addComponentListener(componentListener);
@@ -586,6 +761,7 @@ public class BasicListUI extends ListUI
list.getModel().removeListDataListener(listDataListener);
list.removeListSelectionListener(listSelectionListener);
list.removeMouseListener(mouseInputListener);
+ list.removeKeyListener(keyListener);
list.removeMouseMotionListener(mouseInputListener);
list.removePropertyChangeListener(propertyChangeListener);
}
@@ -711,11 +887,11 @@ public class BasicListUI extends ListUI
ListCellRenderer rend, ListModel data,
ListSelectionModel sel, int lead)
{
- boolean is_sel = list.isSelectedIndex(row);
- boolean has_focus = false;
+ boolean isSel = list.isSelectedIndex(row);
+ boolean hasFocus = (list.getLeadSelectionIndex() == row) && BasicListUI.this.list.hasFocus();
Component comp = rend.getListCellRendererComponent(list,
data.getElementAt(row),
- 0, is_sel, has_focus);
+ 0, isSel, hasFocus);
//comp.setBounds(new Rectangle(0, 0, bounds.width, bounds.height));
//comp.paint(g);
rendererPane.paintComponent(g, comp, list, bounds);
diff --git a/javax/swing/plaf/basic/BasicLookAndFeel.java b/javax/swing/plaf/basic/BasicLookAndFeel.java
index 67cf25057..54d91d888 100644
--- a/javax/swing/plaf/basic/BasicLookAndFeel.java
+++ b/javax/swing/plaf/basic/BasicLookAndFeel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,10 +47,12 @@ import java.io.Serializable;
import java.util.Enumeration;
import java.util.ResourceBundle;
-import javax.swing.ImageIcon;
+import javax.swing.BorderFactory;
import javax.swing.KeyStroke;
import javax.swing.LookAndFeel;
import javax.swing.UIDefaults;
+import javax.swing.border.BevelBorder;
+import javax.swing.border.Border;
import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.DimensionUIResource;
@@ -69,7 +71,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
static final long serialVersionUID = -6096995660290287879L;
/**
- * Constructor BasicLookAndFeel
+ * Creates a new instance of the Basic look and feel.
*/
public BasicLookAndFeel()
{
@@ -77,8 +79,10 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}
/**
- * getDefaults
- * @return UIDefaults
+ * Creates and returns a new instance of the default resources for this look
+ * and feel.
+ *
+ * @return The UI defaults.
*/
public UIDefaults getDefaults()
{
@@ -95,8 +99,10 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}
/**
- * initClassDefaults
- * @param value0 TODO
+ * Populates the <code>defaults</code> table with mappings between class IDs
+ * and fully qualified class names for the UI delegates.
+ *
+ * @param defaults the defaults table (<code>null</code> not permitted).
*/
protected void initClassDefaults(UIDefaults defaults)
{
@@ -155,8 +161,9 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}
/**
- * initSystemColorDefaults
- * @param defaults TODO
+ * Populates the <code>defaults</code> table with system color defaults.
+ *
+ * @param defaults the defaults table (<code>null</code> not permitted).
*/
protected void initSystemColorDefaults(UIDefaults defaults)
{
@@ -198,13 +205,14 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}
/**
- * loadSystemColors
- * @param defaults TODO
- * @param value1 TODO
- * @param value2 TODO
+ * Loads the system colors. This method is not implemented yet.
+ *
+ * @param defaults the defaults table (<code>null</code> not permitted).
+ * @param systemColors TODO
+ * @param useNative TODO
*/
- protected void loadSystemColors(UIDefaults defaults, String[] value1,
- boolean value2)
+ protected void loadSystemColors(UIDefaults defaults, String[] systemColors,
+ boolean useNative)
{
// TODO
}
@@ -232,7 +240,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
/**
* initComponentDefaults
- * @param defaults TODO
+ * @param defaults the defaults table (<code>null</code> not permitted).
*/
protected void initComponentDefaults(UIDefaults defaults)
{
@@ -247,7 +255,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"AbstractUndoableEdit.undoText", "Undo",
"AbstractUndoableEdit.redoText", "Redo",
- "Button.background", new ColorUIResource(light),
+ "Button.background", new ColorUIResource(Color.LIGHT_GRAY),
"Button.border",
new UIDefaults.LazyValue()
{
@@ -256,17 +264,17 @@ public abstract class BasicLookAndFeel extends LookAndFeel
return BasicBorders.getButtonBorder();
}
},
- "Button.darkShadow", new ColorUIResource(shadow),
+ "Button.darkShadow", new ColorUIResource(Color.BLACK),
"Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"SPACE", "pressed",
"released SPACE", "released"
}),
"Button.font", new FontUIResource("Dialog", Font.PLAIN, 12),
- "Button.foreground", new ColorUIResource(darkShadow),
- "Button.highlight", new ColorUIResource(highLight),
- "Button.light", new ColorUIResource(highLight),
+ "Button.foreground", new ColorUIResource(Color.BLACK),
+ "Button.highlight", new ColorUIResource(Color.WHITE),
+ "Button.light", new ColorUIResource(Color.LIGHT_GRAY),
"Button.margin", new InsetsUIResource(2, 2, 2, 2),
- "Button.shadow", new ColorUIResource(shadow),
+ "Button.shadow", new ColorUIResource(Color.GRAY),
"Button.textIconGap", new Integer(4),
"Button.textShiftOffset", new Integer(0),
"CheckBox.background", new ColorUIResource(light),
@@ -278,7 +286,14 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}),
"CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"CheckBox.foreground", new ColorUIResource(darkShadow),
- "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(),
+ "CheckBox.icon",
+ new UIDefaults.LazyValue()
+ {
+ public Object createValue(UIDefaults def)
+ {
+ return BasicIconFactory.getCheckBoxIcon();
+ }
+ },
"CheckBox.margin",new InsetsUIResource(2, 2, 2, 2),
"CheckBox.textIconGap", new Integer(4),
"CheckBox.textShiftOffset", new Integer(0),
@@ -449,15 +464,39 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"InternalFrame.activeTitleBackground", new ColorUIResource(0, 0, 128),
"InternalFrame.activeTitleForeground", new ColorUIResource(Color.white),
"InternalFrame.border",
- new BorderUIResource.CompoundBorderUIResource(null, null),
+ new UIDefaults.LazyValue()
+ {
+ public Object createValue(UIDefaults table)
+ {
+ Color lineColor = new Color(238, 238, 238);
+ Border inner = BorderFactory.createLineBorder(lineColor, 1);
+ Color shadowInner = new Color(184, 207, 229);
+ Color shadowOuter = new Color(122, 138, 153);
+ Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
+ Color.WHITE,
+ Color.WHITE,
+ shadowOuter,
+ shadowInner);
+ Border border = new BorderUIResource.CompoundBorderUIResource(outer,
+ inner);
+ return border;
+ }
+ },
"InternalFrame.borderColor", new ColorUIResource(light),
- "InternalFrame.borderDarkShadow", new ColorUIResource(shadow),
- "InternalFrame.borderHighlight", new ColorUIResource(highLight),
- "InternalFrame.borderLight", new ColorUIResource(light),
- "InternalFrame.borderShadow", new ColorUIResource(shadow),
+ "InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK),
+ "InternalFrame.borderHighlight", new ColorUIResource(Color.WHITE),
+ "InternalFrame.borderLight", new ColorUIResource(Color.LIGHT_GRAY),
+ "InternalFrame.borderShadow", new ColorUIResource(Color.GRAY),
"InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(),
- // XXX Don't use gif
-// "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")),
+ // FIXME: Set a nice icon for InternalFrames here.
+ "InternalFrame.icon",
+ new UIDefaults.LazyValue()
+ {
+ public Object createValue(UIDefaults def)
+ {
+ return new IconUIResource(BasicIconFactory.createEmptyFrameIcon());
+ }
+ },
"InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(),
"InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.gray),
"InternalFrame.inactiveTitleForeground",
@@ -500,6 +539,9 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"List.foreground", new ColorUIResource(darkShadow),
"List.selectionBackground", new ColorUIResource(Color.black),
"List.selectionForeground", new ColorUIResource(Color.white),
+ "List.focusCellHighlightBorder",
+ new BorderUIResource.
+ LineBorderUIResource(new ColorUIResource(Color.yellow)),
"Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12),
"Menu.acceleratorForeground", new ColorUIResource(darkShadow),
"Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white),
@@ -625,7 +667,14 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"RadioButton.foreground", new ColorUIResource(darkShadow),
"RadioButton.highlight", new ColorUIResource(highLight),
- "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(),
+ "RadioButton.icon",
+ new UIDefaults.LazyValue()
+ {
+ public Object createValue(UIDefaults def)
+ {
+ return BasicIconFactory.getRadioButtonIcon();
+ }
+ },
"RadioButton.light", new ColorUIResource(highLight),
"RadioButton.margin", new InsetsUIResource(2, 2, 2, 2),
"RadioButton.shadow", new ColorUIResource(shadow),
@@ -724,7 +773,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"Slider.highlight", new ColorUIResource(highLight),
"Slider.shadow", new ColorUIResource(shadow),
"Slider.thumbHeight", new Integer(20),
- "Slider.thumbWidth", new Integer(10),
+ "Slider.thumbWidth", new Integer(11),
"Slider.tickHeight", new Integer(12),
"Spinner.background", new ColorUIResource(light),
"Spinner.foreground", new ColorUIResource(light),
@@ -826,7 +875,8 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"Table.focusCellBackground", new ColorUIResource(light),
"Table.focusCellForeground", new ColorUIResource(darkShadow),
"Table.focusCellHighlightBorder",
- new BorderUIResource.LineBorderUIResource(Color.white),
+ new BorderUIResource.LineBorderUIResource(
+ new ColorUIResource(255, 255, 0)),
"Table.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Table.foreground", new ColorUIResource(darkShadow),
"Table.gridColor", new ColorUIResource(Color.gray),
@@ -838,7 +888,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"TableHeader.foreground", new ColorUIResource(darkShadow),
- "TextArea.background", new ColorUIResource(light),
+ "TextArea.background", new ColorUIResource(light),
"TextArea.border", new BasicBorders.MarginBorder(),
"TextArea.caretBlinkRate", new Integer(500),
"TextArea.caretForeground", new ColorUIResource(Color.black),
@@ -879,11 +929,11 @@ public abstract class BasicLookAndFeel extends LookAndFeel
0),
"notify-field-accept"),
new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT,
- InputEvent.SHIFT_DOWN_MASK),
- "selection-backward"),
+ InputEvent.SHIFT_DOWN_MASK),
+ "selection-backward"),
new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT,
- InputEvent.SHIFT_DOWN_MASK),
- "selection-forward"),
+ InputEvent.SHIFT_DOWN_MASK),
+ "selection-forward"),
},
"TextField.margin", new InsetsUIResource(0, 0, 0, 0),
"TextField.selectionBackground", new ColorUIResource(Color.black),
@@ -1011,20 +1061,18 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"PAGE_UP", "scrollUpChangeSelection",
"ctrl PAGE_DOWN", "scrollDownChangeLead"
}),
- "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12),
-// "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")),
+ "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)),
"Tree.foreground", new ColorUIResource(Color.black),
- "Tree.hash", new ColorUIResource(Color.gray),
-// "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")),
+ "Tree.hash", new ColorUIResource(new Color(128, 128, 128)),
"Tree.leftChildIndent", new Integer(7),
-// "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")),
"Tree.rightChildIndent", new Integer(13),
- "Tree.rowHeight", new Integer(16),
+ "Tree.rowHeight", new Integer(20), // FIXME
"Tree.scrollsOnExpand", Boolean.TRUE,
"Tree.selectionBackground", new ColorUIResource(Color.black),
+ "Tree.nonSelectionBackground", new ColorUIResource(new Color(239, 235, 231)),
"Tree.selectionBorderColor", new ColorUIResource(Color.black),
- "Tree.selectionForeground", new ColorUIResource(Color.white),
- "Tree.textBackground", new ColorUIResource(Color.white),
+ "Tree.selectionForeground", new ColorUIResource(new Color(255, 255, 255)),
+ "Tree.textBackground", new ColorUIResource(new Color(255, 255, 255)),
"Tree.textForeground", new ColorUIResource(Color.black),
"Viewport.background", new ColorUIResource(light),
"Viewport.foreground", new ColorUIResource(Color.black),
diff --git a/javax/swing/plaf/basic/BasicMenuBarUI.java b/javax/swing/plaf/basic/BasicMenuBarUI.java
index 62b047506..95f6b84fb 100644
--- a/javax/swing/plaf/basic/BasicMenuBarUI.java
+++ b/javax/swing/plaf/basic/BasicMenuBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -105,7 +105,7 @@ public class BasicMenuBarUI extends MenuBarUI
* Factory method to create a BasicMenuBarUI for the given {@link
* JComponent}, which should be a {@link JMenuBar}.
*
- * @param b The {@link JComponent} a UI is being created for.
+ * @param x The {@link JComponent} a UI is being created for.
*
* @return A BasicMenuBarUI for the {@link JComponent}.
*/
@@ -165,6 +165,7 @@ public class BasicMenuBarUI extends MenuBarUI
menuBar.setBorder(defaults.getBorder("MenuBar.border"));
menuBar.setFont(defaults.getFont("MenuBar.font"));
menuBar.setForeground(defaults.getColor("MenuBar.foreground"));
+ menuBar.setOpaque(true);
}
/**
diff --git a/javax/swing/plaf/basic/BasicMenuItemUI.java b/javax/swing/plaf/basic/BasicMenuItemUI.java
index ae8b6c54c..bbacc5028 100644
--- a/javax/swing/plaf/basic/BasicMenuItemUI.java
+++ b/javax/swing/plaf/basic/BasicMenuItemUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -506,11 +506,10 @@ public class BasicMenuItemUI extends MenuItemUI
br.width += insets.right + insets.left;
br.height += insets.top + insets.bottom;
- /* Menu item is considered to be highlighted when it is selected.
- It is considered to be selected if menu item is inside some menu
- and is armed or if it is both armed and pressed */
- if (m.getModel().isArmed()
- && (m.getParent() instanceof MenuElement || m.getModel().isPressed()))
+ // Menu item is considered to be highlighted when it is selected.
+ // But we don't want to paint the background of JCheckBoxMenuItems
+ if ((m.isSelected() && checkIcon == null) || m.getModel().isArmed() &&
+ (m.getParent() instanceof MenuElement))
{
if (m.isContentAreaFilled())
{
@@ -606,12 +605,10 @@ public class BasicMenuItemUI extends MenuItemUI
{
if (menuItem.isEnabled())
{
- /* Menu item is considered to be highlighted when it is selected.
- It is considered to be selected if menu item is inside some menu
- and is armed or if it is both armed and pressed */
- if (menuItem.getModel().isArmed()
- && (menuItem.getParent() instanceof MenuElement
- || menuItem.getModel().isPressed()))
+ // Menu item is considered to be highlighted when it is selected.
+ // But not if it's a JCheckBoxMenuItem
+ if ((menuItem.isSelected() && checkIcon == null) || menuItem.getModel().isArmed() &&
+ (menuItem.getParent() instanceof MenuElement))
g.setColor(selectionForeground);
else
g.setColor(menuItem.getForeground());
@@ -619,7 +616,10 @@ public class BasicMenuItemUI extends MenuItemUI
else
// FIXME: should fix this to use 'disabledForeground', but its
// default value in BasicLookAndFeel is null.
- g.setColor(Color.gray);
+
+ // FIXME: should there be different foreground colours for selected
+ // or deselected, when disabled?
+ g.setColor(Color.gray);
int mnemonicIndex = menuItem.getDisplayedMnemonicIndex();
diff --git a/javax/swing/plaf/basic/BasicMenuUI.java b/javax/swing/plaf/basic/BasicMenuUI.java
index 89daf3245..4b07d7069 100644
--- a/javax/swing/plaf/basic/BasicMenuUI.java
+++ b/javax/swing/plaf/basic/BasicMenuUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,6 +46,7 @@ import java.beans.PropertyChangeListener;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.MenuSelectionManager;
import javax.swing.UIDefaults;
@@ -179,6 +180,12 @@ public class BasicMenuUI extends BasicMenuItemUI
*/
public Dimension getMaximumSize(JComponent c)
{
+ // If this menu is in a popup menu, treat it like a regular JMenuItem
+ if (!((JMenu)c).isTopLevelMenu())
+ {
+ JMenuItem menuItem = new JMenuItem(((JMenu)c).getText(), ((JMenu)c).getIcon());
+ return menuItem.getMaximumSize();
+ }
return c.getPreferredSize();
}
@@ -292,19 +299,42 @@ public class BasicMenuUI extends BasicMenuItemUI
manager.processMouseEvent(e);
}
+ private boolean popupVisible()
+ {
+ JMenuBar mb = (JMenuBar) ((JMenu) menuItem).getParent();
+ // check if mb.isSelected because if no menus are selected
+ // we don't have to look through the list for popup menus
+ if (!mb.isSelected())
+ return false;
+ for (int i = 0; i < mb.getMenuCount(); i++)
+ {
+ JMenu m = mb.getMenu(i);
+ if (m != null && m.isPopupMenuVisible())
+ return true;
+ }
+ return false;
+ }
+
public void mouseEntered(MouseEvent e)
{
/* When mouse enters menu item, it should be considered selected
if (i) if this menu is a submenu in some other menu
- (ii) or if this menu is in a menu bar and some other menu in a menu bar was just
- selected. (If nothing was selected, menu should be pressed before
+ (ii) or if this menu is in a menu bar and some other menu in a
+ menu bar was just selected and has its popup menu visible.
+ (If nothing was selected, menu should be pressed before
it will be selected)
*/
JMenu menu = (JMenu) menuItem;
- if (! menu.isTopLevelMenu()
- || (menu.isTopLevelMenu()
- && (((JMenuBar) menu.getParent()).isSelected() && ! menu.isArmed())))
+
+ // NOTE: the following if used to require !menu.isArmed but I could find
+ // no reason for this and it was preventing some JDK-compatible behaviour.
+ // Specifically, if a menu is selected but its popup menu not visible,
+ // and then another menu is selected whose popup menu IS visible, when
+ // the mouse is moved over the first menu, its popup menu should become
+ // visible.
+
+ if (! menu.isTopLevelMenu() || popupVisible())
{
// set new selection and forward this event to MenuSelectionManager
MenuSelectionManager manager = MenuSelectionManager.defaultManager();
@@ -419,7 +449,7 @@ public class BasicMenuUI extends BasicMenuItemUI
*
* @param e The PropertyChangeEvent.
*/
- public void propertyChange(PropertyChangeEvent evt)
+ public void propertyChange(PropertyChangeEvent e)
{
}
}
diff --git a/javax/swing/plaf/basic/BasicOptionPaneUI.java b/javax/swing/plaf/basic/BasicOptionPaneUI.java
index 21bdf33ae..c9f623259 100644
--- a/javax/swing/plaf/basic/BasicOptionPaneUI.java
+++ b/javax/swing/plaf/basic/BasicOptionPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -161,8 +161,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
* but was made public by a compiler bug and is now
* public for compatibility.
*/
- // FIXME: should be static
- public class ButtonAreaLayout implements LayoutManager
+ public static class ButtonAreaLayout implements LayoutManager
{
/** Whether this layout will center the buttons. */
protected boolean centersChildren = true;
@@ -249,7 +248,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
for (int i = 0; i < buttonList.length; i++)
{
Dimension dims = buttonList[i].getPreferredSize();
- if (getSizeButtonsToSameWidth())
+ if (syncAllWidths)
{
buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height);
x += widthOfWidestButton + getPadding();
@@ -347,7 +346,6 @@ public class BasicOptionPaneUI extends OptionPaneUI
public void setCentersChildren(boolean newValue)
{
centersChildren = newValue;
- optionPane.invalidate();
}
/**
@@ -358,7 +356,6 @@ public class BasicOptionPaneUI extends OptionPaneUI
public void setPadding(int newPadding)
{
padding = newPadding;
- optionPane.invalidate();
}
/**
@@ -369,7 +366,6 @@ public class BasicOptionPaneUI extends OptionPaneUI
public void setSyncAllWidths(boolean newValue)
{
syncAllWidths = newValue;
- optionPane.invalidate();
}
}
@@ -914,7 +910,9 @@ public class BasicOptionPaneUI extends OptionPaneUI
*/
protected Container createSeparator()
{
- return (Container) Box.createVerticalStrut(17);
+ // FIXME: Figure out what this method is supposed to return and where
+ // this should be added to the OptionPane.
+ return null;
}
/**
@@ -1119,6 +1117,10 @@ public class BasicOptionPaneUI extends OptionPaneUI
optionPane.add(msg);
}
+ // FIXME: Figure out if the separator should be inserted here or what
+ // this thing is supposed to do. Note: The JDK does NOT insert another
+ // component at this place. The JOptionPane only has two panels in it
+ // and there actually are applications that depend on this beeing so.
Container sep = createSeparator();
if (sep != null)
optionPane.add(sep);
@@ -1146,6 +1148,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
optionPane.setBackground(defaults.getColor("OptionPane.background"));
optionPane.setForeground(defaults.getColor("OptionPane.foreground"));
optionPane.setBorder(defaults.getBorder("OptionPane.border"));
+ optionPane.setOpaque(true);
messageBorder = defaults.getBorder("OptionPane.messageAreaBorder");
messageForeground = defaults.getColor("OptionPane.messageForeground");
diff --git a/javax/swing/plaf/basic/BasicPanelUI.java b/javax/swing/plaf/basic/BasicPanelUI.java
index 7e72d730d..b715c57b3 100644
--- a/javax/swing/plaf/basic/BasicPanelUI.java
+++ b/javax/swing/plaf/basic/BasicPanelUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,18 +39,33 @@ exception statement from your version. */
package javax.swing.plaf.basic;
import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.PanelUI;
public class BasicPanelUI extends PanelUI
{
- public static ComponentUI createUI(JComponent x)
- {
- return new BasicPanelUI();
- }
-
- public void installUI(JComponent c)
- {
- super.installUI(c);
- }
+ public static ComponentUI createUI(JComponent x)
+ {
+ return new BasicPanelUI();
+ }
+
+ public void installUI(JComponent c)
+ {
+ super.installUI(c);
+ if (c instanceof JPanel)
+ {
+ JPanel p = (JPanel) c;
+ installDefaults(p);
+ }
+ }
+
+ public void installDefaults(JPanel p)
+ {
+ UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+ p.setBackground(defaults.getColor("Panel.background"));
+ p.setOpaque(true);
+ }
}
diff --git a/javax/swing/plaf/basic/BasicPasswordFieldUI.java b/javax/swing/plaf/basic/BasicPasswordFieldUI.java
index 0350f7437..044027b0b 100644
--- a/javax/swing/plaf/basic/BasicPasswordFieldUI.java
+++ b/javax/swing/plaf/basic/BasicPasswordFieldUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java b/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java
index d0df9d347..b62947722 100644
--- a/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java
+++ b/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicPopupMenuUI.java b/javax/swing/plaf/basic/BasicPopupMenuUI.java
index b7cbb3284..247117bc9 100644
--- a/javax/swing/plaf/basic/BasicPopupMenuUI.java
+++ b/javax/swing/plaf/basic/BasicPopupMenuUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,6 +51,7 @@ import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JLayeredPane;
import javax.swing.JMenu;
+import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.MenuElement;
import javax.swing.MenuSelectionManager;
@@ -73,8 +74,8 @@ public class BasicPopupMenuUI extends PopupMenuUI
/* popupMenu for which this UI delegate is for*/
protected JPopupMenu popupMenu;
- /* MouseInputListener listens to mouse events */
- private static transient MouseInputListener mouseInputListener;
+ /* MouseInputListener listens to mouse events. Package private for inner classes. */
+ static transient MouseInputListener mouseInputListener;
/* PopupMenuListener listens to popup menu events fired by JPopupMenu*/
private transient PopupMenuListener popupMenuListener;
@@ -415,6 +416,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
private transient Component mouseEventTarget;
private transient Component pressedComponent;
private transient Component lastComponentEntered;
+ private transient Component tempComponent;
private transient int pressCount;
/**
@@ -552,7 +554,9 @@ public class BasicPopupMenuUI extends PopupMenuUI
me.isPopupTrigger(),
me.getButton());
- lastComponentEntered.dispatchEvent(exited);
+ tempComponent = lastComponentEntered;
+ lastComponentEntered = null;
+ tempComponent.dispatchEvent(exited);
}
lastComponentEntered = null;
diff --git a/javax/swing/plaf/basic/BasicProgressBarUI.java b/javax/swing/plaf/basic/BasicProgressBarUI.java
index acf6a97d7..d00628f53 100644
--- a/javax/swing/plaf/basic/BasicProgressBarUI.java
+++ b/javax/swing/plaf/basic/BasicProgressBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java b/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java
index 55cfdc033..d5cd7f448 100644
--- a/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java
+++ b/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicRadioButtonUI.java b/javax/swing/plaf/basic/BasicRadioButtonUI.java
index 15d2e7af9..98738251c 100644
--- a/javax/swing/plaf/basic/BasicRadioButtonUI.java
+++ b/javax/swing/plaf/basic/BasicRadioButtonUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,50 +38,125 @@ exception statement from your version. */
package javax.swing.plaf.basic;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+
import javax.swing.AbstractButton;
import javax.swing.Icon;
import javax.swing.JComponent;
+import javax.swing.SwingUtilities;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
+/**
+ * The BasicLookAndFeel UI implementation for
+ * {@link javax.swing.JRadioButton}s.
+ */
public class BasicRadioButtonUI extends BasicToggleButtonUI
{
-
+ /**
+ * The default icon for JRadioButtons. The default icon displays the usual
+ * RadioButton and is sensible to the selection state of the button,
+ * and can be used both as normal icon as well as selectedIcon.
+ */
protected Icon icon;
+ /**
+ * Creates and returns a new instance of <code>BasicRadioButtonUI</code>.
+ *
+ * @return a new instance of <code>BasicRadioButtonUI</code>
+ */
public static ComponentUI createUI(final JComponent c) {
return new BasicRadioButtonUI();
}
+ /**
+ * Creates a new instance of <code>BasicButtonUI</code>.
+ */
public BasicRadioButtonUI()
{
icon = getDefaultIcon();
}
- public void installUI(final JComponent c) {
- super.installUI(c);
- if (c instanceof AbstractButton)
- {
- AbstractButton b = (AbstractButton) c;
- b.setIcon(icon);
- }
+ /**
+ * Installs defaults from the Look &amp; Feel table on the specified
+ * button.
+ *
+ * @param b the button on which to install the defaults
+ */
+ protected void installDefaults(AbstractButton b)
+ {
+ super.installDefaults(b);
+ if (b.getIcon() == null)
+ b.setIcon(icon);
+ if (b.getSelectedIcon() == null)
+ b.setSelectedIcon(icon);
}
+ /**
+ * Returns the prefix used for UIDefaults properties. This is
+ * <code>RadioButton</code> in this case.
+ *
+ * @return the prefix used for UIDefaults properties
+ */
+ protected String getPropertyPrefix()
+ {
+ return "RadioButton";
+ }
+
+ /**
+ * Returns the default icon for JRadioButtons.
+ * The default icon displays the usual
+ * RadioButton and is sensible to the selection state of the button,
+ * and can be used both as normal icon as well as selectedIcon.
+ *
+ * @return the default icon for JRadioButtons
+ */
public Icon getDefaultIcon()
{
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
- return defaults.getIcon("RadioButton.icon");
+ return defaults.getIcon(getPropertyPrefix() + ".icon");
}
-
-}
-
-
-
-
+ /**
+ * Paints the RadioButton.
+ *
+ * @param g the Graphics context to paint with
+ * @param c the button to paint
+ */
+ public void paint(Graphics g, JComponent c)
+ {
+ AbstractButton b = (AbstractButton) c;
+ Rectangle tr = new Rectangle();
+ Rectangle ir = new Rectangle();
+ Rectangle vr = new Rectangle();
+ Font f = c.getFont();
+ g.setFont(f);
+ Icon currentIcon = null;
+ if (b.isSelected())
+ currentIcon = b.getSelectedIcon();
+ else
+ currentIcon = b.getIcon();
+ SwingUtilities.calculateInnerArea(b, vr);
+ String text = SwingUtilities.layoutCompoundLabel
+ (c, g.getFontMetrics(f), b.getText(), currentIcon,
+ b.getVerticalAlignment(), b.getHorizontalAlignment(),
+ b.getVerticalTextPosition(), b.getHorizontalTextPosition(),
+ vr, ir, tr, b.getIconTextGap() + defaultTextShiftOffset);
+
+ if (currentIcon != null)
+ {
+ currentIcon.paintIcon(c, g, ir.x, ir.y);
+ }
+ if (text != null)
+ paintText(g, b, tr, text);
+ paintFocus(g, b, vr, tr, ir);
+ }
+}
diff --git a/javax/swing/plaf/basic/BasicRootPaneUI.java b/javax/swing/plaf/basic/BasicRootPaneUI.java
index 4923b90b2..d97f7baea 100644
--- a/javax/swing/plaf/basic/BasicRootPaneUI.java
+++ b/javax/swing/plaf/basic/BasicRootPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,7 +56,6 @@ public class BasicRootPaneUI extends RootPaneUI
public void installUI(JComponent c)
{
- c.setOpaque(true);
c.setBackground(UIManager.getColor("control"));
super.installUI(c);
}
diff --git a/javax/swing/plaf/basic/BasicScrollBarUI.java b/javax/swing/plaf/basic/BasicScrollBarUI.java
index b7c5074aa..892db2b03 100644
--- a/javax/swing/plaf/basic/BasicScrollBarUI.java
+++ b/javax/swing/plaf/basic/BasicScrollBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,8 +45,6 @@ import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.LayoutManager;
-import java.awt.Point;
-import java.awt.Polygon;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -124,7 +122,6 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
{
// System.err.println(this + ".stateChanged()");
calculatePreferredSize();
- layoutContainer(scrollbar);
getThumbBounds();
scrollbar.repaint();
}
@@ -167,9 +164,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
incrButton.addMouseListener(buttonListener);
decrButton.addMouseListener(buttonListener);
calculatePreferredSize();
- layoutContainer(scrollbar);
}
- layoutContainer(scrollbar);
scrollbar.repaint();
}
}
@@ -820,6 +815,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
scrollbar.setBackground(defaults.getColor("ScrollBar.background"));
scrollbar.setBorder(defaults.getBorder("ScrollBar.border"));
scrollbar.setOpaque(true);
+ scrollbar.setLayout(this);
thumbColor = defaults.getColor("ScrollBar.thumb");
thumbDarkShadowColor = defaults.getColor("ScrollBar.thumbDarkShadow");
@@ -888,7 +884,6 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
installListeners();
calculatePreferredSize();
- layoutContainer(scrollbar);
}
}
@@ -973,7 +968,6 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
*/
public void paint(Graphics g, JComponent c)
{
- layoutContainer(scrollbar);
paintTrack(g, c, getTrackBounds());
paintThumb(g, c, getThumbBounds());
diff --git a/javax/swing/plaf/basic/BasicScrollPaneUI.java b/javax/swing/plaf/basic/BasicScrollPaneUI.java
index 938548aeb..bd1576f37 100644
--- a/javax/swing/plaf/basic/BasicScrollPaneUI.java
+++ b/javax/swing/plaf/basic/BasicScrollPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -102,14 +102,6 @@ public class BasicScrollPaneUI extends ScrollPaneUI
return sl.minimumLayoutSize(c);
}
- public Dimension getPreferredSize(JComponent c)
- {
- JScrollPane p = (JScrollPane ) c;
- ScrollPaneLayout sl = (ScrollPaneLayout) p.getLayout();
- return sl.preferredLayoutSize(c);
- }
-
-
public void paint(Graphics g, JComponent c)
{
// do nothing; the normal painting-of-children algorithm, along with
diff --git a/javax/swing/plaf/basic/BasicSeparatorUI.java b/javax/swing/plaf/basic/BasicSeparatorUI.java
index db2d16458..38c9c7a28 100644
--- a/javax/swing/plaf/basic/BasicSeparatorUI.java
+++ b/javax/swing/plaf/basic/BasicSeparatorUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -125,7 +125,7 @@ public class BasicSeparatorUI extends SeparatorUI
shadow = defaults.getColor("Separator.shadow");
highlight = defaults.getColor("Separator.highlight");
- s.setOpaque(true);
+ s.setOpaque(false);
}
/**
diff --git a/javax/swing/plaf/basic/BasicSliderUI.java b/javax/swing/plaf/basic/BasicSliderUI.java
index 9169a6bb7..0b4058429 100644
--- a/javax/swing/plaf/basic/BasicSliderUI.java
+++ b/javax/swing/plaf/basic/BasicSliderUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -470,15 +470,6 @@ public class BasicSliderUI extends SliderUI
}
}
- /** The preferred height of the thumb. */
- private transient int thumbHeight;
-
- /** The preferred width of the thumb. */
- private transient int thumbWidth;
-
- /** The preferred height of the tick rectangle. */
- private transient int tickHeight;
-
/** Listener for changes from the model. */
protected ChangeListener changeListener;
@@ -698,11 +689,6 @@ public class BasicSliderUI extends SliderUI
focusColor = defaults.getColor("Slider.focus");
slider.setBorder(defaults.getBorder("Slider.border"));
slider.setOpaque(true);
-
- thumbHeight = defaults.getInt("Slider.thumbHeight");
- thumbWidth = defaults.getInt("Slider.thumbWidth");
- tickHeight = defaults.getInt("Slider.tickHeight");
-
focusInsets = defaults.getInsets("Slider.focusInsets");
}
@@ -899,11 +885,11 @@ public class BasicSliderUI extends SliderUI
width += insets.left + insets.right + focusInsets.left + focusInsets.right;
// Height is determined by the thumb, the ticks and the labels.
- int height = thumbHeight;
+ int height = getThumbSize().height;
if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0
|| slider.getMinorTickSpacing() > 0)
- height += tickHeight;
+ height += getTickLength();
if (slider.getPaintLabels())
height += getHeightOfTallestLabel();
@@ -934,11 +920,11 @@ public class BasicSliderUI extends SliderUI
height += insets.top + insets.bottom + focusInsets.top
+ focusInsets.bottom;
- int width = thumbHeight;
+ int width = getThumbSize().width;
if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0
|| slider.getMinorTickSpacing() > 0)
- width += tickHeight;
+ width += getTickLength();
if (slider.getPaintLabels())
width += getWidthOfWidestLabel();
@@ -956,7 +942,21 @@ public class BasicSliderUI extends SliderUI
*/
public Dimension getMinimumHorizontalSize()
{
- return getPreferredHorizontalSize();
+ Insets insets = slider.getInsets();
+ // Height is determined by the thumb, the ticks and the labels.
+ int height = getThumbSize().height;
+
+ if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0
+ || slider.getMinorTickSpacing() > 0)
+ height += getTickLength();
+
+ if (slider.getPaintLabels())
+ height += getHeightOfTallestLabel();
+
+ height += insets.top + insets.bottom + focusInsets.top
+ + focusInsets.bottom;
+
+ return new Dimension(36, height);
}
/**
@@ -967,7 +967,19 @@ public class BasicSliderUI extends SliderUI
*/
public Dimension getMinimumVerticalSize()
{
- return getPreferredVerticalSize();
+ Insets insets = slider.getInsets();
+ int width = getThumbSize().width;
+
+ if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0
+ || slider.getMinorTickSpacing() > 0)
+ width += getTickLength();
+
+ if (slider.getPaintLabels())
+ width += getWidthOfWidestLabel();
+
+ width += insets.left + insets.right + focusInsets.left + focusInsets.right;
+
+ return new Dimension(width, 36);
}
/**
@@ -999,15 +1011,14 @@ public class BasicSliderUI extends SliderUI
public Dimension getMinimumSize(JComponent c)
{
if (slider.getOrientation() == JSlider.HORIZONTAL)
- return getPreferredHorizontalSize();
+ return getMinimumHorizontalSize();
else
- return getPreferredVerticalSize();
+ return getMinimumVerticalSize();
}
/**
* This method returns the maximum size for this {@link JSlider} for this
- * look and feel. If it returns null, then it is up to the Layout Manager
- * to give the {@link JComponent} a size.
+ * look and feel.
*
* @param c The {@link JComponent} to find a maximum size for.
*
@@ -1015,10 +1026,40 @@ public class BasicSliderUI extends SliderUI
*/
public Dimension getMaximumSize(JComponent c)
{
+ Insets insets = slider.getInsets();
if (slider.getOrientation() == JSlider.HORIZONTAL)
- return getPreferredHorizontalSize();
+ {
+ // Height is determined by the thumb, the ticks and the labels.
+ int height = getThumbSize().height;
+
+ if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0
+ || slider.getMinorTickSpacing() > 0)
+ height += getTickLength();
+
+ if (slider.getPaintLabels())
+ height += getHeightOfTallestLabel();
+
+ height += insets.top + insets.bottom + focusInsets.top
+ + focusInsets.bottom;
+
+ return new Dimension(32767, height);
+ }
else
- return getPreferredVerticalSize();
+ {
+ int width = getThumbSize().width;
+
+ if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0
+ || slider.getMinorTickSpacing() > 0)
+ width += getTickLength();
+
+ if (slider.getPaintLabels())
+ width += getWidthOfWidestLabel();
+
+ width += insets.left + insets.right + focusInsets.left
+ + focusInsets.right;
+
+ return new Dimension(width, 32767);
+ }
}
/**
@@ -1045,7 +1086,6 @@ public class BasicSliderUI extends SliderUI
{
insetCache = slider.getInsets();
focusRect = SwingUtilities.calculateInnerArea(slider, focusRect);
-
if (focusRect.width < 0)
focusRect.width = 0;
if (focusRect.height < 0)
@@ -1058,30 +1098,13 @@ public class BasicSliderUI extends SliderUI
*/
protected void calculateThumbSize()
{
+ Dimension d = getThumbSize();
+ thumbRect.width = d.width;
+ thumbRect.height = d.height;
if (slider.getOrientation() == JSlider.HORIZONTAL)
- {
- if (thumbWidth > contentRect.width)
- thumbRect.width = contentRect.width / 4;
- else
- thumbRect.width = thumbWidth;
- if (thumbHeight > contentRect.height)
- thumbRect.height = contentRect.height;
- else
- thumbRect.height = thumbHeight;
- }
+ thumbRect.y = trackRect.y;
else
- {
- // The thumb gets flipped when inverted, so thumbWidth
- // actually is the height and vice versa.
- if (thumbWidth > contentRect.height)
- thumbRect.height = contentRect.height / 4;
- else
- thumbRect.height = thumbWidth;
- if (thumbHeight > contentRect.width)
- thumbRect.width = contentRect.width;
- else
- thumbRect.width = thumbHeight;
- }
+ thumbRect.x = trackRect.x;
}
/**
@@ -1092,9 +1115,10 @@ public class BasicSliderUI extends SliderUI
{
contentRect.x = focusRect.x + focusInsets.left;
contentRect.y = focusRect.y + focusInsets.top;
+
contentRect.width = focusRect.width - focusInsets.left - focusInsets.right;
- contentRect.height = focusRect.height - focusInsets.top
- - focusInsets.bottom;
+ contentRect.height = focusRect.height - focusInsets.top
+ - focusInsets.bottom;
if (contentRect.width < 0)
contentRect.width = 0;
@@ -1113,11 +1137,11 @@ public class BasicSliderUI extends SliderUI
if (slider.getOrientation() == JSlider.HORIZONTAL)
{
thumbRect.x = xPositionForValue(value) - thumbRect.width / 2;
- thumbRect.y = contentRect.y;
+ thumbRect.y = trackRect.y;
}
else
{
- thumbRect.x = contentRect.x;
+ thumbRect.x = trackRect.x;
thumbRect.y = yPositionForValue(value) - thumbRect.height / 2;
}
}
@@ -1129,9 +1153,9 @@ public class BasicSliderUI extends SliderUI
protected void calculateTrackBuffer()
{
if (slider.getOrientation() == JSlider.HORIZONTAL)
- trackBuffer = thumbRect.width;
+ trackBuffer = thumbRect.width / 2;
else
- trackBuffer = thumbRect.height;
+ trackBuffer = thumbRect.height / 2;
}
/**
@@ -1141,9 +1165,11 @@ public class BasicSliderUI extends SliderUI
*/
protected Dimension getThumbSize()
{
- // This is really just the bounds box for the thumb.
- // The thumb will actually be pointed (like a rectangle + triangle at bottom)
- return thumbRect.getSize();
+ // TODO: shouldn't create new objects every time
+ if (slider.getOrientation() == JSlider.HORIZONTAL)
+ return new Dimension(11, 20);
+ else
+ return new Dimension(20, 11);
}
/**
@@ -1155,13 +1181,21 @@ public class BasicSliderUI extends SliderUI
if (slider.getOrientation() == JSlider.HORIZONTAL)
{
trackRect.x = contentRect.x + trackBuffer;
- trackRect.y = contentRect.y;
+ int h = getThumbSize().height;
+ if (slider.getPaintTicks() && (slider.getMajorTickSpacing() > 0
+ || slider.getMinorTickSpacing() > 0))
+ h += getTickLength();
+ trackRect.y = contentRect.y + (contentRect.height - h) / 2 - 1;
trackRect.width = contentRect.width - 2 * trackBuffer;
trackRect.height = thumbRect.height;
}
else
{
- trackRect.x = contentRect.x;
+ int w = getThumbSize().width;
+ if (slider.getPaintTicks() && (slider.getMajorTickSpacing() > 0
+ || slider.getMinorTickSpacing() > 0))
+ w += getTickLength();
+ trackRect.x = contentRect.x + (contentRect.width - w) / 2 - 1;
trackRect.y = contentRect.y + trackBuffer;
trackRect.width = thumbRect.width;
trackRect.height = contentRect.height - 2 * trackBuffer;
@@ -1180,7 +1214,7 @@ public class BasicSliderUI extends SliderUI
*/
protected int getTickLength()
{
- return tickHeight;
+ return 8;
}
/**
@@ -1536,9 +1570,6 @@ public class BasicSliderUI extends SliderUI
Point c = new Point(a);
Point d = new Point(a);
- Polygon high;
- Polygon shadow;
-
if (slider.getOrientation() == JSlider.HORIZONTAL)
{
width = trackRect.width;
@@ -1591,74 +1622,78 @@ public class BasicSliderUI extends SliderUI
{
if (slider.getOrientation() == JSlider.HORIZONTAL)
{
- double loc = tickRect.x;
+ double loc = tickRect.x + 0.5;
double increment = (max == min) ? 0
- : majorSpace * (double) tickRect.width / (max
- - min);
- if (drawInverted())
+ : majorSpace * (double) (tickRect.width - 1) / (max - min);
+ if (drawInverted())
{
loc += tickRect.width;
increment *= -1;
}
+ g.translate(0, tickRect.y);
for (int i = min; i <= max; i += majorSpace)
{
paintMajorTickForHorizSlider(g, tickRect, (int) loc);
loc += increment;
}
+ g.translate(0, -tickRect.y);
}
else
{
- double loc = tickRect.height + tickRect.y;
+ double loc = tickRect.height + tickRect.y + 0.5;
double increment = (max == min) ? 0
- : -majorSpace * (double) tickRect.height / (max
- - min);
+ : -majorSpace * (double) (tickRect.height - 1) / (max - min);
if (drawInverted())
{
- loc = tickRect.y;
+ loc = tickRect.y + 0.5;
increment *= -1;
}
+ g.translate(tickRect.x, 0);
for (int i = min; i <= max; i += majorSpace)
{
paintMajorTickForVertSlider(g, tickRect, (int) loc);
loc += increment;
}
+ g.translate(-tickRect.x, 0);
}
}
if (minorSpace > 0)
{
if (slider.getOrientation() == JSlider.HORIZONTAL)
{
- double loc = tickRect.x;
+ double loc = tickRect.x + 0.5;
double increment = (max == min) ? 0
- : minorSpace * (double) tickRect.width / (max
- - min);
+ : minorSpace * (double) (tickRect.width - 1) / (max - min);
if (drawInverted())
{
loc += tickRect.width;
increment *= -1;
}
+ g.translate(0, tickRect.y);
for (int i = min; i <= max; i += minorSpace)
{
paintMinorTickForHorizSlider(g, tickRect, (int) loc);
loc += increment;
}
+ g.translate(0, -tickRect.y);
}
else
{
- double loc = tickRect.height + tickRect.y;
+ double loc = tickRect.height + tickRect.y + 0.5;
double increment = (max == min) ? 0
- : -minorSpace * (double) tickRect.height / (max
- - min);
+ : -minorSpace * (double) (tickRect.height - 1) / (max - min);
if (drawInverted())
{
- loc = tickRect.y;
+ loc = tickRect.y + 0.5;
increment *= -1;
}
+ g.translate(tickRect.x, 0);
for (int i = min; i <= max; i += minorSpace)
{
paintMinorTickForVertSlider(g, tickRect, (int) loc);
loc += increment;
}
+ g.translate(-tickRect.x, 0);
}
}
}
@@ -1680,7 +1715,7 @@ public class BasicSliderUI extends SliderUI
protected void paintMinorTickForHorizSlider(Graphics g,
Rectangle tickBounds, int x)
{
- int y = tickRect.y + tickRect.height / 4;
+ int y = tickRect.height / 4;
Color saved = g.getColor();
g.setColor(Color.BLACK);
@@ -1699,7 +1734,7 @@ public class BasicSliderUI extends SliderUI
protected void paintMajorTickForHorizSlider(Graphics g,
Rectangle tickBounds, int x)
{
- int y = tickRect.y + tickRect.height / 4;
+ int y = tickRect.height / 4;
Color saved = g.getColor();
g.setColor(Color.BLACK);
@@ -1718,7 +1753,7 @@ public class BasicSliderUI extends SliderUI
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds,
int y)
{
- int x = tickRect.x + tickRect.width / 4;
+ int x = tickRect.width / 4;
Color saved = g.getColor();
g.setColor(Color.BLACK);
@@ -1737,7 +1772,7 @@ public class BasicSliderUI extends SliderUI
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds,
int y)
{
- int x = tickRect.x + tickRect.width / 4;
+ int x = tickRect.width / 4;
Color saved = g.getColor();
g.setColor(Color.BLACK);
@@ -1924,8 +1959,6 @@ public class BasicSliderUI extends SliderUI
{
Color saved_color = g.getColor();
- Polygon thumb = new Polygon();
-
Point a = new Point(thumbRect.x, thumbRect.y);
Point b = new Point(a);
Point c = new Point(a);
@@ -1933,7 +1966,8 @@ public class BasicSliderUI extends SliderUI
Point e = new Point(a);
Polygon bright;
- Polygon dark;
+ Polygon light; // light shadow
+ Polygon dark; // dark shadow
Polygon all;
// This will be in X-dimension if the slider is inverted and y if it isn't.
@@ -1943,36 +1977,42 @@ public class BasicSliderUI extends SliderUI
{
turnPoint = thumbRect.height * 3 / 4;
- b.translate(thumbRect.width, 0);
- c.translate(thumbRect.width, turnPoint);
- d.translate(thumbRect.width / 2, thumbRect.height);
+ b.translate(thumbRect.width - 1, 0);
+ c.translate(thumbRect.width - 1, turnPoint);
+ d.translate(thumbRect.width / 2 - 1, thumbRect.height - 1);
e.translate(0, turnPoint);
- bright = new Polygon(new int[] { b.x, a.x, e.x, d.x },
+ bright = new Polygon(new int[] { b.x - 1, a.x, e.x, d.x },
new int[] { b.y, a.y, e.y, d.y }, 4);
- dark = new Polygon(new int[] { b.x, c.x, d.x },
- new int[] { b.y, c.y, d.y }, 3);
- all = new Polygon(new int[] { a.x + 1, b.x, c.x, d.x, e.x + 1 },
- new int[] { a.y + 1, b.y + 1, c.y, d.y + 1, e.y }, 5);
+ dark = new Polygon(new int[] { b.x, c.x, d.x + 1 },
+ new int[] { b.y, c.y - 1, d.y }, 3);
+
+ light = new Polygon(new int[] { b.x - 1, c.x - 1, d.x + 1 },
+ new int[] { b.y + 1, c.y - 1, d.y - 1 }, 3);
+
+ all = new Polygon(new int[] { a.x + 1, b.x - 2, c.x - 2, d.x, e.x + 1 },
+ new int[] { a.y + 1, b.y + 1, c.y - 1, d.y - 1, e.y }, 5);
}
else
{
- turnPoint = thumbRect.width * 3 / 4;
+ turnPoint = thumbRect.width * 3 / 4 - 1;
b.translate(turnPoint, 0);
- c.translate(thumbRect.width, thumbRect.height / 2);
- d.translate(turnPoint, thumbRect.height);
- e.translate(0, thumbRect.height);
+ c.translate(thumbRect.width - 1, thumbRect.height / 2);
+ d.translate(turnPoint, thumbRect.height - 1);
+ e.translate(0, thumbRect.height - 1);
- bright = new Polygon(new int[] { c.x, b.x, a.x, e.x },
- new int[] { c.y, b.y, a.y, e.y }, 4);
+ bright = new Polygon(new int[] { c.x - 1, b.x, a.x, e.x },
+ new int[] { c.y - 1, b.y, a.y, e.y - 1 }, 4);
- dark = new Polygon(new int[] { c.x, d.x, e.x + 1 },
+ dark = new Polygon(new int[] { c.x, d.x, e.x },
new int[] { c.y, d.y, e.y }, 3);
- all = new Polygon(new int[] { a.x + 1, b.x, c.x - 1, d.x, e.x + 1 },
- new int[] { a.y + 1, b.y + 1, c.y, d.y, e.y }, 5);
+ light = new Polygon(new int[] { c.x - 1, d.x, e.x + 1},
+ new int[] { c.y, d.y - 1, e.y - 1}, 3);
+ all = new Polygon(new int[] { a.x + 1, b.x, c.x - 2, c.x - 2, d.x, e.x + 1 },
+ new int[] { a.y + 1, b.y + 1, c.y - 1, c.y, d.y - 2, e.y - 2 }, 6);
}
g.setColor(Color.WHITE);
@@ -1982,6 +2022,10 @@ public class BasicSliderUI extends SliderUI
g.drawPolyline(dark.xpoints, dark.ypoints, dark.npoints);
g.setColor(Color.GRAY);
+ g.drawPolyline(light.xpoints, light.ypoints, light.npoints);
+
+ g.setColor(Color.LIGHT_GRAY);
+ g.drawPolyline(all.xpoints, all.ypoints, all.npoints);
g.fillPolygon(all);
g.setColor(saved_color);
@@ -2065,8 +2109,7 @@ public class BasicSliderUI extends SliderUI
{
int min = slider.getMinimum();
int max = slider.getMaximum();
- int extent = slider.getExtent();
- int len = trackRect.width;
+ int len = trackRect.width - 1;
int xPos = (max == min) ? 0 : (value - min) * len / (max - min);
@@ -2074,7 +2117,7 @@ public class BasicSliderUI extends SliderUI
xPos += trackRect.x;
else
{
- xPos = trackRect.width - xPos;
+ xPos = len - xPos;
xPos += trackRect.x;
}
return xPos;
@@ -2091,14 +2134,13 @@ public class BasicSliderUI extends SliderUI
{
int min = slider.getMinimum();
int max = slider.getMaximum();
- int extent = slider.getExtent();
- int len = trackRect.height;
+ int len = trackRect.height - 1;
int yPos = (max == min) ? 0 : (value - min) * len / (max - min);
if (! drawInverted())
{
- yPos = trackRect.height - yPos;
+ yPos = len - yPos;
yPos += trackRect.y;
}
else
@@ -2123,8 +2165,9 @@ public class BasicSliderUI extends SliderUI
int value;
- // If the length is 0, you shouldn't be able to even see where the slider is.
- // This really shouldn't ever happen, but just in case, we'll return the middle.
+ // If the length is 0, you shouldn't be able to even see where the slider
+ // is. This really shouldn't ever happen, but just in case, we'll return
+ // the middle.
if (len == 0)
return ((max - min) / 2);
@@ -2158,8 +2201,9 @@ public class BasicSliderUI extends SliderUI
int value;
- // If the length is 0, you shouldn't be able to even see where the slider is.
- // This really shouldn't ever happen, but just in case, we'll return the middle.
+ // If the length is 0, you shouldn't be able to even see where the slider
+ // is. This really shouldn't ever happen, but just in case, we'll return
+ // the middle.
if (len == 0)
return ((max - min) / 2);
diff --git a/javax/swing/plaf/basic/BasicSpinnerUI.java b/javax/swing/plaf/basic/BasicSpinnerUI.java
index 919cde786..97ab97b89 100644
--- a/javax/swing/plaf/basic/BasicSpinnerUI.java
+++ b/javax/swing/plaf/basic/BasicSpinnerUI.java
@@ -1,5 +1,5 @@
/* SpinnerUI.java --
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -161,7 +161,7 @@ public class BasicSpinnerUI extends SpinnerUI
* obtained from <code>UIManager.getLookAndFeelDefaults</code>, as well as
* set the layout obtained from <code>createLayout</code>
*
- * @see #javax.swing.UIManager#getLookAndFeelDefaults
+ * @see javax.swing.UIManager#getLookAndFeelDefaults
* @see #createLayout
* @see #installUI
*/
@@ -178,6 +178,7 @@ public class BasicSpinnerUI extends SpinnerUI
spinner.setBorder(defaults.getBorder("Spinner.border"));
*/
spinner.setLayout(createLayout());
+ spinner.setOpaque(true);
}
/*
diff --git a/javax/swing/plaf/basic/BasicSplitPaneDivider.java b/javax/swing/plaf/basic/BasicSplitPaneDivider.java
index 3b8596e7e..b8674ed2f 100644
--- a/javax/swing/plaf/basic/BasicSplitPaneDivider.java
+++ b/javax/swing/plaf/basic/BasicSplitPaneDivider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -273,7 +273,7 @@ public class BasicSplitPaneDivider extends Container
*
* @param border the new border. Typically, this will be an instance of
* {@link
- * javax.swing.plaf.basic.BasicBorders.SplitPaneDividerBorder}.
+ * javax.swing.plaf.basic.BasicBorders.SplitPaneBorder}.
*
* @since 1.3
*/
diff --git a/javax/swing/plaf/basic/BasicSplitPaneUI.java b/javax/swing/plaf/basic/BasicSplitPaneUI.java
index b701a63d6..ff7e8acfb 100644
--- a/javax/swing/plaf/basic/BasicSplitPaneUI.java
+++ b/javax/swing/plaf/basic/BasicSplitPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -348,7 +348,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
height = Math.max(height, dims.height);
}
}
- return new Dimension(500, 500); //width, height);
+ return new Dimension(width, height);
}
return null;
}
@@ -613,7 +613,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
width = Math.max(width, dims.width);
}
}
- return new Dimension(500, 500); //width, height);
+ return new Dimension(width, height);
}
return null;
}
@@ -990,8 +990,8 @@ public class BasicSplitPaneUI extends SplitPaneUI
*/
protected void installDefaults()
{
- resetLayoutManager();
divider = createDefaultDivider();
+ resetLayoutManager();
nonContinuousLayoutDivider = createDefaultNonContinuousLayoutDivider();
splitPane.add(divider, JSplitPane.DIVIDER);
@@ -1000,6 +1000,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
splitPane.setBackground(defaults.getColor("SplitPane.background"));
splitPane.setBorder(defaults.getBorder("SplitPane.border"));
splitPane.setDividerSize(defaults.getInt("SplitPane.dividerSize"));
+ splitPane.setOpaque(true);
}
/**
@@ -1384,11 +1385,6 @@ public class BasicSplitPaneUI extends SplitPaneUI
*/
public void paint(Graphics g, JComponent jc)
{
- // Make sure that the location is valid
- int divLoc = splitPane.getDividerLocation();
- int valLoc = validLocation(divLoc);
- if (divLoc != valLoc)
- splitPane.setDividerLocation(valLoc);
}
/**
@@ -1449,9 +1445,8 @@ public class BasicSplitPaneUI extends SplitPaneUI
layoutManager = new BasicHorizontalLayoutManager();
else
layoutManager = new BasicVerticalLayoutManager();
- layoutManager.invalidateLayout(splitPane);
- layoutManager.updateComponents();
getSplitPane().setLayout(layoutManager);
+ layoutManager.updateComponents();
// invalidating by itself does not invalidate the layout.
getSplitPane().revalidate();
diff --git a/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/javax/swing/plaf/basic/BasicTabbedPaneUI.java
index 9ea653e7f..7e9d9b982 100644
--- a/javax/swing/plaf/basic/BasicTabbedPaneUI.java
+++ b/javax/swing/plaf/basic/BasicTabbedPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -1541,7 +1541,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabPane.setFont(defaults.getFont("TabbedPane.font"));
tabPane.setForeground(defaults.getColor("TabbedPane.foreground"));
tabPane.setBackground(defaults.getColor("TabbedPane.background"));
- tabPane.setOpaque(true);
+ tabPane.setOpaque(false);
highlight = defaults.getColor("TabbedPane.highlight");
lightHighlight = defaults.getColor("TabbedPane.lightHighlight");
@@ -1680,18 +1680,6 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
}
/**
- * This method returns the preferred size of the JTabbedPane.
- *
- * @param c The JComponent to find a size for.
- *
- * @return The preferred size.
- */
- public Dimension getPreferredSize(JComponent c)
- {
- return layoutManager.preferredLayoutSize(tabPane);
- }
-
- /**
* This method returns the minimum size of the JTabbedPane.
*
* @param c The JComponent to find a size for.
diff --git a/javax/swing/plaf/basic/BasicTableHeaderUI.java b/javax/swing/plaf/basic/BasicTableHeaderUI.java
index ebc702ad3..700b406d0 100644
--- a/javax/swing/plaf/basic/BasicTableHeaderUI.java
+++ b/javax/swing/plaf/basic/BasicTableHeaderUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicTableUI.java b/javax/swing/plaf/basic/BasicTableUI.java
index 93483804c..aa8f21a62 100644
--- a/javax/swing/plaf/basic/BasicTableUI.java
+++ b/javax/swing/plaf/basic/BasicTableUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,16 +46,19 @@ import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
+import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
+import javax.swing.BorderFactory;
import javax.swing.CellRendererPane;
import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
+import javax.swing.border.Border;
import javax.swing.event.MouseInputListener;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.TableUI;
@@ -77,6 +80,12 @@ public class BasicTableUI
protected CellRendererPane rendererPane;
protected JTable table;
+ /** The normal cell border. */
+ Border cellBorder;
+
+ /** The cell border for selected/highlighted cells. */
+ Border highlightCellBorder;
+
class FocusHandler implements FocusListener
{
public void focusGained(FocusEvent e)
@@ -89,12 +98,418 @@ public class BasicTableUI
class KeyHandler implements KeyListener
{
- public void keyPressed(KeyEvent e)
+
+ /**
+ * A helper method for the keyPressed event. Used because the actions
+ * for TAB, SHIFT-TAB, ENTER, and SHIFT-ENTER are very similar.
+ *
+ * Selects the next (previous if SHIFT pressed) column for TAB, or row for
+ * ENTER from within the currently selected cells.
+ *
+ * @param firstModel the ListSelectionModel for columns (TAB) or
+ * rows (ENTER)
+ * @param firstMin the first selected index in firstModel
+ * @param firstMax the last selected index in firstModel
+ * @param secondModel the ListSelectionModel for rows (TAB) or
+ * columns (ENTER)
+ * @param secondMin the first selected index in secondModel
+ * @param secondMax the last selected index in secondModel
+ * @param reverse true if shift was held for the event
+ * @param eventIsTab true if TAB was pressed, false if ENTER pressed
+ */
+ void advanceMultipleSelection (ListSelectionModel firstModel, int firstMin,
+ int firstMax, ListSelectionModel secondModel,
+ int secondMin, int secondMax, boolean reverse,
+ boolean eventIsTab)
{
+ // If eventIsTab, all the "firsts" correspond to columns, otherwise, to rows
+ // "seconds" correspond to the opposite
+ int firstLead = firstModel.getLeadSelectionIndex();
+ int secondLead = secondModel.getLeadSelectionIndex();
+ int numFirsts = eventIsTab ?
+ table.getModel().getColumnCount() : table.getModel().getRowCount();
+ int numSeconds = eventIsTab ?
+ table.getModel().getRowCount() : table.getModel().getColumnCount();
+
+ // check if we have to wrap the "firsts" around, going to the other side
+ if ((firstLead == firstMax && !reverse) ||
+ (reverse && firstLead == firstMin))
+ {
+ firstModel.addSelectionInterval(reverse ? firstMax : firstMin,
+ reverse ? firstMax : firstMin);
+
+ // check if we have to wrap the "seconds"
+ if ((secondLead == secondMax && !reverse) ||
+ (reverse && secondLead == secondMin))
+ secondModel.addSelectionInterval(reverse ? secondMax : secondMin,
+ reverse ? secondMax : secondMin);
+
+ // if we're not wrapping the seconds, we have to find out where we
+ // are within the secondModel and advance to the next cell (or
+ // go back to the previous cell if reverse == true)
+ else
+ {
+ int[] secondsSelected;
+ if (eventIsTab && table.getRowSelectionAllowed() ||
+ !eventIsTab && table.getColumnSelectionAllowed())
+ secondsSelected = eventIsTab ?
+ table.getSelectedRows() : table.getSelectedColumns();
+ else
+ {
+ // if row selection is not allowed, then the entire column gets
+ // selected when you click on it, so consider ALL rows selected
+ secondsSelected = new int[numSeconds];
+ for (int i = 0; i < numSeconds; i++)
+ secondsSelected[i] = i;
+ }
+
+ // and now find the "next" index within the model
+ int secondIndex = reverse ? secondsSelected.length - 1 : 0;
+ if (!reverse)
+ while (secondsSelected[secondIndex] <= secondLead)
+ secondIndex++;
+ else
+ while (secondsSelected[secondIndex] >= secondLead)
+ secondIndex--;
+
+ // and select it - updating the lead selection index
+ secondModel.addSelectionInterval(secondsSelected[secondIndex],
+ secondsSelected[secondIndex]);
+ }
+ }
+ // We didn't have to wrap the firsts, so just find the "next" first
+ // and select it, we don't have to change "seconds"
+ else
+ {
+ int[] firstsSelected;
+ if (eventIsTab && table.getColumnSelectionAllowed() ||
+ !eventIsTab && table.getRowSelectionAllowed())
+ firstsSelected = eventIsTab ?
+ table.getSelectedColumns() : table.getSelectedRows();
+ else
+ {
+ // if selection not allowed, consider ALL firsts to be selected
+ firstsSelected = new int[numFirsts];
+ for (int i = 0; i < numFirsts; i++)
+ firstsSelected[i] = i;
+ }
+ int firstIndex = reverse ? firstsSelected.length - 1 : 0;
+ if (!reverse)
+ while (firstsSelected[firstIndex] <= firstLead)
+ firstIndex++;
+ else
+ while (firstsSelected[firstIndex] >= firstLead)
+ firstIndex--;
+ firstModel.addSelectionInterval(firstsSelected[firstIndex],
+ firstsSelected[firstIndex]);
+ secondModel.addSelectionInterval(secondLead, secondLead);
+ }
+ }
+
+ /**
+ * A helper method for the keyPressed event. Used because the actions
+ * for TAB, SHIFT-TAB, ENTER, and SHIFT-ENTER are very similar.
+ *
+ * Selects the next (previous if SHIFT pressed) column (TAB) or row (ENTER)
+ * in the table, changing the current selection. All cells in the table
+ * are eligible, not just the ones that are currently selected.
+ * @param firstModel the ListSelectionModel for columns (TAB) or rows
+ * (ENTER)
+ * @param firstMax the last index in firstModel
+ * @param secondModel the ListSelectionModel for rows (TAB) or columns
+ * (ENTER)
+ * @param secondMax the last index in secondModel
+ * @param reverse true if SHIFT was pressed for the event
+ */
+
+ void advanceSingleSelection (ListSelectionModel firstModel, int firstMax,
+ ListSelectionModel secondModel, int secondMax,
+ boolean reverse)
+ {
+ // for TABs, "first" corresponds to columns and "seconds" to rows.
+ // the opposite is true for ENTERs
+ int firstLead = firstModel.getLeadSelectionIndex();
+ int secondLead = secondModel.getLeadSelectionIndex();
+
+ // if we are going backwards subtract 2 because we later add 1
+ // for a net change of -1
+ if (reverse && (firstLead == 0))
+ {
+ // check if we have to wrap around
+ if (secondLead == 0)
+ secondLead += secondMax + 1;
+ secondLead -= 2;
+ }
+
+ // do we have to wrap the "seconds"?
+ if (reverse && (firstLead == 0) || !reverse && (firstLead == firstMax))
+ secondModel.setSelectionInterval((secondLead + 1)%(secondMax + 1),
+ (secondLead + 1)%(secondMax + 1));
+ // if not, just reselect the current lead
+ else
+ secondModel.setSelectionInterval(secondLead, secondLead);
+
+ // if we are going backwards, subtract 2 because we add 1 later
+ // for net change of -1
+ if (reverse)
+ {
+ // check for wraparound
+ if (firstLead == 0)
+ firstLead += firstMax + 1;
+ firstLead -= 2;
+ }
+ // select the next "first"
+ firstModel.setSelectionInterval ((firstLead + 1)%(firstMax + 1),
+ (firstLead + 1)%(firstMax + 1));
+ }
+
+ public void keyPressed(KeyEvent evt)
+ {
+ ListSelectionModel rowModel = table.getSelectionModel();
+ ListSelectionModel colModel = table.getColumnModel().getSelectionModel();
+
+ int rowLead = rowModel.getLeadSelectionIndex();
+ int rowMax = table.getModel().getRowCount() - 1;
+
+ int colLead = colModel.getLeadSelectionIndex();
+ int colMax = table.getModel().getColumnCount() - 1;
+
+ if ((evt.getKeyCode() == KeyEvent.VK_DOWN)
+ || (evt.getKeyCode() == KeyEvent.VK_KP_DOWN))
+ {
+ if (evt.getModifiers() == 0)
+ {
+
+ table.clearSelection();
+ rowModel.setSelectionInterval(Math.min(rowLead + 1, rowMax),
+ Math.min(rowLead + 1, rowMax));
+ colModel.setSelectionInterval(colLead,colLead);
+ }
+ else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ {
+ rowModel.setLeadSelectionIndex(Math.min(rowLead + 1, rowMax));
+ colModel.setLeadSelectionIndex(colLead);
+ }
+ }
+ else if ((evt.getKeyCode() == KeyEvent.VK_UP)
+ || (evt.getKeyCode() == KeyEvent.VK_KP_UP))
+ {
+ if (evt.getModifiers() == 0)
+ {
+ table.clearSelection();
+ rowModel.setSelectionInterval(Math.max(rowLead - 1, 0),
+ Math.max(rowLead - 1, 0));
+ colModel.setSelectionInterval(colLead,colLead);
+ }
+ else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ {
+ rowModel.setLeadSelectionIndex(Math.max(rowLead - 1, 0));
+ colModel.setLeadSelectionIndex(colLead);
+ }
+ }
+ else if ((evt.getKeyCode() == KeyEvent.VK_LEFT)
+ || (evt.getKeyCode() == KeyEvent.VK_KP_LEFT))
+ {
+ if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ {
+ colModel.setLeadSelectionIndex(Math.max(colLead - 1, 0));
+ rowModel.setLeadSelectionIndex(rowLead);
+ }
+ else if (evt.getModifiers() == 0)
+ {
+ table.clearSelection();
+ rowModel.setSelectionInterval(rowLead,rowLead);
+ colModel.setSelectionInterval(Math.max(colLead - 1, 0),
+ Math.max(colLead - 1, 0));
+ }
+ }
+ else if ((evt.getKeyCode() == KeyEvent.VK_RIGHT)
+ || (evt.getKeyCode() == KeyEvent.VK_KP_RIGHT))
+ {
+ if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ {
+ colModel.setLeadSelectionIndex(Math.min(colLead + 1, colMax));
+ rowModel.setLeadSelectionIndex(rowLead);
+ }
+ else if (evt.getModifiers() == 0)
+ {
+ table.clearSelection();
+ rowModel.setSelectionInterval(rowLead,rowLead);
+ colModel.setSelectionInterval(Math.min(colLead + 1, colMax),
+ Math.min(colLead + 1, colMax));
+ }
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_END)
+ {
+ if (evt.getModifiers() == (InputEvent.SHIFT_MASK | InputEvent.CTRL_MASK))
+ {
+ rowModel.setLeadSelectionIndex(rowMax);
+ colModel.setLeadSelectionIndex(colLead);
+ }
+ else if (evt.getModifiers() == InputEvent.CTRL_MASK)
+ {
+ table.clearSelection();
+ rowModel.setSelectionInterval(rowMax,rowMax);
+ colModel.setSelectionInterval(colLead, colLead);
+ }
+ else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ {
+ colModel.setLeadSelectionIndex(colMax);
+ rowModel.setLeadSelectionIndex(rowLead);
+ }
+ else if (evt.getModifiers() == 0)
+ {
+ table.clearSelection();
+ rowModel.setSelectionInterval(rowLead, rowLead);
+ colModel.setSelectionInterval(colMax, colMax);
+ }
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_HOME)
+ {
+ if (evt.getModifiers() == (InputEvent.SHIFT_MASK | InputEvent.CTRL_MASK))
+ {
+ rowModel.setLeadSelectionIndex(0);
+ colModel.setLeadSelectionIndex(colLead);
+ }
+ else if (evt.getModifiers() == InputEvent.CTRL_MASK)
+ {
+ table.clearSelection();
+ rowModel.setSelectionInterval(0,0);
+ colModel.setSelectionInterval(colLead, colLead);
+ }
+ else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
+ {
+ colModel.setLeadSelectionIndex(0);
+ rowModel.setLeadSelectionIndex(rowLead);
+ }
+ else if (evt.getModifiers() == 0)
+ {
+ table.clearSelection();
+ rowModel.setSelectionInterval(rowLead, rowLead);
+ colModel.setSelectionInterval(0, 0);
+ }
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_F2)
+ {
+ // FIXME: Implement "start editing"
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_PAGE_UP)
+ {
+ // FIXME: implement, need JList.ensureIndexIsVisible to work
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_PAGE_DOWN)
+ {
+ // FIXME: implement, need JList.ensureIndexIsVisible to work
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_TAB
+ || evt.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ // If modifers other than SHIFT are pressed, do nothing
+ if (evt.getModifiers() != 0 && evt.getModifiers() !=
+ InputEvent.SHIFT_MASK)
+ return;
+
+ // If nothing is selected, select the first cell in the table
+ if (table.getSelectedRowCount() == 0 &&
+ table.getSelectedColumnCount() == 0)
+ {
+ rowModel.setSelectionInterval(0, 0);
+ colModel.setSelectionInterval(0, 0);
+ return;
+ }
+
+ // If the lead selection index isn't selected (ie a remove operation
+ // happened, then set the lead to the first selected cell in the
+ // table
+ if (!table.isCellSelected(rowLead, colLead))
+ {
+ rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(),
+ rowModel.getMinSelectionIndex());
+ colModel.addSelectionInterval(colModel.getMinSelectionIndex(),
+ colModel.getMinSelectionIndex());
+ return;
+ }
+
+ // multRowsSelected and multColsSelected tell us if multiple rows or
+ // columns are selected, respectively
+ boolean multRowsSelected, multColsSelected;
+ multRowsSelected = (table.getSelectedRowCount() > 1) ||
+ (!table.getRowSelectionAllowed() &&
+ table.getSelectedColumnCount() > 0);
+ multColsSelected = (table.getSelectedColumnCount() > 1) ||
+ (!table.getColumnSelectionAllowed() &&
+ table.getSelectedRowCount() > 0);
+
+ // If there is just one selection, select the next cell, and wrap
+ // when you get to the edges of the table.
+ if (!multColsSelected || !multRowsSelected)
+ {
+ if (evt.getKeyCode() == KeyEvent.VK_TAB)
+ advanceSingleSelection(colModel, colMax, rowModel, rowMax,
+ (evt.getModifiers() ==
+ InputEvent.SHIFT_MASK));
+ else
+ advanceSingleSelection(rowModel, rowMax, colModel, colMax,
+ (evt.getModifiers() ==
+ InputEvent.SHIFT_MASK));
+ return;
+ }
+
+
+ // rowMinSelected and rowMaxSelected are the minimum and maximum
+ // values respectively of selected cells in the row selection model
+ // Similarly for colMinSelected and colMaxSelected.
+ int rowMaxSelected = table.getRowSelectionAllowed() ?
+ rowModel.getMaxSelectionIndex() : table.getModel().getRowCount() - 1;
+ int rowMinSelected = table.getRowSelectionAllowed() ?
+ rowModel.getMinSelectionIndex() : 0;
+ int colMaxSelected = table.getColumnSelectionAllowed() ?
+ colModel.getMaxSelectionIndex() :
+ table.getModel().getColumnCount() - 1;
+ int colMinSelected = table.getColumnSelectionAllowed() ?
+ colModel.getMinSelectionIndex() : 0;
+
+ // If there are multiple rows and columns selected, select the next
+ // cell and wrap at the edges of the selection.
+ if (evt.getKeyCode() == KeyEvent.VK_TAB)
+ advanceMultipleSelection(colModel, colMinSelected, colMaxSelected,
+ rowModel, rowMinSelected, rowMaxSelected,
+ (evt.getModifiers() ==
+ InputEvent.SHIFT_MASK), true);
+ else
+ advanceMultipleSelection(rowModel, rowMinSelected, rowMaxSelected,
+ colModel, colMinSelected, colMaxSelected,
+ (evt.getModifiers() ==
+ InputEvent.SHIFT_MASK), false);
+
+ table.repaint();
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_ESCAPE)
+ {
+ // FIXME: implement "cancel"
+ }
+ else if ((evt.getKeyCode() == KeyEvent.VK_A || evt.getKeyCode()
+ == KeyEvent.VK_SLASH) && (evt.getModifiers() ==
+ InputEvent.CTRL_MASK))
+ {
+ table.selectAll();
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_BACK_SLASH
+ && (evt.getModifiers() == InputEvent.CTRL_MASK))
+ {
+ table.clearSelection();
+ }
+ else if (evt.getKeyCode() == KeyEvent.VK_SPACE
+ && (evt.getModifiers() == InputEvent.CTRL_MASK))
+ {
+ table.changeSelection(rowLead, colLead, true, false);
+ }
}
+
public void keyReleased(KeyEvent e)
{
}
+
public void keyTyped(KeyEvent e)
{
}
@@ -104,23 +519,32 @@ public class BasicTableUI
{
Point begin, curr;
- private void updateSelection()
+ private void updateSelection(boolean controlPressed)
{
- if (table.getRowSelectionAllowed())
+ // Update the rows
+ int lo_row = table.rowAtPoint(begin);
+ int hi_row = table.rowAtPoint(curr);
+ ListSelectionModel rowModel = table.getSelectionModel();
+ if (lo_row != -1 && hi_row != -1)
{
- int lo_row = table.rowAtPoint(begin);
- int hi_row = table.rowAtPoint(curr);
- ListSelectionModel rowModel = table.getSelectionModel();
- if (lo_row != -1 && hi_row != -1)
+ if (controlPressed && rowModel.getSelectionMode()
+ != ListSelectionModel.SINGLE_SELECTION)
+ rowModel.addSelectionInterval(lo_row, hi_row);
+ else
rowModel.setSelectionInterval(lo_row, hi_row);
}
-
- if (table.getColumnSelectionAllowed())
+
+ // Update the columns
+ int lo_col = table.columnAtPoint(begin);
+ int hi_col = table.columnAtPoint(curr);
+ ListSelectionModel colModel = table.getColumnModel().
+ getSelectionModel();
+ if (lo_col != -1 && hi_col != -1)
{
- int lo_col = table.columnAtPoint(begin);
- int hi_col = table.columnAtPoint(curr);
- ListSelectionModel colModel = table.getColumnModel().getSelectionModel();
- if (lo_col != -1 && hi_col != -1)
+ if (controlPressed && colModel.getSelectionMode() !=
+ ListSelectionModel.SINGLE_SELECTION)
+ colModel.addSelectionInterval(lo_col, hi_col);
+ else
colModel.setSelectionInterval(lo_col, hi_col);
}
}
@@ -131,7 +555,7 @@ public class BasicTableUI
public void mouseDragged(MouseEvent e)
{
curr = new Point(e.getX(), e.getY());
- updateSelection();
+ updateSelection(e.isControlDown());
}
public void mouseEntered(MouseEvent e)
{
@@ -146,7 +570,20 @@ public class BasicTableUI
{
begin = new Point(e.getX(), e.getY());
curr = new Point(e.getX(), e.getY());
- updateSelection();
+ //if control is pressed and the cell is already selected, deselect it
+ if (e.isControlDown() && table.
+ isCellSelected(table.rowAtPoint(begin),table.columnAtPoint(begin)))
+ {
+ table.getSelectionModel().
+ removeSelectionInterval(table.rowAtPoint(begin),
+ table.rowAtPoint(begin));
+ table.getColumnModel().getSelectionModel().
+ removeSelectionInterval(table.columnAtPoint(begin),
+ table.columnAtPoint(begin));
+ }
+ else
+ updateSelection(e.isControlDown());
+
}
public void mouseReleased(MouseEvent e)
{
@@ -195,6 +632,9 @@ public class BasicTableUI
table.setSelectionForeground(defaults.getColor("Table.selectionForeground"));
table.setSelectionBackground(defaults.getColor("Table.selectionBackground"));
table.setOpaque(true);
+
+ highlightCellBorder = defaults.getBorder("Table.focusCellHighlightBorder");
+ cellBorder = BorderFactory.createEmptyBorder(1, 1, 1, 1);
}
protected void installKeyboardActions()
{
@@ -205,6 +645,7 @@ public class BasicTableUI
table.addFocusListener(focusListener);
table.addKeyListener(keyListener);
table.addMouseListener(mouseInputListener);
+ table.addMouseMotionListener(mouseInputListener);
}
protected void uninstallDefaults()
@@ -236,6 +677,7 @@ public class BasicTableUI
table.removeFocusListener(focusListener);
table.removeKeyListener(keyListener);
table.removeMouseListener(mouseInputListener);
+ table.removeMouseMotionListener(mouseInputListener);
}
public void installUI(JComponent comp)
@@ -292,6 +734,17 @@ public class BasicTableUI
Component comp = table.prepareRenderer(rend, r, c);
gfx.translate(x, y);
comp.setBounds(new Rectangle(0, 0, width, height));
+ // Set correct border on cell renderer.
+ // Only the lead selection cell gets a border
+ if (comp instanceof JComponent)
+ {
+ if (table.getSelectionModel().getLeadSelectionIndex() == r
+ && table.getColumnModel().getSelectionModel().
+ getLeadSelectionIndex() == c)
+ ((JComponent) comp).setBorder(highlightCellBorder);
+ else
+ ((JComponent) comp).setBorder(cellBorder);
+ }
comp.paint(gfx);
gfx.translate(-x, -y);
}
@@ -347,5 +800,4 @@ public class BasicTableUI
}
}
-
}
diff --git a/javax/swing/plaf/basic/BasicTextAreaUI.java b/javax/swing/plaf/basic/BasicTextAreaUI.java
index 61d025ddd..97b0ccb6e 100644
--- a/javax/swing/plaf/basic/BasicTextAreaUI.java
+++ b/javax/swing/plaf/basic/BasicTextAreaUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicTextFieldUI.java b/javax/swing/plaf/basic/BasicTextFieldUI.java
index e7cf33b1b..a300446c2 100644
--- a/javax/swing/plaf/basic/BasicTextFieldUI.java
+++ b/javax/swing/plaf/basic/BasicTextFieldUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicTextPaneUI.java b/javax/swing/plaf/basic/BasicTextPaneUI.java
index ac20a0a99..55d908e1b 100644
--- a/javax/swing/plaf/basic/BasicTextPaneUI.java
+++ b/javax/swing/plaf/basic/BasicTextPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicTextUI.java b/javax/swing/plaf/basic/BasicTextUI.java
index 1bb0fe4b2..acd0261ed 100644
--- a/javax/swing/plaf/basic/BasicTextUI.java
+++ b/javax/swing/plaf/basic/BasicTextUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -78,10 +78,20 @@ import javax.swing.text.Position;
import javax.swing.text.View;
import javax.swing.text.ViewFactory;
-
+/**
+ * The abstract base class from which the UI classes for Swings text
+ * components are derived. This provides most of the functionality for
+ * the UI classes.
+ *
+ * @author original author unknown
+ * @author Roman Kennke (roman@kennke.org)
+ */
public abstract class BasicTextUI extends TextUI
implements ViewFactory
{
+ /**
+ * A {@link DefaultCaret} that implements {@link UIResource}.
+ */
public static class BasicCaret extends DefaultCaret
implements UIResource
{
@@ -90,6 +100,9 @@ public abstract class BasicTextUI extends TextUI
}
}
+ /**
+ * A {@link DefaultHighlighter} that implements {@link UIResource}.
+ */
public static class BasicHighlighter extends DefaultHighlighter
implements UIResource
{
@@ -97,40 +110,80 @@ public abstract class BasicTextUI extends TextUI
{
}
}
-
+
+ /**
+ * This view forms the root of the View hierarchy. However, it delegates
+ * most calls to another View which is the real root of the hierarchy.
+ * The purpose is to make sure that all Views in the hierarchy, including
+ * the (real) root have a well-defined parent to which they can delegate
+ * calls like {@link #preferenceChanged}, {@link #getViewFactory} and
+ * {@link #getContainer}.
+ */
private class RootView extends View
{
+ /** The real root view. */
private View view;
-
+
+ /**
+ * Creates a new RootView.
+ */
public RootView()
{
super(null);
}
- // View methods.
-
+ /**
+ * Returns the ViewFactory for this RootView. If the current EditorKit
+ * provides a ViewFactory, this is used. Otherwise the TextUI itself
+ * is returned as a ViewFactory.
+ *
+ * @return the ViewFactory for this RootView
+ */
public ViewFactory getViewFactory()
{
- // FIXME: Handle EditorKit somehow.
- return BasicTextUI.this;
+ ViewFactory factory = null;
+ EditorKit editorKit = BasicTextUI.this.getEditorKit(getComponent());
+ factory = editorKit.getViewFactory();
+ if (factory == null)
+ factory = BasicTextUI.this;
+ return factory;
}
+ /**
+ * Sets the real root view.
+ *
+ * @param v the root view to set
+ */
public void setView(View v)
{
if (view != null)
view.setParent(null);
if (v != null)
- v.setParent(null);
+ v.setParent(this);
view = v;
}
+ /**
+ * Returns the <code>Container</code> that contains this view. This
+ * normally will be the text component that is managed by this TextUI.
+ *
+ * @return the <code>Container</code> that contains this view
+ */
public Container getContainer()
{
return textComponent;
}
-
+
+ /**
+ * Returns the preferred span along the specified <code>axis</code>.
+ * This is delegated to the real root view.
+ *
+ * @param axis the axis for which the preferred span is queried
+ *
+ * @return the preferred span along the axis
+ */
public float getPreferredSpan(int axis)
{
if (view != null)
@@ -139,19 +192,47 @@ public abstract class BasicTextUI extends TextUI
return Integer.MAX_VALUE;
}
+ /**
+ * Paints the view. This is delegated to the real root view.
+ *
+ * @param g the <code>Graphics</code> context to paint to
+ * @param s the allocation for the View
+ */
public void paint(Graphics g, Shape s)
{
if (view != null)
view.paint(g, s);
}
+
+ /**
+ * Maps a position in the document into the coordinate space of the View.
+ * The output rectangle usually reflects the font height but has a width
+ * of zero.
+ *
+ * This is delegated to the real root view.
+ *
+ * @param pos the position of the character in the model
+ * @param a the area that is occupied by the view
+ * @param bias either {@link Position.Bias.Forward} or
+ * {@link Position.Bias.Backward} depending on the preferred
+ * direction bias. If <code>null</code> this defaults to
+ * <code>Position.Bias.Forward</code>
+ *
+ * @return a rectangle that gives the location of the document position
+ * inside the view coordinate space
+ *
+ * @throws BadLocationException if <code>pos</code> is invalid
+ * @throws IllegalArgumentException if b is not one of the above listed
+ * valid values
+ */
public Shape modelToView(int position, Shape a, Position.Bias bias)
throws BadLocationException
{
if (view == null)
return null;
- return ((PlainView) view).modelToView(position, a, bias).getBounds();
+ return ((View) view).modelToView(position, a, bias);
}
/**
@@ -194,8 +275,16 @@ public abstract class BasicTextUI extends TextUI
}
}
+ /**
+ * Receives notifications when properties of the text component change.
+ */
class UpdateHandler implements PropertyChangeListener
{
+ /**
+ * Notifies when a property of the text component changes.
+ *
+ * @param event the PropertyChangeEvent describing the change
+ */
public void propertyChange(PropertyChangeEvent event)
{
if (event.getPropertyName().equals("document"))
@@ -208,7 +297,7 @@ public abstract class BasicTextUI extends TextUI
/**
* Listens for changes on the underlying model and forwards notifications
- * to the View.
+ * to the View. This also updates the caret position of the text component.
*
* TODO: Maybe this should somehow be handled through EditorKits
*/
@@ -236,6 +325,9 @@ public abstract class BasicTextUI extends TextUI
Dimension size = textComponent.getSize();
rootView.insertUpdate(ev, new Rectangle(0, 0, size.width, size.height),
BasicTextUI.this);
+ int caretPos = textComponent.getCaretPosition();
+ if (caretPos >= ev.getOffset())
+ textComponent.setCaretPosition(caretPos + ev.getLength());
}
/**
@@ -248,37 +340,79 @@ public abstract class BasicTextUI extends TextUI
Dimension size = textComponent.getSize();
rootView.removeUpdate(ev, new Rectangle(0, 0, size.width, size.height),
BasicTextUI.this);
+ int caretPos = textComponent.getCaretPosition();
+ if (caretPos >= ev.getOffset())
+ textComponent.setCaretPosition(ev.getOffset());
}
}
+ /**
+ * The EditorKit used by this TextUI.
+ */
+ // FIXME: should probably be non-static.
static EditorKit kit = new DefaultEditorKit();
+ /**
+ * The root view.
+ */
RootView rootView = new RootView();
+
+ /**
+ * The text component that we handle.
+ */
JTextComponent textComponent;
+
+ /**
+ * Receives notification when the model changes.
+ */
UpdateHandler updateHandler = new UpdateHandler();
/** The DocumentEvent handler. */
DocumentHandler documentHandler = new DocumentHandler();
+ /**
+ * Creates a new <code>BasicTextUI</code> instance.
+ */
public BasicTextUI()
{
}
+ /**
+ * Creates a {@link Caret} that should be installed into the text component.
+ *
+ * @return a caret that should be installed into the text component
+ */
protected Caret createCaret()
{
return new BasicCaret();
}
+ /**
+ * Creates a {@link Highlighter} that should be installed into the text
+ * component.
+ *
+ * @return a <code>Highlighter</code> for the text component
+ */
protected Highlighter createHighlighter()
{
return new BasicHighlighter();
}
-
+
+ /**
+ * The text component that is managed by this UI.
+ *
+ * @return the text component that is managed by this UI
+ */
protected final JTextComponent getComponent()
{
return textComponent;
}
-
+
+ /**
+ * Installs this UI on the text component.
+ *
+ * @param c the text component on which to install the UI
+ */
public void installUI(final JComponent c)
{
super.installUI(c);
@@ -301,6 +435,9 @@ public abstract class BasicTextUI extends TextUI
installKeyboardActions();
}
+ /**
+ * Installs UI defaults on the text components.
+ */
protected void installDefaults()
{
Caret caret = textComponent.getCaret();
@@ -325,6 +462,9 @@ public abstract class BasicTextUI extends TextUI
caret.setBlinkRate(defaults.getInt(prefix + ".caretBlinkRate"));
}
+ /**
+ * This FocusListener triggers repaints on focus shift.
+ */
private FocusListener focuslistener = new FocusListener() {
public void focusGained(FocusEvent e)
{
@@ -336,6 +476,9 @@ public abstract class BasicTextUI extends TextUI
}
};
+ /**
+ * Install all listeners on the text component.
+ */
protected void installListeners()
{
textComponent.addFocusListener(focuslistener);
@@ -352,23 +495,49 @@ public abstract class BasicTextUI extends TextUI
doc.addDocumentListener(documentHandler);
}
+ /**
+ * Returns the name of the keymap for this type of TextUI.
+ *
+ * This is implemented so that the classname of this TextUI
+ * without the package prefix is returned. This way subclasses
+ * don't have to override this method.
+ *
+ * @return the name of the keymap for this TextUI
+ */
protected String getKeymapName()
{
- return "BasicTextUI";
+ String fullClassName = getClass().getName();
+ int index = fullClassName.lastIndexOf('.');
+ String className = fullClassName.substring(index + 1);
+ return className;
}
+ /**
+ * Creates the {@link Keymap} that is installed on the text component.
+ *
+ * @return the {@link Keymap} that is installed on the text component
+ */
protected Keymap createKeymap()
{
String prefix = getPropertyPrefix();
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
JTextComponent.KeyBinding[] bindings =
(JTextComponent.KeyBinding[]) defaults.get(prefix + ".keyBindings");
+ if (bindings == null)
+ {
+ bindings = new JTextComponent.KeyBinding[0];
+ defaults.put(prefix + ".keyBindings", bindings);
+ }
+
Keymap km = JTextComponent.addKeymap(getKeymapName(),
JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP));
JTextComponent.loadKeymap(km, bindings, textComponent.getActions());
return km;
}
+ /**
+ * Installs the keyboard actions on the text components.
+ */
protected void installKeyboardActions()
{
// load any bindings for the older Keymap interface
@@ -384,6 +553,13 @@ public abstract class BasicTextUI extends TextUI
SwingUtilities.replaceUIActionMap(textComponent, getActionMap());
}
+ /**
+ * Gets the input map for the specified <code>condition</code>.
+ *
+ * @param condition the condition for the InputMap
+ *
+ * @return the InputMap for the specified condition
+ */
InputMap getInputMap(int condition)
{
String prefix = getPropertyPrefix();
@@ -401,6 +577,13 @@ public abstract class BasicTextUI extends TextUI
}
}
+ /**
+ * Returns the ActionMap to be installed on the text component.
+ *
+ * @return the ActionMap to be installed on the text component
+ */
+ // FIXME: The UIDefaults have no entries for .actionMap, so this should
+ // be handled somehow different.
ActionMap getActionMap()
{
String prefix = getPropertyPrefix();
@@ -414,6 +597,11 @@ public abstract class BasicTextUI extends TextUI
return am;
}
+ /**
+ * Creates an ActionMap to be installed on the text component.
+ *
+ * @return an ActionMap to be installed on the text component
+ */
ActionMap createActionMap()
{
Action[] actions = textComponent.getActions();
@@ -426,7 +614,12 @@ public abstract class BasicTextUI extends TextUI
}
return am;
}
-
+
+ /**
+ * Uninstalls this TextUI from the text component.
+ *
+ * @param component the text component to uninstall the UI from
+ */
public void uninstallUI(final JComponent component)
{
super.uninstallUI(component);
@@ -441,23 +634,49 @@ public abstract class BasicTextUI extends TextUI
textComponent = null;
}
+ /**
+ * Uninstalls all default properties that have previously been installed by
+ * this UI.
+ */
protected void uninstallDefaults()
{
// Do nothing here.
}
+ /**
+ * Uninstalls all listeners that have previously been installed by
+ * this UI.
+ */
protected void uninstallListeners()
{
textComponent.removeFocusListener(focuslistener);
}
+ /**
+ * Uninstalls all keyboard actions that have previously been installed by
+ * this UI.
+ */
protected void uninstallKeyboardActions()
{
- // Do nothing here.
+ // FIXME: Uninstall keyboard actions here.
}
-
+
+ /**
+ * Returns the property prefix by which the text component's UIDefaults
+ * are looked up.
+ *
+ * @return the property prefix by which the text component's UIDefaults
+ * are looked up
+ */
protected abstract String getPropertyPrefix();
+ /**
+ * Returns the preferred size of the text component.
+ *
+ * @param c not used here
+ *
+ * @return the preferred size of the text component
+ */
public Dimension getPreferredSize(JComponent c)
{
View v = getRootView(textComponent);
@@ -473,6 +692,8 @@ public abstract class BasicTextUI extends TextUI
*
* This returns (Integer.MAX_VALUE, Integer.MAX_VALUE).
*
+ * @param c not used here
+ *
* @return the maximum size for text components that use this UI
*/
public Dimension getMaximumSize(JComponent c)
@@ -481,11 +702,22 @@ public abstract class BasicTextUI extends TextUI
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
}
+ /**
+ * Paints the text component.
+ *
+ * @param g the <code>Graphics</code> context to paint to
+ * @param c not used here
+ */
public final void paint(Graphics g, JComponent c)
{
paintSafely(g);
}
+ /**
+ * Actually performs the painting.
+ *
+ * @param g the <code>Graphics</code> context to paint to
+ */
protected void paintSafely(Graphics g)
{
Caret caret = textComponent.getCaret();
@@ -504,74 +736,213 @@ public abstract class BasicTextUI extends TextUI
caret.paint(g);
}
+ /**
+ * Paints the background of the text component.
+ *
+ * @param g the <code>Graphics</code> context to paint to
+ */
protected void paintBackground(Graphics g)
{
g.setColor(textComponent.getBackground());
g.fillRect(0, 0, textComponent.getWidth(), textComponent.getHeight());
}
+ /**
+ * Marks the specified range inside the text component's model as
+ * damaged and queues a repaint request.
+ *
+ * @param t the text component
+ * @param p0 the start location inside the document model of the range that
+ * is damaged
+ * @param p1 the end location inside the document model of the range that
+ * is damaged
+ */
public void damageRange(JTextComponent t, int p0, int p1)
{
damageRange(t, p0, p1, null, null);
}
+ /**
+ * Marks the specified range inside the text component's model as
+ * damaged and queues a repaint request. This variant of this method
+ * allows a {@link Position.Bias} object to be specified for the start
+ * and end location of the range.
+ *
+ * @param t the text component
+ * @param p0 the start location inside the document model of the range that
+ * is damaged
+ * @param p1 the end location inside the document model of the range that
+ * is damaged
+ * @param firstBias the bias for the start location
+ * @param secondBias the bias for the end location
+ */
public void damageRange(JTextComponent t, int p0, int p1,
Position.Bias firstBias, Position.Bias secondBias)
{
+ // TODO: Implement me.
}
+ /**
+ * Returns the {@link EditorKit} used for the text component that is managed
+ * by this UI.
+ *
+ * @param t the text component
+ *
+ * @return the {@link EditorKit} used for the text component that is managed
+ * by this UI
+ */
public EditorKit getEditorKit(JTextComponent t)
{
return kit;
}
+ /**
+ * Gets the next position inside the document model that is visible on
+ * screen, starting from <code>pos</code>.
+ *
+ * @param t the text component
+ * @param pos the start positionn
+ * @param b the bias for pos
+ * @param direction the search direction
+ * @param biasRet filled by the method to indicate the bias of the return
+ * value
+ *
+ * @return the next position inside the document model that is visible on
+ * screen
+ */
public int getNextVisualPositionFrom(JTextComponent t, int pos,
Position.Bias b, int direction,
Position.Bias[] biasRet)
throws BadLocationException
{
- return 0;
+ return 0; // TODO: Implement me.
}
+ /**
+ * Returns the root {@link View} of a text component.
+ *
+ * @return the root {@link View} of a text component
+ */
public View getRootView(JTextComponent t)
{
return rootView;
}
+ /**
+ * Maps a position in the document into the coordinate space of the View.
+ * The output rectangle usually reflects the font height but has a width
+ * of zero. A bias of {@link Position.Bias.Forward} is used in this method.
+ *
+ * @param pos the position of the character in the model
+ * @param a the area that is occupied by the view
+ *
+ * @return a rectangle that gives the location of the document position
+ * inside the view coordinate space
+ *
+ * @throws BadLocationException if <code>pos</code> is invalid
+ * @throws IllegalArgumentException if b is not one of the above listed
+ * valid values
+ */
public Rectangle modelToView(JTextComponent t, int pos)
throws BadLocationException
{
return modelToView(t, pos, Position.Bias.Forward);
}
+ /**
+ * Maps a position in the document into the coordinate space of the View.
+ * The output rectangle usually reflects the font height but has a width
+ * of zero.
+ *
+ * @param pos the position of the character in the model
+ * @param a the area that is occupied by the view
+ * @param bias either {@link Position.Bias.Forward} or
+ * {@link Position.Bias.Backward} depending on the preferred
+ * direction bias. If <code>null</code> this defaults to
+ * <code>Position.Bias.Forward</code>
+ *
+ * @return a rectangle that gives the location of the document position
+ * inside the view coordinate space
+ *
+ * @throws BadLocationException if <code>pos</code> is invalid
+ * @throws IllegalArgumentException if b is not one of the above listed
+ * valid values
+ */
public Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias)
throws BadLocationException
{
return rootView.modelToView(pos, getVisibleEditorRect(), bias).getBounds();
}
+ /**
+ * Maps a point in the <code>View</code> coordinate space to a position
+ * inside a document model.
+ *
+ * @param t the text component
+ * @param pt the point to be mapped
+ *
+ * @return the position inside the document model that corresponds to
+ * <code>pt</code>
+ */
public int viewToModel(JTextComponent t, Point pt)
{
return viewToModel(t, pt, null);
}
+ /**
+ * Maps a point in the <code>View</code> coordinate space to a position
+ * inside a document model.
+ *
+ * @param t the text component
+ * @param pt the point to be mapped
+ * @param biasReturn filled in by the method to indicate the bias of the
+ * return value
+ *
+ * @return the position inside the document model that corresponds to
+ * <code>pt</code>
+ */
public int viewToModel(JTextComponent t, Point pt, Position.Bias[] biasReturn)
{
- return 0;
+ return 0; // FIXME: Implement me.
}
+ /**
+ * Creates a {@link View} for the specified {@link Element}.
+ *
+ * @param elem the <code>Element</code> to create a <code>View</code> for
+ *
+ * @see ViewFactory
+ */
public View create(Element elem)
{
// Subclasses have to implement this to get this functionality.
return null;
}
+ /**
+ * Creates a {@link View} for the specified {@link Element}.
+ *
+ * @param elem the <code>Element</code> to create a <code>View</code> for
+ * @param p0 the start offset
+ * @param p1 the end offset
+ *
+ * @see ViewFactory
+ */
public View create(Element elem, int p0, int p1)
{
// Subclasses have to implement this to get this functionality.
return null;
}
-
+
+ /**
+ * Returns the allocation to give the root view.
+ *
+ * @return the allocation to give the root view
+ *
+ * @specnote The allocation has nothing to do with visibility. According
+ * to the specs the naming of this method is unfortunate and
+ * has historical reasons
+ */
protected Rectangle getVisibleEditorRect()
{
int width = textComponent.getWidth();
@@ -586,12 +957,20 @@ public abstract class BasicTextUI extends TextUI
height - insets.top + insets.bottom);
}
+ /**
+ * Sets the root view for the text component.
+ *
+ * @param view the <code>View</code> to be set as root view
+ */
protected final void setView(View view)
{
rootView.setView(view);
- view.setParent(rootView);
}
+ /**
+ * Indicates that the model of a text component has changed. This
+ * triggers a rebuild of the view hierarchy.
+ */
protected void modelChanged()
{
if (textComponent == null || rootView == null)
diff --git a/javax/swing/plaf/basic/BasicToggleButtonUI.java b/javax/swing/plaf/basic/BasicToggleButtonUI.java
index 677e6a575..84509ad6e 100644
--- a/javax/swing/plaf/basic/BasicToggleButtonUI.java
+++ b/javax/swing/plaf/basic/BasicToggleButtonUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java b/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java
index 72554c0f4..db29fdca5 100644
--- a/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java
+++ b/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/BasicToolBarUI.java b/javax/swing/plaf/basic/BasicToolBarUI.java
index 18477c9dd..8be89efcf 100644
--- a/javax/swing/plaf/basic/BasicToolBarUI.java
+++ b/javax/swing/plaf/basic/BasicToolBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -542,19 +542,6 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
}
/**
- * This method returns the preferred size of the given JComponent for this
- * UI.
- *
- * @param c The JComponent to find a preferred size for.
- *
- * @return The preferred size for this UI.
- */
- public Dimension getPreferredSize(JComponent c)
- {
- return toolBar.getLayout().preferredLayoutSize(c);
- }
-
- /**
* This method installs the needed components for the JToolBar.
*/
protected void installComponents()
diff --git a/javax/swing/plaf/basic/BasicToolTipUI.java b/javax/swing/plaf/basic/BasicToolTipUI.java
index b561cce71..b7a08aa72 100644
--- a/javax/swing/plaf/basic/BasicToolTipUI.java
+++ b/javax/swing/plaf/basic/BasicToolTipUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -97,7 +97,7 @@ public class BasicToolTipUI extends ToolTipUI
* @param x The x coordinate to start painting at.
* @param y The y coordinate to start painting at.
* @param w The width of the Component.
- * @param y The height of the Component.
+ * @param h The height of the Component.
*/
public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
diff --git a/javax/swing/plaf/basic/BasicTreeUI.java b/javax/swing/plaf/basic/BasicTreeUI.java
index db74f067e..067cb0c3b 100644
--- a/javax/swing/plaf/basic/BasicTreeUI.java
+++ b/javax/swing/plaf/basic/BasicTreeUI.java
@@ -1,5 +1,5 @@
/* BasicTreeUI.java --
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,358 +41,2843 @@ package javax.swing.plaf.basic;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
import java.awt.Graphics;
+import java.awt.Point;
import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.Hashtable;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.CellRendererPane;
+import javax.swing.Icon;
import javax.swing.JComponent;
+import javax.swing.JScrollBar;
+import javax.swing.JScrollPane;
import javax.swing.JTree;
+import javax.swing.SwingUtilities;
+import javax.swing.Timer;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
+import javax.swing.event.CellEditorListener;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.MouseInputListener;
+import javax.swing.event.TreeExpansionEvent;
+import javax.swing.event.TreeExpansionListener;
+import javax.swing.event.TreeModelEvent;
+import javax.swing.event.TreeModelListener;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.TreeUI;
+import javax.swing.tree.AbstractLayoutCache;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeCellEditor;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.FixedHeightLayoutCache;
+import javax.swing.tree.TreeCellEditor;
+import javax.swing.tree.TreeCellRenderer;
import javax.swing.tree.TreeModel;
+import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
+import javax.swing.tree.TreeSelectionModel;
/**
- * A delegate providing the user interface for <code>JTree</code>
- * according to the Basic look and feel. The current implementation
- * of GNU Classpath does really work; it is just a stub that allows
- * compiling the code.
- *
+ * A delegate providing the user interface for <code>JTree</code> according to
+ * the Basic look and feel.
+ *
* @see javax.swing.JTree
- *
* @author Sascha Brawer (brawer@dandelis.ch)
+ * @author Lillian Angel (langel@redhat.com)
*/
-public class BasicTreeUI
- extends TreeUI
+public class BasicTreeUI extends TreeUI
{
-
+ /** Collapse Icon for the tree. */
+ protected transient Icon collapsedIcon;
+
+ /** Expanded Icon for the tree. */
+ protected transient Icon expandedIcon;
+
+ /** Distance between left margin and where vertical dashes will be drawn. */
+ protected int leftChildIndent;
+
+ /**
+ * Distance between leftChildIndent and where cell contents will be drawn.
+ */
+ protected int rightChildIndent;
+
+ /**
+ * Total fistance that will be indented. The sum of leftChildIndent and
+ * rightChildIndent .
+ */
+ protected int totalChildIndent;
+
+ /** Minimum preferred size. */
+ protected Dimension preferredMinsize;
+
+ /** Index of the row that was last selected. */
+ protected int lastSelectedRow;
+
+ /** Component that we're going to be drawing onto. */
+ protected JTree tree;
+
+ /** Renderer that is being used to do the actual cell drawing. */
+ protected transient TreeCellRenderer currentCellRenderer;
+
+ /**
+ * Set to true if the renderer that is currently in the tree was created by
+ * this instance.
+ */
+ protected boolean createdRenderer;
+
+ /** Editor for the tree. */
+ protected transient TreeCellEditor cellEditor;
+
+ /**
+ * Set to true if editor that is currently in the tree was created by this
+ * instance.
+ */
+ protected boolean createdCellEditor;
+
+ /**
+ * Set to false when editing and shouldSelectCall() returns true meaning the
+ * node should be selected before editing, used in completeEditing.
+ */
+ protected boolean stopEditingInCompleteEditing;
+
+ /** Used to paint the TreeCellRenderer. */
+ protected CellRendererPane rendererPane;
+
+ /** Size needed to completely display all the nodes. */
+ protected Dimension preferredSize;
+
+ /** Is the preferredSize valid? */
+ protected boolean validCachedPreferredSize;
+
+ /** Object responsible for handling sizing and expanded issues. */
+ protected AbstractLayoutCache treeState;
+
+ /** Used for minimizing the drawing of vertical lines. */
+ protected Hashtable drawingCache;
+
+ /**
+ * True if doing optimizations for a largeModel. Subclasses that don't
+ * support this may wish to override createLayoutCache to not return a
+ * FixedHeightLayoutCache instance.
+ */
+ protected boolean largeModel;
+
+ /** Responsible for telling the TreeState the size needed for a node. */
+ protected AbstractLayoutCache.NodeDimensions nodeDimensions;
+
+ /** Used to determine what to display. */
+ protected TreeModel treeModel;
+
+ /** Model maintaining the selection. */
+ protected TreeSelectionModel treeSelectionModel;
+
+ /**
+ * How much the depth should be offset to properly calculate x locations.
+ * This is based on whether or not the root is visible, and if the root
+ * handles are visible.
+ */
+ protected int depthOffset;
+
+ /**
+ * When editing, this will be the Component that is doing the actual editing.
+ */
+ protected Component editingComponent;
+
+ /** Path that is being edited. */
+ protected TreePath editingPath;
+
+ /**
+ * Row that is being edited. Should only be referenced if editingComponent is
+ * null.
+ */
+ protected int editingRow;
+
+ /** Set to true if the editor has a different size than the renderer. */
+ protected boolean editorHasDifferentSize;
+
+ /** Listeners */
+ private PropertyChangeListener propertyChangeListener;
+ private FocusListener focusListener;
+ private TreeSelectionListener treeSelectionListener;
+ private MouseInputListener mouseInputListener;
+ private KeyListener keyListener;
+ private PropertyChangeListener selectionModelPropertyChangeListener;
+ private ComponentListener componentListener;
+ private CellEditorListener cellEditorListener;
+ private TreeExpansionListener treeExpansionListener;
+ private TreeModelListener treeModelListener;
+
+ /**
+ * Creates a new BasicTreeUI object.
+ */
+ public BasicTreeUI()
+ {
+ drawingCache = new Hashtable();
+ cellEditor = createDefaultCellEditor();
+ currentCellRenderer = createDefaultCellRenderer();
+ nodeDimensions = createNodeDimensions();
+ rendererPane = createCellRendererPane();
+ configureLayoutCache();
+
+ propertyChangeListener = createPropertyChangeListener();
+ focusListener = createFocusListener();
+ treeSelectionListener = createTreeSelectionListener();
+ mouseInputListener = new MouseInputHandler(null, null, null);
+ keyListener = createKeyListener();
+ selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener();
+ componentListener = createComponentListener();
+ cellEditorListener = createCellEditorListener();
+ treeExpansionListener = createTreeExpansionListener();
+ treeModelListener = createTreeModelListener();
+
+ createdRenderer = true;
+ createdCellEditor = true;
+ editingRow = -1;
+ lastSelectedRow = -1;
+ }
+
+ /**
+ * Returns an instance of the UI delegate for the specified component.
+ *
+ * @param c the <code>JComponent</code> for which we need a UI delegate
+ * for.
+ * @return the <code>ComponentUI</code> for c.
+ */
+ public static ComponentUI createUI(JComponent c)
+ {
+ return new BasicTreeUI();
+ }
+
+ /**
+ * Returns the Hash color.
+ *
+ * @return the <code>Color</code> of the Hash.
+ */
+ protected Color getHashColor()
+ {
+ return UIManager.getLookAndFeelDefaults().getColor("Tree.hash");
+ }
+
+ /**
+ * Sets the Hash color.
+ *
+ * @param color the <code>Color</code> to set the Hash to.
+ */
+ protected void setHashColor(Color color)
+ {
+ // FIXME: not implemented
+
+ }
+
+ /**
+ * Sets the left child's indent value.
+ *
+ * @param newAmount is the new indent value for the left child.
+ */
+ public void setLeftChildIndent(int newAmount)
+ {
+ leftChildIndent = newAmount;
+ }
+
+ /**
+ * Returns the indent value for the left child.
+ *
+ * @return the indent value for the left child.
+ */
+ public int getLeftChildIndent(int newAmount)
+ {
+ return leftChildIndent;
+ }
+
+ /**
+ * Sets the right child's indent value.
+ *
+ * @param newAmount is the new indent value for the right child.
+ */
+ public void setRightChildIndent(int newAmount)
+ {
+ rightChildIndent = newAmount;
+ }
+
+ /**
+ * Returns the indent value for the right child.
+ *
+ * @return the indent value for the right child.
+ */
+ public int getRightChildIndent(int newAmount)
+ {
+ return rightChildIndent;
+ }
+
+ /**
+ * Sets the expanded icon.
+ *
+ * @param newG is the new expanded icon.
+ */
+ public void setExpandedIcon(Icon newG)
+ {
+ expandedIcon = newG;
+ }
+
+ /**
+ * Returns the current expanded icon.
+ *
+ * @return the current expanded icon.
+ */
+ public Icon getExpandedIcon()
+ {
+ return expandedIcon;
+ }
+
+ /**
+ * Sets the collapsed icon.
+ *
+ * @param newG is the new collapsed icon.
+ */
+ public void setCollapsedIcon(Icon newG)
+ {
+ collapsedIcon = newG;
+ }
+
+ /**
+ * Returns the current collapsed icon.
+ *
+ * @return the current collapsed icon.
+ */
+ public Icon getCollapsedIcon()
+ {
+ return collapsedIcon;
+ }
+
+ /**
+ * Updates the componentListener, if necessary.
+ *
+ * @param largeModel sets this.largeModel to it.
+ */
+ protected void setLargeModel(boolean largeModel)
+ {
+ if (largeModel != this.largeModel)
+ {
+ tree.removeComponentListener(componentListener);
+ this.largeModel = largeModel;
+ tree.addComponentListener(componentListener);
+ }
+ }
+
+ /**
+ * Returns true if largeModel is set
+ *
+ * @return true if largeModel is set, otherwise false.
+ */
+ protected boolean isLargeModel()
+ {
+ return largeModel;
+ }
+
+ /**
+ * Sets the row height.
+ *
+ * @param rowHeight is the height to set this.rowHeight to.
+ */
+ protected void setRowHeight(int rowHeight)
+ {
+ treeState.setRowHeight(rowHeight);
+ }
+
+ /**
+ * Returns the current row height.
+ *
+ * @return current row height.
+ */
+ protected int getRowHeight()
+ {
+ return treeState.getRowHeight();
+ }
+
+ /**
+ * Sets the TreeCellRenderer to <code>tcr</code>. This invokes
+ * <code>updateRenderer</code>.
+ *
+ * @param tcr is the new TreeCellRenderer.
+ */
+ protected void setCellRenderer(TreeCellRenderer tcr)
+ {
+ currentCellRenderer = tcr;
+ updateRenderer();
+ }
+
+ /**
+ * Return currentCellRenderer, which will either be the trees renderer, or
+ * defaultCellRenderer, which ever was not null.
+ *
+ * @return the current Cell Renderer
+ */
+ protected TreeCellRenderer getCellRenderer()
+ {
+ if (currentCellRenderer != null)
+ return currentCellRenderer;
+
+ return createDefaultCellRenderer();
+ }
+
+ /**
+ * Sets the tree's model.
+ *
+ * @param model to set the treeModel to.
+ */
+ protected void setModel(TreeModel model)
+ {
+ tree.setModel(model);
+ treeModel = model;
+ }
+
+ /**
+ * Returns the tree's model
+ *
+ * @return treeModel
+ */
+ protected TreeModel getModel()
+ {
+ return treeModel;
+ }
+
/**
- * Determines the geometric extent of the label that is
- * drawn for a path.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
- *
- * @param path the path whose label extent is requested.
- *
- * @return a rectangle enclosing the label, or <code>null</code>
- * if <code>path</code> contains invalid nodes.
+ * Sets the root to being visible.
+ *
+ * @param newValue sets the visibility of the root
+ */
+ protected void setRootVisible(boolean newValue)
+ {
+ tree.setRootVisible(newValue);
+ }
+
+ /**
+ * Returns true if the root is visible.
+ *
+ * @return true if the root is visible.
+ */
+ protected boolean isRootVisible()
+ {
+ return tree.isRootVisible();
+ }
+
+ /**
+ * Determines whether the node handles are to be displayed.
+ *
+ * @param newValue sets whether or not node handles should be displayed.
+ */
+ protected void setShowsRootHandles(boolean newValue)
+ {
+ tree.setShowsRootHandles(newValue);
+ }
+
+ /**
+ * Returns true if the node handles are to be displayed.
+ *
+ * @return true if the node handles are to be displayed.
+ */
+ protected boolean getShowsRootHandles()
+ {
+ return tree.getShowsRootHandles();
+ }
+
+ /**
+ * Sets the cell editor.
+ *
+ * @param editor to set the cellEditor to.
+ */
+ protected void setCellEditor(TreeCellEditor editor)
+ {
+ cellEditor = editor;
+ }
+
+ /**
+ * Returns the <code>TreeCellEditor</code> for this tree.
+ *
+ * @return the cellEditor for this tree.
+ */
+ protected TreeCellEditor getCellEditor()
+ {
+ return cellEditor;
+ }
+
+ /**
+ * Configures the receiver to allow, or not allow, editing.
+ *
+ * @param newValue sets the receiver to allow editing if true.
+ */
+ protected void setEditable(boolean newValue)
+ {
+ tree.setEditable(newValue);
+ }
+
+ /**
+ * Returns true if the receiver allows editing.
+ *
+ * @return true if the receiver allows editing.
+ */
+ protected boolean isEditable()
+ {
+ return tree.isEditable();
+ }
+
+ /**
+ * Resets the selection model. The appropriate listeners are installed on the
+ * model.
+ *
+ * @param newLSM resets the selection model.
+ */
+ protected void setSelectionModel(TreeSelectionModel newLSM)
+ {
+ if (newLSM != null)
+ {
+ treeSelectionModel = newLSM;
+ tree.setSelectionModel(treeSelectionModel);
+ }
+ }
+
+ /**
+ * Returns the current selection model.
+ *
+ * @return the current selection model.
+ */
+ protected TreeSelectionModel getSelectionModel()
+ {
+ return treeSelectionModel;
+ }
+
+ /**
+ * Returns the Rectangle enclosing the label portion that the last item in
+ * path will be drawn to. Will return null if any component in path is
+ * currently valid.
+ *
+ * @param tree is the current tree the path will be drawn to.
+ * @param path is the current path the tree to draw to.
+ * @return the Rectangle enclosing the label portion that the last item in
+ * the path will be drawn to.
*/
public Rectangle getPathBounds(JTree tree, TreePath path)
{
- return null; // FIXME: not implemented
+ if (path != null)
+ {
+ Object cell = path.getLastPathComponent();
+ TreeModel mod = tree.getModel();
+ DefaultMutableTreeNode root = (DefaultMutableTreeNode) mod.getRoot();
+ if (!tree.isRootVisible()
+ && tree.isExpanded(new TreePath(root)))
+ root = root.getNextNode();
+
+ Point loc = getCellLocation(0, 0, tree, mod, cell, root);
+ return getCellBounds(loc.x, loc.y, cell);
+ }
+ return null;
}
-
-
+
/**
- * Creates a <code>TreePath</code> for the specified row.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
- *
- * @param row the index of the row, which should be a number
- * in the range <code>[0, getRowCount(tree) - 1]</code>.
- *
- * @return a <code>TreePath</code> for the specified row, or
- * <code>null</code> if <code>row</code> is outside
- * the valid range.
+ * Returns the path for passed in row. If row is not visible null is
+ * returned.
+ *
+ * @param tree is the current tree to return path for.
+ * @param row is the row number of the row to return.
+ * @return the path for passed in row. If row is not visible null is
+ * returned.
*/
public TreePath getPathForRow(JTree tree, int row)
{
- return null; // FIXME: not implemented
+ DefaultMutableTreeNode node = ((DefaultMutableTreeNode) (tree.getModel())
+ .getRoot());
+ if (!tree.isRootVisible()
+ && tree.isExpanded(new TreePath(((DefaultMutableTreeNode) node)
+ .getPath())))
+ node = node.getNextNode();
+
+ for (int i = 0; i < row; i++)
+ node = getNextVisibleNode(node);
+
+ // in case nothing was found
+ if (node == null)
+ return null;
+
+ // something was found
+ return new TreePath(node.getPath());
}
-
-
+
/**
- * Determines in which row a <code>TreePath</code> is currently
- * being displayed.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
- *
- * @param path the path for which the caller wants to know
- * in which row it is being displayed.
- *
- * @return a number in the range <code>[0, getRowCount(tree)
- * - 1]</code> if the path is currently on display;
- * <code>-1</code> if the path is not shown to the
- * user.
+ * Returns the row that the last item identified in path is visible at. Will
+ * return -1 if any of the elments in the path are not currently visible.
+ *
+ * @param tree is the current tree to return the row for.
+ * @param path is the path used to find the row.
+ * @return the row that the last item identified in path is visible at. Will
+ * return -1 if any of the elments in the path are not currently
+ * visible.
*/
public int getRowForPath(JTree tree, TreePath path)
{
- return -1; // FIXME: not implemented
+ // FIXME: check visibility
+ // right now, just returns last element because
+ // expand/collapse is not implemented
+ return path.getPathCount() - 1;
}
-
-
+
/**
- * Counts how many rows are currently displayed.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
- *
- * @return the number of visible rows.
+ * Returns the number of rows that are being displayed.
+ *
+ * @param tree is the current tree to return the number of rows for.
+ * @return the number of rows being displayed.
*/
public int getRowCount(JTree tree)
{
- return 0; // FIXME: not implemented
+ DefaultMutableTreeNode node = ((DefaultMutableTreeNode) (tree.getModel())
+ .getRoot());
+ if (!tree.isRootVisible()
+ && tree.isExpanded(new TreePath(((DefaultMutableTreeNode) node)
+ .getPath())))
+ node = node.getNextNode();
+
+ int count = 0;
+
+ while (node != null)
+ {
+ count++;
+ node = getNextVisibleNode(node);
+ }
+
+ return count;
}
-
-
+
/**
- * Finds the path that is closest to the specified position.
- *
- * <p><img src="../doc-files/TreeUI-1.png" width="300" height="250"
- * alt="[A screen shot of a JTree]" />
- *
- * <p>As shown by the above illustration, the bounds of the
- * closest path do not necessarily need to contain the passed
- * location.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
- *
- * @param x the horizontal location, relative to the origin
- * of <code>tree</code>.
- *
- * @param y the vertical location, relative to the origin
- * of <code>tree</code>.
- *
- * @return the closest path, or <code>null</code> if the
- * tree is currenlty not displaying any paths at all.
- */
- public TreePath getClosestPathForLocation(JTree tree,
- int x, int y)
- {
- return null; // FIXME: not implemented
+ * Returns the path to the node that is closest to x,y. If there is nothing
+ * currently visible this will return null, otherwise it'll always return a
+ * valid path. If you need to test if the returned object is exactly at x,y
+ * you should get the bounds for the returned path and test x,y against that.
+ *
+ * @param tree the tree to search for the closest path
+ * @param x is the x coordinate of the location to search
+ * @param y is the y coordinate of the location to search
+ * @return the tree path closes to x,y.
+ */
+ public TreePath getClosestPathForLocation(JTree tree, int x, int y)
+ {
+ //FIXME: what if root is hidden? should not depend on (0,0)
+ // should start counting rows from where root is.
+
+ int row = Math.round(y / getRowHeight());
+ TreePath path = getPathForRow(tree, row);
+
+ // no row is visible at this node
+ while (row > 0 && path == null)
+ {
+ --row;
+ path = getPathForRow(tree, row);
+ }
+
+ return path;
}
-
-
+
/**
- * Determines whether the user is currently editing a tree cell.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
- *
- * @see #getEditingPath
+ * Returns true if the tree is being edited. The item that is being edited
+ * can be returned by getEditingPath().
+ *
+ * @param tree is the tree to check for editing.
+ * @return true if the tree is being edited.
*/
public boolean isEditing(JTree tree)
{
- return false; // FIXME: not implemented
+ // FIXME: not implemented
+ return false;
}
-
-
+
/**
- * Stops editing a tree cell, committing the entered value into the
- * tree&#x2019;s model. If no editing session is active, or if the
- * active editor does not agree to stopping, nothing happens. In
- * some look and feels, this action happens when the user has
- * pressed the enter key.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
- *
- * @return <code>false</code> if the editing still goes on because
- * the cell editor has objected to stopping the session;
- * <code>true</code> if editing has been stopped.
+ * Stops the current editing session. This has no effect if the tree is not
+ * being edited. Returns true if the editor allows the editing session to
+ * stop.
+ *
+ * @param tree is the tree to stop the editing on
+ * @return true if the editor allows the editing session to stop.
*/
public boolean stopEditing(JTree tree)
{
- return true; // FIXME: not implemented
+ // FIXME: not implemented
+ return false;
}
-
+
/**
- * Cancels editing a tree cell, discarding any entered value.
- * If no editing session is active, nothing happens. The cell
- * editor is not given an opportunity to veto the canceling.
- * In some look and feels, this action happens when the user has
- * pressed the escape key.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
+ * Cancels the current editing session.
+ *
+ * @param tree is the tree to cancel the editing session on.
*/
public void cancelEditing(JTree tree)
{
// FIXME: not implemented
}
-
-
+
/**
- * Starts a session to edit a tree cell. If the cell editor
- * rejects editing the cell, it will just be selected.
- *
- * @param tree the <code>JTree</code> for which this delegate
- * object provides the user interface.
- *
- * @param path the cell to edit.
+ * Selects the last item in path and tries to edit it. Editing will fail if
+ * the CellEditor won't allow it for the selected item.
+ *
+ * @param tree is the tree to edit on.
+ * @param path is the path in tree to edit on.
*/
public void startEditingAtPath(JTree tree, TreePath path)
{
// FIXME: not implemented
}
-
-
+
/**
- * Retrieves the tree cell that is currently being edited.
- *
- * @return the currently edited path, or <code>null</code>
- * if no editing session is currently active.
+ * Returns the path to the element that is being editted.
+ *
+ * @param tree is the tree to get the editing path from.
+ * @return the path that is being edited.
*/
public TreePath getEditingPath(JTree tree)
{
- return null; // FIXME: not implemented
+ // FIXME: not implemented
+ return null;
}
-
- public static ComponentUI createUI(JComponent c)
+
+ /**
+ * Invoked after the tree instance variable has been set, but before any
+ * default/listeners have been installed.
+ */
+ protected void prepareForUIInstall()
{
- return new BasicTreeUI();
+ // FIXME: not implemented
}
-
- int rightChildIndent;
- int leftChildIndent;
- int rowHeight;
- Color hashColor;
-
- protected void installDefaults(JTree tree)
+
+ /**
+ * Invoked from installUI after all the defaults/listeners have been
+ * installed.
+ */
+ protected void completeUIInstall()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Invoked from uninstallUI after all the defaults/listeners have been
+ * uninstalled.
+ */
+ protected void completeUIUninstall()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Installs the subcomponents of the tree, which is the renderer pane.
+ */
+ protected void installComponents()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Creates an instance of NodeDimensions that is able to determine the size
+ * of a given node in the tree.
+ *
+ * @return the NodeDimensions of a given node in the tree
+ */
+ protected AbstractLayoutCache.NodeDimensions createNodeDimensions()
+ {
+ // FIXME: not implemented
+ return null;
+ }
+
+ /**
+ * Creates a listener that is reponsible for the updates the UI based on how
+ * the tree changes.
+ *
+ * @return the PropertyChangeListener that is reposnsible for the updates
+ */
+ protected PropertyChangeListener createPropertyChangeListener()
+ {
+ return new PropertyChangeHandler();
+ }
+
+ /**
+ * Creates the listener responsible for updating the selection based on mouse
+ * events.
+ *
+ * @return the MouseListener responsible for updating.
+ */
+ protected MouseListener createMouseListener()
+ {
+ return new MouseHandler();
+ }
+
+ /**
+ * Creates the listener that is responsible for updating the display when
+ * focus is lost/grained.
+ *
+ * @return the FocusListener responsible for updating.
+ */
+ protected FocusListener createFocusListener()
+ {
+ return new FocusHandler();
+ }
+
+ /**
+ * Creates the listener reponsible for getting key events from the tree.
+ *
+ * @return the KeyListener responsible for getting key events.
+ */
+ protected KeyListener createKeyListener()
+ {
+ return new KeyHandler();
+ }
+
+ /**
+ * Creates the listener responsible for getting property change events from
+ * the selection model.
+ *
+ * @returns the PropertyChangeListener reponsible for getting property change
+ * events from the selection model.
+ */
+ protected PropertyChangeListener createSelectionModelPropertyChangeListener()
+ {
+ return new SelectionModelPropertyChangeHandler();
+ }
+
+ /**
+ * Creates the listener that updates the display based on selection change
+ * methods.
+ *
+ * @return the TreeSelectionListener responsible for updating.
+ */
+ protected TreeSelectionListener createTreeSelectionListener()
+ {
+ return new TreeSelectionHandler();
+ }
+
+ /**
+ * Creates a listener to handle events from the current editor
+ *
+ * @return the CellEditorListener that handles events from the current editor
+ */
+ protected CellEditorListener createCellEditorListener()
+ {
+ return new CellEditorHandler();
+ }
+
+ /**
+ * Creates and returns a new ComponentHandler. This is used for the large
+ * model to mark the validCachedPreferredSize as invalid when the component
+ * moves.
+ *
+ * @return a new ComponentHandler.
+ */
+ protected ComponentListener createComponentListener()
+ {
+ return new ComponentHandler();
+ }
+
+ /**
+ * Creates and returns the object responsible for updating the treestate when
+ * a nodes expanded state changes.
+ *
+ * @return the TreeExpansionListener responsible for updating the treestate
+ */
+ protected TreeExpansionListener createTreeExpansionListener()
+ {
+ return new TreeExpansionHandler();
+ }
+
+ /**
+ * Creates the object responsible for managing what is expanded, as well as
+ * the size of nodes.
+ *
+ * @return the object responsible for managing what is expanded.
+ */
+ protected AbstractLayoutCache createLayoutCache()
+ {
+ return new FixedHeightLayoutCache();
+ }
+
+ /**
+ * Returns the renderer pane that renderer components are placed in.
+ *
+ * @return the rendererpane that render components are placed in.
+ */
+ protected CellRendererPane createCellRendererPane()
+ {
+ return new CellRendererPane();
+ }
+
+ /**
+ * Creates a default cell editor.
+ *
+ * @return the default cell editor.
+ */
+ protected TreeCellEditor createDefaultCellEditor()
+ {
+ return new DefaultTreeCellEditor(tree,
+ (DefaultTreeCellRenderer) createDefaultCellRenderer(), cellEditor);
+ }
+
+ /**
+ * Returns the default cell renderer that is used to do the stamping of each
+ * node.
+ *
+ * @return the default cell renderer that is used to do the stamping of each
+ * node.
+ */
+ protected TreeCellRenderer createDefaultCellRenderer()
+ {
+ return new DefaultTreeCellRenderer();
+ }
+
+ /**
+ * Returns a listener that can update the tree when the model changes.
+ *
+ * @return a listener that can update the tree when the model changes.
+ */
+ protected TreeModelListener createTreeModelListener()
+ {
+ return new TreeModelHandler();
+ }
+
+ /**
+ * Uninstall all registered listeners
+ */
+ protected void uninstallListeners()
+ {
+ tree.removePropertyChangeListener(propertyChangeListener);
+ tree.removeFocusListener(focusListener);
+ tree.removeTreeSelectionListener(treeSelectionListener);
+ tree.removeMouseListener(mouseInputListener);
+ tree.removeKeyListener(keyListener);
+ tree.removePropertyChangeListener(selectionModelPropertyChangeListener);
+ tree.removeComponentListener(componentListener);
+ tree.removeTreeExpansionListener(treeExpansionListener);
+
+ TreeCellEditor tce = tree.getCellEditor();
+ if (tce != null)
+ tce.removeCellEditorListener(cellEditorListener);
+ TreeModel tm = tree.getModel();
+ if (tm != null)
+ tm.removeTreeModelListener(treeModelListener);
+ }
+
+ /**
+ * Uninstall all keyboard actions.
+ */
+ protected void uninstallKeyboardActions()
+ {
+ }
+
+ /**
+ * Uninstall the rendererPane.
+ */
+ protected void uninstallComponents()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * The vertical element of legs between nodes starts at the bottom of the
+ * parent node by default. This method makes the leg start below that.
+ *
+ * @return the vertical leg buffer
+ */
+ protected int getVerticalLegBuffer()
+ {
+ // FIXME: not implemented
+ return 0;
+ }
+
+ /**
+ * The horizontal element of legs between nodes starts at the right of the
+ * left-hand side of the child node by default. This method makes the leg end
+ * before that.
+ *
+ * @return the horizontal leg buffer
+ */
+ protected int getHorizontalLegBuffer()
+ {
+ // FIXME: not implemented
+ return 0;
+ }
+
+ /**
+ * Make all the nodes that are expanded in JTree expanded in LayoutCache.
+ * This invokes update ExpandedDescendants with the root path.
+ */
+ protected void updateLayoutCacheExpandedNodes()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Updates the expanded state of all the descendants of the <code>path</code>
+ * by getting the expanded descendants from the tree and forwarding to the
+ * tree state.
+ *
+ * @param path the path used to update the expanded states
+ */
+ protected void updateExpandedDescendants(TreePath path)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Returns a path to the last child of <code>parent</code>
+ *
+ * @param parent is the topmost path to specified
+ * @return a path to the last child of parent
+ */
+ protected TreePath getLastChildPath(TreePath parent)
+ {
+ return ((TreePath) parent.getLastPathComponent());
+ }
+
+ /**
+ * Updates how much each depth should be offset by.
+ */
+ protected void updateDepthOffset()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Updates the cellEditor based on editability of the JTree that we're
+ * contained in. Ig the tree is editable but doesn't have a cellEditor, a
+ * basic one will be used.
+ */
+ protected void updateCellEditor()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Messaged from the tree we're in when the renderer has changed.
+ */
+ protected void updateRenderer()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Resets the treeState instance based on the tree we're providing the look
+ * and feel for.
+ */
+ protected void configureLayoutCache()
+ {
+ treeState = createLayoutCache();
+ }
+
+ /**
+ * Marks the cached size as being invalid, and messages the tree with
+ * <code>treeDidChange</code>.
+ */
+ protected void updateSize()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Updates the <code>preferredSize</code> instance variable, which is
+ * returned from <code>getPreferredSize()</code>. For left to right
+ * orientations, the size is determined from the current AbstractLayoutCache.
+ * For RTL orientations, the preferred size becomes the width minus the
+ * minimum x position.
+ */
+ protected void updateCachedPreferredSize()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Messaged from the VisibleTreeNode after it has been expanded.
+ *
+ * @param path is the path that has been expanded.
+ */
+ protected void pathWasExpanded(TreePath path)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Messaged from the VisibleTreeNode after it has collapsed
+ */
+ protected void pathWasCollapsed(TreePath path)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Install all defaults for the tree.
+ *
+ * @param tree is the JTree to install defaults for
+ */
+ protected void installDefaults(JTree tree)
{
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
-
+
tree.setFont(defaults.getFont("Tree.font"));
tree.setForeground(defaults.getColor("Tree.foreground"));
tree.setBackground(defaults.getColor("Tree.background"));
tree.setOpaque(true);
-
- hashColor = defaults.getColor("Tree.hash");
+
rightChildIndent = defaults.getInt("Tree.rightChildIndent");
leftChildIndent = defaults.getInt("Tree.leftChildIndent");
- rowHeight = defaults.getInt("Tree.rowHeight");
+ setRowHeight(defaults.getInt("Tree.rowHeight"));
}
-
- protected void installKeyboardActions()
+
+ /**
+ * Install all keyboard actions for this
+ */
+ protected void installKeyboardActions()
{
}
-
- protected void installListeners()
+
+ /**
+ * Install all listeners for this
+ */
+ protected void installListeners()
{
+ tree.addPropertyChangeListener(propertyChangeListener);
+ tree.addFocusListener(focusListener);
+ tree.addTreeSelectionListener(treeSelectionListener);
+ tree.addMouseListener(mouseInputListener);
+ tree.addKeyListener(keyListener);
+ tree.addPropertyChangeListener(selectionModelPropertyChangeListener);
+ tree.addComponentListener(componentListener);
+ cellEditor.addCellEditorListener(cellEditorListener);
+ tree.addTreeExpansionListener(treeExpansionListener);
+ treeModel.addTreeModelListener(treeModelListener);
}
-
+
+ /**
+ * Install the UI for the component
+ *
+ * @param c the component to install UI for
+ */
public void installUI(JComponent c)
{
+ super.installUI(c);
installDefaults((JTree) c);
+ tree = (JTree) c;
+ setModel(tree.getModel());
+ tree.setRootVisible(true);
+ tree.expandPath(new TreePath(tree.getModel().getRoot()));
+ treeSelectionModel = tree.getSelectionModel();
+ installListeners();
+ installKeyboardActions();
+ completeUIInstall();
}
-
-
- protected void uninstallDefaults(JTree tree)
+
+ /**
+ * Uninstall the defaults for the tree
+ *
+ * @param tree to uninstall defaults for
+ */
+ protected void uninstallDefaults(JTree tree)
{
+ UIDefaults defaults = UIManager.getLookAndFeelDefaults();
tree.setFont(null);
tree.setForeground(null);
tree.setBackground(null);
-
tree.setCellRenderer(null);
}
-
+
+ /**
+ * Uninstall the UI for the component
+ *
+ * @param c the component to uninstall UI for
+ */
public void uninstallUI(JComponent c)
{
uninstallDefaults((JTree) c);
+ uninstallKeyboardActions();
+ uninstallListeners();
+ tree = null;
+ completeUIUninstall();
}
-
+
+ /**
+ * Paints the specified component appropriate for the look and feel. This
+ * method is invoked from the ComponentUI.update method when the specified
+ * component is being painted. Subclasses should override this method and use
+ * the specified Graphics object to render the content of the component.
+ *
+ * @param g the Graphics context in which to paint
+ * @param c the component being painted; this argument is often ignored, but
+ * might be used if the UI object is stateless and shared by multiple
+ * components
+ */
+ public void paint(Graphics g, JComponent c)
+ {
+ JTree tree = (JTree) c;
+ TreeModel mod = tree.getModel();
+ Object root = mod.getRoot();
+
+ if (!tree.isRootVisible())
+ tree.expandPath(new TreePath(root));
+
+ paintRecursive(g, 0, 0, 0, 0, tree, mod, root);
+
+ if (hasControlIcons())
+ paintControlIcons(g, 0, 0, 0, 0, tree, mod, root);
+ }
+
+ /**
+ * Ensures that the rows identified by beginRow through endRow are visible.
+ *
+ * @param beginRow is the first row
+ * @param endRow is the last row
+ */
+ protected void ensureRowsAreVisible(int beginRow, int endRow)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Sets the preferred minimum size.
+ *
+ * @param newSize is the new preferred minimum size.
+ */
+ public void setPreferredMinSize(Dimension newSize)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Gets the preferred minimum size.
+ *
+ * @returns the preferred minimum size.
+ */
+ public Dimension getPreferredMinSize()
+ {
+ // FIXME: not implemented
+ return null;
+ }
+
+ /**
+ * Returns the preferred size to properly display the tree, this is a cover
+ * method for getPreferredSize(c, false).
+ *
+ * @param c the component whose preferred size is being queried; this
+ * argument is often ignored but might be used if the UI object is
+ * stateless and shared by multiple components
+ * @return the preferred size
+ */
public Dimension getPreferredSize(JComponent c)
{
- return new Dimension(200,200);
+ return getPreferredSize(c, false);
}
-
- protected void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf)
- {
- Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree,
- leaf,
- false, // selected
- false, // expanded
- true, // leaf
- 0, // row
- false // hasFocus
- );
- g.translate(x, y);
- c.paint(g);
- g.translate(-x, -y);
+
+ /**
+ * Returns the preferred size to represent the tree in c. If checkConsistancy
+ * is true, checkConsistancy is messaged first.
+ *
+ * @param c the component whose preferred size is being queried.
+ * @param checkConsistancy if true must check consistancy
+ * @return the preferred size
+ */
+ public Dimension getPreferredSize(JComponent c, boolean checkConsistancy)
+ {
+ // FIXME: checkConsistancy not implemented, c not used
+ TreeNode node = ((TreeNode) (tree.getModel())
+ .getRoot());
+ int maxWidth = 0;
+ int count = 0;
+ if (node != null)
+ {
+ maxWidth = (int) (getCellBounds(0, 0, node).getWidth());
+ while (node != null)
+ {
+ count++;
+ DefaultMutableTreeNode nextNode = getNextVisibleNode(
+ new DefaultMutableTreeNode(node));
+ if (nextNode != null)
+ maxWidth = Math.max(maxWidth, (int) (getCellBounds(0, 0, nextNode)
+ .getWidth()));
+ node = nextNode;
+ }
+ }
+ return new Dimension(maxWidth, (getRowHeight() * count));
}
-
- protected void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf)
- {
- Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree,
- nonLeaf,
- false, // selected
- false, // expanded
- false, // leaf
- 0, // row
- false // hasFocus
- );
- g.translate(x, y);
- c.paint(g);
- g.translate(-x, -y);
+
+ /**
+ * Returns the minimum size for this component. Which will be the min
+ * preferred size or (0,0).
+ *
+ * @param c the component whose min size is being queried.
+ * @returns the preferred size or null
+ */
+ public Dimension getMinimumSize(JComponent c)
+ {
+ // FIXME: not implemented
+ return getPreferredSize(c);
}
-
- protected int paintRecursive(Graphics g,
- int indentation,
- int descent,
- int childNumber,
- int depth,
- JTree tree,
- TreeModel mod,
- Object curr)
+
+ /**
+ * Returns the maximum size for the component, which will be the preferred
+ * size if the instance is currently in JTree or (0,0).
+ *
+ * @param c the component whose preferred size is being queried
+ * @return the max size or null
+ */
+ public Dimension getMaximumSize(JComponent c)
+ {
+ // FIXME: not implemented
+ return getPreferredSize(c);
+ }
+
+ /**
+ * Messages to stop the editing session. If the UI the receiver is providing
+ * the look and feel for returns true from
+ * <code>getInvokesStopCellEditing</code>, stopCellEditing will be invoked
+ * on the current editor. Then completeEditing will be messaged with false,
+ * true, false to cancel any lingering editing.
+ */
+ protected void completeEditing()
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Stops the editing session. If messageStop is true, the editor is messaged
+ * with stopEditing, if messageCancel is true the editor is messaged with
+ * cancelEditing. If messageTree is true, the treeModel is messaged with
+ * valueForPathChanged.
+ *
+ * @param messageStop message to stop editing
+ * @param messageCancel message to cancel editing
+ * @param messageTree message to treeModel
+ */
+ protected void completeEditing(boolean messageStop, boolean messageCancel,
+ boolean messageTree)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Will start editing for node if there is a cellEditor and shouldSelectCall
+ * returns true. This assumes that path is valid and visible.
+ *
+ * @param path is the path to start editing
+ * @param event is the MouseEvent performed on the path
+ * @return true if successful
+ */
+ protected boolean startEditing(TreePath path, MouseEvent event)
+ {
+ // FIXME: not implemented
+ return false;
+ }
+
+ /**
+ * If the <code>mouseX</code> and <code>mouseY</code> are in the expand
+ * or collapse region of the row, this will toggle the row.
+ *
+ * @param path the path we are concerned with
+ * @param mouseX is the cursor's x position
+ * @param mouseY is the cursor's y position
+ */
+ protected void checkForClickInExpandControl(TreePath path, int mouseX,
+ int mouseY)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Returns true if the <code>mouseX</code> and <code>mouseY</code> fall
+ * in the area of row that is used to expand/collpse the node and the node at
+ * row does not represent a leaf.
+ *
+ * @param path the path we are concerned with
+ * @param mouseX is the cursor's x position
+ * @param mouseY is the cursor's y position
+ * @return true if the <code>mouseX</code> and <code>mouseY</code> fall
+ * in the area of row that is used to expand/collpse the node and the
+ * node at row does not represent a leaf.
+ */
+ protected boolean isLocationInExpandControl(TreePath path, int mouseX,
+ int mouseY)
+ {
+ // FIXME: not implemented
+ return false;
+ }
+
+ /**
+ * Messaged when the user clicks the particular row, this invokes
+ * toggleExpandState.
+ *
+ * @param path the path we are concerned with
+ * @param mouseX is the cursor's x position
+ * @param mouseY is the cursor's y position
+ */
+ protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Expands path if it is not expanded, or collapses row if it is expanded. If
+ * expanding a path and JTree scroll on expand, ensureRowsAreVisible is
+ * invoked to scroll as many of the children to visible as possible (tries to
+ * scroll to last visible descendant of path).
+ *
+ * @param path the path we are concerned with
+ */
+ protected void toggleExpandState(TreePath path)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Returning true signifies a mouse event on the node should toggle the
+ * selection of only the row under the mouse.
+ *
+ * @param event is the MouseEvent performed on the row.
+ * @return true signifies a mouse event on the node should toggle the
+ * selection of only the row under the mouse.
+ */
+ protected boolean isToggleSelectionEvent(MouseEvent event)
+ {
+ // FIXME: not implemented
+ return false;
+ }
+
+ /**
+ * Returning true signifies a mouse event on the node should select from the
+ * anchor point.
+ *
+ * @param event is the MouseEvent performed on the node.
+ * @return true signifies a mouse event on the node should select from the
+ * anchor point.
+ */
+ protected boolean isMultiSelectEvent(MouseEvent event)
+ {
+ // FIXME: not implemented
+ return false;
+ }
+
+ /**
+ * Returning true indicates the row under the mouse should be toggled based
+ * on the event. This is invoked after checkForClickInExpandControl, implying
+ * the location is not in the expand (toggle) control.
+ *
+ * @param event is the MouseEvent performed on the row.
+ * @return true indicates the row under the mouse should be toggled based on
+ * the event.
+ */
+ protected boolean isToggleEvent(MouseEvent event)
+ {
+ // FIXME: not implemented
+ return false;
+ }
+
+ /**
+ * Messaged to update the selection based on a MouseEvent over a particular
+ * row. If the even is a toggle selection event, the row is either selected,
+ * or deselected. If the event identifies a multi selection event, the
+ * selection is updated from the anchor point. Otherwise, the row is
+ * selected, and if the even specified a toggle event the row is
+ * expanded/collapsed.
+ *
+ * @param path is the path selected for an event
+ * @param event is the MouseEvent performed on the path.
+ */
+ protected void selectPathForEvent(TreePath path, MouseEvent event)
+ {
+ // FIXME: not implemented
+ }
+
+ /**
+ * Returns true if the node at <code>row</code> is a leaf.
+ *
+ * @param row is the row we are concerned with.
+ * @return true if the node at <code>row</code> is a leaf.
+ */
+ protected boolean isLeaf(int row)
+ {
+ TreePath pathForRow = getPathForRow(tree, row);
+ if (pathForRow == null)
+ return true;
+
+ Object node = pathForRow.getLastPathComponent();
+
+ if (node instanceof TreeNode)
+ return ((TreeNode) node).isLeaf();
+ else
+ return true;
+ }
+
+ /**
+ * Updates the preferred size when scrolling, if necessary.
+ */
+ public class ComponentHandler
+ extends ComponentAdapter
+ implements ActionListener
+ {
+ /**
+ * Timer used when inside a scrollpane and the scrollbar is adjusting
+ */
+ protected Timer timer;
+
+ /** ScrollBar that is being adjusted */
+ protected JScrollBar scrollBar;
+
+ /**
+ * Constructor
+ */
+ public ComponentHandler()
+ {
+ }
+
+ /**
+ * Invoked when the component's position changes.
+ *
+ * @param e the event that occurs when moving the component
+ */
+ public void componentMoved(ComponentEvent e)
+ {
+ }
+
+ /**
+ * Creats, if necessary, and starts a Timer to check if needed to resize
+ * the bounds
+ */
+ protected void startTimer()
+ {
+ }
+
+ /**
+ * Returns the JScrollPane housing the JTree, or null if one isn't found.
+ *
+ * @return JScrollPane housing the JTree, or null if one isn't found.
+ */
+ protected JScrollPane getScrollPane()
+ {
+ return null;
+ }
+
+ /**
+ * Public as a result of Timer. If the scrollBar is null, or not
+ * adjusting, this stops the timer and updates the sizing.
+ *
+ * @param ae is the action performed
+ */
+ public void actionPerformed(ActionEvent ae)
+ {
+ }
+ }// ComponentHandler
+
+ /**
+ * Listener responsible for getting cell editing events and updating the tree
+ * accordingly.
+ */
+ public class CellEditorHandler
+ implements CellEditorListener
+ {
+ /**
+ * Constructor
+ */
+ public CellEditorHandler()
+ {
+ }
+
+ /**
+ * Messaged when editing has stopped in the tree. Tells the listeners
+ * editing has stopped.
+ *
+ * @param e is the notification event
+ */
+ public void editingStopped(ChangeEvent e)
+ {
+ }
+
+ /**
+ * Messaged when editing has been canceled in the tree. This tells the
+ * listeners the editor has canceled editing.
+ *
+ * @param e is the notification event
+ */
+ public void editingCanceled(ChangeEvent e)
+ {
+ }
+ }// CellEditorHandler
+
+ /**
+ * Repaints the lead selection row when focus is lost/grained.
+ */
+ public class FocusHandler
+ implements FocusListener
+ {
+ /**
+ * Constructor
+ */
+ public FocusHandler()
+ {
+ }
+
+ /**
+ * Invoked when focus is activated on the tree we're in, redraws the lead
+ * row. Invoked when a component gains the keyboard focus.
+ *
+ * @param e is the focus event that is activated
+ */
+ public void focusGained(FocusEvent e)
+ {
+ }
+
+ /**
+ * Invoked when focus is deactivated on the tree we're in, redraws the
+ * lead row. Invoked when a component loses the keyboard focus.
+ *
+ * @param e is the focus event that is deactivated
+ */
+ public void focusLost(FocusEvent e)
+ {
+ }
+ }// FocusHandler
+
+ /**
+ * This is used to get multiple key down events to appropriately genereate
+ * events.
+ */
+ public class KeyHandler
+ extends KeyAdapter
+ {
+ /** Key code that is being generated for. */
+ protected Action repeatKeyAction;
+
+ /** Set to true while keyPressed is active */
+ protected boolean isKeyDown;
+
+ /**
+ * Constructor
+ */
+ public KeyHandler()
+ {
+ }
+
+ /**
+ * Invoked when a key has been typed. Moves the keyboard focus to the
+ * first element whose first letter matches the alphanumeric key pressed
+ * by the user. Subsequent same key presses move the keyboard focus to the
+ * next object that starts with the same letter.
+ *
+ * @param e the key typed
+ */
+ public void keyTyped(KeyEvent e)
+ {
+ }
+
+ /**
+ * Invoked when a key has been pressed.
+ *
+ * @param e the key pressed
+ */
+ public void keyPressed(KeyEvent e)
+ {
+ TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath();
+ DefaultMutableTreeNode last = null;
+ if (start != null)
+ last = (DefaultMutableTreeNode) start.getLastPathComponent();
+
+ if (last != null)
+ {
+ // DOWN, KP_DOWN
+ if (e.getKeyCode() == KeyEvent.VK_DOWN
+ || e.getKeyCode() == KeyEvent.VK_KP_DOWN)
+ {
+ DefaultMutableTreeNode next = (DefaultMutableTreeNode)
+ BasicTreeUI.this.getNextVisibleNode(last);
+ if (next != null)
+ {
+ TreePath newPath = new TreePath(next.getPath());
+ BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, newPath);
+ if (e.isControlDown())
+ tree.setLeadSelectionPath(newPath);
+ else if (!next.isLeaf() && e.isShiftDown())
+ {
+ BasicTreeUI.this.tree.expandPath(newPath);
+ BasicTreeUI.this.tree.fireTreeExpanded(newPath);
+ }
+ }
+ }
+ // UP, KP_UP
+ else if (e.getKeyCode() == KeyEvent.VK_UP
+ || e.getKeyCode() == KeyEvent.VK_KP_UP)
+ {
+ DefaultMutableTreeNode prev = (DefaultMutableTreeNode)
+ BasicTreeUI.this.getPreviousVisibleNode(last);
+
+ if (prev != null)
+ {
+ TreePath newPath = new TreePath(prev.getPath());
+ BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
+ new TreePath(prev.getPath()));
+ if (e.isControlDown())
+ tree.setLeadSelectionPath(newPath);
+ else if (!prev.isLeaf() && e.isShiftDown())
+ {
+ BasicTreeUI.this.tree.expandPath(newPath);
+ BasicTreeUI.this.tree.fireTreeExpanded(newPath);
+ }
+ }
+ }
+ // LEFT, KP_LEFT
+ else if (e.getKeyCode() == KeyEvent.VK_LEFT
+ || e.getKeyCode() == KeyEvent.VK_KP_LEFT)
+ {
+ TreePath path = new TreePath(last.getPath());
+ DefaultMutableTreeNode p = (DefaultMutableTreeNode) last
+ .getParent();
+
+ if (!last.isLeaf() && BasicTreeUI.this.tree.isExpanded(path))
+ {
+ BasicTreeUI.this.tree.collapsePath(path);
+ BasicTreeUI.this.tree.fireTreeCollapsed(path);
+ }
+ else if (p != null)
+ BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
+ new TreePath(p.getPath()));
+ }
+ // RIGHT, KP_RIGHT
+ else if (e.getKeyCode() == KeyEvent.VK_RIGHT
+ || e.getKeyCode() == KeyEvent.VK_KP_RIGHT)
+ {
+ TreePath path = new TreePath(last.getPath());
+
+ if (!last.isLeaf() && BasicTreeUI.this.tree.isCollapsed(path))
+ {
+ BasicTreeUI.this.tree.expandPath(path);
+ BasicTreeUI.this.tree.fireTreeExpanded(path);
+ }
+ else
+ {
+ DefaultMutableTreeNode next = (DefaultMutableTreeNode)
+ BasicTreeUI.this.getNextVisibleNode(last);
+
+ if (next != null)
+ BasicTreeUI.this.selectPath(BasicTreeUI.this.tree,
+ new TreePath(next.getPath()));
+ }
+ }
+ // Enter
+ else if (e.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ TreePath path = new TreePath(last.getPath());
+ if (!last.isLeaf())
+ {
+ if (BasicTreeUI.this.tree.isExpanded(path))
+ {
+ BasicTreeUI.this.tree.collapsePath(path);
+ BasicTreeUI.this.tree.fireTreeCollapsed(path);
+ }
+ else
+ {
+ BasicTreeUI.this.tree.expandPath(path);
+ BasicTreeUI.this.tree.fireTreeExpanded(path);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Invoked when a key has been released
+ *
+ * @param e the key released
+ */
+ public void keyReleased(KeyEvent e)
+ {
+ }
+ }// KeyHandler
+
+ /**
+ * MouseListener is responsible for updating the selevtion based on mouse
+ * events.
+ */
+ public class MouseHandler
+ extends MouseAdapter
+ implements MouseMotionListener
+ {
+ /**
+ * Constructor
+ */
+ public MouseHandler()
+ {
+ }
+
+ /**
+ * Invoked when a mouse button has been pressed on a component.
+ *
+ * @param e is the mouse event that occured
+ */
+ public void mousePressed(MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when a mouse button is pressed on a component and then dragged.
+ * MOUSE_DRAGGED events will continue to be delivered to the component
+ * where the drag originated until the mouse button is released
+ * (regardless of whether the mouse position is within the bounds of the
+ * component).
+ *
+ * @param e is the mouse event that occured
+ */
+ public void mouseDragged(MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when the mouse button has been moved on a component (with no
+ * buttons no down).
+ *
+ * @param e the mouse event that occured
+ */
+ public void mouseMoved(MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when a mouse button has been released on a component.
+ *
+ * @param e is the mouse event that occured
+ */
+ public void mouseReleased(MouseEvent e)
+ {
+ }
+ }// MouseHandler
+
+ /**
+ * MouseInputHandler handles passing all mouse events, including mouse motion
+ * events, until the mouse is released to the destination it is constructed
+ * with.
+ */
+ public class MouseInputHandler
+ implements MouseInputListener
+ {
+ /** Source that events are coming from */
+ protected Component source;
+
+ /** Destination that receives all events. */
+ protected Component destination;
+
+ /** Number of mouse clicks on a non-leaf */
+ private int clickCount = 0;
+
+ /** The last non-leaf cell that was clicked */
+ private Object lastClicked = null;
+
+ /**
+ * Constructor
+ *
+ * @param source that events are coming from
+ * @param destination that receives all events
+ * @param e is the event received
+ */
+ public MouseInputHandler(Component source, Component destination,
+ MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when the mouse button has been clicked (pressed and released)
+ * on a component.
+ *
+ * @param e mouse event that occured
+ */
+ public void mouseClicked(MouseEvent e)
+ {
+ Point click = e.getPoint();
+ int row = Math.round(click.y / BasicTreeUI.this.getRowHeight());
+ TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree,
+ click.x, click.y);
+
+ if (path != null)
+ {
+ boolean inBounds = false;
+ boolean cntlClick = false;
+ Rectangle bounds = BasicTreeUI.this.getPathBounds(
+ BasicTreeUI.this.tree, path);
+
+ bounds.x -= rightChildIndent - 4;
+ bounds.width += rightChildIndent + 4;
+
+ if (bounds.contains(click.x, click.y))
+ inBounds = true;
+ else if (BasicTreeUI.this.hasControlIcons()
+ && (click.x < (bounds.x - rightChildIndent + 5) &&
+ click.x > (bounds.x - rightChildIndent - 5)))
+ cntlClick = true;
+
+ if ((inBounds || cntlClick)
+ && BasicTreeUI.this.tree.isVisible(path))
+ {
+ if (!cntlClick && !BasicTreeUI.this.isLeaf(row))
+ {
+ Object cell = path.getLastPathComponent();
+ if (lastClicked != null && lastClicked.equals(cell))
+ clickCount = 2;
+ else
+ {
+ lastClicked = cell;
+ clickCount = 1;
+ }
+ }
+
+ if (clickCount == 2 || cntlClick == true)
+ {
+ clickCount = 0;
+ lastClicked = null;
+ BasicTreeUI.this.tree.getSelectionModel().clearSelection();
+ if (BasicTreeUI.this.tree.isExpanded(path))
+ {
+ BasicTreeUI.this.tree.collapsePath(path);
+ BasicTreeUI.this.tree.fireTreeCollapsed(path);
+ }
+ else
+ {
+ BasicTreeUI.this.tree.expandPath(path);
+ BasicTreeUI.this.tree.fireTreeExpanded(path);
+ }
+ }
+
+ BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, path);
+ }
+ }
+ }
+
+ /**
+ * Invoked when a mouse button has been pressed on a component.
+ *
+ * @param e mouse event that occured
+ */
+ public void mousePressed(MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when a mouse button has been released on a component.
+ *
+ * @param e mouse event that occured
+ */
+ public void mouseReleased(MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when the mouse enters a component.
+ *
+ * @param e mouse event that occured
+ */
+ public void mouseEntered(MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when the mouse exits a component.
+ *
+ * @param e mouse event that occured
+ */
+ public void mouseExited(MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when a mouse button is pressed on a component and then dragged.
+ * MOUSE_DRAGGED events will continue to be delivered to the component
+ * where the drag originated until the mouse button is released
+ * (regardless of whether the mouse position is within the bounds of the
+ * component).
+ *
+ * @param e mouse event that occured
+ */
+ public void mouseDragged(MouseEvent e)
+ {
+ }
+
+ /**
+ * Invoked when the mouse cursor has been moved onto a component but no
+ * buttons have been pushed.
+ *
+ * @param e mouse event that occured
+ */
+ public void mouseMoved(MouseEvent e)
+ {
+ }
+
+ /**
+ * Removes event from the source
+ */
+ protected void removeFromSource()
+ {
+ }
+ }// MouseInputHandler
+
+ /**
+ * Class responsible for getting size of node, method is forwarded to
+ * BasicTreeUI method. X location does not include insets, that is handled in
+ * getPathBounds.
+ */
+ public class NodeDimensionsHandler
+ extends AbstractLayoutCache.NodeDimensions
+ {
+ /**
+ * Constructor
+ */
+ public NodeDimensionsHandler()
+ {
+ }
+
+ /**
+ * Responsible for getting the size of a particular node.
+ *
+ * @param value the value to be represented
+ * @param row row being queried
+ * @param depth the depth of the row
+ * @param expanded true if row is expanded
+ * @param size a Rectangle containing the size needed to represent value
+ * @return containing the node dimensions, or null if node has no
+ * dimension
+ */
+ public Rectangle getNodeDimensions(Object value, int row, int depth,
+ boolean expanded, Rectangle size)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the amount to indent the given row
+ *
+ * @return amount to indent the given row.
+ */
+ protected int getRowX(int row, int depth)
+ {
+ return 0;
+ }
+ }// NodeDimensionsHandler
+
+ /**
+ * PropertyChangeListener for the tree. Updates the appropriate varaible, or
+ * TreeState, based on what changes.
+ */
+ public class PropertyChangeHandler
+ implements PropertyChangeListener
+ {
+
+ /**
+ * Constructor
+ */
+ public PropertyChangeHandler()
+ {
+ }
+
+ /**
+ * This method gets called when a bound property is changed.
+ *
+ * @param event A PropertyChangeEvent object describing the event source
+ * and the property that has changed.
+ */
+ public void propertyChange(PropertyChangeEvent event)
+ {
+ }
+ }// PropertyChangeHandler
+
+ /**
+ * Listener on the TreeSelectionModel, resets the row selection if any of the
+ * properties of the model change.
+ */
+ public class SelectionModelPropertyChangeHandler
+ implements PropertyChangeListener
+ {
+
+ /**
+ * Constructor
+ */
+ public SelectionModelPropertyChangeHandler()
+ {
+ }
+
+ /**
+ * This method gets called when a bound property is changed.
+ *
+ * @param event A PropertyChangeEvent object describing the event source
+ * and the property that has changed.
+ */
+ public void propertyChange(PropertyChangeEvent event)
+ {
+ }
+ }// SelectionModelPropertyChangeHandler
+
+ /**
+ * ActionListener that invokes cancelEditing when action performed.
+ */
+ public class TreeCancelEditingAction
+ extends AbstractAction
+ {
+
+ /**
+ * Constructor
+ */
+ public TreeCancelEditingAction()
+ {
+ }
+
+ /**
+ * Invoked when an action occurs.
+ *
+ * @param e event that occured
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * Returns true if the action is enabled.
+ *
+ * @return true if the action is enabled, false otherwise
+ */
+ public boolean isEnabled()
+ {
+ return false;
+ }
+ }// TreeCancelEditingAction
+
+ /**
+ * Updates the TreeState in response to nodes expanding/collapsing.
+ */
+ public class TreeExpansionHandler
+ implements TreeExpansionListener
+ {
+
+ /**
+ * Constructor
+ */
+ public TreeExpansionHandler()
+ {
+ }
+
+ /**
+ * Called whenever an item in the tree has been expanded.
+ *
+ * @param event is the event that occured
+ */
+ public void treeExpanded(TreeExpansionEvent event)
+ {
+ BasicTreeUI.this.tree.repaint();
+ }
+
+ /**
+ * Called whenever an item in the tree has been collapsed.
+ *
+ * @param event is the event that occured
+ */
+ public void treeCollapsed(TreeExpansionEvent event)
+ {
+ BasicTreeUI.this.tree.repaint();
+ }
+ }// TreeExpansionHandler
+
+ /**
+ * TreeHomeAction is used to handle end/home actions. Scrolls either the
+ * first or last cell to be visible based on direction.
+ */
+ public class TreeHomeAction
+ extends AbstractAction
+ {
+
+ /** direction is either home or end */
+ protected int direction;
+
+ /**
+ * Constructor
+ *
+ * @param direction - it is home or end
+ * @param name is the name of the direction
+ */
+ public TreeHomeAction(int direction, String name)
+ {
+ }
+
+ /**
+ * Invoked when an action occurs.
+ *
+ * @param e is the event that occured
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * Returns true if the action is enabled.
+ *
+ * @return true if the action is enabled.
+ */
+ public boolean isEnabled()
+ {
+ return false;
+ }
+ }// TreeHomeAction
+
+ /**
+ * TreeIncrementAction is used to handle up/down actions. Selection is moved
+ * up or down based on direction.
+ */
+ public class TreeIncrementAction
+ extends AbstractAction
+ {
+
+ /** Specifies the direction to adjust the selection by. */
+ protected int direction;
+
+ /**
+ * Constructor
+ *
+ * @param direction up or down
+ * @param name is the name of the direction
+ */
+ public TreeIncrementAction(int direction, String name)
+ {
+ }
+
+ /**
+ * Invoked when an action occurs.
+ *
+ * @param e is the event that occured
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * Returns true if the action is enabled.
+ *
+ * @return true if the action is enabled.
+ */
+ public boolean isEnabled()
+ {
+ return false;
+ }
+ }// TreeIncrementAction
+
+ /**
+ * Forwards all TreeModel events to the TreeState.
+ */
+ public class TreeModelHandler
+ implements TreeModelListener
+ {
+ /**
+ * Constructor
+ */
+ public TreeModelHandler()
+ {
+ }
+
+ /**
+ * Invoked after a node (or a set of siblings) has changed in some way.
+ * The node(s) have not changed locations in the tree or altered their
+ * children arrays, but other attributes have changed and may affect
+ * presentation. Example: the name of a file has changed, but it is in the
+ * same location in the file system. To indicate the root has changed,
+ * childIndices and children will be null. Use e.getPath() to get the
+ * parent of the changed node(s). e.getChildIndices() returns the
+ * index(es) of the changed node(s).
+ *
+ * @param e is the event that occured
+ */
+ public void treeNodesChanged(TreeModelEvent e)
+ {
+ }
+
+ /**
+ * Invoked after nodes have been inserted into the tree. Use e.getPath()
+ * to get the parent of the new node(s). e.getChildIndices() returns the
+ * index(es) of the new node(s) in ascending order.
+ *
+ * @param e is the event that occured
+ */
+ public void treeNodesInserted(TreeModelEvent e)
+ {
+ }
+
+ /**
+ * Invoked after nodes have been removed from the tree. Note that if a
+ * subtree is removed from the tree, this method may only be invoked once
+ * for the root of the removed subtree, not once for each individual set
+ * of siblings removed. Use e.getPath() to get the former parent of the
+ * deleted node(s). e.getChildIndices() returns, in ascending order, the
+ * index(es) the node(s) had before being deleted.
+ *
+ * @param e is the event that occured
+ */
+ public void treeNodesRemoved(TreeModelEvent e)
+ {
+ }
+
+ /**
+ * Invoked after the tree has drastically changed structure from a given
+ * node down. If the path returned by e.getPath() is of length one and the
+ * first element does not identify the current root node the first element
+ * should become the new root of the tree. Use e.getPath() to get the path
+ * to the node. e.getChildIndices() returns null.
+ *
+ * @param e is the event that occured
+ */
+ public void treeStructureChanged(TreeModelEvent e)
+ {
+ }
+ }// TreeModelHandler
+
+ /**
+ * TreePageAction handles page up and page down events.
+ */
+ public class TreePageAction
+ extends AbstractAction
+ {
+ /** Specifies the direction to adjust the selection by. */
+ protected int direction;
+
+ /**
+ * Constructor
+ *
+ * @param direction up or down
+ * @param name is the name of the direction
+ */
+ public TreePageAction(int direction, String name)
+ {
+ }
+
+ /**
+ * Invoked when an action occurs.
+ *
+ * @param e is the event that occured
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * Returns true if the action is enabled.
+ *
+ * @return true if the action is enabled.
+ */
+ public boolean isEnabled()
+ {
+ return false;
+ }
+ }// TreePageAction
+
+ /**
+ * Listens for changes in the selection model and updates the display
+ * accordingly.
+ */
+ public class TreeSelectionHandler
+ implements TreeSelectionListener
+ {
+ /**
+ * Constructor
+ */
+ public TreeSelectionHandler()
+ {
+ }
+
+ /**
+ * Messaged when the selection changes in the tree we're displaying for.
+ * Stops editing, messages super and displays the changed paths.
+ *
+ * @param event the event that characterizes the change.
+ */
+ public void valueChanged(TreeSelectionEvent event)
+ {
+ }
+ }// TreeSelectionHandler
+
+ /**
+ * For the first selected row expandedness will be toggled.
+ */
+ public class TreeToggleAction
+ extends AbstractAction
+ {
+ /**
+ * Constructor
+ *
+ * @param name is the name of <code>Action</code> field
+ */
+ public TreeToggleAction(String name)
+ {
+ }
+
+ /**
+ * Invoked when an action occurs.
+ *
+ * @param e the event that occured
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * Returns true if the action is enabled.
+ *
+ * @return true if the action is enabled, false otherwise
+ */
+ public boolean isEnabled()
+ {
+ return false;
+ }
+ } // TreeToggleAction
+
+ /**
+ * TreeTraverseAction is the action used for left/right keys. Will toggle
+ * the expandedness of a node, as well as potentially incrementing the
+ * selection.
+ */
+ public class TreeTraverseAction
+ extends AbstractAction
+ {
+ /**
+ * Determines direction to traverse, 1 means expand, -1 means collapse.
+ */
+ protected int direction;
+
+ /**
+ * Constructor
+ *
+ * @param direction to traverse
+ * @param name is the name of the direction
+ */
+ public TreeTraverseAction(int direction, String name)
+ {
+ }
+
+ /**
+ * Invoked when an action occurs.
+ *
+ * @param e the event that occured
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ }
+
+ /**
+ * Returns true if the action is enabled.
+ *
+ * @return true if the action is enabled, false otherwise
+ */
+ public boolean isEnabled()
+ {
+ return false;
+ }
+ } // TreeTraverseAction
+
+ /**
+ * Returns the cell bounds for painting selected cells
+ * Package private for use in inner classes.
+ *
+ * @param x is the x location of the cell
+ * @param y is the y location of the cell
+ * @param cell is the Object to get the bounds for
+ *
+ * @returns Rectangle that represents the cell bounds
+ */
+ Rectangle getCellBounds(int x, int y, Object cell)
+ {
+ if (cell != null)
+ {
+ String s = cell.toString();
+ Font f = tree.getFont();
+ FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont());
+
+ if (s != null)
+ return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 4,
+ fm.getHeight());
+ }
+ return new Rectangle(x, y, 0, 0);
+ }
+
+ /**
+ * Retrieves the location of some node, recursively starting at from
+ * some node.
+ * Package private for use in inner classes.
+ *
+ * @param x is the starting x position, offset
+ * @param y is the starting y position, offset
+ * @param tree is the tree to traverse
+ * @param mod is the TreeModel to use
+ * @param node is the node to get the location for
+ * @param startNode is the node to start searching from
+ *
+ * @return Point - the location of node
+ */
+ Point getCellLocation(int x, int y, JTree tree, TreeModel mod,
+ Object node, Object startNode)
+ {
+ int rowHeight = getRowHeight();
+ if (startNode == null || startNode.equals(node))
+ {
+ if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot())))
+ return new Point(x + ((((DefaultMutableTreeNode) node).getLevel())
+ * rightChildIndent), y);
+
+ return new Point(x + ((((DefaultMutableTreeNode) node).getLevel() + 1)
+ * rightChildIndent), y);
+ }
+
+ if (!mod.isLeaf(startNode)
+ && tree.isExpanded(new TreePath(
+ ((DefaultMutableTreeNode) startNode).getPath())))
+ {
+ Object child = mod.getChild(startNode, 0);
+ if (child != null)
+ return getCellLocation(x, y + rowHeight, tree, mod,
+ node, child);
+ }
+
+ return getCellLocation(x, y + rowHeight, tree, mod, node,
+ getNextVisibleNode((DefaultMutableTreeNode) startNode));
+ }
+
+ /**
+ * Paints a node in the tree Package private for use in inner classes.
+ *
+ * @param g the Graphics context in which to paint
+ * @param x the x location of the node
+ * @param y the y location of the node
+ * @param tree the tree to draw on
+ * @param node the object to draw
+ */
+ void paintNode(Graphics g, int x, int y, JTree tree, Object node,
+ boolean isLeaf)
+ {
+ TreePath curr = new TreePath(((DefaultMutableTreeNode) node).getPath());
+ boolean selected = tree.isPathSelected(curr);
+ boolean expanded = false;
+ boolean hasIcons = false;
+
+ if (tree.isVisible(curr))
+ {
+ DefaultTreeCellRenderer dtcr = (DefaultTreeCellRenderer) tree
+ .getCellRenderer();
+
+ if (!isLeaf)
+ expanded = tree.isExpanded(curr);
+
+ Icon icon = null;
+ if (!isLeaf && expanded)
+ icon = dtcr.getOpenIcon();
+ else if (!isLeaf && !expanded)
+ icon = dtcr.getClosedIcon();
+ else
+ icon = dtcr.getLeafIcon();
+
+ if (icon.getIconHeight() > -1 && icon.getIconWidth() > -1)
+ hasIcons = true;
+
+ Component c = dtcr.getTreeCellRendererComponent(tree, node, selected,
+ expanded, isLeaf, 0, false);
+
+ if (hasIcons)
+ {
+ if (selected)
+ {
+ Rectangle cell = getPathBounds(tree, curr);
+ g.setColor(dtcr.getBackgroundSelectionColor());
+ g.fillRect(cell.x + icon.getIconWidth()/2, cell.y, cell.width,
+ cell.height);
+
+ if (curr.equals(tree.getLeadSelectionPath()))
+ {
+ g.setColor(UIManager.getLookAndFeelDefaults().getColor(
+ "Tree.selectionBorderColor"));
+ g.drawRect(cell.x + icon.getIconWidth()/2, cell.y,
+ cell.width, cell.height);
+ }
+ }
+
+ g.translate(x, y);
+ c.paint(g);
+ g.translate(-x, -y);
+ }
+ else
+ rendererPane.paintComponent(g, c, c.getParent(),
+ getCellBounds(x, y, node));
+ }
+ }
+
+ /**
+ * Recursively paints all elements of the tree Package private for use in
+ * inner classes.
+ *
+ * @param g the Graphics context in which to paint
+ * @param indentation of the current object
+ * @param descent is the number of elements drawn
+ * @param childNumber is the index of the current child in the tree
+ * @param depth is the depth of the current object in the tree
+ * @param tree is the tree to draw to
+ * @param mod is the TreeModel we are using to draw
+ * @param curr is the current object to draw
+ *
+ * @return int - current descent of the tree
+ */
+ int paintRecursive(Graphics g, int indentation, int descent,
+ int childNumber, int depth, JTree tree, TreeModel mod, Object curr)
{
Rectangle clip = g.getClipBounds();
- if (indentation > clip.x + clip.width + rightChildIndent ||
- descent > clip.y + clip.height + rowHeight)
+ if (indentation > clip.x + clip.width + rightChildIndent
+ || descent > clip.y + clip.height + getRowHeight())
return descent;
-
-
- int halfHeight = rowHeight / 2;
+
+ int halfHeight = getRowHeight() / 2;
int halfWidth = rightChildIndent / 2;
int y0 = descent + halfHeight;
-
+ int heightOfLine = descent + halfHeight;
+ boolean isRootVisible = tree.isRootVisible();
+
if (mod.isLeaf(curr))
{
- paintLeaf(g, indentation, descent, tree, curr);
- descent += rowHeight;
+ paintNode(g, indentation + 4, descent, tree, curr, true);
+ descent += getRowHeight();
}
else
{
- if (depth > 0 || tree.isRootVisible())
+ if (depth > 0 || isRootVisible)
{
- paintNonLeaf(g, indentation, descent, tree, curr);
- descent += rowHeight;
+ paintNode(g, indentation + 4, descent, tree, curr, false);
+ descent += getRowHeight();
y0 += halfHeight;
}
+
int max = mod.getChildCount(curr);
- for (int i = 0; i < max; ++i)
+ if (tree.isExpanded(new TreePath(((DefaultMutableTreeNode) curr)
+ .getPath())))
{
- g.setColor(hashColor);
- g.drawLine(indentation + halfWidth, descent + halfHeight,
- indentation + rightChildIndent, descent + halfHeight);
- descent = paintRecursive(g,
- indentation + rightChildIndent, descent,
- i, depth+1,
- tree, mod, mod.getChild(curr, i));
+ for (int i = 0; i < max; ++i)
+ {
+ int indent = indentation + rightChildIndent;
+ if (!isRootVisible && depth == 0)
+ indent = 0;
+ else if ((!isRootVisible && !curr.equals(mod.getRoot())) ||
+ isRootVisible)
+ {
+ g.setColor(getHashColor());
+ heightOfLine = descent + halfHeight;
+ g.drawLine(indentation + halfWidth, heightOfLine, indentation
+ + rightChildIndent, heightOfLine);
+ }
+
+ descent = paintRecursive(g, indent,
+ descent, i, depth + 1, tree, mod, mod.getChild(curr, i));
+ }
}
}
-
- int y1 = descent - halfHeight;
- if (y0 != y1)
+
+ if (tree.isExpanded(new TreePath(((DefaultMutableTreeNode) curr)
+ .getPath())))
+ if (y0 != heightOfLine)
+ {
+ g.setColor(getHashColor());
+ g.drawLine(indentation + halfWidth, y0, indentation + halfWidth,
+ heightOfLine);
+ }
+
+ return descent;
+ }
+
+ /**
+ * Recursively paints all the control icons on the tree.
+ * Package private for use in inner classes.
+ *
+ * @param g the Graphics context in which to paint
+ * @param indentation of the current object
+ * @param descent is the number of elements drawn
+ * @param childNumber is the index of the current child in the tree
+ * @param depth is the depth of the current object in the tree
+ * @param tree is the tree to draw to
+ * @param mod is the TreeModel we are using to draw
+ * @param curr is the current object to draw
+ *
+ * @return int - current descent of the tree
+ */
+ int paintControlIcons(Graphics g, int indentation, int descent,
+ int childNumber, int depth, JTree tree, TreeModel mod, Object node)
+ {
+ int h = descent;
+ int rowHeight = getRowHeight();
+ Icon ei = UIManager.getLookAndFeelDefaults()
+ .getIcon("Tree.expandedIcon");
+ Icon ci = UIManager.getLookAndFeelDefaults()
+ .getIcon("Tree.collapsedIcon");
+ Rectangle clip = g.getClipBounds();
+ if (indentation > clip.x + clip.width + rightChildIndent
+ || descent > clip.y + clip.height + getRowHeight())
+ return descent;
+
+ if (mod.isLeaf(node))
+ descent += rowHeight;
+ else
{
- g.setColor(hashColor);
- g.drawLine(indentation + halfWidth, y0,
- indentation + halfWidth, y1);
+ if (depth > 0 || tree.isRootVisible())
+ descent += rowHeight;
+
+ int max = mod.getChildCount(node);
+ if (tree.isExpanded(new TreePath(((DefaultMutableTreeNode) node)
+ .getPath())))
+ {
+ if (!node.equals(mod.getRoot()))
+ ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h);
+
+ for (int i = 0; i < max; ++i)
+ {
+ int indent = indentation + rightChildIndent;
+ if (depth == 0 && !tree.isRootVisible())
+ indent = -1;
+
+ descent = paintControlIcons(g, indent,
+ descent, i, depth + 1, tree, mod, mod.getChild(node, i));
+ }
+ }
+ else if (!node.equals(mod.getRoot()))
+ ci.paintIcon(tree, g, indentation - rightChildIndent - 3,
+ descent - getRowHeight());
}
-
+
return descent;
}
-
- public void paint(Graphics g, JComponent c)
+
+ /**
+ * Returns true if the LookAndFeel implements the control icons
+ * Package private for use in inner classes.
+ *
+ * @return true if control icons are visible
+ */
+ boolean hasControlIcons()
{
- JTree tree = (JTree) c;
- TreeModel mod = tree.getModel();
- g.translate(10, 10);
- paintRecursive(g, 0, 0, 0, 0, tree, mod, mod.getRoot());
- g.translate(-10, -10);
+ if (UIManager.getLookAndFeelDefaults().
+ getIcon("Tree.expandedIcon") == null ||
+ UIManager.getLookAndFeelDefaults().
+ getIcon("Tree.collapsedIcon") == null)
+ return false;
+ return true;
+ }
+
+ /**
+ * Get next visible node in the tree.
+ * Package private for use in inner classes.
+ *
+ * @param the current node
+ * @return the next visible node in the JTree. Return null if there are no
+ * more.
+ */
+ DefaultMutableTreeNode getNextVisibleNode(DefaultMutableTreeNode node)
+ {
+ DefaultMutableTreeNode next = null;
+ TreePath current = null;
+
+ if (node != null)
+ next = node.getNextNode();
+
+ if (next != null)
+ {
+ current = new TreePath(next.getPath());
+ if (tree.isVisible(current))
+ return next;
+
+ while (next != null && !tree.isVisible(current))
+ {
+ next = next.getNextNode();
+
+ if (next != null)
+ current = new TreePath(next.getPath());
+ }
+ }
+ return next;
+ }
+
+ /**
+ * Get previous visible node in the tree.
+ * Package private for use in inner classes.
+ *
+ * @param the current node
+ * @return the next visible node in the JTree. Return null if there are no
+ * more.
+ */
+ DefaultMutableTreeNode getPreviousVisibleNode
+ (DefaultMutableTreeNode node)
+ {
+ DefaultMutableTreeNode prev = null;
+ TreePath current = null;
+
+ if (node != null)
+ prev = node.getPreviousNode();
+
+ if (prev != null)
+ {
+ current = new TreePath(prev.getPath());
+ if (tree.isVisible(current))
+ return prev;
+
+ while (prev != null && !tree.isVisible(current))
+ {
+ prev = prev.getPreviousNode();
+
+ if (prev != null)
+ current = new TreePath(prev.getPath());
+ }
+ }
+ return prev;
+ }
+
+ /**
+ * Selects the specified path in the tree depending on modes.
+ * Package private for use in inner classes.
+ *
+ * @param tree is the tree we are selecting the path in
+ * @param path is the path we are selecting
+ */
+ void selectPath(JTree tree, TreePath path)
+ {
+ if (path != null)
+ {
+ if (tree.isPathSelected(path))
+ tree.removeSelectionPath(path);
+ else if (tree.getSelectionModel().getSelectionMode()
+ == TreeSelectionModel.SINGLE_TREE_SELECTION)
+ {
+ tree.getSelectionModel().clearSelection();
+ tree.addSelectionPath(path);
+ tree.setLeadSelectionPath(path);
+ }
+ else if (tree.getSelectionModel().getSelectionMode()
+ == TreeSelectionModel.CONTIGUOUS_TREE_SELECTION)
+ {
+ // TODO
+ }
+ else
+ {
+ tree.getSelectionModel().setSelectionMode(
+ TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
+ tree.addSelectionPath(path);
+ tree.setLeadSelectionPath(path);
+ }
+ }
}
-}
+} // BasicTreeUI \ No newline at end of file
diff --git a/javax/swing/plaf/basic/BasicViewportUI.java b/javax/swing/plaf/basic/BasicViewportUI.java
index 07d4ba3ed..8ce772bed 100644
--- a/javax/swing/plaf/basic/BasicViewportUI.java
+++ b/javax/swing/plaf/basic/BasicViewportUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/ComboPopup.java b/javax/swing/plaf/basic/ComboPopup.java
index 4cd518df5..8bdcc51b0 100644
--- a/javax/swing/plaf/basic/ComboPopup.java
+++ b/javax/swing/plaf/basic/ComboPopup.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/DefaultMenuLayout.java b/javax/swing/plaf/basic/DefaultMenuLayout.java
index d6ad950f0..9760e82a6 100644
--- a/javax/swing/plaf/basic/DefaultMenuLayout.java
+++ b/javax/swing/plaf/basic/DefaultMenuLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/basic/package.html b/javax/swing/plaf/basic/package.html
index f65518cac..700c8cdbc 100644
--- a/javax/swing/plaf/basic/package.html
+++ b/javax/swing/plaf/basic/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.plaf.basic package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,7 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.plaf.basic</title></head>
<body>
-<p></p>
+<p>Provides a "basic" look and feel implementation.</p>
</body>
</html>
diff --git a/javax/swing/plaf/metal/DefaultMetalTheme.java b/javax/swing/plaf/metal/DefaultMetalTheme.java
index 7c91eaadc..673aec1e4 100644
--- a/javax/swing/plaf/metal/DefaultMetalTheme.java
+++ b/javax/swing/plaf/metal/DefaultMetalTheme.java
@@ -1,5 +1,5 @@
/* DefaultMetalTheme.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,6 +43,11 @@ import java.awt.Font;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
+/**
+ * The default theme for the {@link MetalLookAndFeel}.
+ *
+ * @see MetalLookAndFeel#setCurrentTheme(MetalTheme)
+ */
public class DefaultMetalTheme extends MetalTheme
{
private static final ColorUIResource PRIMARY1 =
@@ -71,71 +76,144 @@ public class DefaultMetalTheme extends MetalTheme
private static final FontUIResource WINDOW_TITLE_FONT =
new FontUIResource("Dialog", Font.BOLD, 12);
+ /**
+ * Creates a new instance of this theme.
+ */
public DefaultMetalTheme()
{
// Do nothing here.
}
+ /**
+ * Returns the name of the theme.
+ *
+ * @return <code>"Steel"</code>.
+ */
public String getName()
{
return "Steel";
}
+ /**
+ * Returns the first primary color for this theme.
+ *
+ * @return The first primary color.
+ */
protected ColorUIResource getPrimary1()
{
return PRIMARY1;
}
+ /**
+ * Returns the second primary color for this theme.
+ *
+ * @return The second primary color.
+ */
protected ColorUIResource getPrimary2()
{
return PRIMARY2;
}
+ /**
+ * Returns the third primary color for this theme.
+ *
+ * @return The third primary color.
+ */
protected ColorUIResource getPrimary3()
{
return PRIMARY3;
}
+ /**
+ * Returns the first secondary color for this theme.
+ *
+ * @return The first secondary color.
+ */
protected ColorUIResource getSecondary1()
{
return SECONDARY1;
}
+ /**
+ * Returns the second secondary color for this theme.
+ *
+ * @return The second secondary color.
+ */
protected ColorUIResource getSecondary2()
{
return SECONDARY2;
}
+ /**
+ * Returns the third secondary color for this theme.
+ *
+ * @return The third secondary color.
+ */
protected ColorUIResource getSecondary3()
{
return SECONDARY3;
}
+ /**
+ * Returns the font used for text on controls. In this case, the font is
+ * <code>FontUIResource("Dialog", Font.BOLD, 12)</code>.
+ *
+ * @return The font.
+ */
public FontUIResource getControlTextFont()
{
return CONTROL_TEXT_FONT;
}
-
+ /**
+ * Returns the font used for text in menus. In this case, the font is
+ * <code>FontUIResource("Dialog", Font.BOLD, 12)</code>.
+ *
+ * @return The font used for text in menus.
+ */
public FontUIResource getMenuTextFont()
{
return MENU_TEXT_FONT;
}
+ /**
+ * Returns the font used for sub text. In this case, the font is
+ * <code>FontUIResource("Dialog", Font.PLAIN, 10)</code>.
+ *
+ * @return The font used for sub text.
+ */
public FontUIResource getSubTextFont()
{
return SUB_TEXT_FONT;
}
+ /**
+ * Returns the font used for system text. In this case, the font is
+ * <code>FontUIResource("Dialog", Font.PLAIN, 12)</code>.
+ *
+ * @return The font used for system text.
+ */
public FontUIResource getSystemTextFont()
{
return SYSTEM_TEXT_FONT;
}
+ /**
+ * Returns the font used for user text. In this case, the font is
+ * <code>FontUIResource("Dialog", Font.PLAIN, 12)</code>.
+ *
+ * @return The font used for user text.
+ */
public FontUIResource getUserTextFont()
{
return USER_TEXT_FONT;
}
+ /**
+ * Returns the font used for window titles. In this case, the font is
+ * <code>FontUIResource("Dialog", Font.BOLD, 12)</code>.
+ *
+ * @return The font used for window titles.
+ */
public FontUIResource getWindowTitleFont()
{
return WINDOW_TITLE_FONT;
diff --git a/javax/swing/plaf/metal/MetalBorders.java b/javax/swing/plaf/metal/MetalBorders.java
index d5b467fa2..851324242 100644
--- a/javax/swing/plaf/metal/MetalBorders.java
+++ b/javax/swing/plaf/metal/MetalBorders.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,6 +46,9 @@ import java.awt.Insets;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.JButton;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
import javax.swing.border.AbstractBorder;
import javax.swing.border.Border;
import javax.swing.plaf.BorderUIResource;
@@ -78,7 +81,7 @@ public class MetalBorders
/**
* The border that is drawn around Swing buttons.
*/
- public static class MetalButtonBorder
+ public static class ButtonBorder
extends AbstractBorder
implements UIResource
{
@@ -88,7 +91,7 @@ public class MetalBorders
/**
* Creates a new instance of ButtonBorder.
*/
- public MetalButtonBorder()
+ public ButtonBorder()
{
}
@@ -184,6 +187,168 @@ public class MetalBorders
}
/**
+ * A border used for {@link JMenu} and {@link JMenuItem} components.
+ */
+ public static class MenuItemBorder
+ extends AbstractBorder
+ implements UIResource
+ {
+ /** The border insets. */
+ protected static Insets borderInsets = new Insets(2, 2, 2, 2);
+
+ // TODO: find where the real colors come from
+ private static Color borderColorDark = new Color(102, 102, 153);
+ private static Color borderColorLight = new Color(255, 255, 255);
+
+ /**
+ * Creates a new border instance.
+ */
+ public MenuItemBorder()
+ {
+ }
+
+ /**
+ * Paints the border for the component. A border is painted only if the
+ * component is a selected {@link JMenu} or an armed {@link JMenuItem}.
+ *
+ * @param c the component.
+ * @param g the graphics device.
+ * @param x the x-coordinate of the border area.
+ * @param y the y-coordinate of the border area.
+ * @param w the width of the border area.
+ * @param h the height of the border area.
+ */
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ int h)
+ {
+ if (c instanceof JMenu) {
+ JMenu menu = (JMenu) c;
+ if (menu.isSelected())
+ {
+ g.setColor(borderColorDark);
+ g.drawLine(x, y, x, y + h);
+ g.drawLine(x, y, x + w, y);
+ g.drawLine(x + w - 2, y + 1, x + w - 2, y + h);
+ g.setColor(borderColorLight);
+ g.drawLine(x + w - 1, y + 1, x + w - 1, y + h);
+ }
+ }
+ else if (c instanceof JMenuItem)
+ {
+ JMenuItem item = (JMenuItem) c;
+ if (item.isArmed())
+ {
+ g.setColor(borderColorDark);
+ g.drawLine(x, y, x + w, y);
+ g.setColor(borderColorLight);
+ g.drawLine(x, y + h - 1, x + w, y + h - 1);
+ }
+ }
+ }
+
+ /**
+ * Returns the border insets.
+ *
+ * @param c the component (ignored).
+ *
+ * @return The border insets.
+ */
+ public Insets getBorderInsets(Component c)
+ {
+ return borderInsets;
+ }
+
+ /**
+ * Populates <code>insets</code> with the border insets, then returns it.
+ *
+ * @param c the component (ignored).
+ * @param insets the object to populate with the border insets.
+ *
+ * @return The border insets.
+ *
+ * @throws NullPointerException if <code>insets</code> is <code>null</code>.
+ */
+ public Insets getBorderInsets(Component c, Insets insets)
+ {
+ insets.left = borderInsets.left;
+ insets.top = borderInsets.top;
+ insets.bottom = borderInsets.bottom;
+ insets.right = borderInsets.right;
+ return insets;
+ }
+ }
+
+ /**
+ * A border used for {@link JMenuBar} components.
+ */
+ public static class MenuBarBorder
+ extends AbstractBorder
+ implements UIResource
+ {
+ /** The border insets. */
+ protected static Insets borderInsets = new Insets(1, 0, 1, 0);
+
+ // TODO: find where this color really comes from
+ private static Color borderColor = new Color(153, 153, 153);
+
+ /**
+ * Creates a new border instance.
+ */
+ public MenuBarBorder()
+ {
+ }
+
+ /**
+ * Paints the border for the component. A border is painted only if the
+ * component is a selected {@link JMenu} or an armed {@link JMenuItem}.
+ *
+ * @param c the component.
+ * @param g the graphics device.
+ * @param x the x-coordinate of the border area.
+ * @param y the y-coordinate of the border area.
+ * @param w the width of the border area.
+ * @param h the height of the border area.
+ */
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ int h)
+ {
+ g.setColor(borderColor);
+ g.drawLine(x, y + h - 1, x + w, y + h - 1);
+ }
+
+ /**
+ * Returns the border insets.
+ *
+ * @param c the component (ignored).
+ *
+ * @return The border insets.
+ */
+ public Insets getBorderInsets(Component c)
+ {
+ return borderInsets;
+ }
+
+ /**
+ * Populates <code>insets</code> with the border insets, then returns it.
+ *
+ * @param c the component (ignored).
+ * @param insets the object to populate with the border insets.
+ *
+ * @return The border insets.
+ *
+ * @throws NullPointerException if <code>insets</code> is <code>null</code>.
+ */
+ public Insets getBorderInsets(Component c, Insets insets)
+ {
+ insets.left = borderInsets.left;
+ insets.top = borderInsets.top;
+ insets.bottom = borderInsets.bottom;
+ insets.right = borderInsets.right;
+ return insets;
+ }
+ }
+
+ /**
* A border for JScrollPanes.
*/
public static class ScrollPaneBorder
@@ -404,7 +569,7 @@ public class MetalBorders
{
if (buttonBorder == null)
{
- Border outer = new MetalButtonBorder();
+ Border outer = new ButtonBorder();
Border inner = getMarginBorder();
buttonBorder = new BorderUIResource.CompoundBorderUIResource
(outer, inner);
@@ -421,7 +586,7 @@ public class MetalBorders
{
if (toolbarButtonBorder == null)
{
- Border outer = new MetalButtonBorder();
+ Border outer = new ButtonBorder();
Border inner = new RolloverMarginBorder();
toolbarButtonBorder = new BorderUIResource.CompoundBorderUIResource
(outer, inner);
diff --git a/javax/swing/plaf/metal/MetalButtonUI.java b/javax/swing/plaf/metal/MetalButtonUI.java
index 7b9130e0e..0dac5ec39 100644
--- a/javax/swing/plaf/metal/MetalButtonUI.java
+++ b/javax/swing/plaf/metal/MetalButtonUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package javax.swing.plaf.metal;
+import java.awt.Color;
+
import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.JToolBar;
@@ -56,18 +58,60 @@ public class MetalButtonUI
extends BasicButtonUI
{
- // FIXME: probably substitute with a Map in the future in the case
- // that this UI becomes stateful
-
/** The cached MetalButtonUI instance. */
private static MetalButtonUI instance = null;
+ /** The color for the focus border. */
+ protected Color focusColor;
+
+ /** The color that indicates a selected button. */
+ protected Color selectColor;
+
+ /** The color for disabled button labels. */
+ protected Color disabledTextColor;
+
/**
* Creates a new instance of MetalButtonUI.
*/
public MetalButtonUI()
{
super();
+ focusColor = getFocusColor();
+ selectColor = getSelectColor();
+ disabledTextColor = getDisabledTextColor();
+ }
+
+ /**
+ * Returns the color for the focus border.
+ *
+ * @return the color for the focus border
+ */
+ protected Color getFocusColor()
+ {
+ UIDefaults def = UIManager.getLookAndFeelDefaults();
+ return def.getColor(getPropertyPrefix() + ".focus");
+ }
+
+ /**
+ * Returns the color that indicates a selected button.
+ *
+ * @return the color that indicates a selected button
+ */
+ protected Color getSelectColor()
+ {
+ UIDefaults def = UIManager.getLookAndFeelDefaults();
+ return def.getColor(getPropertyPrefix() + ".select");
+ }
+
+ /**
+ * Returns the color for the text label of disabled buttons.
+ *
+ * @return the color for the text label of disabled buttons
+ */
+ protected Color getDisabledTextColor()
+ {
+ UIDefaults def = UIManager.getLookAndFeelDefaults();
+ return def.getColor(getPropertyPrefix() + ".disabledText");
}
/**
diff --git a/javax/swing/plaf/metal/MetalCheckBoxIcon.java b/javax/swing/plaf/metal/MetalCheckBoxIcon.java
new file mode 100644
index 000000000..3f3c9ce58
--- /dev/null
+++ b/javax/swing/plaf/metal/MetalCheckBoxIcon.java
@@ -0,0 +1,136 @@
+/* MetalCheckBoxIcon.java -- An icon for JCheckBoxes in the Metal L&F
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+
+import java.io.Serializable;
+
+import javax.swing.Icon;
+import javax.swing.JCheckBox;
+import javax.swing.plaf.UIResource;
+
+/**
+ * An {@link Icon} implementation for {@link JCheckBox}es in the
+ * Metal Look &amp; Feel.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+public class MetalCheckBoxIcon
+ implements Icon, UIResource, Serializable
+{
+
+ /** Used to paint the border of the icon. */
+ MetalBorders.ButtonBorder border;
+
+ /**
+ * Creates a new MetalCheckBoxIcon instance.
+ */
+ public MetalCheckBoxIcon()
+ {
+ border = new MetalBorders.ButtonBorder();
+ }
+
+ /**
+ * Draws the check in the CheckBox.
+ *
+ * @param c the component to draw on
+ * @param g the Graphics context to draw with
+ * @param x the X position
+ * @param y the Y position
+ */
+ protected void drawCheck(Component c, Graphics g, int x, int y)
+ {
+ g.setColor(Color.BLACK);
+ g.drawLine(3 + x, 5 + y, 3 + x, 9 + y);
+ g.drawLine(4 + x, 5 + y, 4 + x, 9 + y);
+ g.drawLine(5 + x, 7 + y, 9 + x, 3 + y);
+ g.drawLine(5 + x, 8 + y, 9 + x, 4 + y);
+ }
+
+ /**
+ * Returns the size (both X and Y) of the checkbox icon.
+ *
+ * @return the size of the checkbox icon
+ */
+ protected int getControlSize()
+ {
+ return 13;
+ }
+
+ /**
+ * Returns the width of the icon in pixels.
+ *
+ * @return the width of the icon in pixels
+ */
+ public int getIconWidth()
+ {
+ return getControlSize();
+ }
+
+ /**
+ * Returns the height of the icon in pixels.
+ *
+ * @return the height of the icon in pixels
+ */
+ public int getIconHeight()
+ {
+ return getControlSize();
+ }
+
+ /**
+ * Paints the icon. This first paints the border of the CheckBox and
+ * if the CheckBox is selected it calls {@link #drawCheck} to draw
+ * the check.
+ *
+ * @param c the Component to draw on (gets casted to JCheckBox)
+ * @param g the Graphics context to draw with
+ * @param x the X position
+ * @param y the Y position
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ border.paintBorder(c, g, x, y, getIconWidth(), getIconHeight());
+ JCheckBox cb = (JCheckBox) c;
+ if (cb.isSelected())
+ drawCheck(c, g, x, y);
+ }
+}
diff --git a/javax/swing/plaf/metal/MetalCheckBoxUI.java b/javax/swing/plaf/metal/MetalCheckBoxUI.java
index cc5ac73d7..d59e38c54 100644
--- a/javax/swing/plaf/metal/MetalCheckBoxUI.java
+++ b/javax/swing/plaf/metal/MetalCheckBoxUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalComboBoxIcon.java b/javax/swing/plaf/metal/MetalComboBoxIcon.java
new file mode 100644
index 000000000..ce4fa7d32
--- /dev/null
+++ b/javax/swing/plaf/metal/MetalComboBoxIcon.java
@@ -0,0 +1,100 @@
+/* MetalComboBoxButton.java
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.io.Serializable;
+
+import javax.swing.Icon;
+
+/**
+ * An icon used by the {@link MetalComboBoxUI} class.
+ */
+public class MetalComboBoxIcon implements Icon, Serializable {
+
+ /**
+ * Creates a new icon.
+ */
+ public MetalComboBoxIcon()
+ {
+ // nothing required.
+ }
+
+ /**
+ * Returns the icon width, which for this icon is 10 pixels.
+ *
+ * @return <code>10</code>.
+ */
+ public int getIconWidth()
+ {
+ return 10;
+ }
+
+ /**
+ * Returns the icon height, which for this icon is 5 pixels.
+ *
+ * @return <code>5</code>.
+ */
+ public int getIconHeight()
+ {
+ return 5;
+ }
+
+ /**
+ * Paints the icon at the location (x, y).
+ *
+ * @param c the combo box (ignored here).
+ * @param g the graphics device.
+ * @param x the x coordinate.
+ * @param y the y coordinate.
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ // TODO: work out whether/how the icon changes with different component
+ // states (and also different metal themes)
+ Color savedColor = g.getColor();
+ g.setColor(Color.black);
+ for (int i = 0; i < 5; i++)
+ g.drawLine(x + i, y + i, x + 9 - i, y + i);
+ g.setColor(savedColor);
+ }
+
+}
diff --git a/javax/swing/plaf/metal/MetalComboBoxUI.java b/javax/swing/plaf/metal/MetalComboBoxUI.java
index 2e4ca5149..28c279d8e 100644
--- a/javax/swing/plaf/metal/MetalComboBoxUI.java
+++ b/javax/swing/plaf/metal/MetalComboBoxUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalDesktopIconUI.java b/javax/swing/plaf/metal/MetalDesktopIconUI.java
index 6ceedd0d6..00870545b 100644
--- a/javax/swing/plaf/metal/MetalDesktopIconUI.java
+++ b/javax/swing/plaf/metal/MetalDesktopIconUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalIconFactory.java b/javax/swing/plaf/metal/MetalIconFactory.java
new file mode 100644
index 000000000..2c21d2b02
--- /dev/null
+++ b/javax/swing/plaf/metal/MetalIconFactory.java
@@ -0,0 +1,786 @@
+/* MetalIconFactory.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.plaf.metal;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.io.Serializable;
+
+import javax.swing.Icon;
+import javax.swing.JRadioButton;
+import javax.swing.JSlider;
+import javax.swing.plaf.UIResource;
+
+/**
+ * Creates icons for the {@link MetalLookAndFeel}.
+ */
+public class MetalIconFactory implements Serializable
+{
+
+ /** A constant representing "dark". */
+ public static final boolean DARK = false;
+
+ /** A constant representing "light". */
+ public static final boolean LIGHT = true;
+
+ /**
+ * An icon representing a file (drawn as a piece of paper with the top-right
+ * corner turned down).
+ */
+ public static class FileIcon16 implements Icon, Serializable
+ {
+ /**
+ * Returns the width of the icon, in pixels.
+ *
+ * @return The width of the icon.
+ */
+ public int getIconWidth()
+ {
+ return 16;
+ }
+
+ /**
+ * Returns the height of the icon, in pixels.
+ *
+ * @return The height of the icon.
+ */
+ public int getIconHeight()
+ {
+ return 16;
+ }
+
+ /**
+ * Paints the icon at the location (x, y).
+ *
+ * @param c the component.
+ * @param g the graphics context.
+ * @param x the x coordinate.
+ * @param y the y coordinate.
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ // TODO: pick up appropriate UI colors
+ g.setColor(Color.black);
+ g.drawLine(x, y, x + 9, y);
+ g.drawLine(x, y + 1, x, y + 15);
+ g.drawLine(x, y + 15, x + 12, y + 15);
+ g.drawLine(x + 12, y + 15, x + 12, y + 6);
+ g.drawLine(x + 12, y + 6, x + 9, y);
+
+ g.drawLine(x + 7, y + 2, x + 11, y + 6);
+ g.drawLine(x + 8, y + 1, x + 9, y + 1);
+
+ g.setColor(new Color(204, 204, 255));
+ g.drawLine(x + 1, y + 1, x + 7, y + 1);
+ g.drawLine(x + 1, y + 1, x + 1, y + 14);
+ g.drawLine(x + 1, y + 14, x + 11, y + 14);
+ g.drawLine(x + 11, y + 14, x + 11, y + 7);
+ g.drawLine(x + 8, y + 2, x + 10, y + 4);
+ }
+
+ /**
+ * Returns the additional height (???).
+ *
+ * @return The additional height.
+ */
+ public int getAdditionalHeight()
+ {
+ return 0;
+ }
+
+ /**
+ * Returns the shift (???).
+ *
+ * @return The shift.
+ */
+ public int getShift()
+ {
+ return 0;
+ }
+
+ }
+
+ /**
+ * An icon representing a folder.
+ */
+ public static class FolderIcon16 implements Icon, Serializable
+ {
+ /**
+ * Returns the width of the icon, in pixels.
+ *
+ * @return The width of the icon.
+ */
+ public int getIconWidth() {
+ return 16;
+ }
+
+ /**
+ * Returns the height of the icon, in pixels.
+ *
+ * @return The height of the icon.
+ */
+ public int getIconHeight()
+ {
+ return 16;
+ }
+
+ /**
+ * Paints the icon at the location (x, y).
+ *
+ * @param c the component.
+ * @param g the graphics device.
+ * @param x the x coordinate.
+ * @param y the y coordinate.
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ // TODO: pick up appropriate UI colors
+ g.setColor(Color.black);
+ g.drawLine(x, y + 3, x, y + 12);
+ g.drawLine(x, y + 12, x + 15, y + 12);
+ g.drawLine(x + 15, y + 12, x + 15, y + 2);
+ g.drawLine(x + 14, y + 3, x + 9, y + 3);
+ g.drawLine(x + 8, y + 2, x + 1, y + 2);
+ g.setColor(new Color(204, 204, 255));
+ g.fillRect(x + 2, y + 4, 7, 8);
+ g.fillRect(x + 9, y + 5, 6, 7);
+ g.setColor(new Color(102, 102, 153));
+ g.drawLine(x + 9, y + 2, x + 14, y + 2);
+ g.setColor(new Color(50, 50, 120));
+ g.drawLine(x + 9, y + 1, x + 15, y + 1);
+ g.drawLine(x + 10, y, x + 15, y);
+ }
+
+ /**
+ * Returns the additional height (???).
+ *
+ * @return The additional height.
+ */
+ public int getAdditionalHeight()
+ {
+ return 0;
+ }
+
+ /**
+ * Returns the shift (???).
+ *
+ * @return The shift.
+ */
+ public int getShift()
+ {
+ return 0;
+ }
+
+ }
+
+ /**
+ * An {@link Icon} implementation for {@link JCheckBox}es in the
+ * Metal Look &amp; Feel.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+ static class RadioButtonIcon
+ implements Icon, UIResource, Serializable
+ {
+ /**
+ * Draws the check in the RadioButton.
+ *
+ * @param c the component to draw on
+ * @param g the Graphics context to draw with
+ */
+ protected void drawCheck(Component c, Graphics g)
+ {
+ g.setColor(MetalLookAndFeel.getBlack());
+ g.fillRect(4, 3, 4, 6);
+ g.drawLine(3, 4, 3, 7);
+ g.drawLine(8, 4, 8, 7);
+ }
+
+ /**
+ * Returns the width of the icon in pixels.
+ *
+ * @return the width of the icon in pixels
+ */
+ public int getIconWidth()
+ {
+ return 13;
+ }
+
+ /**
+ * Returns the height of the icon in pixels.
+ *
+ * @return the height of the icon in pixels
+ */
+ public int getIconHeight()
+ {
+ return 13;
+ }
+
+ /**
+ * Paints the icon. This first paints the border of the RadioButton and
+ * if the CheckBox is selected it calls {@link #drawCheck} to draw
+ * the check.
+ *
+ * @param c the Component to draw on (gets casted to JCheckBox)
+ * @param g the Graphics context to draw with
+ * @param x the X position
+ * @param y the Y position
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ Color dark = MetalLookAndFeel.getControlDarkShadow();
+ Color light = MetalLookAndFeel.getWhite();
+ g.translate(x, y);
+
+ // The light 'circle'
+ g.setColor(light);
+ g.drawLine(4, 1, 10, 1);
+ g.drawLine(2, 2, 3, 2);
+ g.drawLine(8, 2, 11, 2);
+ g.drawLine(2, 3, 2, 3);
+ g.drawLine(11, 2, 11, 9);
+ g.drawLine(1, 4, 1, 7);
+ g.drawLine(12, 4, 12, 7);
+ g.drawLine(2, 8, 2, 11);
+ g.drawLine(11, 8, 11, 9);
+ g.drawLine(10, 10, 10, 10);
+ g.drawLine(2, 11, 9, 11);
+ g.drawLine(4, 12, 7, 12);
+
+ // The dark 'circle'
+ g.setColor(dark);
+ g.drawLine(4, 0, 7, 0);
+ g.drawLine(2, 1, 3, 1);
+ g.drawLine(8, 1, 9, 1);
+ g.drawLine(1, 2, 1, 3);
+ g.drawLine(10, 2, 10, 3);
+ g.drawLine(0, 4, 0, 7);
+ g.drawLine(11, 4, 11, 7);
+ g.drawLine(1, 8, 1, 9);
+ g.drawLine(10, 8, 10, 9);
+ g.drawLine(2, 10, 3, 10);
+ g.drawLine(8, 10, 9, 10);
+ g.drawLine(4, 11, 7, 11);
+
+ JRadioButton rb = (JRadioButton) c;
+ if (rb.isSelected())
+ drawCheck(c, g);
+
+ g.translate(-x, -y);
+ }
+ }
+
+ /**
+ * The icon used to display the thumb control on a horizontally oriented
+ * {@link JSlider} component.
+ */
+ private static class HorizontalSliderThumbIcon
+ implements Icon, Serializable
+ {
+
+ /**
+ * Creates a new instance.
+ */
+ public HorizontalSliderThumbIcon()
+ {
+ }
+
+ /**
+ * Returns the width of the icon, in pixels.
+ *
+ * @return The width of the icon.
+ */
+ public int getIconWidth()
+ {
+ return 15;
+ }
+
+ /**
+ * Returns the height of the icon, in pixels.
+ *
+ * @return The height of the icon.
+ */
+ public int getIconHeight()
+ {
+ return 16;
+ }
+
+ /**
+ * Paints the icon, taking into account whether or not the component has
+ * the focus.
+ *
+ * @param c the component.
+ * @param g the graphics device.
+ * @param x the x-coordinate.
+ * @param y the y-coordinate.
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ boolean focus = false;
+ if (c != null)
+ focus = c.hasFocus();
+ // TODO: pick up the colors from the look and feel
+
+ // draw the outline
+ g.setColor(Color.black);
+ g.drawLine(x + 1, y, x + 13, y);
+ g.drawLine(x + 14, y + 1, x + 14, y + 7);
+ g.drawLine(x + 14, y + 8, x + 7, y + 15);
+ g.drawLine(x + 6, y + 14, x, y + 8);
+ g.drawLine(x, y + 7, x, y + 1);
+
+ // fill the icon
+ g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium
+ g.fillRect(x + 2, y + 2, 12, 7);
+ g.drawLine(x + 2, y + 9, x + 12, y + 9);
+ g.drawLine(x + 3, y + 10, x + 11, y + 10);
+ g.drawLine(x + 4, y + 11, x + 10, y + 11);
+ g.drawLine(x + 5, y + 12, x + 9, y + 12);
+ g.drawLine(x + 6, y + 13, x + 8, y + 13);
+ g.drawLine(x + 7, y + 14, x + 7, y + 14);
+
+ // draw highlights
+ g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light
+ g.drawLine(x + 1, y + 1, x + 13, y + 1);
+ g.drawLine(x + 1, y + 2, x + 1, y + 8);
+ g.drawLine(x + 2, y + 2, x + 2, y + 2);
+ g.drawLine(x + 6, y + 2, x + 6, y + 2);
+ g.drawLine(x + 10, y + 2, x + 10, y + 2);
+
+ g.drawLine(x + 4, y + 4, x + 4, y + 4);
+ g.drawLine(x + 8, y + 4, x + 8, y + 4);
+
+ g.drawLine(x + 2, y + 6, x + 2, y + 6);
+ g.drawLine(x + 6, y + 6, x + 6, y + 6);
+ g.drawLine(x + 10, y + 6, x + 10, y + 6);
+
+ // draw dots
+ g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark
+ g.drawLine(x + 3, y + 3, x + 3, y + 3);
+ g.drawLine(x + 7, y + 3, x + 7, y + 3);
+ g.drawLine(x + 11, y + 3, x + 11, y + 3);
+
+ g.drawLine(x + 5, y + 5, x + 5, y + 5);
+ g.drawLine(x + 9, y + 5, x + 9, y + 5);
+
+ g.drawLine(x + 3, y + 7, x + 3, y + 7);
+ g.drawLine(x + 7, y + 7, x + 7, y + 7);
+ g.drawLine(x + 11, y + 7, x + 11, y + 7);
+
+ }
+ }
+
+ /**
+ * The icon used to display the thumb control on a horizontally oriented
+ * {@link JSlider} component.
+ */
+ private static class VerticalSliderThumbIcon implements Icon, Serializable
+ {
+ /**
+ * Creates a new instance.
+ */
+ public VerticalSliderThumbIcon()
+ {
+ }
+
+ /**
+ * Returns the width of the icon, in pixels.
+ *
+ * @return The width of the icon.
+ */
+ public int getIconWidth()
+ {
+ return 16;
+ }
+
+ /**
+ * Returns the height of the icon, in pixels.
+ *
+ * @return The height of the icon.
+ */
+ public int getIconHeight()
+ {
+ return 15;
+ }
+
+ /**
+ * Paints the icon taking into account whether the slider control has the
+ * focus or not.
+ *
+ * @param c the slider (must be a non-<code>null</code> instance of
+ * {@link JSlider}.
+ * @param g the graphics device.
+ * @param x the x-coordinate.
+ * @param y the y-coordinate.
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ boolean focus = false;
+ if (c != null)
+ focus = c.hasFocus();
+ // TODO: pick up the colors from the look and feel
+
+ // draw the outline
+ g.setColor(Color.black);
+ g.drawLine(x + 1, y, x + 7, y);
+ g.drawLine(x + 8, y, x + 15, y + 7);
+ g.drawLine(x + 14, y + 8, x + 8, y + 14);
+ g.drawLine(x + 8, y + 14, x + 1, y + 14);
+ g.drawLine(x, y + 13, x, y + 1);
+
+ // fill the icon
+ g.setColor(focus ? new Color(153, 153, 204) : new Color(204, 204, 204)); // medium
+ g.fillRect(x + 2, y + 2, 7, 12);
+ g.drawLine(x + 9, y + 2, x + 9, y + 12);
+ g.drawLine(x + 10, y + 3, x + 10, y + 11);
+ g.drawLine(x + 11, y + 4, x + 11, y + 10);
+ g.drawLine(x + 12, y + 5, x + 12, y + 9);
+ g.drawLine(x + 13, y + 6, x + 13, y + 8);
+ g.drawLine(x + 14, y + 7, x + 14, y + 7);
+
+ // draw highlights
+ g.setColor(focus ? new Color(204, 204, 255) : new Color(255, 255, 255)); // light
+ g.drawLine(x + 1, y + 1, x + 8, y + 1);
+ g.drawLine(x + 1, y + 2, x + 1, y + 13);
+ g.drawLine(x + 2, y + 2, x + 2, y + 2);
+ g.drawLine(x + 2, y + 6, x + 2, y + 6);
+ g.drawLine(x + 2, y + 10, x + 2, y + 10);
+
+ g.drawLine(x + 4, y + 4, x + 4, y + 4);
+ g.drawLine(x + 4, y + 8, x + 4, y + 8);
+
+ g.drawLine(x + 6, y + 2, x + 6, y + 2);
+ g.drawLine(x + 6, y + 6, x + 6, y + 6);
+ g.drawLine(x + 6, y + 10, x + 6, y + 10);
+
+ // draw dots
+ g.setColor(focus ? new Color(102, 102, 153) : Color.black); // dark
+ g.drawLine(x + 3, y + 3, x + 3, y + 3);
+ g.drawLine(x + 3, y + 7, x + 3, y + 7);
+ g.drawLine(x + 3, y + 11, x + 3, y + 11);
+
+ g.drawLine(x + 5, y + 5, x + 5, y + 5);
+ g.drawLine(x + 5, y + 9, x + 5, y + 9);
+
+ g.drawLine(x + 7, y + 3, x + 7, y + 3);
+ g.drawLine(x + 7, y + 7, x + 7, y + 7);
+ g.drawLine(x + 7, y + 11, x + 7, y + 11);
+ }
+ }
+
+ /**
+ * A tree control icon. This icon can be in one of two states: expanded and
+ * collapsed.
+ */
+ public static class TreeControlIcon implements Icon, Serializable
+ {
+
+ /** ???. */
+ protected boolean isLight;
+
+ /** A flag that controls whether or not the icon is collapsed. */
+ private boolean collapsed;
+
+ /**
+ * Creates a new icon.
+ *
+ * @param isCollapsed a flag that controls whether the icon is in the
+ * collapsed state or the expanded state.
+ */
+ public TreeControlIcon(boolean isCollapsed)
+ {
+ collapsed = isCollapsed;
+ }
+
+ /**
+ * Returns the width of the icon, in pixels.
+ *
+ * @return The width of the icon.
+ */
+ public int getIconWidth()
+ {
+ return 18;
+ }
+ /**
+ * Returns the height of the icon, in pixels.
+ *
+ * @return The height of the icon.
+ */
+ public int getIconHeight()
+ {
+ return 18;
+ }
+
+ /**
+ * Paints the icon at the location (x, y).
+ *
+ * @param c the component.
+ * @param g the graphics device.
+ * @param x the x coordinate.
+ * @param y the y coordinate.
+ */
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ x = x + 5;
+ y = y + 5;
+ if (collapsed)
+ {
+ // TODO: pick up appropriate UI colors
+ g.setColor(Color.black);
+ g.drawLine(x + 2, y, x + 5, y);
+ g.drawLine(x + 6, y + 1, x + 7, y + 2);
+ g.fillRect(x + 7, y + 3, 5, 2);
+ g.drawLine(x + 7, y + 5, x + 6, y + 6);
+ g.drawLine(x + 1, y + 1, x + 1, y + 1);
+ g.drawLine(x, y + 2, x, y + 5);
+ g.drawLine(x + 1, y + 6, x + 1, y + 6);
+ g.drawLine(x + 2, y + 7, x + 5, y + 7);
+ g.fillRect(x + 3, y + 3, 2, 2);
+
+ g.setColor(new Color(204, 204, 255));
+ g.drawLine(x + 3, y + 2, x + 4, y + 2);
+ g.drawLine(x + 2, y + 3, x + 2, y + 4);
+ g.drawLine(x + 3, y + 5, x + 3, y + 5);
+ g.drawLine(x + 5, y + 3, x + 5, y + 3);
+
+ g.setColor(new Color(153, 153, 204));
+ g.drawLine(x + 2, y + 2, x + 2, y + 2);
+ g.drawLine(x + 2, y + 5, x + 2, y + 5);
+ g.drawLine(x + 2, y + 6, x + 5, y + 6);
+ g.drawLine(x + 5, y + 2, x + 5, y + 2);
+ g.drawLine(x + 6, y + 2, x + 6, y + 5);
+
+ g.setColor(new Color(102, 102, 153));
+ g.drawLine(x + 2, y + 1, x + 5, y + 1);
+ g.drawLine(x + 1, y + 2, x + 1, y + 5);
+ }
+ else
+ {
+ // TODO: pick up appropriate UI colors
+ g.setColor(Color.black);
+ g.drawLine(x + 2, y, x + 5, y);
+ g.drawLine(x + 6, y + 1, x + 7, y + 2);
+ g.drawLine(x + 7, y + 2, x + 7, y + 5);
+ g.fillRect(x + 3, y + 7, 2, 5);
+ g.drawLine(x + 7, y + 5, x + 6, y + 6);
+ g.drawLine(x + 1, y + 1, x + 1, y + 1);
+ g.drawLine(x, y + 2, x, y + 5);
+ g.drawLine(x + 1, y + 6, x + 1, y + 6);
+ g.drawLine(x + 2, y + 7, x + 5, y + 7);
+ g.fillRect(x + 3, y + 3, 2, 2);
+
+ g.setColor(new Color(204, 204, 255));
+ g.drawLine(x + 3, y + 2, x + 4, y + 2);
+ g.drawLine(x + 2, y + 3, x + 2, y + 4);
+ g.drawLine(x + 3, y + 5, x + 3, y + 5);
+ g.drawLine(x + 5, y + 3, x + 5, y + 3);
+
+ g.setColor(new Color(153, 153, 204));
+ g.drawLine(x + 2, y + 2, x + 2, y + 2);
+ g.drawLine(x + 2, y + 5, x + 2, y + 5);
+ g.drawLine(x + 2, y + 6, x + 5, y + 6);
+ g.drawLine(x + 5, y + 2, x + 5, y + 2);
+ g.drawLine(x + 6, y + 2, x + 6, y + 5);
+
+ g.setColor(new Color(102, 102, 153));
+ g.drawLine(x + 2, y + 1, x + 5, y + 1);
+ g.drawLine(x + 1, y + 2, x + 1, y + 5);
+ }
+ }
+
+ /**
+ * Simply calls {@link #paintIcon(Component, Graphics, int, int)}.
+ *
+ * @param c the component.
+ * @param g the graphics device.
+ * @param x the x coordinate.
+ * @param y the y coordinate.
+ */
+ public void paintMe(Component c, Graphics g, int x, int y)
+ {
+ paintIcon(c, g, x, y);
+ }
+ }
+
+ /**
+ * A tree folder icon.
+ */
+ public static class TreeFolderIcon extends FolderIcon16
+ {
+ /**
+ * Creates a new instance.
+ */
+ public TreeFolderIcon()
+ {
+ }
+
+ /**
+ * Returns the additional height (???).
+ *
+ * @return The additional height.
+ */
+ public int getAdditionalHeight()
+ {
+ return 2;
+ }
+
+ /**
+ * Returns the shift (???).
+ *
+ * @return The shift.
+ */
+ public int getShift()
+ {
+ return -1;
+ }
+ }
+
+ /**
+ * A tree leaf icon.
+ */
+ public static class TreeLeafIcon extends FileIcon16
+ {
+ /**
+ * Creates a new instance.
+ */
+ public TreeLeafIcon()
+ {
+ }
+
+ /**
+ * Returns the additional height (???).
+ *
+ * @return The additional height.
+ */
+ public int getAdditionalHeight()
+ {
+ return 4;
+ }
+
+ /**
+ * Returns the shift (???).
+ *
+ * @return The shift.
+ */
+ public int getShift()
+ {
+ return 2;
+ }
+ }
+
+ /** The cached RadioButtonIcon instance. */
+ private static RadioButtonIcon radioButtonIcon;
+
+ /**
+ * Creates a new instance. All the methods are static, so creating an
+ * instance isn't necessary.
+ */
+ public MetalIconFactory()
+ {
+ }
+
+ /**
+ * Returns an icon for RadioButtons in the Metal L&amp;F.
+ *
+ * @return an icon for RadioButtons in the Metal L&amp;F
+ */
+ public static Icon getRadioButtonIcon()
+ {
+ if (radioButtonIcon == null)
+ radioButtonIcon = new RadioButtonIcon();
+ return radioButtonIcon;
+ }
+
+ /**
+ * Returns the icon used to display the thumb for a horizontally oriented
+ * {@link JSlider}.
+ *
+ * @return The icon.
+ */
+ public static Icon getHorizontalSliderThumbIcon()
+ {
+ return new HorizontalSliderThumbIcon();
+ }
+
+ /**
+ * Returns the icon used to display the thumb for a vertically oriented
+ * {@link JSlider}.
+ *
+ * @return The icon.
+ */
+ public static Icon getVerticalSliderThumbIcon()
+ {
+ return new VerticalSliderThumbIcon();
+ }
+
+ /**
+ * Creates and returns a new tree folder icon.
+ *
+ * @return A new tree folder icon.
+ */
+ public static Icon getTreeFolderIcon()
+ {
+ return new TreeFolderIcon();
+ }
+
+ /**
+ * Creates and returns a new tree leaf icon.
+ *
+ * @return A new tree leaf icon.
+ */
+ public static Icon getTreeLeafIcon()
+ {
+ return new TreeLeafIcon();
+ }
+
+ /**
+ * Creates and returns a tree control icon.
+ *
+ * @param isCollapsed a flag that controls whether the icon is in the
+ * collapsed or expanded state.
+ *
+ * @return A tree control icon.
+ */
+ public static Icon getTreeControlIcon(boolean isCollapsed)
+ {
+ return new TreeControlIcon(isCollapsed);
+ }
+
+}
diff --git a/javax/swing/plaf/metal/MetalInternalFrameUI.java b/javax/swing/plaf/metal/MetalInternalFrameUI.java
index f2f8e3600..14143512e 100644
--- a/javax/swing/plaf/metal/MetalInternalFrameUI.java
+++ b/javax/swing/plaf/metal/MetalInternalFrameUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalLabelUI.java b/javax/swing/plaf/metal/MetalLabelUI.java
index 12aa7b116..cdd861227 100644
--- a/javax/swing/plaf/metal/MetalLabelUI.java
+++ b/javax/swing/plaf/metal/MetalLabelUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalLookAndFeel.java b/javax/swing/plaf/metal/MetalLookAndFeel.java
index 77f683516..373fb0593 100644
--- a/javax/swing/plaf/metal/MetalLookAndFeel.java
+++ b/javax/swing/plaf/metal/MetalLookAndFeel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,49 +39,96 @@ exception statement from your version. */
package javax.swing.plaf.metal;
import java.awt.Color;
+import java.awt.Font;
import java.awt.Insets;
+import javax.swing.ImageIcon;
import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
+import javax.swing.plaf.IconUIResource;
+import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.basic.BasicLookAndFeel;
+/**
+ * A custom look and feel that is designed to look similar across different
+ * operating systems.
+ */
public class MetalLookAndFeel extends BasicLookAndFeel
{
private static final long serialVersionUID = 6680646159193457980L;
+
+ /** The current theme. */
private static MetalTheme theme;
+
+ /** The look and feel defaults. */
private UIDefaults LAF_defaults;
+ /**
+ * Creates a new instance of the Metal look and feel.
+ */
public MetalLookAndFeel()
{
createDefaultTheme();
}
+ /**
+ * Sets the current theme to a new instance of {@link DefaultMetalTheme}.
+ */
protected void createDefaultTheme()
{
setCurrentTheme(new DefaultMetalTheme());
}
+ /**
+ * Returns <code>false</code> to indicate that this look and feel does not
+ * attempt to emulate the look and feel of native applications on the host
+ * platform.
+ *
+ * @return <code>false</code>.
+ */
public boolean isNativeLookAndFeel()
{
- return true;
+ return false;
}
+ /**
+ * Returns <code>true</code> to indicate that this look and feel is supported
+ * on all platforms.
+ *
+ * @return <code>true</code>.
+ */
public boolean isSupportedLookAndFeel()
{
return true;
}
+ /**
+ * Returns a string describing the look and feel. In this case, the method
+ * returns "Metal look and feel".
+ *
+ * @return A string describing the look and feel.
+ */
public String getDescription()
{
return "Metal look and feel";
}
+ /**
+ * Returns the look and feel identifier.
+ *
+ * @return "MetalLookAndFeel".
+ */
public String getID()
{
return "MetalLookAndFeel";
}
+ /**
+ * Returns the look and feel name.
+ *
+ * @return "MetalLookAndFeel".
+ */
public String getName()
{
return "MetalLookAndFeel";
@@ -90,225 +137,474 @@ public class MetalLookAndFeel extends BasicLookAndFeel
public UIDefaults getDefaults()
{
if (LAF_defaults == null)
- LAF_defaults = super.getDefaults();
+ {
+ LAF_defaults = super.getDefaults();
- // add custom theme entries to the table
- theme.addCustomEntriesToTable(LAF_defaults);
+ // add custom theme entries to the table
+ theme.addCustomEntriesToTable(LAF_defaults);
+ }
// Returns the default values for this look and feel.
return LAF_defaults;
}
+ /**
+ * Returns the accelerator foreground color from the installed theme.
+ *
+ * @return The accelerator foreground color.
+ */
public static ColorUIResource getAcceleratorForeground()
{
return theme.getAcceleratorForeground();
}
+ /**
+ * Returns the accelerator selected foreground color from the installed
+ * theme.
+ *
+ * @return The accelerator selected foreground color.
+ */
public static ColorUIResource getAcceleratorSelectedForeground()
{
return theme.getAcceleratorSelectedForeground();
}
+ /**
+ * Returns the color black from the installed theme.
+ *
+ * @return The color black.
+ */
public static ColorUIResource getBlack()
{
return theme.getBlack();
}
+ /**
+ * Returns the control color from the installed theme.
+ *
+ * @return The control color.
+ */
public static ColorUIResource getControl()
{
return theme.getControl();
}
+ /**
+ * Returns the color used for dark shadows on controls, from the installed
+ * theme.
+ *
+ * @return The color used for dark shadows on controls.
+ */
public static ColorUIResource getControlDarkShadow()
{
return theme.getControlDarkShadow();
}
+ /**
+ * Returns the color used for disabled controls, from the installed theme.
+ *
+ * @return The color used for disabled controls.
+ */
public static ColorUIResource getControlDisabled()
{
return theme.getControlDisabled();
}
+ /**
+ * Returns the color used to draw highlights for controls, from the installed
+ * theme.
+ *
+ * @return The color used to draw highlights for controls.
+ */
public static ColorUIResource getControlHighlight()
{
return theme.getControlHighlight();
}
+ /**
+ * Returns the color used to display control info, from the installed
+ * theme.
+ *
+ * @return The color used to display control info.
+ */
public static ColorUIResource getControlInfo()
{
return theme.getControlInfo();
}
+ /**
+ * Returns the color used to draw shadows for controls, from the installed
+ * theme.
+ *
+ * @return The color used to draw shadows for controls.
+ */
public static ColorUIResource getControlShadow()
{
return theme.getControlShadow();
}
+ /**
+ * Returns the color used for text on controls, from the installed theme.
+ *
+ * @return The color used for text on controls.
+ */
public static ColorUIResource getControlTextColor()
{
return theme.getControlTextColor();
}
+ /**
+ * Returns the font used for text on controls, from the installed theme.
+ *
+ * @return The font used for text on controls.
+ */
public static FontUIResource getControlTextFont()
{
return theme.getControlTextFont();
}
+ /**
+ * Returns the color used for the desktop background, from the installed
+ * theme.
+ *
+ * @return The color used for the desktop background.
+ */
public static ColorUIResource getDesktopColor()
{
return theme.getDesktopColor();
}
+ /**
+ * Returns the color used to draw focus highlights, from the installed
+ * theme.
+ *
+ * @return The color used to draw focus highlights.
+ */
public static ColorUIResource getFocusColor()
{
return theme.getFocusColor();
}
+ /**
+ * Returns the color used to draw highlighted text, from the installed
+ * theme.
+ *
+ * @return The color used to draw highlighted text.
+ */
public static ColorUIResource getHighlightedTextColor()
{
return theme.getHighlightedTextColor();
}
+ /**
+ * Returns the color used to draw text on inactive controls, from the
+ * installed theme.
+ *
+ * @return The color used to draw text on inactive controls.
+ */
public static ColorUIResource getInactiveControlTextColor()
{
return theme.getInactiveControlTextColor();
}
+ /**
+ * Returns the color used to draw inactive system text, from the installed
+ * theme.
+ *
+ * @return The color used to draw inactive system text.
+ */
public static ColorUIResource getInactiveSystemTextColor()
{
return theme.getInactiveSystemTextColor();
}
+ /**
+ * Returns the background color for menu items, from the installed theme.
+ *
+ * @return The background color for menu items.
+ *
+ * @see #getMenuSelectedBackground()
+ */
public static ColorUIResource getMenuBackground()
{
return theme.getMenuBackground();
}
+ /**
+ * Returns the foreground color for disabled menu items, from the installed
+ * theme.
+ *
+ * @return The foreground color for disabled menu items.
+ *
+ * @see #getMenuForeground()
+ */
public static ColorUIResource getMenuDisabledForeground()
{
return theme.getMenuDisabledForeground();
}
+ /**
+ * Returns the foreground color for menu items, from the installed theme.
+ *
+ * @return The foreground color for menu items.
+ *
+ * @see #getMenuDisabledForeground()
+ * @see #getMenuSelectedForeground()
+ */
public static ColorUIResource getMenuForeground()
{
return theme.getMenuForeground();
}
+ /**
+ * Returns the background color for selected menu items, from the installed
+ * theme.
+ *
+ * @return The background color for selected menu items.
+ *
+ * @see #getMenuBackground()
+ */
public static ColorUIResource getMenuSelectedBackground()
{
return theme.getMenuSelectedBackground();
}
+ /**
+ * Returns the foreground color for selected menu items, from the installed
+ * theme.
+ *
+ * @return The foreground color for selected menu items.
+ *
+ * @see #getMenuForeground()
+ */
public static ColorUIResource getMenuSelectedForeground()
{
return theme.getMenuSelectedForeground();
}
+ /**
+ * Returns the font used for text in menus, from the installed theme.
+ *
+ * @return The font used for text in menus.
+ */
public static FontUIResource getMenuTextFont()
{
return theme.getMenuTextFont();
}
+ /**
+ * Returns the primary color for controls, from the installed theme.
+ *
+ * @return The primary color for controls.
+ */
public static ColorUIResource getPrimaryControl()
{
return theme.getPrimaryControl();
}
+ /**
+ * Returns the primary color for the dark shadow on controls, from the
+ * installed theme.
+ *
+ * @return The primary color for the dark shadow on controls.
+ */
public static ColorUIResource getPrimaryControlDarkShadow()
{
return theme.getPrimaryControlDarkShadow();
}
+ /**
+ * Returns the primary color for the highlight on controls, from the
+ * installed theme.
+ *
+ * @return The primary color for the highlight on controls.
+ */
public static ColorUIResource getPrimaryControlHighlight()
{
return theme.getPrimaryControlHighlight();
}
+ /**
+ * Returns the primary color for the information on controls, from the
+ * installed theme.
+ *
+ * @return The primary color for the information on controls.
+ */
public static ColorUIResource getPrimaryControlInfo()
{
return theme.getPrimaryControlInfo();
}
+ /**
+ * Returns the primary color for the shadow on controls, from the installed
+ * theme.
+ *
+ * @return The primary color for the shadow on controls.
+ */
public static ColorUIResource getPrimaryControlShadow()
{
return theme.getPrimaryControlShadow();
}
+ /**
+ * Returns the background color for separators, from the installed theme.
+ *
+ * @return The background color for separators.
+ */
public static ColorUIResource getSeparatorBackground()
{
return theme.getSeparatorBackground();
}
+ /**
+ * Returns the foreground color for separators, from the installed theme.
+ *
+ * @return The foreground color for separators.
+ */
public static ColorUIResource getSeparatorForeground()
{
return theme.getSeparatorForeground();
}
+ /**
+ * Returns the font used for sub text, from the installed theme.
+ *
+ * @return The font used for sub text.
+ */
public static FontUIResource getSubTextFont()
{
return theme.getSubTextFont();
}
+ /**
+ * Returns the color used for system text, from the installed theme.
+ *
+ * @return The color used for system text.
+ */
public static ColorUIResource getSystemTextColor()
{
return theme.getSystemTextColor();
}
+ /**
+ * Returns the font used for system text, from the installed theme.
+ *
+ * @return The font used for system text.
+ */
public static FontUIResource getSystemTextFont()
{
return theme.getSystemTextFont();
}
+ /**
+ * Returns the color used to highlight text, from the installed theme.
+ *
+ * @return The color used to highlight text.
+ */
public static ColorUIResource getTextHighlightColor()
{
return theme.getTextHighlightColor();
}
+ /**
+ * Returns the color used to display user text, from the installed theme.
+ *
+ * @return The color used to display user text.
+ */
public static ColorUIResource getUserTextColor()
{
return theme.getUserTextColor();
}
+ /**
+ * Returns the font used for user text, obtained from the current theme.
+ *
+ * @return The font used for user text.
+ */
public static FontUIResource getUserTextFont()
{
return theme.getUserTextFont();
}
+ /**
+ * Returns the color used for white, from the installed theme.
+ *
+ * @return The color used for white.
+ */
public static ColorUIResource getWhite()
{
return theme.getWhite();
}
+ /**
+ * Returns the window background color, from the installed theme.
+ *
+ * @return The window background color.
+ */
public static ColorUIResource getWindowBackground()
{
return theme.getWindowBackground();
}
+ /**
+ * Returns the window title background color, from the installed theme.
+ *
+ * @return The window title background color.
+ */
public static ColorUIResource getWindowTitleBackground()
{
return theme.getWindowTitleBackground();
}
+ /**
+ * Returns the window title font from the current theme.
+ *
+ * @return The window title font.
+ *
+ * @see MetalTheme
+ */
public static FontUIResource getWindowTitleFont()
{
return theme.getWindowTitleFont();
}
+ /**
+ * Returns the window title foreground color, from the installed theme.
+ *
+ * @return The window title foreground color.
+ */
public static ColorUIResource getWindowTitleForeground()
{
return theme.getWindowTitleForeground();
}
+ /**
+ * Returns the background color for an inactive window title, from the
+ * installed theme.
+ *
+ * @return The background color for an inactive window title.
+ */
public static ColorUIResource getWindowTitleInactiveBackground()
{
return theme.getWindowTitleInactiveBackground();
}
+ /**
+ * Returns the foreground color for an inactive window title, from the
+ * installed theme.
+ *
+ * @return The foreground color for an inactive window title.
+ */
public static ColorUIResource getWindowTitleInactiveForeground()
{
return theme.getWindowTitleInactiveForeground();
}
+ /**
+ * Sets the current theme for the look and feel.
+ *
+ * @param theme the theme.
+ */
public static void setCurrentTheme(MetalTheme theme)
{
MetalLookAndFeel.theme = theme;
@@ -417,7 +713,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
* </tr><tr>
* <td>Button.background</td><td>0xcccccc</td>
* </tr><tr>
- * <td>Button.border</td><td>{@link MetalBorders.ButtonBorder}</td>
+ * <td>Button.border</td><td>{@link MetalBorders#getButtonBorder()}</td>
* </tr><tr>
* <td>Button.font</td><td>{@link #getControlTextFont}</td>
* </tr><tr>
@@ -476,6 +772,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"Button.select", new ColorUIResource(getPrimaryControlShadow()),
"Button.shadow", new ColorUIResource(getPrimaryControlShadow()),
"CheckBox.background", new ColorUIResource(getControl()),
+ "CheckBox.icon",
+ new UIDefaults.ProxyLazyValue
+ ("javax.swing.plaf.metal.MetalCheckBoxIcon"),
"CheckBoxMenuItem.background", new ColorUIResource(getControl()),
"ToolBar.background", new ColorUIResource(getControl()),
"Panel.background", new ColorUIResource(getControl()),
@@ -489,11 +788,28 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"Label.disabledForeground", new ColorUIResource(getControlDisabled()),
"Label.foreground", new ColorUIResource(getSystemTextColor()),
"Menu.background", new ColorUIResource(getControl()),
+ "Menu.border", new MetalBorders.MenuItemBorder(),
+ "Menu.borderPainted", Boolean.TRUE,
"Menu.font", getControlTextFont(),
+ "Menu.selectionBackground", getMenuSelectedBackground(),
+ "Menu.selectionForeground", getMenuSelectedForeground(),
"MenuBar.background", new ColorUIResource(getControl()),
+ "MenuBar.border", new MetalBorders.MenuBarBorder(),
"MenuBar.font", getControlTextFont(),
"MenuItem.background", new ColorUIResource(getControl()),
+ "MenuItem.border", new MetalBorders.MenuItemBorder(),
"MenuItem.font", getControlTextFont(),
+ "MenuItem.selectionBackground", getMenuSelectedBackground(),
+ "MenuItem.selectionForeground", getMenuSelectedForeground(),
+ "Panel.background", new ColorUIResource(getControl()),
+ "RadioButton.icon",
+ new UIDefaults.LazyValue()
+ {
+ public Object createValue(UIDefaults def)
+ {
+ return MetalIconFactory.getRadioButtonIcon();
+ }
+ },
"ScrollBar.background", new ColorUIResource(getControl()),
"ScrollBar.shadow", new ColorUIResource(getControlShadow()),
"ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()),
@@ -501,6 +817,53 @@ public class MetalLookAndFeel extends BasicLookAndFeel
new ColorUIResource(getPrimaryControlDarkShadow()),
"ScrollBar.thumbHighlight",
new ColorUIResource(getPrimaryControl()),
+
+ "SplitPane.darkShadow",
+ new ColorUIResource(getControlDarkShadow()),
+ "SplitPane.highlight",
+ new ColorUIResource(getControlHighlight()),
+
+ "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0),
+ "Slider.horizontalThumbIcon",
+ MetalIconFactory.getHorizontalSliderThumbIcon(),
+ "Slider.verticalThumbIcon",
+ MetalIconFactory.getVerticalSliderThumbIcon(),
+ "Slider.trackWidth", new Integer(7),
+ "Slider.majorTickLength", new Integer(6),
+
+ "ToggleButton.background", new ColorUIResource(getControl()),
+ "ToggleButton.border", MetalBorders.getButtonBorder(),
+ "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()),
+ "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()),
+ "ToggleButton.focus", new ColorUIResource(getFocusColor()),
+ "ToggleButton.font", getControlTextFont(),
+ "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()),
+ "ToggleButton.highlight", new ColorUIResource(getControlHighlight()),
+ "ToggleButton.light", new ColorUIResource(getControlHighlight()),
+ "ToggleButton.margin", new Insets(2, 14, 2, 14),
+ "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()),
+ "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()),
+
+ "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(),
+ "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(),
+ "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(),
+ "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true),
+ "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false),
+ "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)),
+ "Tree.background", new ColorUIResource(Color.white),
+ "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)),
+ "Tree.hash", new ColorUIResource(new Color(204, 204, 255)),
+ "Tree.leftChildIndent", new Integer(7),
+ "Tree.rightChildIndent", new Integer(13),
+ "Tree.rowHeight", new Integer(20),
+ "Tree.scrollsOnExpand", Boolean.TRUE,
+ "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)),
+ "Tree.nonSelectionBackground", new ColorUIResource(Color.white),
+ "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)),
+ "Tree.selectionForeground", new ColorUIResource(Color.black),
+ "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)),
+ "Tree.textForeground", new ColorUIResource(Color.black),
+ "Tree.selectionForeground", new ColorUIResource(Color.black),
"PopupMenu.border", new MetalBorders.PopupMenuBorder()
};
defaults.putDefaults(myDefaults);
diff --git a/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java b/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java
index 0892c56e4..ec9bf2b55 100644
--- a/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java
+++ b/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalProgressBarUI.java b/javax/swing/plaf/metal/MetalProgressBarUI.java
index 04ca52f71..96d1988fd 100644
--- a/javax/swing/plaf/metal/MetalProgressBarUI.java
+++ b/javax/swing/plaf/metal/MetalProgressBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalRadioButtonUI.java b/javax/swing/plaf/metal/MetalRadioButtonUI.java
index b4ff10bd5..a668f914e 100644
--- a/javax/swing/plaf/metal/MetalRadioButtonUI.java
+++ b/javax/swing/plaf/metal/MetalRadioButtonUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalRootPaneUI.java b/javax/swing/plaf/metal/MetalRootPaneUI.java
index 5306b6182..4196a4e47 100644
--- a/javax/swing/plaf/metal/MetalRootPaneUI.java
+++ b/javax/swing/plaf/metal/MetalRootPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalScrollBarUI.java b/javax/swing/plaf/metal/MetalScrollBarUI.java
index 17ac88bc7..526dfb50a 100644
--- a/javax/swing/plaf/metal/MetalScrollBarUI.java
+++ b/javax/swing/plaf/metal/MetalScrollBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -129,28 +129,9 @@ public class MetalScrollBarUI
thumbBounds.y + thumbBounds.height);
// draw the pattern
- int xOff = 0;
- for (int y = thumbBounds.y + 4;
- y < (thumbBounds.y + thumbBounds.height - 4); y++)
- {
- // set color alternating with every line
- if ((y % 2) == 0)
- g.setColor(thumbHighlightColor);
- else
- g.setColor(thumbDarkShadowColor);
-
- for (int x = thumbBounds.x + 3 + (xOff);
- x < (thumbBounds.x + thumbBounds.width - 3); x = x + 4)
- {
- g.drawLine(x, y, x, y);
- }
-
- // increase x offset
- xOff++;
- if (xOff > 3)
- xOff = 0;
-
- }
+ MetalUtils.fillMetalPattern(g, thumbBounds.x + 3, thumbBounds.y + 3,
+ thumbBounds.width - 6, thumbBounds.height - 6,
+ thumbHighlightColor, thumbDarkShadowColor);
}
/**
diff --git a/javax/swing/plaf/metal/MetalScrollPaneUI.java b/javax/swing/plaf/metal/MetalScrollPaneUI.java
index 6220ea9e2..3e1198b39 100644
--- a/javax/swing/plaf/metal/MetalScrollPaneUI.java
+++ b/javax/swing/plaf/metal/MetalScrollPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalSeparatorUI.java b/javax/swing/plaf/metal/MetalSeparatorUI.java
index e6c36b4e4..6e78ccb70 100644
--- a/javax/swing/plaf/metal/MetalSeparatorUI.java
+++ b/javax/swing/plaf/metal/MetalSeparatorUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalSliderUI.java b/javax/swing/plaf/metal/MetalSliderUI.java
index fafd21d3e..4b52c4b00 100644
--- a/javax/swing/plaf/metal/MetalSliderUI.java
+++ b/javax/swing/plaf/metal/MetalSliderUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,25 +38,72 @@ exception statement from your version. */
package javax.swing.plaf.metal;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+import java.beans.PropertyChangeListener;
import java.util.HashMap;
+import javax.swing.Icon;
import javax.swing.JComponent;
+import javax.swing.JSlider;
+import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
+import javax.swing.plaf.basic.BasicGraphicsUtils;
import javax.swing.plaf.basic.BasicSliderUI;
+/**
+ * A UI delegate for the {@link JSlider} component.
+ */
public class MetalSliderUI
extends BasicSliderUI
{
+ // TODO: find a use for this
+ protected static Color thumbColor;
+
+ // TODO: find a use for this
+ protected static Color highlightColor;
+
+ // TODO: find a use for this
+ protected static Color darkShadowColor;
+
+ /** The track width. */
+ protected static int trackWidth = UIManager.getInt("Slider.trackWidth");
+
+ /** The length of the major tick marks. */
+ protected static int tickLength = UIManager.getInt("Slider.majorTickLength");
+
+ /** The icon used for the thumb control of horizontally oriented sliders. */
+ protected static Icon horizThumbIcon = UIManager.getIcon(
+ "Slider.horizontalThumbIcon");
+
+ /** The icon used for the thumb control of vertically oriented sliders. */
+ protected static Icon vertThumbIcon = UIManager.getIcon(
+ "Slider.verticalThumbIcon");
+ /** The gap between the track and the tick marks. */
+ protected final int TICK_BUFFER = 4;
+
+ /**
+ * A flag that controls whether or not the track is filled up to the value
+ * of the slider.
+ */
+ protected boolean filledSlider;
+
+ /** A key to look up the filledSlider setting in the {@link UIManager}. */
+ protected final String SLIDER_FILL = "JSlider.isFilled";
+
/** The UI instances for MetalSliderUIs */
private static HashMap instances;
/**
- * Constructs a new instance of MetalSliderUI.
+ * Constructs a new instance.
*/
public MetalSliderUI()
{
super(null);
+ filledSlider = UIManager.getBoolean(SLIDER_FILL);
}
/**
@@ -71,17 +118,225 @@ public class MetalSliderUI
if (instances == null)
instances = new HashMap();
-
Object o = instances.get(component);
MetalSliderUI instance;
if (o == null)
{
- instance = new MetalSliderUI();
- instances.put(component, instance);
+ instance = new MetalSliderUI();
+ instances.put(component, instance);
}
else
instance = (MetalSliderUI) o;
return instance;
}
+
+ public void installUI(JComponent c)
+ {
+ super.installUI(c);
+ Boolean b = (Boolean) c.getClientProperty(SLIDER_FILL);
+ if (b != null)
+ filledSlider = b.booleanValue();
+ }
+
+ /**
+ * Paints the thumb icon for the slider.
+ *
+ * @param g the graphics device.
+ */
+ public void paintThumb(Graphics g)
+ {
+ if (slider.getOrientation() == JSlider.HORIZONTAL)
+ horizThumbIcon.paintIcon(slider, g, thumbRect.x, thumbRect.y);
+ else
+ vertThumbIcon.paintIcon(slider, g, thumbRect.x, thumbRect.y);
+ }
+
+ /**
+ * Creates a property change listener for the slider.
+ *
+ * @param slider the slider.
+ */
+ protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
+ {
+ // TODO: try to figure out why it might be necessary to override this
+ // method as is done in Sun's implementation
+ return super.createPropertyChangeListener(slider);
+ }
+
+ /**
+ * Paints the track along which the thumb control moves.
+ *
+ * @param g the graphics device.
+ */
+ public void paintTrack(Graphics g)
+ {
+ if (slider.getOrientation() == JSlider.HORIZONTAL)
+ {
+ if (filledSlider)
+ {
+ // TODO: fill the track
+ }
+ BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y
+ + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1,
+ getTrackWidth(), Color.darkGray, Color.gray, Color.darkGray,
+ Color.white);
+ }
+ else
+ {
+ if (filledSlider)
+ {
+ // TODO: fill the track
+ }
+ BasicGraphicsUtils.drawEtchedRect(g, trackRect.x + (trackRect.width
+ - getTrackWidth()) / 2, trackRect.y, getTrackWidth(),
+ trackRect.height - 1, Color.darkGray, Color.gray, Color.darkGray,
+ Color.white);
+ }
+ }
+
+ /**
+ * Draws the focus rectangle for the slider. The Metal look and feel
+ * indicates that the {@link JSlider} has the focus by changing the color of
+ * the thumb control - this is handled elsewhere and so this method is empty
+ * (it overrides the method in the {@link BasicSliderUI} class to prevent
+ * a default focus highlight from being drawn).
+ *
+ * @param g the graphics device.
+ */
+ public void paintFocus(Graphics g)
+ {
+ // do nothing as focus is shown by different color on thumb control
+ }
+
+ /**
+ * Returns the size of the thumb icon.
+ *
+ * @return The size of the thumb icon.
+ */
+ protected Dimension getThumbSize()
+ {
+ if (slider.getOrientation() == JSlider.HORIZONTAL)
+ return new Dimension(horizThumbIcon.getIconWidth(),
+ horizThumbIcon.getIconHeight());
+ else
+ return new Dimension(vertThumbIcon.getIconWidth(),
+ vertThumbIcon.getIconHeight());
+ }
+
+ /**
+ * Returns the length of the major tick marks.
+ *
+ * @return The length of the major tick marks.
+ */
+ public int getTickLength()
+ {
+ return tickLength + TICK_BUFFER;
+ }
+
+ /**
+ * Returns the track width.
+ *
+ * @return The track width.
+ */
+ protected int getTrackWidth()
+ {
+ return trackWidth;
+ }
+
+ /**
+ * Returns the track length.
+ *
+ * @return The track length.
+ */
+ protected int getTrackLength()
+ {
+ return (slider.getOrientation() == JSlider.HORIZONTAL
+ ? tickRect.width : tickRect.height);
+ }
+
+ /**
+ * Returns the thumb overhang.
+ *
+ * @return The thumb overhang.
+ */
+ protected int getThumbOverhang()
+ {
+ // TODO: figure out what this is used for
+ return 0;
+ }
+
+ protected void scrollDueToClickInTrack(int dir)
+ {
+ super.scrollDueToClickInTrack(dir);
+ }
+
+ /**
+ * Paints the minor ticks for a slider with a horizontal orientation.
+ *
+ * @param g the graphics device.
+ * @param tickBounds the tick bounds.
+ * @param x the x value for the tick.
+ */
+ protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds,
+ int x)
+ {
+ // Note the incoming 'g' has a translation in place to get us to the
+ // start of the tick rect already...
+ // TODO: get color from UIManager...
+ g.setColor(new Color(153, 153, 204));
+ g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength / 2);
+ }
+
+ /**
+ * Paints the major ticks for a slider with a horizontal orientation.
+ *
+ * @param g the graphics device.
+ * @param tickBounds the tick bounds.
+ * @param x the x value for the tick.
+ */
+ protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds,
+ int x)
+ {
+ // Note the incoming 'g' has a translation in place to get us to the
+ // start of the tick rect already...
+ // TODO: get color from UIManager...
+ g.setColor(new Color(153, 153, 204));
+ g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength);
+ }
+
+ /**
+ * Paints the minor ticks for a slider with a vertical orientation.
+ *
+ * @param g the graphics device.
+ * @param tickBounds the tick bounds.
+ * @param y the y value for the tick.
+ */
+ protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds,
+ int y)
+ {
+ // Note the incoming 'g' has a translation in place to get us to the
+ // start of the tick rect already...
+ // TODO: get color from UIManager...
+ g.setColor(new Color(153, 153, 204));
+ g.drawLine(TICK_BUFFER - 1, y, TICK_BUFFER - 1 + tickLength / 2, y);
+ }
+
+ /**
+ * Paints the major ticks for a slider with a vertical orientation.
+ *
+ * @param g the graphics device.
+ * @param tickBounds the tick bounds.
+ * @param y the y value for the tick.
+ */
+ protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds,
+ int y)
+ {
+ // Note the incoming 'g' has a translation in place to get us to the
+ // start of the tick rect already...
+ // TODO: get color from UIManager...
+ g.setColor(new Color(153, 153, 204));
+ g.drawLine(TICK_BUFFER - 1, y, TICK_BUFFER - 1 + tickLength, y);
+ }
+
}
diff --git a/javax/swing/plaf/metal/MetalSplitPaneDivider.java b/javax/swing/plaf/metal/MetalSplitPaneDivider.java
new file mode 100644
index 000000000..60e9c0559
--- /dev/null
+++ b/javax/swing/plaf/metal/MetalSplitPaneDivider.java
@@ -0,0 +1,84 @@
+/* MetalSplitPaneDivider.java
+Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing.plaf.metal;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+
+import javax.swing.plaf.basic.BasicSplitPaneDivider;
+
+/**
+ * The divider that is used by the MetalSplitPaneUI.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ *
+ */
+class MetalSplitPaneDivider extends BasicSplitPaneDivider
+{
+ /** The dark color in the pattern. */
+ Color dark;
+
+ /** The light color in the pattern. */
+ Color light;
+
+ /**
+ * Creates a new instance of MetalSplitPaneDivider.
+ *
+ * @param ui the <code>MetalSplitPaneUI</code> that uses this divider
+ */
+ public MetalSplitPaneDivider(MetalSplitPaneUI ui, Color light, Color dark)
+ {
+ super(ui);
+ this.light = light;
+ this.dark = dark;
+ }
+
+ /**
+ * Paints the divider.
+ *
+ * @param g the <code>Graphics</code> context to use for painting
+ */
+ public void paint(Graphics g)
+ {
+ //super.paint(g);
+ Dimension s = getSize();
+ MetalUtils.fillMetalPattern(g, 2, 2, s.width - 4, s.height - 4,
+ light, dark);
+ }
+}
diff --git a/javax/swing/plaf/metal/MetalSplitPaneUI.java b/javax/swing/plaf/metal/MetalSplitPaneUI.java
index eda17f508..b7ea8984b 100644
--- a/javax/swing/plaf/metal/MetalSplitPaneUI.java
+++ b/javax/swing/plaf/metal/MetalSplitPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,11 +38,15 @@ exception statement from your version. */
package javax.swing.plaf.metal;
+import java.awt.Color;
import java.util.HashMap;
import javax.swing.JComponent;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSplitPaneUI;
+import javax.swing.plaf.basic.BasicSplitPaneDivider;
public class MetalSplitPaneUI
extends BasicSplitPaneUI
@@ -83,4 +87,20 @@ public class MetalSplitPaneUI
return instance;
}
+
+ /**
+ * Returns the divider that is used by the <code>JSplitPane</code>.
+ *
+ * The divider returned by this method is a {@link BasicSplitPaneDivider}
+ * that is drawn using the Metal look.
+ *
+ * @return the default divider to use for <code>JSplitPane</code>s.
+ */
+ public BasicSplitPaneDivider createDefaultDivider()
+ {
+ UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+ Color light = defaults.getColor("SplitPane.highlight");
+ Color dark = defaults.getColor("SplitPane.darkShadow");
+ return new MetalSplitPaneDivider(this, light, dark);
+ }
}
diff --git a/javax/swing/plaf/metal/MetalTabbedPaneUI.java b/javax/swing/plaf/metal/MetalTabbedPaneUI.java
index 524fc5253..bf50f9172 100644
--- a/javax/swing/plaf/metal/MetalTabbedPaneUI.java
+++ b/javax/swing/plaf/metal/MetalTabbedPaneUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalTextFieldUI.java b/javax/swing/plaf/metal/MetalTextFieldUI.java
index d2e9ea529..d6e50e122 100644
--- a/javax/swing/plaf/metal/MetalTextFieldUI.java
+++ b/javax/swing/plaf/metal/MetalTextFieldUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalTheme.java b/javax/swing/plaf/metal/MetalTheme.java
index 970f83095..d5131af2e 100644
--- a/javax/swing/plaf/metal/MetalTheme.java
+++ b/javax/swing/plaf/metal/MetalTheme.java
@@ -1,5 +1,5 @@
/* MetalTheme.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,215 +45,532 @@ import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
+/**
+ * The base class for themes used by the {@link MetalLookAndFeel}. A default
+ * theme ({@link DefaultMetalTheme}) is provided, or you can create and use
+ * your own.
+ *
+ * @see MetalLookAndFeel#setCurrentTheme(MetalTheme)
+ */
public abstract class MetalTheme
{
private ColorUIResource BLACK = new ColorUIResource(Color.BLACK);
private ColorUIResource WHITE = new ColorUIResource(Color.WHITE);
+ /**
+ * Default constructor.
+ */
public MetalTheme()
{
// Do nothing here.
}
+ /**
+ * Returns the name of the theme.
+ *
+ * @return The name of the theme.
+ */
public abstract String getName();
+ /**
+ * Adds custom entries to the UI defaults table. This method is empty.
+ *
+ * @param table the table.
+ */
public void addCustomEntriesToTable(UIDefaults table)
{
// Do nothing here.
- // This method needs to be overloaded to actuall do something.
+ // This method needs to be overridden to actually do something.
+ // It is called from MetalLookAndFeel.getDefaults().
}
+ /**
+ * Returns the accelerator foreground color. The default implementation
+ * returns the color from {@link #getPrimary1()}.
+ *
+ * @return The accelerator foreground color.
+ */
public ColorUIResource getAcceleratorForeground()
{
return getPrimary1();
}
+ /**
+ * Returns the accelerator selected foreground color. The default
+ * implementation returns the color from {@link #getBlack()}.
+ *
+ * @return The accelerator selected foreground color.
+ */
public ColorUIResource getAcceleratorSelectedForeground()
{
return getBlack();
}
+ /**
+ * Returns the control color. The default implementation returns the color
+ * from {@link #getSecondary3()}.
+ *
+ * @return The control color.
+ */
public ColorUIResource getControl()
{
return getSecondary3();
}
+ /**
+ * Returns the color used for dark shadows on controls. The default
+ * implementation returns the color from {@link #getSecondary1()}.
+ *
+ * @return The color used for dark shadows on controls.
+ */
public ColorUIResource getControlDarkShadow()
{
return getSecondary1();
}
+ /**
+ * Returns the color used for disabled controls. The default implementation
+ * returns the color from {@link #getSecondary1()}.
+ *
+ * @return The color used for disabled controls.
+ */
public ColorUIResource getControlDisabled()
{
return getSecondary2();
}
+ /**
+ * Returns the color used to draw highlights for controls. The default
+ * implementation returns the color from {@link #getWhite()}.
+ *
+ * @return The color used to draw highlights for controls.
+ */
public ColorUIResource getControlHighlight()
{
return getWhite();
}
+ /**
+ * Returns the color used to display control info. The default
+ * implementation returns the color from {@link #getBlack()}.
+ *
+ * @return The color used to display control info.
+ */
public ColorUIResource getControlInfo()
{
return getBlack();
}
+ /**
+ * Returns the color used to draw shadows for controls. The default
+ * implementation returns the color from {@link #getSecondary2()}.
+ *
+ * @return The color used to draw shadows for controls.
+ */
public ColorUIResource getControlShadow()
{
return getSecondary2();
}
+ /**
+ * Returns the color used for text on controls. The default implementation
+ * returns the color from {@link #getControlInfo()}.
+ *
+ * @return The color used for text on controls.
+ */
public ColorUIResource getControlTextColor()
{
return getControlInfo();
}
+ /**
+ * Returns the color used for the desktop background. The default
+ * implementation returns the color from {@link #getPrimary2()}.
+ *
+ * @return The color used for the desktop background.
+ */
public ColorUIResource getDesktopColor()
{
return getPrimary2();
}
+ /**
+ * Returns the color used to draw focus highlights. The default
+ * implementation returns the color from {@link #getPrimary2()}.
+ *
+ * @return The color used to draw focus highlights.
+ */
public ColorUIResource getFocusColor()
{
return getPrimary2();
}
+ /**
+ * Returns the color used to draw highlighted text. The default
+ * implementation returns the color from {@link #getHighlightedTextColor()}.
+ *
+ * @return The color used to draw highlighted text.
+ */
public ColorUIResource getHighlightedTextColor()
{
return getControlTextColor();
}
+ /**
+ * Returns the color used to draw text on inactive controls. The default
+ * implementation returns the color from {@link #getControlDisabled()}.
+ *
+ * @return The color used to draw text on inactive controls.
+ */
public ColorUIResource getInactiveControlTextColor()
{
return getControlDisabled();
}
+ /**
+ * Returns the color used to draw inactive system text. The default
+ * implementation returns the color from {@link #getSecondary2()}.
+ *
+ * @return The color used to draw inactive system text.
+ */
public ColorUIResource getInactiveSystemTextColor()
{
return getSecondary2();
}
+ /**
+ * Returns the background color for menu items. The default implementation
+ * returns the color from {@link #getSecondary3()}.
+ *
+ * @return The background color for menu items.
+ *
+ * @see #getMenuSelectedBackground()
+ */
public ColorUIResource getMenuBackground()
{
return getSecondary3();
}
+ /**
+ * Returns the foreground color for disabled menu items. The default
+ * implementation returns the color from {@link #getSecondary2()}.
+ *
+ * @return The foreground color for disabled menu items.
+ *
+ * @see #getMenuForeground()
+ */
public ColorUIResource getMenuDisabledForeground()
{
- return getSecondary3();
+ return getSecondary2();
}
+ /**
+ * Returns the foreground color for menu items. The default implementation
+ * returns the color from {@link #getBlack()}.
+ *
+ * @return The foreground color for menu items.
+ *
+ * @see #getMenuDisabledForeground()
+ * @see #getMenuSelectedForeground()
+ */
public ColorUIResource getMenuForeground()
{
return getBlack();
}
+ /**
+ * Returns the background color for selected menu items. The default
+ * implementation returns the color from {@link #getPrimary2()}.
+ *
+ * @return The background color for selected menu items.
+ *
+ * @see #getMenuBackground()
+ */
public ColorUIResource getMenuSelectedBackground()
{
return getPrimary2();
}
+ /**
+ * Returns the foreground color for selected menu items. The default
+ * implementation returns the value from {@link #getBlack()}.
+ *
+ * @return The foreground color for selected menu items.
+ *
+ * @see #getMenuForeground()
+ */
public ColorUIResource getMenuSelectedForeground()
{
return getBlack();
}
+ /**
+ * Returns the primary color for controls. The default implementation
+ * returns the color from {@link #getPrimary3()}.
+ *
+ * @return The primary color for controls.
+ */
public ColorUIResource getPrimaryControl()
{
return getPrimary3();
}
+ /**
+ * Returns the primary color for the dark shadow on controls. The default
+ * implementation returns the color from {@link #getPrimary1()}.
+ *
+ * @return The primary color for the dark shadow on controls.
+ */
public ColorUIResource getPrimaryControlDarkShadow()
{
return getPrimary1();
}
+ /**
+ * Returns the primary color for the highlight on controls. The default
+ * implementation returns the color from {@link #getWhite()}.
+ *
+ * @return The primary color for the highlight on controls.
+ */
public ColorUIResource getPrimaryControlHighlight()
{
return getWhite();
}
+ /**
+ * Returns the primary color for the information on controls. The default
+ * implementation returns the color from {@link #getBlack()}.
+ *
+ * @return The primary color for the information on controls.
+ */
public ColorUIResource getPrimaryControlInfo()
{
return getBlack();
}
+ /**
+ * Returns the primary color for the shadow on controls. The default
+ * implementation returns the color from {@link #getPrimary2()}.
+ *
+ * @return The primary color for the shadow on controls.
+ */
public ColorUIResource getPrimaryControlShadow()
{
return getPrimary2();
}
+ /**
+ * Returns the background color for separators. The default implementation
+ * returns the color from {@link #getWhite()}.
+ *
+ * @return The background color for separators.
+ */
public ColorUIResource getSeparatorBackground()
{
return getWhite();
}
+ /**
+ * Returns the foreground color for separators. The default implementation
+ * returns the value from {@link #getPrimary1()}.
+ *
+ * @return The foreground color for separators.
+ */
public ColorUIResource getSeparatorForeground()
{
return getPrimary1();
}
+ /**
+ * Returns the color used for system text. The default implementation
+ * returns the color from {@link #getBlack()}.
+ *
+ * @return The color used for system text.
+ */
public ColorUIResource getSystemTextColor()
{
return getBlack();
}
+ /**
+ * Returns the color used to highlight text. The default implementation
+ * returns the color from {@link #getPrimary3()}.
+ *
+ * @return The color used to highlight text.
+ */
public ColorUIResource getTextHighlightColor()
{
return getPrimary3();
}
+ /**
+ * Returns the color used to display user text. The default implementation
+ * returns the color from {@link #getBlack()}.
+ *
+ * @return The color used to display user text.
+ */
public ColorUIResource getUserTextColor()
{
return getBlack();
}
+ /**
+ * Returns the window background color. The default implementation returns
+ * the color from {@link #getWhite()}.
+ *
+ * @return The window background color.
+ */
public ColorUIResource getWindowBackground()
{
return getWhite();
}
+ /**
+ * Returns the window title background color. The default implementation
+ * returns the color from {@link #getPrimary3()}.
+ *
+ * @return The window title background color.
+ */
public ColorUIResource getWindowTitleBackground()
{
return getPrimary3();
}
+ /**
+ * Returns the window title foreground color. The default implementation
+ * returns the color from {@link #getBlack()}.
+ *
+ * @return The window title foreground color.
+ */
public ColorUIResource getWindowTitleForeground()
{
return getBlack();
}
+ /**
+ * Returns the background color for an inactive window title. The default
+ * implementation returns the color from {@link #getSecondary3()}.
+ *
+ * @return The background color for an inactive window title.
+ */
public ColorUIResource getWindowTitleInactiveBackground()
{
return getSecondary3();
}
+ /**
+ * Returns the foreground color for an inactive window title. The default
+ * implementation returns the color from {@link #getBlack()}.
+ *
+ * @return The foreground color for an inactive window title.
+ */
public ColorUIResource getWindowTitleInactiveForeground()
{
return getBlack();
}
+ /**
+ * Returns the color used for black.
+ *
+ * @return The color used for black.
+ */
protected ColorUIResource getBlack()
{
return BLACK;
}
+ /**
+ * Returns the color used for white.
+ *
+ * @return The color used for white.
+ */
protected ColorUIResource getWhite()
{
return WHITE;
}
+ /**
+ * Returns the first primary color for this theme.
+ *
+ * @return The first primary color.
+ */
protected abstract ColorUIResource getPrimary1();
+
+ /**
+ * Returns the second primary color for this theme.
+ *
+ * @return The second primary color.
+ */
protected abstract ColorUIResource getPrimary2();
+
+ /**
+ * Returns the third primary color for this theme.
+ *
+ * @return The third primary color.
+ */
protected abstract ColorUIResource getPrimary3();
+
+ /**
+ * Returns the first secondary color for this theme.
+ *
+ * @return The first secondary color.
+ */
protected abstract ColorUIResource getSecondary1();
+
+ /**
+ * Returns the second secondary color for this theme.
+ *
+ * @return The second secondary color.
+ */
protected abstract ColorUIResource getSecondary2();
+
+ /**
+ * Returns the third secondary color for this theme.
+ *
+ * @return The third secondary color.
+ */
protected abstract ColorUIResource getSecondary3();
+ /**
+ * Returns the font used for text on controls.
+ *
+ * @return The font used for text on controls.
+ */
public abstract FontUIResource getControlTextFont();
+
+ /**
+ * Returns the font used for text in menus.
+ *
+ * @return The font used for text in menus.
+ */
public abstract FontUIResource getMenuTextFont();
+
+ /**
+ * Returns the font used for sub text.
+ *
+ * @return The font used for sub text.
+ */
public abstract FontUIResource getSubTextFont();
+
+ /**
+ * Returns the font used for system text.
+ *
+ * @return The font used for system text.
+ */
public abstract FontUIResource getSystemTextFont();
+
+ /**
+ * Returns the font used for user text.
+ *
+ * @return The font used for user text.
+ */
public abstract FontUIResource getUserTextFont();
+
+ /**
+ * Returns the font used for window titles.
+ *
+ * @return The font used for window titles.
+ */
public abstract FontUIResource getWindowTitleFont();
+
}
diff --git a/javax/swing/plaf/metal/MetalToggleButtonUI.java b/javax/swing/plaf/metal/MetalToggleButtonUI.java
index 84af36a5e..be6d0c39e 100644
--- a/javax/swing/plaf/metal/MetalToggleButtonUI.java
+++ b/javax/swing/plaf/metal/MetalToggleButtonUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,7 +38,11 @@ exception statement from your version. */
package javax.swing.plaf.metal;
+import java.awt.Color;
+
import javax.swing.JComponent;
+import javax.swing.UIDefaults;
+import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicToggleButtonUI;
@@ -46,7 +50,15 @@ public class MetalToggleButtonUI
extends BasicToggleButtonUI
{
- // FIXME: maybe replace by a Map of instances when this becomes stateful
+ /** The color for the focus border. */
+ protected Color focusColor;
+
+ /** The color that indicates a selected button. */
+ protected Color selectColor;
+
+ /** The color for disabled button labels. */
+ protected Color disabledTextColor;
+
/** The shared UI instance for MetalToggleButtonUIs */
private static MetalToggleButtonUI instance = null;
@@ -56,6 +68,43 @@ public class MetalToggleButtonUI
public MetalToggleButtonUI()
{
super();
+ focusColor = getFocusColor();
+ selectColor = getSelectColor();
+ disabledTextColor = getDisabledTextColor();
+ }
+
+
+ /**
+ * Returns the color for the focus border.
+ *
+ * @return the color for the focus border
+ */
+ protected Color getFocusColor()
+ {
+ UIDefaults def = UIManager.getLookAndFeelDefaults();
+ return def.getColor(getPropertyPrefix() + ".focus");
+ }
+
+ /**
+ * Returns the color that indicates a selected button.
+ *
+ * @return the color that indicates a selected button
+ */
+ protected Color getSelectColor()
+ {
+ UIDefaults def = UIManager.getLookAndFeelDefaults();
+ return def.getColor(getPropertyPrefix() + ".select");
+ }
+
+ /**
+ * Returns the color for the text label of disabled buttons.
+ *
+ * @return the color for the text label of disabled buttons
+ */
+ protected Color getDisabledTextColor()
+ {
+ UIDefaults def = UIManager.getLookAndFeelDefaults();
+ return def.getColor(getPropertyPrefix() + ".disabledText");
}
/**
diff --git a/javax/swing/plaf/metal/MetalToolBarUI.java b/javax/swing/plaf/metal/MetalToolBarUI.java
index 299a4c0a4..39af0011a 100644
--- a/javax/swing/plaf/metal/MetalToolBarUI.java
+++ b/javax/swing/plaf/metal/MetalToolBarUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalToolTipUI.java b/javax/swing/plaf/metal/MetalToolTipUI.java
index 303b6294a..c88b6534a 100644
--- a/javax/swing/plaf/metal/MetalToolTipUI.java
+++ b/javax/swing/plaf/metal/MetalToolTipUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/plaf/metal/MetalTreeUI.java b/javax/swing/plaf/metal/MetalTreeUI.java
index a420204b5..d85d61c24 100644
--- a/javax/swing/plaf/metal/MetalTreeUI.java
+++ b/javax/swing/plaf/metal/MetalTreeUI.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package javax.swing.plaf.metal;
+import java.util.HashMap;
+
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTreeUI;
@@ -46,9 +48,8 @@ public class MetalTreeUI
extends BasicTreeUI
{
- // FIXME: maybe replace by a Map of instances when this becomes stateful
- /** The shared UI instance for MetalTreeUIs */
- private static MetalTreeUI instance = null;
+ /** The UI instances for MetalTreeUIs */
+ private static HashMap instances = null;
/**
* Constructs a new instance of MetalTreeUI.
@@ -67,8 +68,19 @@ public class MetalTreeUI
*/
public static ComponentUI createUI(JComponent component)
{
- if (instance == null)
- instance = new MetalTreeUI();
+ if (instances == null)
+ instances = new HashMap();
+
+ Object o = instances.get(component);
+ MetalTreeUI instance;
+ if (o == null)
+ {
+ instance = new MetalTreeUI();
+ instances.put(component, instance);
+ }
+ else
+ instance = (MetalTreeUI) o;
+
return instance;
}
}
diff --git a/javax/swing/plaf/metal/MetalUtils.java b/javax/swing/plaf/metal/MetalUtils.java
new file mode 100644
index 000000000..a342ee02b
--- /dev/null
+++ b/javax/swing/plaf/metal/MetalUtils.java
@@ -0,0 +1,87 @@
+/* Metaltils.java
+Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing.plaf.metal;
+
+import java.awt.Color;
+import java.awt.Graphics;
+
+/**
+ * Some utility and helper methods for the Metal Look &amp; Feel.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+class MetalUtils
+{
+
+ /**
+ * Fills a rectangle with the typical Metal pattern.
+ *
+ * @param g the <code>Graphics</code> context to use
+ * @param x the X coordinate of the upper left corner of the rectangle to
+ * fill
+ * @param y the Y coordinate of the upper left corner of the rectangle to
+ * fill
+ * @param w the width of the rectangle to fill
+ * @param w the height of the rectangle to fill
+ * @param light the light color to use
+ * @param dark the dark color to use
+ */
+ static void fillMetalPattern(Graphics g, int x, int y, int w, int h,
+ Color light, Color dark)
+ {
+ int xOff = 0;
+ for (int mY = y; mY < (y + h); mY++)
+ {
+ // set color alternating with every line
+ if ((mY % 2) == 0)
+ g.setColor(light);
+ else
+ g.setColor(dark);
+
+ for (int mX = x + (xOff); mX < (x + w); mX += 4)
+ {
+ g.drawLine(mX, mY, mX, mY);
+ }
+
+ // increase x offset
+ xOff++;
+ if (xOff > 3)
+ xOff = 0;
+ }
+ }
+}
diff --git a/javax/swing/plaf/metal/package.html b/javax/swing/plaf/metal/package.html
index 3d125027a..2ea787bb5 100644
--- a/javax/swing/plaf/metal/package.html
+++ b/javax/swing/plaf/metal/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.plaf.metal package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,7 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.plaf.metal</title></head>
<body>
-<p></p>
+<p>Provides a cross-platform look and feel known as "Metal".</p>
</body>
</html>
diff --git a/javax/swing/plaf/package.html b/javax/swing/plaf/package.html
index e4b247aea..c266074f0 100644
--- a/javax/swing/plaf/package.html
+++ b/javax/swing/plaf/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.plaf package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.plaf</title></head>
<body>
-<p></p>
+<p>A base package for the "pluggable look and feel" (plaf) mechanism used by
+the <code>javax.swing</code> classes.</p>
</body>
</html>
diff --git a/javax/swing/table/AbstractTableModel.java b/javax/swing/table/AbstractTableModel.java
index 076487f53..3e9f6e9b3 100644
--- a/javax/swing/table/AbstractTableModel.java
+++ b/javax/swing/table/AbstractTableModel.java
@@ -1,5 +1,5 @@
/* AbstractTableModel.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,7 +46,8 @@ import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
/**
- * AbstractTableModel
+ * A base class that can be used to create implementations of the
+ * {@link TableModel} interface.
*
* @author Andrew Selkirk
*/
@@ -55,58 +56,60 @@ public abstract class AbstractTableModel implements TableModel, Serializable
static final long serialVersionUID = -5798593159423650347L;
/**
- * listenerList
+ * Storage for the listeners registered with this model.
*/
protected EventListenerList listenerList = new EventListenerList();
/**
- * Constructor AbstractTableModel
+ * Creates a default instance.
*/
public AbstractTableModel()
{
- // TODO
+ // no setup required here
}
/**
- * Get the name of the column for this index. If you do not override
- * this methode, you'll get something like: 0, A; 1, B; ...; AA; AB;
- * ...
+ * Returns the name of the specified column. This method generates default
+ * names in a sequence (starting with column 0): A, B, C, ..., Z, AA, AB,
+ * AC, ..., AZ, BA, BB, BC, and so on. Subclasses may override this method
+ * to allow column names to be specified on some other basis.
*
- * @param columnIndex The index of the column.
+ * @param columnIndex the column index.
*
* @return The name of the column.
*/
- public String getColumnName (int columnIndex)
+ public String getColumnName(int columnIndex)
{
- int index = columnIndex + 1;
StringBuffer buffer = new StringBuffer();
-
- while (index > 0)
+ while (columnIndex >= 0)
{
- buffer.insert (0, (char) ('A' + ((index - 1) % 26)));
- index = (index - 1) / 26;
+ buffer.insert (0, (char) ('A' + columnIndex % 26));
+ columnIndex = columnIndex / 26 - 1;
}
-
- // Return column name.
return buffer.toString();
}
/**
- * Return the index of the given name.
+ * Return the index of the specified column, or <code>-1</code> if there is
+ * no column with the specified name.
*
- * @param columnName The name of the column.
+ * @param columnName the name of the column (<code>null</code> not permitted).
*
* @return The index of the column, -1 if not found.
+ *
+ * @see #getColumnName(int)
+ * @throws NullPointerException if <code>columnName</code> is
+ * <code>null</code>.
*/
- public int findColumn (String columnName)
+ public int findColumn(String columnName)
{
int count = getColumnCount();
for (int index = 0; index < count; index++)
{
- String name = getColumnName (index);
+ String name = getColumnName(index);
- if (name.equals (columnName))
+ if (columnName.equals(name))
return index;
}
@@ -115,142 +118,162 @@ public abstract class AbstractTableModel implements TableModel, Serializable
}
/**
- * Returns the class of a comlumn.
- *
- * @param columnIndex The index of the column.
- *
- * @return The class type of the column.
+ * Returns the <code>Class</code> for all <code>Object</code> instances
+ * in the specified column.
+ *
+ * @param columnIndex the column index.
+ *
+ * @return The class.
*/
- public Class getColumnClass (int columnIndex)
+ public Class getColumnClass(int columnIndex)
{
return Object.class;
}
/**
- * Tells whether a cell is editable.
+ * Returns <code>true</code> if the specified cell is editable, and
+ * <code>false</code> if it is not. This implementation returns
+ * <code>false</code> for all arguments, subclasses should override the
+ * method if necessary.
*
- * @param rowIndex The row of the cell.
- * @param columnIndex The index of the cell.
+ * @param rowIndex the row index of the cell.
+ * @param columnIndex the column index of the cell.
*
- * @return True if cell is editable.
+ * @return <code>false</code>.
*/
- public boolean isCellEditable (int rowIndex, int columnIndex)
+ public boolean isCellEditable(int rowIndex, int columnIndex)
{
return false;
}
/**
- * Sets a cell to a value.
+ * Sets the value of the given cell. This implementation ignores all
+ * arguments and does nothing, subclasses should override the
+ * method if necessary.
*
- * @param value New value of cell.
- * @param rowIndex The row of the cell.
- * @param columnIndex The column of the cell.
+ * @param value the new value (<code>null</code> permitted).
+ * @param rowIndex the row index of the cell.
+ * @param columnIndex the column index of the cell.
*/
- public void setValueAt (Object value, int rowIndex, int columnIndex)
+ public void setValueAt(Object value, int rowIndex, int columnIndex)
{
// Do nothing...
}
/**
- * Add a TableModelListener.
+ * Adds a listener to the table model. The listener will receive notification
+ * of all changes to the table model.
*
- * @param listener The listener to add.
+ * @param listener the listener.
*/
- public void addTableModelListener (TableModelListener listener)
+ public void addTableModelListener(TableModelListener listener)
{
- listenerList.add (TableModelListener.class, listener);
+ listenerList.add(TableModelListener.class, listener);
}
/**
- * Removes a TableModelListener.
+ * Removes a listener from the table model so that it will no longer receive
+ * notification of changes to the table model.
*
- * @param listener The listener to remove.
+ * @param listener the listener to remove.
*/
- public void removeTableModelListener (TableModelListener listener)
+ public void removeTableModelListener(TableModelListener listener)
{
- listenerList.remove (TableModelListener.class, listener);
+ listenerList.remove(TableModelListener.class, listener);
}
/**
- * Return all registered TableModelListener objects.
+ * Returns an array containing the listeners that have been added to the
+ * table model.
*
- * @return Array of TableModelListener objects.
+ * @return Array of {@link TableModelListener} objects.
*
* @since 1.4
*/
public TableModelListener[] getTableModelListeners()
{
return (TableModelListener[])
- listenerList.getListeners (TableModelListener.class);
+ listenerList.getListeners(TableModelListener.class);
}
/**
- * fireTableDataChanged
+ * Sends a {@link TableModelEvent} to all registered listeners to inform
+ * them that the table data has changed.
*/
public void fireTableDataChanged()
{
- fireTableChanged (new TableModelEvent (this));
+ fireTableChanged(new TableModelEvent(this, 0, Integer.MAX_VALUE));
}
/**
- * fireTableStructureChanged
+ * Sends a {@link TableModelEvent} to all registered listeners to inform
+ * them that the table structure has changed.
*/
public void fireTableStructureChanged()
{
- fireTableChanged (new TableModelEvent (this, TableModelEvent.HEADER_ROW));
+ fireTableChanged(new TableModelEvent(this, TableModelEvent.HEADER_ROW));
}
/**
- * fireTableRowsInserted
- * @param value0 TODO
- * @param value1 TODO
+ * Sends a {@link TableModelEvent} to all registered listeners to inform
+ * them that some rows have been inserted into the model.
+ *
+ * @param firstRow the index of the first row.
+ * @param lastRow the index of the last row.
*/
public void fireTableRowsInserted (int firstRow, int lastRow)
{
- fireTableChanged (new TableModelEvent (this, firstRow, lastRow,
- TableModelEvent.ALL_COLUMNS,
- TableModelEvent.INSERT));
+ fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
+ TableModelEvent.ALL_COLUMNS,
+ TableModelEvent.INSERT));
}
/**
- * fireTableRowsUpdated
- * @param value0 TODO
- * @param value1 TODO
+ * Sends a {@link TableModelEvent} to all registered listeners to inform
+ * them that some rows have been updated.
+ *
+ * @param firstRow the index of the first row.
+ * @param lastRow the index of the last row.
*/
public void fireTableRowsUpdated (int firstRow, int lastRow)
{
- fireTableChanged (new TableModelEvent (this, firstRow, lastRow,
- TableModelEvent.ALL_COLUMNS,
- TableModelEvent.UPDATE));
+ fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
+ TableModelEvent.ALL_COLUMNS,
+ TableModelEvent.UPDATE));
}
/**
- * fireTableRowsDeleted
- * @param value0 TODO
- * @param value1 TODO
+ * Sends a {@link TableModelEvent} to all registered listeners to inform
+ * them that some rows have been deleted from the model.
+ *
+ * @param firstRow the index of the first row.
+ * @param lastRow the index of the last row.
*/
public void fireTableRowsDeleted(int firstRow, int lastRow)
{
- fireTableChanged (new TableModelEvent (this, firstRow, lastRow,
- TableModelEvent.ALL_COLUMNS,
- TableModelEvent.DELETE));
+ fireTableChanged(new TableModelEvent(this, firstRow, lastRow,
+ TableModelEvent.ALL_COLUMNS,
+ TableModelEvent.DELETE));
}
/**
- * fireTableCellUpdated
- * @param value0 TODO
- * @param value1 TODO
+ * Sends a {@link TableModelEvent} to all registered listeners to inform
+ * them that a single cell has been updated.
+ *
+ * @param row the row index.
+ * @param column the column index.
*/
public void fireTableCellUpdated (int row, int column)
{
- fireTableChanged (new TableModelEvent (this, row, row, column));
+ fireTableChanged(new TableModelEvent(this, row, row, column));
}
/**
- * fireTableChanged
- * @param value0 TODO
+ * Sends the specified event to all registered listeners.
+ *
+ * @param event the event to send.
*/
- public void fireTableChanged (TableModelEvent event)
+ public void fireTableChanged(TableModelEvent event)
{
int index;
TableModelListener listener;
@@ -264,12 +287,15 @@ public abstract class AbstractTableModel implements TableModel, Serializable
}
/**
- * getListeners
- * @param value0 TODO
- * @return EventListener[]
+ * Returns an array of listeners of the given type that are registered with
+ * this model.
+ *
+ * @param listenerType the listener class.
+ *
+ * @return An array of listeners (possibly empty).
*/
- public EventListener[] getListeners (Class listenerType)
+ public EventListener[] getListeners(Class listenerType)
{
- return listenerList.getListeners (listenerType);
+ return listenerList.getListeners(listenerType);
}
}
diff --git a/javax/swing/table/DefaultTableCellRenderer.java b/javax/swing/table/DefaultTableCellRenderer.java
index 1dadf81b5..02e9fd7dc 100644
--- a/javax/swing/table/DefaultTableCellRenderer.java
+++ b/javax/swing/table/DefaultTableCellRenderer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/table/DefaultTableColumnModel.java b/javax/swing/table/DefaultTableColumnModel.java
index 3a8b1a3bf..10871770d 100644
--- a/javax/swing/table/DefaultTableColumnModel.java
+++ b/javax/swing/table/DefaultTableColumnModel.java
@@ -1,5 +1,5 @@
/* DefaultTableColumnModel.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -119,9 +119,11 @@ public class DefaultTableColumnModel
*/
public void addColumn(TableColumn col)
{
+ if (col == null)
+ throw new IllegalArgumentException("Null 'col' argument.");
tableColumns.add(col);
invalidateWidthCache();
- fireColumnAdded(new TableColumnModelEvent(this,0,tableColumns.size()));
+ fireColumnAdded(new TableColumnModelEvent(this, 0, tableColumns.size() - 1));
}
/**
@@ -132,8 +134,10 @@ public class DefaultTableColumnModel
*/
public void removeColumn(TableColumn col)
{
- int index = getColumnIndex(col);
- fireColumnRemoved(new TableColumnModelEvent(this,index,0));
+ int index = this.tableColumns.indexOf(col);
+ if (index < 0)
+ return;
+ fireColumnRemoved(new TableColumnModelEvent(this, index, 0));
tableColumns.remove(col);
invalidateWidthCache();
}
@@ -147,10 +151,14 @@ public class DefaultTableColumnModel
*/
public void moveColumn(int i, int j)
{
- Object tmp = tableColumns.get(i);
- tableColumns.set(i, tableColumns.get(j));
- tableColumns.set(j, tmp);
- fireColumnAdded(new TableColumnModelEvent(this,i,j));
+ int columnCount = getColumnCount();
+ if (i < 0 || i >= columnCount)
+ throw new IllegalArgumentException("Index 'i' out of range.");
+ if (j < 0 || j >= columnCount)
+ throw new IllegalArgumentException("Index 'j' out of range.");
+ Object column = tableColumns.remove(i);
+ tableColumns.add(j, column);
+ fireColumnAdded(new TableColumnModelEvent(this, i, j));
}
/**
@@ -182,14 +190,27 @@ public class DefaultTableColumnModel
}
/**
- * getColumnIndex returns index of the specified column
+ * Returns the index of the {@link TableColumn} with the given identifier.
*
- * @param identifier identifier of the column
- * @return int index of the given column
+ * @param identifier the identifier (<code>null</code> not permitted).
+ *
+ * @return The index of the {@link TableColumn} with the given identifier.
+ *
+ * @throws IllegalArgumentException if <code>identifier</code> is
+ * <code>null</code> or there is no column with that identifier.
*/
public int getColumnIndex(Object identifier)
{
- return tableColumns.indexOf(identifier, 0);
+ if (identifier == null)
+ throw new IllegalArgumentException("Null identifier.");
+ int columnCount = tableColumns.size();
+ for (int i = 0; i < columnCount; i++)
+ {
+ TableColumn tc = (TableColumn) tableColumns.get(i);
+ if (identifier.equals(tc.getIdentifier()))
+ return i;
+ }
+ throw new IllegalArgumentException("No TableColumn with that identifier.");
}
/**
diff --git a/javax/swing/table/DefaultTableModel.java b/javax/swing/table/DefaultTableModel.java
index aab420201..6844f2a27 100644
--- a/javax/swing/table/DefaultTableModel.java
+++ b/javax/swing/table/DefaultTableModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -61,7 +61,7 @@ public class DefaultTableModel extends AbstractTableModel
protected Vector dataVector;
/**
- * columnIdentifiers
+ * Storage for the column identifiers.
*/
protected Vector columnIdentifiers;
@@ -160,7 +160,7 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Returns the vector containing the row data for the table.
*
- * @returns The data vector.
+ * @return The data vector.
*/
public Vector getDataVector()
{
@@ -181,11 +181,11 @@ public class DefaultTableModel extends AbstractTableModel
*/
public void setDataVector(Vector data, Vector columnNames)
{
- dataVector = data;
- columnIdentifiers = columnNames;
- for (int r = 0; r < data.size(); r++) {
- ((Vector) dataVector.get(r)).setSize(columnNames.size());
- }
+ if (data == null)
+ dataVector = new Vector();
+ else
+ dataVector = data;
+ setColumnIdentifiers(columnNames);
}
/**
@@ -281,7 +281,7 @@ public class DefaultTableModel extends AbstractTableModel
* If <code>rowCount</code> is greater than the current number of rows in
* the table, new (empty) rows are added.
*
- * @param the row count.
+ * @param rowCount the row count.
*/
public void setRowCount(int rowCount)
{
@@ -319,7 +319,7 @@ public class DefaultTableModel extends AbstractTableModel
}
if (columnIdentifiers != null)
columnIdentifiers.setSize(columnCount);
- fireTableDataChanged();
+ fireTableStructureChanged();
}
/**
@@ -385,7 +385,7 @@ public class DefaultTableModel extends AbstractTableModel
((Vector) dataVector.get(i)).add(columnData == null ? null : columnData[i]);
}
columnIdentifiers.add(columnName);
- fireTableDataChanged();
+ fireTableStructureChanged();
}
/**
@@ -395,9 +395,10 @@ public class DefaultTableModel extends AbstractTableModel
* @param rowData the row data (<code>null</code> permitted).
*/
public void addRow(Vector rowData) {
+ int rowIndex = dataVector.size();
dataVector.add(rowData);
newRowsAdded(new TableModelEvent(
- this, dataVector.size(), dataVector.size(), -1, TableModelEvent.INSERT)
+ this, rowIndex, rowIndex, -1, TableModelEvent.INSERT)
);
}
@@ -450,7 +451,9 @@ public class DefaultTableModel extends AbstractTableModel
{
dataVector.insertElementAt(removed.get(i), toIndex);
}
- fireTableDataChanged();
+ int firstRow = Math.min(startIndex, toIndex);
+ int lastRow = Math.max(endIndex, toIndex + (endIndex - startIndex));
+ fireTableRowsUpdated(firstRow, lastRow);
}
/**
@@ -465,8 +468,9 @@ public class DefaultTableModel extends AbstractTableModel
}
/**
- * getRowCount
- * @returns int
+ * Returns the number of rows in the model.
+ *
+ * @return The row count.
*/
public int getRowCount() {
return dataVector.size();
@@ -486,7 +490,7 @@ public class DefaultTableModel extends AbstractTableModel
*
* @param column the column index.
*
- * @returns The column name.
+ * @return The column name.
*/
public String getColumnName(int column) {
String result = "";
@@ -502,6 +506,8 @@ public class DefaultTableModel extends AbstractTableModel
else
result = super.getColumnName(column);
}
+ else
+ result = super.getColumnName(column);
}
return result;
}
@@ -514,7 +520,7 @@ public class DefaultTableModel extends AbstractTableModel
* @param row the row index.
* @param column the column index.
*
- * @returns <code>true</code> in all cases.
+ * @return <code>true</code> in all cases.
*/
public boolean isCellEditable(int row, int column) {
return true;
@@ -526,8 +532,8 @@ public class DefaultTableModel extends AbstractTableModel
* @param row the row index.
* @param column the column index.
*
- * @returns The value (<code>Object</code>, possibly <code>null</code>) at
- * the specified cell in the table.
+ * @return The value (<code>Object</code>, possibly <code>null</code>) at
+ * the specified cell in the table.
*/
public Object getValueAt(int row, int column) {
return ((Vector) dataVector.get(row)).get(column);
@@ -551,8 +557,8 @@ public class DefaultTableModel extends AbstractTableModel
*
* @param data the data array (<code>null</code> permitted).
*
- * @returns A vector (or <code>null</code> if the data array
- * is <code>null</code>).
+ * @return A vector (or <code>null</code> if the data array
+ * is <code>null</code>).
*/
protected static Vector convertToVector(Object[] data) {
if (data == null)
@@ -566,10 +572,10 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Converts the data array to a <code>Vector</code> of rows.
*
- * @param the data array (<code>null</code> permitted).
+ * @param data the data array (<code>null</code> permitted).
*
- * @returns A vector (or <code>null</code> if the data array
- * is <code>null</code>.
+ * @return A vector (or <code>null</code> if the data array
+ * is <code>null</code>.
*/
protected static Vector convertToVector(Object[][] data) {
if (data == null)
diff --git a/javax/swing/table/JTableHeader.java b/javax/swing/table/JTableHeader.java
index 0f538ed24..45586da20 100644
--- a/javax/swing/table/JTableHeader.java
+++ b/javax/swing/table/JTableHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -356,11 +356,21 @@ public class JTableHeader extends JComponent
TableCellRenderer cellRenderer;
+ /**
+ * Creates a new default instance.
+ */
public JTableHeader()
{
this(null);
}
+ /**
+ * Creates a new header. If <code>cm</code> is <code>null</code>, a new
+ * table column model is created by calling
+ * {@link #createDefaultColumnModel()}.
+ *
+ * @param cm the table column model (<code>null</code> permitted).
+ */
public JTableHeader(TableColumnModel cm)
{
accessibleContext = new AccessibleJTableHeader();
@@ -377,6 +387,11 @@ public class JTableHeader extends JComponent
updateUI();
}
+ /**
+ * Creates a default table column model.
+ *
+ * @return A default table column model.
+ */
protected TableColumnModel createDefaultColumnModel()
{
return new DefaultTableColumnModel();
@@ -572,16 +587,31 @@ public class JTableHeader extends JComponent
updateTableInRealTime = u;
}
+ /**
+ * Creates a default renderer.
+ *
+ * @return A default renderer.
+ */
protected TableCellRenderer createDefaultRenderer()
{
return new DefaultTableCellRenderer();
}
-
+
+ /**
+ * Returns the default table cell renderer.
+ *
+ * @return The default table cell renderer.
+ */
public TableCellRenderer getDefaultRenderer()
{
return cellRenderer;
}
+ /**
+ * Sets the default table cell renderer.
+ *
+ * @param cellRenderer the renderer.
+ */
public void setDefaultRenderer(TableCellRenderer cellRenderer)
{
this.cellRenderer = cellRenderer;
@@ -621,6 +651,13 @@ public class JTableHeader extends JComponent
setUI((TableHeaderUI) UIManager.getUI(this));
}
+ /**
+ * Returns the index of the column at the specified point.
+ *
+ * @param point the point.
+ *
+ * @return The column index, or -1.
+ */
public int columnAtPoint(Point point)
{
if (getBounds().contains(point))
diff --git a/javax/swing/table/TableCellEditor.java b/javax/swing/table/TableCellEditor.java
index d83812c1a..b355311dc 100644
--- a/javax/swing/table/TableCellEditor.java
+++ b/javax/swing/table/TableCellEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/table/TableCellRenderer.java b/javax/swing/table/TableCellRenderer.java
index 580226b3f..639b4b9ad 100644
--- a/javax/swing/table/TableCellRenderer.java
+++ b/javax/swing/table/TableCellRenderer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/table/TableColumn.java b/javax/swing/table/TableColumn.java
index c2de7f0e1..9c36bb05a 100644
--- a/javax/swing/table/TableColumn.java
+++ b/javax/swing/table/TableColumn.java
@@ -1,5 +1,5 @@
/* TableColumn.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,13 +38,16 @@ exception statement from your version. */
package javax.swing.table;
+import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.Serializable;
import javax.swing.event.SwingPropertyChangeSupport;
/**
- * TableColumn
+ * Represents the attributes of a column in a table, including the column index,
+ * width, minimum width, preferred width and maximum width.
+ *
* @author Andrew Selkirk
* @version 1.0
*/
@@ -54,52 +57,53 @@ public class TableColumn
static final long serialVersionUID = -6113660025878112608L;
/**
- * COLUMN_WIDTH_PROPERTY
+ * The name for the <code>columnWidth</code> property. Note that the typo
+ * in the name value is deliberate, to match the specification.
*/
public static final String COLUMN_WIDTH_PROPERTY = "columWidth";
/**
- * HEADER_VALUE_PROPERTY
+ * The name for the <code>headerValue</code> property.
*/
public static final String HEADER_VALUE_PROPERTY = "headerValue";
/**
- * HEADER_RENDERER_PROPERTY
+ * The name for the <code>headerRenderer</code> property.
*/
public static final String HEADER_RENDERER_PROPERTY = "headerRenderer";
/**
- * CELL_RENDERER_PROPERTY
+ * The name for the <code>cellRenderer</code> property.
*/
public static final String CELL_RENDERER_PROPERTY = "cellRenderer";
/**
- * modelIndex
+ * The index of the corresponding column in the table model.
*/
protected int modelIndex;
/**
- * identifier
+ * The identifier for the column.
*/
protected Object identifier;
/**
- * width
+ * The width.
*/
protected int width;
/**
- * minWidth
+ * The minimum width.
*/
protected int minWidth = 15;
/**
- * preferredWidth
+ * The preferred width.
*/
private int preferredWidth;
/**
- * maxWidth
+ * The maximum width.
*/
protected int maxWidth = Integer.MAX_VALUE;
@@ -109,7 +113,7 @@ public class TableColumn
protected TableCellRenderer headerRenderer;
/**
- * headerValue
+ * The header value.
*/
protected Object headerValue;
@@ -142,7 +146,8 @@ public class TableColumn
new SwingPropertyChangeSupport(this);
/**
- * Constructor TableColumn
+ * Creates a new <code>TableColumn</code> that maps to column 0 in the
+ * related table model. The default width is <code>75</code> units.
*/
public TableColumn()
{
@@ -150,7 +155,8 @@ public class TableColumn
}
/**
- * Constructor TableColumn
+ * Creates a new <code>TableColumn</code> that maps to the specified column
+ * in the related table model. The default width is <code>75</code> units.
*
* @param modelIndex the index of the column in the model
*/
@@ -160,7 +166,8 @@ public class TableColumn
}
/**
- * Constructor TableColumn
+ * Creates a new <code>TableColumn</code> that maps to the specified column
+ * in the related table model, and has the specified <code>width</code>.
*
* @param modelIndex the index of the column in the model
* @param width the width
@@ -171,12 +178,14 @@ public class TableColumn
}
/**
- * Constructor TableColumn
+ * Creates a new <code>TableColumn</code> that maps to the specified column
+ * in the related table model, and has the specified <code>width</code>,
+ * <code>cellRenderer</code> and <code>cellEditor</code>.
*
* @param modelIndex the index of the column in the model
* @param width the width
- * @param cellRenderer the cell renderer
- * @param cellEditor the cell editor
+ * @param cellRenderer the cell renderer (<code>null</code> permitted).
+ * @param cellEditor the cell editor (<code>null</code> permitted).
*/
public TableColumn(int modelIndex, int width,
TableCellRenderer cellRenderer, TableCellEditor cellEditor)
@@ -230,9 +239,10 @@ public class TableColumn
}
/**
- * setModelIndex
+ * Sets the index of the column in the related {@link TableModel} that this
+ * <code>TableColumn</code> maps to.
*
- * @param modelIndex the index to set
+ * @param modelIndex the column index in the model.
*/
public void setModelIndex(int modelIndex)
{
@@ -240,7 +250,8 @@ public class TableColumn
}
/**
- * getModelIndex
+ * Returns the index of the column in the related {@link TableModel} that
+ * this <code>TableColumn</code> maps to.
*
* @return the model index
*/
@@ -250,7 +261,7 @@ public class TableColumn
}
/**
- * setIdentifier
+ * Sets the identifier for the column.
*
* @param identifier the identifier
*/
@@ -260,9 +271,11 @@ public class TableColumn
}
/**
- * getIdentifier
+ * Returns the identifier for the column, or {@link #getHeaderValue()} if the
+ * identifier is <code>null</code>.
*
- * @return the identifier
+ * @return The identifier (or {@link #getHeaderValue()} if the identifier is
+ * <code>null</code>).
*/
public Object getIdentifier()
{
@@ -272,7 +285,9 @@ public class TableColumn
}
/**
- * setHeaderValue
+ * Sets the header value and sends a {@link PropertyChangeEvent} to all
+ * registered listeners. The header value property uses the name
+ * {@link #HEADER_VALUE_PROPERTY}.
*
* @param headerValue the value of the header
*/
@@ -287,7 +302,7 @@ public class TableColumn
}
/**
- * getHeaderValue
+ * Returns the header value.
*
* @return the value of the header
*/
@@ -299,7 +314,7 @@ public class TableColumn
/**
* setHeaderRenderer
*
- * @param headerRenderer the renderer to se
+ * @param renderer the renderer to use
*/
public void setHeaderRenderer(TableCellRenderer renderer)
{
@@ -322,9 +337,10 @@ public class TableColumn
}
/**
- * setCellRenderer
+ * Sets the renderer for cells in this column and sends a
+ * {@link PropertyChangeEvent} to all registered listeners.
*
- * @param cellRenderer the cell renderer
+ * @param renderer the cell renderer (<code>null</code> permitted).
*/
public void setCellRenderer(TableCellRenderer renderer)
{
@@ -338,9 +354,9 @@ public class TableColumn
}
/**
- * getCellRenderer
+ * Returns the renderer for the table cells in this column.
*
- * @return the cell renderer
+ * @return The cell renderer.
*/
public TableCellRenderer getCellRenderer()
{
@@ -425,9 +441,10 @@ public class TableColumn
}
/**
- * setMinWidth
+ * Sets the minimum width for the column and, if necessary, updates the
+ * <code>width</code> and <code>preferredWidth</code>.
*
- * @param minWidth the minium width
+ * @param minWidth the minimum width
*/
public void setMinWidth(int minWidth)
{
@@ -437,9 +454,9 @@ public class TableColumn
}
/**
- * getMinWidth
+ * Returns the <code>TableColumn</code>'s minimum width.
*
- * @return the minimum width
+ * @return The minimum width.
*/
public int getMinWidth()
{
@@ -447,7 +464,8 @@ public class TableColumn
}
/**
- * setMaxWidth
+ * Sets the maximum width and, if necessary, updates the <code>width</code>
+ * and <code>preferredWidth</code>.
*
* @param maxWidth the maximum width
*/
@@ -459,8 +477,9 @@ public class TableColumn
}
/**
- * getMaxWidth
- * @return the maximim width
+ * Returns the maximum width.
+ *
+ * @return The maximum width.
*/
public int getMaxWidth()
{
@@ -498,8 +517,7 @@ public class TableColumn
}
/**
- * disableResizedPosting
- *
+ * This method is empty, unused and deprecated.
* @deprecated 1.3
*/
public void disableResizedPosting()
@@ -508,8 +526,7 @@ public class TableColumn
}
/**
- * enableResizedPosting
- *
+ * This method is empty, unused and deprecated.
* @deprecated 1.3
*/
public void enableResizedPosting()
@@ -518,8 +535,9 @@ public class TableColumn
}
/**
- * addPropertyChangeListener
- * @param listener the listener to all
+ * Adds a property change listener.
+ *
+ * @param listener the listener to add
*/
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
{
@@ -536,6 +554,7 @@ public class TableColumn
}
/**
+ * Returns the property change listeners for this <code>TableColumn</code>.
* @since 1.4
*/
public PropertyChangeListener[] getPropertyChangeListeners()
diff --git a/javax/swing/table/TableColumnModel.java b/javax/swing/table/TableColumnModel.java
index 1c036d8a1..76a145604 100644
--- a/javax/swing/table/TableColumnModel.java
+++ b/javax/swing/table/TableColumnModel.java
@@ -1,5 +1,5 @@
/* TableColumnModel.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,29 +40,39 @@ package javax.swing.table;
import java.util.Enumeration;
+import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.TableColumnModelListener;
/**
- * TableColumnModel public interface
+ * The interface used by {@link JTable} to access the columns in the table
+ * view.
+ *
* @author Andrew Selkirk
*/
public interface TableColumnModel
{
/**
- * addColumn
- * @param column TableColumn
+ * Adds a column to the model.
+ *
+ * @param column the new column (<code>null</code> not permitted).
+ *
+ * @throws IllegalArgumentException if <code>column</code> is
+ * <code>null</code>.
*/
void addColumn(TableColumn column);
/**
- * removeColumn
+ * Removes a column from the model. If <code>column</code> is not defined
+ * in the model, this method does nothing.
+ *
* @param column TableColumn
*/
void removeColumn(TableColumn column);
/**
- * moveColumn
+ * Moves a column.
+ *
* @param columnIndex Index of column to move
* @param newIndex New index of column
*/
@@ -75,8 +85,9 @@ public interface TableColumnModel
void setColumnMargin(int margin);
/**
- * getColumnCount
- * @return Column count
+ * Returns the number of columns in the model.
+ *
+ * @return The column count
*/
int getColumnCount();
@@ -87,20 +98,30 @@ public interface TableColumnModel
Enumeration getColumns();
/**
- * getColumnIndex
- * @param columnIdentifier Column id
+ * Returns the index of the {@link TableColumn} with the given identifier.
+ *
+ * @param identifier the identifier (<code>null</code> not permitted).
+ *
+ * @return The index of the {@link TableColumn} with the given identifier.
+ *
+ * @throws IllegalArgumentException if <code>identifier</code> is
+ * <code>null</code> or there is no column with that identifier.
*/
int getColumnIndex(Object columnIdentifier);
/**
- * getColumn
- * @param columnIndex Index of column
+ * Returns the <code>TableColumn</code> at the specified index.
+ *
+ * @param columnIndex the column index.
+ *
+ * @return The table column.
*/
TableColumn getColumn(int columnIndex);
/**
- * getColumnMargin
- * @return Column margin
+ * Returns the column margin.
+ *
+ * @return The column margin.
*/
int getColumnMargin();
diff --git a/javax/swing/table/TableModel.java b/javax/swing/table/TableModel.java
index 591ce4342..016ae171d 100644
--- a/javax/swing/table/TableModel.java
+++ b/javax/swing/table/TableModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,8 +42,8 @@ import javax.swing.event.TableModelListener;
/**
* A <code>TableModel</code> is a two dimensional data structure that
* can store arbitrary <code>Object</code> instances, usually for the
- * purpose of display in a {@link JTable} component. Individual objects
- * can be accessed by specifying the row index and column index for
+ * purpose of display in a {@link javax.swing.JTable} component. Individual
+ * objects can be accessed by specifying the row index and column index for
* the object. Each column in the model has a name associated with it.
* <p>
* The {@link DefaultTableModel} class provides one implementation of
diff --git a/javax/swing/table/package.html b/javax/swing/table/package.html
index 93c6de184..84e6f1aa3 100644
--- a/javax/swing/table/package.html
+++ b/javax/swing/table/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.table package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.table</title></head>
<body>
-<p></p>
+<p>Interfaces and classes that support the {@link javax.swing.JTable}
+component.</p>
</body>
</html>
diff --git a/javax/swing/text/AbstractDocument.java b/javax/swing/text/AbstractDocument.java
index efeb85db6..58d85732b 100644
--- a/javax/swing/text/AbstractDocument.java
+++ b/javax/swing/text/AbstractDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -108,16 +108,7 @@ public abstract class AbstractDocument
public Position createPosition(final int offset) throws BadLocationException
{
- if (offset < 0 || offset > getLength())
- throw new BadLocationException(getText(0, getLength()), offset);
-
- return new Position()
- {
- public int getOffset()
- {
- return offset;
- }
- };
+ return content.createPosition(offset);
}
protected void fireChangedUpdate(DocumentEvent event)
@@ -847,15 +838,28 @@ public abstract class AbstractDocument
public class LeafElement extends AbstractElement
{
private static final long serialVersionUID = 5115368706941283802L;
- int start;
- int end;
+
+ /** Manages the start offset of this element. */
+ Position startPos;
+
+ /** Manages the end offset of this element. */
+ Position endPos;
public LeafElement(Element parent, AttributeSet attributes, int start,
int end)
{
super(parent, attributes);
- this.start = start;
- this.end = end;
+ try
+ {
+ startPos = parent.getDocument().createPosition(start);
+ endPos = parent.getDocument().createPosition(end);
+ }
+ catch (BadLocationException ex)
+ {
+ throw new AssertionError("BadLocationException must not be thrown "
+ + "here. start=" + start + ", end=" + end
+ + ", length=" + getLength());
+ }
}
public Enumeration children()
@@ -885,7 +889,7 @@ public abstract class AbstractDocument
public int getEndOffset()
{
- return end;
+ return endPos.getOffset();
}
public String getName()
@@ -895,7 +899,7 @@ public abstract class AbstractDocument
public int getStartOffset()
{
- return start;
+ return startPos.getOffset();
}
public boolean isLeaf()
diff --git a/javax/swing/text/AttributeSet.java b/javax/swing/text/AttributeSet.java
index 68d36bcf4..87e7b98af 100644
--- a/javax/swing/text/AttributeSet.java
+++ b/javax/swing/text/AttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/BadLocationException.java b/javax/swing/text/BadLocationException.java
index 01463d139..e1a2ebcc6 100644
--- a/javax/swing/text/BadLocationException.java
+++ b/javax/swing/text/BadLocationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/BoxView.java b/javax/swing/text/BoxView.java
new file mode 100644
index 000000000..79a3123bf
--- /dev/null
+++ b/javax/swing/text/BoxView.java
@@ -0,0 +1,87 @@
+/* BoxView.java -- An composite view
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text;
+
+import java.awt.Graphics;
+import java.awt.Shape;
+
+// TODO: Implement this class.
+public class BoxView
+ extends CompositeView
+{
+
+ /**
+ * Creates a new <code>BoxView</code> for the given
+ * <code>Element</code>.
+ *
+ * @param element the element that is rendered by this BoxView
+ */
+ public BoxView(Element element)
+ {
+ super(element);
+ }
+
+
+ /**
+ * Renders the <code>Element</code> that is associated with this
+ * <code>View</code>.
+ *
+ * @param g the <code>Graphics</code> context to render to
+ * @param a the allocated region for the <code>Element</code>
+ */
+ public void paint(Graphics g, Shape a)
+ {
+ // TODO: Implement me.
+ }
+
+
+ /**
+ * Returns the preferred span of the content managed by this
+ * <code>View</code> along the specified <code>axis</code>.
+ *
+ * @param axis the axis
+ *
+ * @return the preferred span of this <code>View</code>.
+ */
+ public float getPreferredSpan(int axis)
+ {
+ // TODO: Implement me.
+ return 0F;
+ }
+}
diff --git a/javax/swing/text/Caret.java b/javax/swing/text/Caret.java
index 62263a62a..46072ef19 100644
--- a/javax/swing/text/Caret.java
+++ b/javax/swing/text/Caret.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/ChangedCharSetException.java b/javax/swing/text/ChangedCharSetException.java
index bf592a65a..7fba29a30 100644
--- a/javax/swing/text/ChangedCharSetException.java
+++ b/javax/swing/text/ChangedCharSetException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/ComponentView.java b/javax/swing/text/ComponentView.java
index 0305a7174..744d537ae 100644
--- a/javax/swing/text/ComponentView.java
+++ b/javax/swing/text/ComponentView.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/CompositeView.java b/javax/swing/text/CompositeView.java
new file mode 100644
index 000000000..3dc46fc8e
--- /dev/null
+++ b/javax/swing/text/CompositeView.java
@@ -0,0 +1,84 @@
+/* CompositeView.java -- An abstract view that manages child views
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text;
+
+import java.awt.Shape;
+
+// TODO: Implement this class.
+public abstract class CompositeView
+ extends View
+{
+
+ /**
+ * Creates a new <code>CompositeView</code> for the given
+ * <code>Element</code>.
+ *
+ * @param element the element that is rendered by this CompositeView
+ */
+ public CompositeView(Element element)
+ {
+ super(element);
+ }
+
+ /**
+ * Maps a position in the document into the coordinate space of the View.
+ * The output rectangle usually reflects the font height but has a width
+ * of zero.
+ *
+ * @param pos the position of the character in the model
+ * @param a the area that is occupied by the view
+ * @param bias either {@link Position.Bias.Forward} or
+ * {@link Position.Bias.Backward} depending on the preferred
+ * direction bias. If <code>null</code> this defaults to
+ * <code>Position.Bias.Forward</code>
+ *
+ * @return a rectangle that gives the location of the document position
+ * inside the view coordinate space
+ *
+ * @throws BadLocationException if <code>pos</code> is invalid
+ * @throws IllegalArgumentException if b is not one of the above listed
+ * valid values
+ */
+ public Shape modelToView(int pos, Shape a, Position.Bias b)
+ throws BadLocationException
+ {
+ // Implement me.
+ return null;
+ }
+}
diff --git a/javax/swing/text/DateFormatter.java b/javax/swing/text/DateFormatter.java
new file mode 100644
index 000000000..869f9a090
--- /dev/null
+++ b/javax/swing/text/DateFormatter.java
@@ -0,0 +1,85 @@
+/* DateFormatter.java --
+Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing.text;
+
+import java.text.DateFormat;
+
+/**
+ * <code>DateFormatter</code> is an {@link InternationalFormatter}
+ * that implements value to string and string to value conversion via
+ * an instance of {@link DateFormat}.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+public class DateFormatter extends InternationalFormatter
+{
+
+ /** The serialVersoinUID. */
+ private static final long serialVersionUID = 5423279572591848797L;
+
+ /**
+ * Creates a new instance using the default {@link DateFormat} object
+ * returned by {@link DateFormat#getDateInstance()}.
+ */
+ public DateFormatter()
+ {
+ this(DateFormat.getDateInstance());
+ }
+
+ /**
+ * Creates a new instance of <code>DateFormatter</code> using the
+ * specified <code>DateFormat</code>
+ *
+ * @param format the <code>DateFormat</code> to use
+ */
+ public DateFormatter(DateFormat format)
+ {
+ super();
+ setFormat(format);
+ }
+
+ /**
+ * Sets the format that is used by this <code>DateFormatter</code>.
+ *
+ * @param format the <code>DateFormat</code> to use
+ */
+ public void setFormat(DateFormat format)
+ {
+ super.setFormat(format);
+ }
+}
diff --git a/javax/swing/text/DefaultCaret.java b/javax/swing/text/DefaultCaret.java
index e4d51946f..b57b36563 100644
--- a/javax/swing/text/DefaultCaret.java
+++ b/javax/swing/text/DefaultCaret.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/DefaultEditorKit.java b/javax/swing/text/DefaultEditorKit.java
index 891731f36..aa2fbe850 100644
--- a/javax/swing/text/DefaultEditorKit.java
+++ b/javax/swing/text/DefaultEditorKit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -92,6 +92,16 @@ public class DefaultEditorKit extends EditorKit
}
}
+ /**
+ * This action is executed as default action when a KEY_TYPED
+ * event is received and no keymap entry exists for that. The purpose
+ * of this action is to filter out a couple of characters. This includes
+ * the control characters and characters with the ALT-modifier.
+ *
+ * If an event does not get filtered, it is inserted into the document
+ * of the text component. If there is some text selected in the text component,
+ * this text will be replaced.
+ */
public static class DefaultKeyTypedAction
extends TextAction
{
@@ -102,6 +112,13 @@ public class DefaultEditorKit extends EditorKit
public void actionPerformed(ActionEvent event)
{
+ // first we filter the following events:
+ // - control characters
+ // - key events with the ALT modifier (FIXME: filter that too!)
+ char c = event.getActionCommand().charAt(0);
+ if (Character.isISOControl(c))
+ return;
+
JTextComponent t = getTextComponent(event);
if (t != null)
{
@@ -119,6 +136,11 @@ public class DefaultEditorKit extends EditorKit
}
}
+ /**
+ * This action inserts a newline character into the document
+ * of the text component. This is typically triggered by hitting
+ * ENTER on the keyboard.
+ */
public static class InsertBreakAction
extends TextAction
{
@@ -129,6 +151,8 @@ public class DefaultEditorKit extends EditorKit
public void actionPerformed(ActionEvent event)
{
+ JTextComponent t = getTextComponent(event);
+ t.replaceSelection("\n");
}
}
diff --git a/javax/swing/text/DefaultFormatter.java b/javax/swing/text/DefaultFormatter.java
new file mode 100644
index 000000000..c97d90703
--- /dev/null
+++ b/javax/swing/text/DefaultFormatter.java
@@ -0,0 +1,429 @@
+/* DefaultFormatter.java --
+Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing.text;
+
+import java.io.Serializable;
+import java.lang.reflect.Constructor;
+import java.text.ParseException;
+
+import javax.swing.JFormattedTextField;
+
+/**
+ * The <code>DefaultFormatter</code> is a concrete formatter for use in
+ * {@link JFormattedTextField}s.
+ *
+ * It can format arbitrary values by invoking
+ * their {@link Object#toString} method.
+ *
+ * In order to convert a String back to
+ * a value, the value class must provide a single argument constructor that
+ * takes a String object as argument value. If no such constructor is found,
+ * the String itself is passed back by #stringToValue.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+public class DefaultFormatter
+ extends JFormattedTextField.AbstractFormatter
+ implements Cloneable, Serializable
+{
+
+ /**
+ * A {@link DocumentFilter} that intercepts modification of the
+ * JFormattedTextField's Document and commits the value depending
+ * on the value of the <code>commitsOnValidEdit</code> property.
+ *
+ */
+ // FIXME: Handle allowsInvalid and overwriteMode properties
+ private class FormatterDocumentFilter
+ extends DocumentFilter
+ {
+ /**
+ * Invoked when text is removed from a text component.
+ *
+ * @param bypass the FilterBypass to use to mutate the document
+ * @param offset the start position of the modification
+ * @param length the length of the removed text
+ *
+ * @throws BadLocationException if offset or lenght are invalid in
+ * the Document
+ */
+ public void remove(DocumentFilter.FilterBypass bypass, int offset,
+ int length)
+ throws BadLocationException
+ {
+ super.remove(bypass, offset, length);
+ checkValidInput();
+ commitIfAllowed();
+ }
+
+ /**
+ * Invoked when text is inserted into a text component.
+ *
+ * @param bypass the FilterBypass to use to mutate the document
+ * @param offset the start position of the modification
+ * @param text the inserted text
+ * @param attributes the attributes of the inserted text
+ *
+ * @throws BadLocationException if offset or lenght are invalid in
+ * the Document
+ */
+ public void insertString(DocumentFilter.FilterBypass bypass, int offset,
+ String text, AttributeSet attributes)
+ throws BadLocationException
+ {
+ if (overwriteMode == true)
+ replace(bypass, offset, text.length(), text, attributes);
+ else
+ super.insertString(bypass, offset, text, attributes);
+ checkValidInput();
+ commitIfAllowed();
+ }
+
+ /**
+ * Invoked when text is replaced in a text component.
+ *
+ * @param bypass the FilterBypass to use to mutate the document
+ * @param offset the start position of the modification
+ * @param length the length of the removed text
+ * @param text the inserted text
+ * @param attributes the attributes of the inserted text
+ *
+ * @throws BadLocationException if offset or lenght are invalid in
+ * the Document
+ */
+ public void replace(DocumentFilter.FilterBypass bypass, int offset,
+ int length, String text, AttributeSet attributes)
+ throws BadLocationException
+ {
+ super.replace(bypass, offset, length, text, attributes);
+ checkValidInput();
+ commitIfAllowed();
+ }
+
+ /**
+ * Commits the value to the JTextTextField if the property
+ * <code>commitsOnValidEdit</code> is set to <code>true</code>.
+ */
+ private void commitIfAllowed()
+ {
+ if (commitsOnValidEdit == true)
+ try
+ {
+ getFormattedTextField().commitEdit();
+ }
+ catch (ParseException ex)
+ {
+ // ignore invalid edits
+ }
+ }
+
+ /**
+ * Checks if the value in the input field is valid. If the
+ * property allowsInvalid is set to <code>false</code>, then
+ * the string in the input field is not allowed to be entered.
+ *
+ * @param doc the document of the input field
+ * @param value the current (old) value of the input field
+ */
+ private void checkValidInput()
+ {
+ JFormattedTextField ftf = getFormattedTextField();
+ try
+ {
+ Object newval = stringToValue(ftf.getText());
+ }
+ catch (ParseException ex)
+ {
+ if (!allowsInvalid)
+ {
+ // roll back the input if invalid edits are not allowed
+ try
+ {
+ ftf.setText(valueToString(ftf.getValue()));
+ }
+ catch (ParseException pe)
+ {
+ // if that happens, something serious must be wrong
+ throw new AssertionError("values must be parseable");
+ }
+ }
+ }
+ }
+ }
+
+ /** The serialVersoinUID. */
+ private static final long serialVersionUID = -7369196326612908900L;
+
+ /**
+ * Indicates if the value should be committed after every
+ * valid modification of the Document.
+ */
+ boolean commitsOnValidEdit;
+
+ /**
+ * If <code>true</code> newly inserted characters overwrite existing
+ * values, otherwise insertion is done the normal way.
+ */
+ boolean overwriteMode;
+
+ /**
+ * If <code>true</code> invalid edits are allowed for a limited
+ * time.
+ */
+ boolean allowsInvalid;
+
+ /**
+ * The class that is used for values.
+ */
+ Class valueClass;
+
+ /**
+ * Creates a new instance of <code>DefaultFormatter</code>.
+ */
+ public DefaultFormatter()
+ {
+ commitsOnValidEdit = true;
+ overwriteMode = true;
+ allowsInvalid = true;
+ valueClass = Object.class;
+ }
+
+ /**
+ * Installs the formatter on the specified {@link JFormattedTextField}.
+ *
+ * This method does the following things:
+ * <ul>
+ * <li>Display the value of #valueToString in the
+ * <code>JFormattedTextField</code></li>
+ * <li>Install the Actions from #getActions on the <code>JTextField</code>
+ * </li>
+ * <li>Install the DocumentFilter returned by #getDocumentFilter</li>
+ * <li>Install the NavigationFilter returned by #getNavigationFilter</li>
+ * </ul>
+ *
+ * This method is typically not overridden by subclasses. Instead override
+ * one of the mentioned methods in order to customize behaviour.
+ *
+ * @param ftf the {@link JFormattedTextField} in which this formatter
+ * is installed
+ */
+ public void install(JFormattedTextField ftf)
+ {
+ super.install(ftf);
+ }
+
+ /**
+ * Returns <code>true</code> if the value should be committed after
+ * each valid modification of the input field, <code>false</code> if
+ * it should never be committed by this formatter.
+ *
+ * @return the state of the <code>commitsOnValidEdit</code> property
+ *
+ * @see #setCommitsOnValidEdit
+ */
+ public boolean getCommitsOnValidEdit()
+ {
+ return commitsOnValidEdit;
+ }
+
+ /**
+ * Sets the value of the <code>commitsOnValidEdit</code> property.
+ *
+ * @param commitsOnValidEdit the new state of the
+ * <code>commitsOnValidEdit</code> property
+ *
+ * @see #getCommitsOnValidEdit
+ */
+ public void setCommitsOnValidEdit(boolean commitsOnValidEdit)
+ {
+ this.commitsOnValidEdit = commitsOnValidEdit;
+ }
+
+ /**
+ * Returns the value of the <code>overwriteMode</code> property.
+ * If that is set to <code>true</code> then newly inserted characters
+ * overwrite existing values, otherwise the characters are inserted like
+ * normal. The default is <code>true</code>.
+ *
+ * @return the value of the <code>overwriteMode</code> property
+ */
+ public boolean getOverwriteMode()
+ {
+ return overwriteMode;
+ }
+
+ /**
+ * Sets the value of the <code>overwriteMode</code> property.
+ *
+ * If that is set to <code>true</code> then newly inserted characters
+ * overwrite existing values, otherwise the characters are inserted like
+ * normal. The default is <code>true</code>.
+ *
+ * @param overwriteMode the new value for the <code>overwriteMode</code>
+ * property
+ */
+ public void setOverwriteMode(boolean overwriteMode)
+ {
+ this.overwriteMode = overwriteMode;
+ }
+
+ /**
+ * Returns whether or not invalid edits are allowed or not. If invalid
+ * edits are allowed, the JFormattedTextField may temporarily contain invalid
+ * characters.
+ *
+ * @return the value of the allowsInvalid property
+ */
+ public boolean getAllowsInvalid()
+ {
+ return allowsInvalid;
+ }
+
+ /**
+ * Sets the value of the <code>allowsInvalid</code> property.
+ *
+ * @param allowsInvalid the new value for the property
+ *
+ * @see #getAllowsInvalid()
+ */
+ public void setAllowsInvalid(boolean allowsInvalid)
+ {
+ this.allowsInvalid = allowsInvalid;
+ }
+
+ /**
+ * Returns the class that is used for values. When Strings are converted
+ * back to values, this class is used to create new value objects.
+ *
+ * @return the class that is used for values
+ */
+ public Class getValueClass()
+ {
+ return valueClass;
+ }
+
+ /**
+ * Sets the class that is used for values.
+ *
+ * @param valueClass the class that is used for values
+ *
+ * @see #getValueClass()
+ */
+ public void setValueClass(Class valueClass)
+ {
+ this.valueClass = valueClass;
+ }
+
+ /**
+ * Converts a String (from the JFormattedTextField input) to a value.
+ * In order to achieve this, the formatter tries to instantiate an object
+ * of the class returned by #getValueClass() using a single argument
+ * constructor that takes a String argument. If such a constructor cannot
+ * be found, the String itself is returned.
+ *
+ * @param string the string to convert
+ *
+ * @return the value for the string
+ *
+ * @throws ParseException if the string cannot be converted into
+ * a value object (e.g. invalid input)
+ */
+ public Object stringToValue(String string)
+ throws ParseException
+ {
+ Object value = string;
+ Class valueClass = getValueClass();
+ if (valueClass == null)
+ valueClass = getFormattedTextField().getValue().getClass();
+ if (valueClass != null)
+ try
+ {
+ Constructor constr = valueClass.getConstructor
+ (new Class[]{String.class});
+ value = constr.newInstance(new Object[]{ string });
+ }
+ catch (NoSuchMethodException ex)
+ {
+ // leave value as string
+ }
+ catch (Exception ex)
+ {
+ throw new ParseException(string, 0);
+ }
+ return value;
+ }
+
+ /**
+ * Converts a value object into a String. This is done by invoking the
+ * {@link Object#toString()} method on the value.
+ *
+ * @param value the value to be converted
+ *
+ * @return the string representation of the value
+ *
+ * @throws ParseException if the value cannot be converted
+ */
+ public String valueToString(Object value)
+ throws ParseException
+ {
+ return value.toString();
+ }
+
+ /**
+ * Creates and returns a clone of this DefaultFormatter.
+ *
+ * @return a clone of this object
+ *
+ * @throws CloneNotSupportedException not thrown here
+ */
+ public Object clone()
+ throws CloneNotSupportedException
+ {
+ return super.clone();
+ }
+
+ /**
+ * Returns the DocumentFilter that is used to restrict input.
+ *
+ * @return the DocumentFilter that is used to restrict input
+ */
+ protected DocumentFilter getDocumentFilter()
+ {
+ return new FormatterDocumentFilter();
+ }
+}
diff --git a/javax/swing/text/DefaultHighlighter.java b/javax/swing/text/DefaultHighlighter.java
index 8d0491b66..c8d874caa 100644
--- a/javax/swing/text/DefaultHighlighter.java
+++ b/javax/swing/text/DefaultHighlighter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/DefaultStyledDocument.java b/javax/swing/text/DefaultStyledDocument.java
index 7b72ab246..14bb038a6 100644
--- a/javax/swing/text/DefaultStyledDocument.java
+++ b/javax/swing/text/DefaultStyledDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,42 +42,174 @@ import java.awt.Color;
import java.awt.Font;
import java.io.Serializable;
+import javax.swing.event.DocumentEvent;
+
/**
+ * The default implementation of {@link StyledDocument}.
+ *
+ * The document is modeled as an {@link Element} tree, which has
+ * a {@link SecionElement} as single root, which has one or more
+ * {@link AbstractDocument.BranchElement}s as paragraph nodes
+ * and each paragraph node having one or more
+ * {@link AbstractDocument.LeafElement}s as content nodes.
+ *
* @author Michael Koch (konqueror@gmx.de)
+ * @author Roman Kennke (roman@kennke.org)
*/
public class DefaultStyledDocument extends AbstractDocument
implements StyledDocument
{
+ /**
+ * Performs all <em>structural</code> changes to the <code>Element</code>
+ * hierarchy.
+ */
public class ElementBuffer
implements Serializable
{
+ /** The root element of the hierarchy. */
private Element root;
-
+
+ /** Holds the offset for structural changes. */
+ private int offset;
+
+ /** Holds the length of structural changes. */
+ private int length;
+
+ /**
+ * Creates a new <code>ElementBuffer</code> for the specified
+ * <code>root</code> element.
+ *
+ * @param root the root element for this <code>ElementBuffer</code>
+ */
public ElementBuffer(Element root)
{
this.root = root;
}
+ /**
+ * Returns the root element of this <code>ElementBuffer</code>.
+ *
+ * @return the root element of this <code>ElementBuffer</code>
+ */
public Element getRootElement()
{
return root;
}
+
+ /**
+ * Modifies the element structure so that the specified interval starts
+ * and ends at an element boundary. Content and paragraph elements
+ * are split and created as necessary.
+ *
+ * This also updates the <code>DefaultDocumentEvent</code> to reflect the
+ * structural changes.
+ *
+ * The bulk work is delegated to {@link #changeUpdate()}.
+ *
+ * @param offset the start index of the interval to be changed
+ * @param length the length of the interval to be changed
+ * @param ev the <code>DefaultDocumentEvent</code> describing the change
+ */
+ public void change(int offset, int length, DefaultDocumentEvent ev)
+ {
+ this.offset = offset;
+ this.length = length;
+ changeUpdate();
+ }
+
+ /**
+ * Performs the actual work for {@link #change}.
+ * The elements at the interval boundaries are split up (if necessary)
+ * so that the interval boundaries are located at element boundaries.
+ */
+ protected void changeUpdate()
+ {
+ // Split up the element at the start offset if necessary.
+ Element el = getCharacterElement(offset);
+ split(el, offset);
+
+ int endOffset = offset + length;
+ el = getCharacterElement(endOffset);
+ split(el, endOffset);
+ }
+
+ /**
+ * Splits an element if <code>offset</code> is not alread at its boundary.
+ *
+ * @param el the Element to possibly split
+ * @param offset the offset at which to possibly split
+ */
+ void split(Element el, int offset)
+ {
+ if (el instanceof AbstractElement)
+ {
+ AbstractElement ael = (AbstractElement) el;
+ int startOffset = ael.getStartOffset();
+ int endOffset = ael.getEndOffset();
+ int len = endOffset - startOffset;
+ if (startOffset != offset && endOffset != offset)
+ {
+ Element paragraph = ael.getParentElement();
+ if (paragraph instanceof BranchElement)
+ {
+ BranchElement par = (BranchElement) paragraph;
+ Element child1 = createLeafElement(par, ael, startOffset,
+ offset);
+ Element child2 = createLeafElement(par, ael, offset,
+ endOffset);
+ int index = par.getElementIndex(startOffset);
+ par.replace(index, 1, new Element[]{ child1, child2 });
+ }
+ else
+ throw new AssertionError("paragraph elements are expected to "
+ + "be instances of "
+ + "javax.swing.text.AbstractDocument.BranchElement");
+ }
+ }
+ else
+ throw new AssertionError("content elements are expected to be "
+ + "instances of "
+ + "javax.swing.text.AbstractDocument.AbstractElement");
+ }
}
-
+
+ /**
+ * The default size to use for new content buffers.
+ */
public static final int BUFFER_SIZE_DEFAULT = 4096;
+ /**
+ * The <code>EditorBuffer</code> that is used to manage to
+ * <code>Element</code> hierarchy.
+ */
protected DefaultStyledDocument.ElementBuffer buffer;
-
+
+ /**
+ * Creates a new <code>DefaultStyledDocument</code>.
+ */
public DefaultStyledDocument()
{
this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleContext());
}
+ /**
+ * Creates a new <code>DefaultStyledDocument</code> that uses the
+ * specified {@link StyleContext}.
+ *
+ * @param context the <code>StyleContext</code> to use
+ */
public DefaultStyledDocument(StyleContext context)
{
this(new GapContent(BUFFER_SIZE_DEFAULT), context);
}
+ /**
+ * Creates a new <code>DefaultStyledDocument</code> that uses the
+ * specified {@link StyleContext} and {@link Content} buffer.
+ *
+ * @param content the <code>Content</code> buffer to use
+ * @param context the <code>StyleContext</code> to use
+ */
public DefaultStyledDocument(AbstractDocument.Content content,
StyleContext context)
{
@@ -86,15 +218,38 @@ public class DefaultStyledDocument extends AbstractDocument
setLogicalStyle(0, context.getStyle(StyleContext.DEFAULT_STYLE));
}
+ /**
+ * Adds a style into the style hierarchy. Unspecified style attributes
+ * can be resolved in the <code>parent</code> style, if one is specified.
+ *
+ * While it is legal to add nameless styles (<code>nm == null</code),
+ * you must be aware that the client application is then responsible
+ * for managing the style hierarchy, since unnamed styles cannot be
+ * looked up by their name.
+ *
+ * @param nm the name of the style or <code>null</code> if the style should
+ * be unnamed
+ * @param parent the parent in which unspecified style attributes are
+ * resolved, or <code>null</code> if that is not necessary
+ *
+ * @return the newly created <code>Style</code>
+ */
public Style addStyle(String nm, Style parent)
{
StyleContext context = (StyleContext) getAttributeContext();
return context.addStyle(nm, parent);
}
-
+
+ /**
+ * Create the default root element for this kind of <code>Document</code>.
+ *
+ * @return the default root element for this kind of <code>Document</code>
+ */
protected AbstractDocument.AbstractElement createDefaultRoot()
{
Element[] tmp;
+ // FIXME: Create a SecionElement here instead of a BranchElement.
+ // Use createBranchElement() and createLeafElement instead.
BranchElement section = new BranchElement(null, null);
BranchElement paragraph = new BranchElement(section, null);
@@ -109,7 +264,17 @@ public class DefaultStyledDocument extends AbstractDocument
return section;
}
-
+
+ /**
+ * Returns the <code>Element</code> that corresponds to the character
+ * at the specified position.
+ *
+ * @param position the position of which we query the corresponding
+ * <code>Element</code>
+ *
+ * @return the <code>Element</code> that corresponds to the character
+ * at the specified position
+ */
public Element getCharacterElement(int position)
{
Element element = getDefaultRootElement();
@@ -122,63 +287,172 @@ public class DefaultStyledDocument extends AbstractDocument
return element;
}
-
+
+ /**
+ * Extracts a background color from a set of attributes.
+ *
+ * @param attributes the attributes from which to get a background color
+ *
+ * @return the background color that correspond to the attributes
+ */
public Color getBackground(AttributeSet attributes)
{
StyleContext context = (StyleContext) getAttributeContext();
return context.getBackground(attributes);
}
-
+
+ /**
+ * Returns the default root element.
+ *
+ * @return the default root element
+ */
public Element getDefaultRootElement()
{
return buffer.getRootElement();
}
-
+
+ /**
+ * Extracts a font from a set of attributes.
+ *
+ * @param attributes the attributes from which to get a font
+ *
+ * @return the font that correspond to the attributes
+ */
public Font getFont(AttributeSet attributes)
{
StyleContext context = (StyleContext) getAttributeContext();
return context.getFont(attributes);
}
+ /**
+ * Extracts a foreground color from a set of attributes.
+ *
+ * @param attributes the attributes from which to get a foreground color
+ *
+ * @return the foreground color that correspond to the attributes
+ */
public Color getForeground(AttributeSet attributes)
{
StyleContext context = (StyleContext) getAttributeContext();
return context.getForeground(attributes);
}
-
+
+ /**
+ * Returns the logical <code>Style</code> for the specified position.
+ *
+ * @param position the position from which to query to logical style
+ *
+ * @return the logical <code>Style</code> for the specified position
+ */
public Style getLogicalStyle(int position)
{
Element paragraph = getParagraphElement(position);
AttributeSet attributes = paragraph.getAttributes();
return (Style) attributes.getResolveParent();
}
-
+
+ /**
+ * Returns the paragraph element for the specified position.
+ *
+ * @param position the position for which to query the paragraph element
+ *
+ * @return the paragraph element for the specified position
+ */
public Element getParagraphElement(int position)
{
Element element = getCharacterElement(position);
return element.getParentElement();
}
+ /**
+ * Looks up and returns a named <code>Style</code>.
+ *
+ * @param nm the name of the <code>Style</code>
+ *
+ * @return the found <code>Style</code> of <code>null</code> if no such
+ * <code>Style</code> exists
+ */
public Style getStyle(String nm)
{
StyleContext context = (StyleContext) getAttributeContext();
return context.getStyle(nm);
}
+ /**
+ * Removes a named <code>Style</code> from the style hierarchy.
+ *
+ * @param nm the name of the <code>Style</code> to be removed
+ */
public void removeStyle(String nm)
{
StyleContext context = (StyleContext) getAttributeContext();
context.removeStyle(nm);
}
+ /**
+ * Sets text attributes for the fragment specified by <code>offset</code>
+ * and <code>length</code>.
+ *
+ * @param offset the start offset of the fragment
+ * @param length the length of the fragment
+ * @param attribute the text attributes to set
+ * @param replace if <code>true</code>, the attributes of the current
+ * selection are overridden, otherwise they are merged
+ */
public void setCharacterAttributes(int offset, int length,
AttributeSet attributes,
boolean replace)
{
- // FIXME: Implement me.
- throw new Error("not implemented");
+ DefaultDocumentEvent ev =
+ new DefaultDocumentEvent(offset, length,
+ DocumentEvent.EventType.CHANGE);
+
+ // Modify the element structure so that the interval begins at an element
+ // start and ends at an element end.
+ buffer.change(offset, length, ev);
+
+ Element root = getDefaultRootElement();
+ // Visit all paragraph elements within the specified interval
+ int paragraphCount = root.getElementCount();
+ for (int pindex = 0; pindex < paragraphCount; pindex++)
+ {
+ Element paragraph = root.getElement(pindex);
+ // Skip paragraphs that lie outside the interval.
+ if ((paragraph.getStartOffset() > offset + length)
+ || (paragraph.getEndOffset() < offset))
+ continue;
+
+ // Visit content elements within this paragraph
+ int contentCount = paragraph.getElementCount();
+ for (int cindex = 0; cindex < contentCount; cindex++)
+ {
+ Element content = paragraph.getElement(cindex);
+ // Skip content that lies outside the interval.
+ if ((content.getStartOffset() > offset + length)
+ || (content.getEndOffset() < offset))
+ continue;
+
+ if (content instanceof AbstractElement)
+ {
+ AbstractElement el = (AbstractElement) content;
+ if (replace)
+ el.removeAttributes(el);
+ el.addAttributes(attributes);
+ }
+ else
+ throw new AssertionError("content elements are expected to be"
+ + "instances of "
+ + "javax.swing.text.AbstractDocument.AbstractElement");
+ }
+ }
}
+ /**
+ * Sets the logical style for the paragraph at the specified position.
+ *
+ * @param position the position at which the logical style is added
+ * @param style the style to set for the current paragraph
+ */
public void setLogicalStyle(int position, Style style)
{
Element el = getParagraphElement(position);
@@ -192,6 +466,15 @@ public class DefaultStyledDocument extends AbstractDocument
+ "instances of javax.swing.text.AbstractDocument.AbstractElement");
}
+ /**
+ * Sets text attributes for the paragraph at the specified fragment.
+ *
+ * @param offset the beginning of the fragment
+ * @param length the length of the fragment
+ * @param attribute the text attributes to set
+ * @param replace if <code>true</code>, the attributes of the current
+ * selection are overridden, otherwise they are merged
+ */
public void setParagraphAttributes(int offset, int length,
AttributeSet attributes,
boolean replace)
diff --git a/javax/swing/text/Document.java b/javax/swing/text/Document.java
index d299f68a2..f23767f58 100644
--- a/javax/swing/text/Document.java
+++ b/javax/swing/text/Document.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/DocumentFilter.java b/javax/swing/text/DocumentFilter.java
index ff96d0729..f86f41ca6 100644
--- a/javax/swing/text/DocumentFilter.java
+++ b/javax/swing/text/DocumentFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/EditorKit.java b/javax/swing/text/EditorKit.java
index 5d89a11ba..bd51a866f 100644
--- a/javax/swing/text/EditorKit.java
+++ b/javax/swing/text/EditorKit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/Element.java b/javax/swing/text/Element.java
index 9f6161264..eb53ee9d3 100644
--- a/javax/swing/text/Element.java
+++ b/javax/swing/text/Element.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/FieldView.java b/javax/swing/text/FieldView.java
index e81a19fe5..4d5c51ceb 100644
--- a/javax/swing/text/FieldView.java
+++ b/javax/swing/text/FieldView.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/FlowView.java b/javax/swing/text/FlowView.java
new file mode 100644
index 000000000..cf139341b
--- /dev/null
+++ b/javax/swing/text/FlowView.java
@@ -0,0 +1,56 @@
+/* FlowView.java -- A composite View
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text;
+
+// TODO: Implement this class.
+public class FlowView
+ extends BoxView
+{
+
+ /**
+ * Creates a new <code>FlowView</code> for the given
+ * <code>Element</code>.
+ *
+ * @param element the element that is rendered by this FlowView
+ */
+ public FlowView(Element element)
+ {
+ super(element);
+ }
+}
diff --git a/javax/swing/text/GapContent.java b/javax/swing/text/GapContent.java
index 111617e94..94084800c 100644
--- a/javax/swing/text/GapContent.java
+++ b/javax/swing/text/GapContent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,9 @@ exception statement from your version. */
package javax.swing.text;
import java.io.Serializable;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.ListIterator;
import javax.swing.undo.UndoableEdit;
@@ -57,6 +60,67 @@ import javax.swing.undo.UndoableEdit;
public class GapContent
implements AbstractDocument.Content, Serializable
{
+
+ /**
+ * A {@link Position} implementation for <code>GapContent</code>.
+ */
+ class GapContentPosition implements Position, Comparable
+ {
+
+ /** The index within the buffer array. */
+ int mark;
+
+ /**
+ * Creates a new GapContentPosition object.
+ *
+ * @param mark the mark of this Position
+ */
+ GapContentPosition(int mark)
+ {
+ this.mark = mark;
+ }
+
+ /**
+ * Comparable interface implementation. This is used to store all
+ * positions in an ordered fashion.
+ *
+ * @param o the object to be compared to this
+ *
+ * @return a negative integer if this is less than <code>o</code>, zero
+ * if both are equal or a positive integer if this is greater
+ * than <code>o</code>
+ *
+ * @throws ClassCastException if <code>o</code> is not a GapContentPosition
+ * or Integer object
+ */
+ public int compareTo(Object o)
+ {
+ if (o instanceof Integer)
+ {
+ int otherMark = ((Integer) o).intValue();
+ return mark - otherMark;
+ }
+ else
+ {
+ GapContentPosition other = (GapContentPosition) o;
+ return mark - other.mark;
+ }
+ }
+
+ /**
+ * Returns the current offset of this Position within the content.
+ *
+ * @return the current offset of this Position within the content.
+ */
+ public int getOffset()
+ {
+ if (mark <= gapStart)
+ return mark;
+ else
+ return mark - (gapEnd - gapStart);
+ }
+ }
+
private static final long serialVersionUID = 8374645204155842629L;
/**
@@ -81,6 +145,12 @@ public class GapContent
int gapEnd;
/**
+ * The positions generated by this GapContent. They are kept in an
+ * ordered fashion, so they can be looked up easily.
+ */
+ LinkedList positions;
+
+ /**
* Creates a new GapContent object.
*/
public GapContent()
@@ -99,6 +169,7 @@ public class GapContent
gapStart = 0;
gapEnd = size - 1;
buffer[size - 1] = '\n';
+ positions = new LinkedList();
}
/**
@@ -288,15 +359,24 @@ public class GapContent
*/
public Position createPosition(final int offset) throws BadLocationException
{
- return new Position()
- {
- int off = offset;
-
- public int getOffset()
- {
- return off;
- }
- };
+ if (offset < 0 || offset > length())
+ throw new BadLocationException("The offset was out of the bounds of this"
+ + " buffer", offset);
+
+ // We store the actual array index in the GapContentPosition. The real
+ // offset is then calculated in the GapContentPosition.
+ int mark = offset;
+ if (offset > gapStart)
+ mark += gapEnd - gapStart;
+ GapContentPosition pos = new GapContentPosition(mark);
+
+ // Add this into our list in a sorted fashion.
+ int index = Collections.binarySearch(positions, pos);
+ if (index < 0)
+ index = -(index + 1);
+ positions.add(index, pos);
+
+ return pos;
}
/**
@@ -309,12 +389,25 @@ public class GapContent
*/
protected void shiftEnd(int newSize)
{
+ int delta = (gapEnd - gapStart) - newSize;
char[] newBuf = (char[]) allocateArray(length() + newSize);
System.arraycopy(buffer, 0, newBuf, 0, gapStart);
System.arraycopy(buffer, gapEnd, newBuf, gapStart + newSize,
buffer.length - gapEnd);
gapEnd = gapStart + newSize;
buffer = newBuf;
+
+ // Update the marks after the gapEnd.
+ int index = Collections.binarySearch(positions, new Integer(gapEnd));
+ if (index < 0)
+ {
+ index = -(index + 1);
+ }
+ for (ListIterator i = positions.listIterator(index); i.hasNext();)
+ {
+ GapContentPosition p = (GapContentPosition) i.next();
+ p.mark += delta;
+ }
}
/**
@@ -326,6 +419,22 @@ public class GapContent
{
int newGapEnd = newGapStart + (gapEnd - gapStart);
+
+ // Update the positions between newGapEnd and (old) gapEnd. The marks
+ // must be shifted by (gapEnd - newGapEnd).
+ int index1 = Collections.binarySearch(positions, new Integer(gapEnd));
+ int index2 = Collections.binarySearch(positions, new Integer(newGapEnd));
+ int i1 = Math.min(index1, index2);
+ int i2 = Math.max(index1, index2);
+ for (ListIterator i = positions.listIterator(i1); i.hasNext();)
+ {
+ if (i.nextIndex() > i2)
+ break;
+
+ GapContentPosition p = (GapContentPosition) i.next();
+ p.mark += gapEnd - newGapEnd;
+ }
+
if (newGapStart == gapStart)
return;
else if (newGapStart < gapStart)
@@ -353,4 +462,28 @@ public class GapContent
{
return buffer;
}
+
+ /**
+ * Replaces a portion of the storage with the specified items.
+ *
+ * @param position the position at which to remove items
+ * @param rmSize the number of items to remove
+ * @param addItems the items to add at location
+ * @param addSize the number of items to add
+ */
+ protected void replace(int position, int rmSize, Object addItems,
+ int addSize)
+ {
+ // Remove content
+ shiftGap(position);
+ gapEnd += rmSize;
+
+ // If gap is too small, enlarge the gap.
+ if ((gapEnd - gapStart) < addSize)
+ shiftEnd(addSize);
+
+ // Add new items to the buffer.
+ System.arraycopy(addItems, 0, buffer, gapStart, addSize);
+ gapStart += addSize;
+ }
}
diff --git a/javax/swing/text/GlyphView.java b/javax/swing/text/GlyphView.java
new file mode 100644
index 000000000..f96a918ca
--- /dev/null
+++ b/javax/swing/text/GlyphView.java
@@ -0,0 +1,111 @@
+/* GlyphView.java -- A view to render styled text
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text;
+
+import java.awt.Graphics;
+import java.awt.Shape;
+
+// TODO: Implement this class.
+public class GlyphView
+ extends View
+{
+
+ /**
+ * Creates a new <code>GlyphView</code> for the given <code>Element</code>.
+ *
+ * @param element the element that is rendered by this GlyphView
+ */
+ public GlyphView(Element element)
+ {
+ super(element);
+ }
+
+ /**
+ * Renders the <code>Element</code> that is associated with this
+ * <code>View</code>.
+ *
+ * @param g the <code>Graphics</code> context to render to
+ * @param a the allocated region for the <code>Element</code>
+ */
+ public void paint(Graphics g, Shape a)
+ {
+ // TODO: Implement me.
+ }
+
+
+ /**
+ * Returns the preferred span of the content managed by this
+ * <code>View</code> along the specified <code>axis</code>.
+ *
+ * @param axis the axis
+ *
+ * @return the preferred span of this <code>View</code>.
+ */
+ public float getPreferredSpan(int axis)
+ {
+ // TODO: Implement me.
+ return 0F;
+ }
+
+ /**
+ * Maps a position in the document into the coordinate space of the View.
+ * The output rectangle usually reflects the font height but has a width
+ * of zero.
+ *
+ * @param pos the position of the character in the model
+ * @param a the area that is occupied by the view
+ * @param bias either {@link Position.Bias.Forward} or
+ * {@link Position.Bias.Backward} depending on the preferred
+ * direction bias. If <code>null</code> this defaults to
+ * <code>Position.Bias.Forward</code>
+ *
+ * @return a rectangle that gives the location of the document position
+ * inside the view coordinate space
+ *
+ * @throws BadLocationException if <code>pos</code> is invalid
+ * @throws IllegalArgumentException if b is not one of the above listed
+ * valid values
+ */
+ public Shape modelToView(int pos, Shape a, Position.Bias b)
+ throws BadLocationException
+ {
+ // Implement me.
+ return null;
+ }
+}
diff --git a/javax/swing/text/Highlighter.java b/javax/swing/text/Highlighter.java
index affec9b7a..91f3b7903 100644
--- a/javax/swing/text/Highlighter.java
+++ b/javax/swing/text/Highlighter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/IconView.java b/javax/swing/text/IconView.java
new file mode 100644
index 000000000..4bbebdb52
--- /dev/null
+++ b/javax/swing/text/IconView.java
@@ -0,0 +1,110 @@
+/* IconView.java -- A view to render icons
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text;
+
+import java.awt.Graphics;
+import java.awt.Shape;
+
+// TODO: Implement this class.
+public class IconView
+ extends View
+{
+
+ /**
+ * Creates a new <code>IconView</code> for the given <code>Element</code>.
+ *
+ * @param element the element that is rendered by this IconView
+ */
+ public IconView(Element element)
+ {
+ super(element);
+ }
+
+ /**
+ * Renders the <code>Element</code> that is associated with this
+ * <code>View</code>.
+ *
+ * @param g the <code>Graphics</code> context to render to
+ * @param a the allocated region for the <code>Element</code>
+ */
+ public void paint(Graphics g, Shape a)
+ {
+ // TODO: Implement me.
+ }
+
+ /**
+ * Returns the preferred span of the content managed by this
+ * <code>View</code> along the specified <code>axis</code>.
+ *
+ * @param axis the axis
+ *
+ * @return the preferred span of this <code>View</code>.
+ */
+ public float getPreferredSpan(int axis)
+ {
+ // TODO: Implement me.
+ return 0F;
+ }
+
+ /**
+ * Maps a position in the document into the coordinate space of the View.
+ * The output rectangle usually reflects the font height but has a width
+ * of zero.
+ *
+ * @param pos the position of the character in the model
+ * @param a the area that is occupied by the view
+ * @param bias either {@link Position.Bias.Forward} or
+ * {@link Position.Bias.Backward} depending on the preferred
+ * direction bias. If <code>null</code> this defaults to
+ * <code>Position.Bias.Forward</code>
+ *
+ * @return a rectangle that gives the location of the document position
+ * inside the view coordinate space
+ *
+ * @throws BadLocationException if <code>pos</code> is invalid
+ * @throws IllegalArgumentException if b is not one of the above listed
+ * valid values
+ */
+ public Shape modelToView(int pos, Shape a, Position.Bias b)
+ throws BadLocationException
+ {
+ // Implement me.
+ return null;
+ }
+}
diff --git a/javax/swing/text/InternationalFormatter.java b/javax/swing/text/InternationalFormatter.java
new file mode 100644
index 000000000..cedaf59fe
--- /dev/null
+++ b/javax/swing/text/InternationalFormatter.java
@@ -0,0 +1,354 @@
+/* InternationalFormatter.java --
+Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package javax.swing.text;
+
+import java.text.AttributedCharacterIterator;
+import java.text.Format;
+import java.text.ParseException;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.swing.Action;
+import javax.swing.JFormattedTextField;
+
+/**
+ * This extends {@link DefaultFormatter} so that the value to string
+ * conversion is done via a {@link Format} object. This allows
+ * various additional formats to be handled by JFormattedField.
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+public class InternationalFormatter
+ extends DefaultFormatter
+{
+
+ /** The serialVersoinUID. */
+ private static final long serialVersionUID = 6941977820906408656L;
+
+ /** The format that handles value to string conversion. */
+ Format format;
+
+ /** The minimal permissable value. */
+ Comparable minimum;
+
+ /** The maximal permissable value. */
+ Comparable maximum;
+
+ /**
+ * Creates a new InternationalFormatter with no Format specified.
+ */
+ public InternationalFormatter()
+ {
+ super();
+ minimum = null;
+ maximum = null;
+ format = null;
+ }
+
+ /**
+ * Creates a new InternationalFormatter that uses the specified
+ * Format object for value to string conversion.
+ *
+ * @param format the Format object to use for value to string conversion
+ */
+ public InternationalFormatter(Format format)
+ {
+ this();
+ setFormat(format);
+ }
+
+ /**
+ * Sets the Format object that is used to convert values to strings.
+ *
+ * @param format the Format to use for value to string conversion
+ *
+ * @see Format
+ */
+ public void setFormat(Format format)
+ {
+ this.format = format;
+ }
+
+ /**
+ * Returns the currently used Format object that is used to format
+ * the JFormattedField.
+ *
+ * @return the current Format
+ */
+ public Format getFormat()
+ {
+ return format;
+ }
+
+ /**
+ * Sets the minimum value that is allowed by this Formatter. The minimum
+ * value is given as an object that implements the {@link Comparable}
+ * interface.
+ *
+ * If <code>minValue</code> is null, then the Formatter has no restrictions
+ * at the lower end.
+ *
+ * If value class is not yet specified and <code>minValue</code> is not
+ * null, then <code>valueClass</code> is set to the class of the minimum
+ * value.
+ *
+ * @param minValue the minimum permissable value
+ *
+ * @see Comparable
+ */
+ public void setMinimum(Comparable minValue)
+ {
+ minimum = minValue;
+ if (valueClass == null && minValue != null)
+ valueClass = minValue.getClass();
+ }
+
+ /**
+ * Returns the minimal value that is allowed by this Formatter.
+ *
+ * A <code>null</code> value means that there is no restriction.
+ *
+ * @return the minimal value that is allowed by this Formatter or
+ * <code>null</code> if there is no restriction
+ */
+ public Comparable getMinimum()
+ {
+ return minimum;
+ }
+
+ /**
+ * Sets the maximum value that is allowed by this Formatter. The maximum
+ * value is given as an object that implements the {@link Comparable}
+ * interface.
+ *
+ * If <code>maxValue</code> is null, then the Formatter has no restrictions
+ * at the upper end.
+ *
+ * If value class is not yet specified and <code>maxValue</code> is not
+ * null, then <code>valueClass</code> is set to the class of the maximum
+ * value.
+ *
+ * @param maxValue the maximum permissable value
+ *
+ * @see Comparable
+ */
+ public void setMaximum(Comparable maxValue)
+ {
+ maximum = maxValue;
+ if (valueClass == null && maxValue != null)
+ valueClass = maxValue.getClass();
+ }
+
+ /**
+ * Returns the maximal value that is allowed by this Formatter.
+ *
+ * A <code>null</code> value means that there is no restriction.
+ *
+ * @return the maximal value that is allowed by this Formatter or
+ * <code>null</code> if there is no restriction
+ */
+ public Comparable getMaximum()
+ {
+ return maximum;
+ }
+
+ /**
+ * Installs the formatter on the specified {@link JFormattedTextField}.
+ *
+ * This method does the following things:
+ * <ul>
+ * <li>Display the value of #valueToString in the
+ * <code>JFormattedTextField</code></li>
+ * <li>Install the Actions from #getActions on the <code>JTextField</code>
+ * </li>
+ * <li>Install the DocumentFilter returned by #getDocumentFilter</li>
+ * <li>Install the NavigationFilter returned by #getNavigationFilter</li>
+ * </ul>
+ *
+ * This method is typically not overridden by subclasses. Instead override
+ * one of the mentioned methods in order to customize behaviour.
+ *
+ * @param ftf the {@link JFormattedTextField} in which this formatter
+ * is installed
+ */
+ public void install(JFormattedTextField ftf)
+ {
+ super.install(ftf);
+ }
+
+ /**
+ * Converts a value object into a String. This is done by invoking
+ * {@link Format#format(Object)} on the specified <code>Format</code> object.
+ * If no format is set, then {@link DefaultFormatter#valueToString(Object)}
+ * is called as a fallback.
+ *
+ * @param value the value to be converted
+ *
+ * @return the string representation of the value
+ *
+ * @throws ParseException if the value cannot be converted
+ */
+ public String valueToString(Object value)
+ throws ParseException
+ {
+ if (format != null)
+ return format.format(value);
+ else
+ return super.valueToString(value);
+ }
+
+ /**
+ * Converts a String (from the JFormattedTextField input) to a value.
+ * This is achieved by invoking {@link Format#parseObject(String)} on
+ * the specified <code>Format</code> object.
+ *
+ * This implementation differs slightly from {@link DefaultFormatter},
+ * it does:
+ * <ol>
+ * <li>Convert the string to an <code>Object</code> using the
+ * <code>Formatter</code>.</li>
+ * <li>If a <code>valueClass</code> has been set, this object is passed to
+ * {@link DefaultFormatter#stringToValue(String)} so that the value
+ * has the correct type. This may or may not work correctly, depending on
+ * the implementation of toString() in the value class and if the class
+ * implements a constructor that takes one String as argument.</li>
+ * <li>If no {@link ParseException} has been thrown so far, we check if the
+ * value exceeds either <code>minimum</code> or <code>maximum</code> if
+ * one of those has been specified and throw a <code>ParseException</code>
+ * if it does.</li>
+ * <li>Return the value.</li>
+ * </ol>
+ *
+ * If no format has been specified, then
+ * {@link DefaultFormatter#stringToValue(String)} is invoked as fallback.
+ *
+ * @param string the string to convert
+ *
+ * @return the value for the string
+ *
+ * @throws ParseException if the string cannot be converted into
+ * a value object (e.g. invalid input)
+ */
+ public Object stringToValue(String string)
+ throws ParseException
+ {
+ if (format != null)
+ {
+ Object o = format.parseObject(string);
+
+ // If a value class has been set, call super in order to get
+ // the class right. That is what the JDK API docs suggest, so we do
+ // it that way.
+ if (valueClass != null)
+ o = super.stringToValue(o.toString());
+
+ // Check for minimum and maximum bounds
+ if (minimum != null && minimum.compareTo(o) > 0)
+ throw new ParseException("The value may not be less than the"
+ + " specified minimum", 0);
+ if (maximum != null && minimum.compareTo(o) < 0)
+ throw new ParseException("The value may not be greater than the"
+ + " specified maximum", 0);
+ return o;
+ }
+ else
+ return super.stringToValue(string);
+ }
+
+ /**
+ * Returns the {@link Format.Field} constants that are associated with
+ * the specified position in the text.
+ *
+ * If <code>offset</code> is not a valid location in the input field,
+ * an empty array of fields is returned.
+ *
+ * @param offset the position in the text from which we want to fetch
+ * the fields constants
+ *
+ * @return the field values associated with the specified position in
+ * the text
+ */
+ public Format.Field[] getFields(int offset)
+ {
+ // TODO: don't know if this is correct
+ AttributedCharacterIterator aci = format.formatToCharacterIterator
+ (getFormattedTextField().getValue());
+ aci.setIndex(offset);
+ Map atts = aci.getAttributes();
+ Set keys = atts.keySet();
+ Format.Field[] fields = new Format.Field[keys.size()];
+ int index = 0;
+ for (Iterator i = keys.iterator(); i.hasNext(); index++)
+ fields[index] = (Format.Field) i.next();
+ return fields;
+ }
+
+ /**
+ * This creates and returns a clone of this Formatter.
+ *
+ * @return a clone of this formatter
+ *
+ * @throws CloneNotSupportedException not thrown here, since cloning is
+ * supported
+ * XXX - FIXME - Whole method disabled as workaround for gcj bug #22060.
+ public Object clone()
+ throws CloneNotSupportedException
+ {
+ // TODO: it has to be considered, if we should return a deep or shallow
+ // clone here. for now we return a shallow clone
+ Object clone = super.clone();
+ return clone;
+ }
+ */
+
+ /**
+ * Returns the Actions that are supported by this Formatter.
+ *
+ * @specnote the JDK API docs say here: <cite>If
+ * <code>getSupportsIncrement</code> returns true, this returns two
+ * Actions suitable for incrementing/decrementing the value.</cite>
+ * The questsion is, which method <code>getSupportsIncrement</code>?
+ * There is no such method in the whole API! So we just call
+ * super.getActions here.
+ */
+ public Action[] getActions()
+ {
+ return super.getActions();
+ }
+}
diff --git a/javax/swing/text/JTextComponent.java b/javax/swing/text/JTextComponent.java
index 0e0256d3b..b3fad7912 100644
--- a/javax/swing/text/JTextComponent.java
+++ b/javax/swing/text/JTextComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,6 +54,8 @@ import java.awt.event.ActionListener;
import java.awt.event.InputMethodListener;
import java.awt.event.KeyEvent;
import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
import java.util.Enumeration;
import java.util.Hashtable;
@@ -94,7 +96,6 @@ public abstract class JTextComponent extends JComponent
/**
* Constructor AccessibleJTextComponent
- * @param component TODO
*/
public AccessibleJTextComponent()
{
@@ -320,7 +321,9 @@ public abstract class JTextComponent extends JComponent
*/
public void actionPerformed(ActionEvent ev)
{
- caret.setVisible(!caret.isVisible());
+ Caret c = caret;
+ if (c != null)
+ c.setVisible(!c.isVisible());
}
/**
@@ -329,11 +332,15 @@ public abstract class JTextComponent extends JComponent
public void update()
{
stop();
- setDelay(caret.getBlinkRate());
- if (editable)
- start();
- else
- caret.setVisible(false);
+ Caret c = caret;
+ if (c != null)
+ {
+ setDelay(c.getBlinkRate());
+ if (editable)
+ start();
+ else
+ c.setVisible(false);
+ }
}
}
@@ -704,8 +711,8 @@ public abstract class JTextComponent extends JComponent
* @return A Keymap associated with the provided name, or
* <code>null</code> if no such Keymap exists
*
- * @see #addKeymap()
- * @see #removeKeymap()
+ * @see #addKeymap
+ * @see #removeKeymap
* @see #keymaps
*/
public static Keymap getKeymap(String n)
@@ -720,7 +727,7 @@ public abstract class JTextComponent extends JComponent
*
* @return The keymap removed from the global table
*
- * @see #addKeymap()
+ * @see #addKeymap
* @see #getKeymap()
* @see #keymaps
*/
@@ -743,7 +750,7 @@ public abstract class JTextComponent extends JComponent
*
* @return The newly created Keymap
*
- * @see #removeKeymap()
+ * @see #removeKeymap
* @see #getKeymap()
* @see #keymaps
*/
@@ -761,7 +768,7 @@ public abstract class JTextComponent extends JComponent
*
* @return The component's current Keymap
*
- * @see #setKeymap()
+ * @see #setKeymap
* @see #keymap
*/
public Keymap getKeymap()
@@ -893,8 +900,8 @@ public abstract class JTextComponent extends JComponent
* @param actions The set of actions to resolve binding names against
*
* @see Action#NAME
- * @see Action#getValue()
- * @see KeyBinding#ActionName
+ * @see Action#getValue
+ * @see KeyBinding#actionName
*/
public static void loadKeymap(Keymap map,
JTextComponent.KeyBinding[] bindings,
@@ -913,12 +920,12 @@ public abstract class JTextComponent extends JComponent
* editor can run. Equivalent to calling
* <code>getUI().getEditorKit().getActions()</code>. This set of Actions
* is a reasonable value to provide as a parameter to {@link
- * #loadKeymap()}, when resolving a set of {@link #KeyBinding} objects
+ * #loadKeymap}, when resolving a set of {@link KeyBinding} objects
* against this component.
*
* @return The set of available Actions on this component's {@link EditorKit}
*
- * @see TextUI#getEditorKit()
+ * @see TextUI#getEditorKit
* @see EditorKit#getActions()
*/
public Action[] getActions()
@@ -926,15 +933,16 @@ public abstract class JTextComponent extends JComponent
return getUI().getEditorKit(this).getActions();
}
- // This is package-private to avoid an accessor method.
+ // These are package-private to avoid an accessor method.
Document doc;
- private Caret caret;
+ Caret caret;
+ boolean editable;
+
private Highlighter highlighter;
private Color caretColor;
private Color disabledTextColor;
private Color selectedTextColor;
private Color selectionColor;
- private boolean editable;
private Insets margin;
private boolean dragEnabled;
@@ -1113,7 +1121,7 @@ public abstract class JTextComponent extends JComponent
/**
* This method sets the label's UI delegate.
*
- * @param ui The label's UI delegate.
+ * @param newUI The label's UI delegate.
*/
public void setUI(TextUI newUI)
{
@@ -1351,7 +1359,7 @@ public abstract class JTextComponent extends JComponent
/**
* Selects the text from the given postion to the selection end position.
*
- * @param end the start positon of the selected text.
+ * @param start the start positon of the selected text.
*/
public void setSelectionStart(int start)
{
@@ -1382,7 +1390,7 @@ public abstract class JTextComponent extends JComponent
* Selects a part of the content of the text component.
*
* @param start the start position of the selected text
- * @param ent the end position of the selected text
+ * @param end the end position of the selected text
*/
public void select(int start, int end)
{
@@ -1611,4 +1619,55 @@ public abstract class JTextComponent extends JComponent
{
navigationFilter = filter;
}
+
+ /**
+ * Read and set the content this component. If not overridden, the
+ * method reads the component content as a plain text.
+ *
+ * The second parameter of this method describes the input stream. It can
+ * be String, URL, File and so on. If not null, this object is added to
+ * the properties of the associated document under the key
+ * {@link Document#StreamDescriptionProperty}.
+ *
+ * @param input an input stream to read from.
+ * @param streamDescription an object, describing the stream.
+ *
+ * @throws IOException if the reader throws it.
+ *
+ * @see #getDocument()
+ * @see Document#getProperty(Object)
+ */
+ public void read(Reader input, Object streamDescription)
+ throws IOException
+ {
+ if (streamDescription != null)
+ {
+ Document d = getDocument();
+ if (d != null)
+ d.putProperty(Document.StreamDescriptionProperty, streamDescription);
+ }
+
+ StringBuffer b = new StringBuffer();
+ int c;
+
+ // Read till -1 (EOF).
+ while ((c = input.read()) >= 0)
+ b.append((char) c);
+
+ setText(b.toString());
+ }
+
+ /**
+ * Write the content of this component to the given stream. If not
+ * overridden, the method writes the component content as a plain text.
+ *
+ * @param output the writer to write into.
+ *
+ * @throws IOException if the writer throws it.
+ */
+ public void write(Writer output)
+ throws IOException
+ {
+ output.write(getText());
+ }
}
diff --git a/javax/swing/text/Keymap.java b/javax/swing/text/Keymap.java
index 8c1dd8bcc..c3f61d88e 100644
--- a/javax/swing/text/Keymap.java
+++ b/javax/swing/text/Keymap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/LabelView.java b/javax/swing/text/LabelView.java
new file mode 100644
index 000000000..a10391613
--- /dev/null
+++ b/javax/swing/text/LabelView.java
@@ -0,0 +1,54 @@
+/* LabelView.java -- A view to render styled text
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text;
+
+// TODO: Implement this class.
+public class LabelView
+ extends GlyphView
+{
+ /**
+ * Creates a new <code>GlyphView</code> for the given <code>Element</code>.
+ *
+ * @param element the element that is rendered by this GlyphView
+ */
+ public LabelView(Element element)
+ {
+ super(element);
+ }
+}
diff --git a/javax/swing/text/LayeredHighlighter.java b/javax/swing/text/LayeredHighlighter.java
index 0b063e5a1..dcaf1c504 100644
--- a/javax/swing/text/LayeredHighlighter.java
+++ b/javax/swing/text/LayeredHighlighter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/MutableAttributeSet.java b/javax/swing/text/MutableAttributeSet.java
index d8cb62a7b..2fe9ad50f 100644
--- a/javax/swing/text/MutableAttributeSet.java
+++ b/javax/swing/text/MutableAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/NavigationFilter.java b/javax/swing/text/NavigationFilter.java
index cdf9e77b7..45f58f9e2 100644
--- a/javax/swing/text/NavigationFilter.java
+++ b/javax/swing/text/NavigationFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/ParagraphView.java b/javax/swing/text/ParagraphView.java
new file mode 100644
index 000000000..44338a1e4
--- /dev/null
+++ b/javax/swing/text/ParagraphView.java
@@ -0,0 +1,56 @@
+/* ParagraphView.java -- A composite View
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package javax.swing.text;
+
+// TODO: Implement this class.
+public class ParagraphView
+ extends FlowView
+{
+
+ /**
+ * Creates a new <code>ParagraphView</code> for the given
+ * <code>Element</code>.
+ *
+ * @param element the element that is rendered by this ParagraphView
+ */
+ public ParagraphView(Element element)
+ {
+ super(element);
+ }
+}
diff --git a/javax/swing/text/PasswordView.java b/javax/swing/text/PasswordView.java
index ad18350e9..229fd2b50 100644
--- a/javax/swing/text/PasswordView.java
+++ b/javax/swing/text/PasswordView.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/PlainDocument.java b/javax/swing/text/PlainDocument.java
index 352df7a88..71070e92d 100644
--- a/javax/swing/text/PlainDocument.java
+++ b/javax/swing/text/PlainDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -135,22 +135,6 @@ public class PlainDocument extends AbstractDocument
start, end - len);
rootElement.replace(i1, i2 - i1, new Element[]{ newEl });
}
- else
- {
- // otherwise only adjust indices of the element
- LeafElement el1 = (LeafElement) rootElement.getElement(i1);
- el1.end -= len;
- }
-
- // reindex remaining elements
- for (int i = rootElement.getElementIndex(p0) + 1;
- i < rootElement.getElementCount(); i++)
- {
- LeafElement el = (LeafElement) rootElement.getElement(i);
- el.start -= len;
- el.end -= len;
- }
-
}
public Element getDefaultRootElement()
diff --git a/javax/swing/text/PlainView.java b/javax/swing/text/PlainView.java
index c9e064362..5d1fab000 100644
--- a/javax/swing/text/PlainView.java
+++ b/javax/swing/text/PlainView.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/Position.java b/javax/swing/text/Position.java
index 2fe2bd347..a9d3d09d7 100644
--- a/javax/swing/text/Position.java
+++ b/javax/swing/text/Position.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/Segment.java b/javax/swing/text/Segment.java
index 3b1d9e7aa..92d850016 100644
--- a/javax/swing/text/Segment.java
+++ b/javax/swing/text/Segment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/SimpleAttributeSet.java b/javax/swing/text/SimpleAttributeSet.java
index c3b7b0820..3ef5db61d 100644
--- a/javax/swing/text/SimpleAttributeSet.java
+++ b/javax/swing/text/SimpleAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/StringContent.java b/javax/swing/text/StringContent.java
index c0e688a8d..bedf480d4 100644
--- a/javax/swing/text/StringContent.java
+++ b/javax/swing/text/StringContent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/Style.java b/javax/swing/text/Style.java
index d8553c02c..851ac0219 100644
--- a/javax/swing/text/Style.java
+++ b/javax/swing/text/Style.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/StyleConstants.java b/javax/swing/text/StyleConstants.java
index e9019b1a9..3f973f226 100644
--- a/javax/swing/text/StyleConstants.java
+++ b/javax/swing/text/StyleConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/StyleContext.java b/javax/swing/text/StyleContext.java
index 86ccc112c..ae11622ff 100644
--- a/javax/swing/text/StyleContext.java
+++ b/javax/swing/text/StyleContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -380,9 +380,17 @@ public class StyleContext
// FIXME: also not sure if these tables ought to be static (singletons),
// shared across all StyleContexts. I think so, but it's not clear in
// docs. revert to non-shared if you think it matters.
-
+
+ /**
+ * The name of the default style.
+ */
public static final String DEFAULT_STYLE = "default";
+ /**
+ * The default style for this style context.
+ */
+ NamedStyle defaultStyle = new NamedStyle(DEFAULT_STYLE, null);
+
static Hashtable sharedAttributeSets = new Hashtable();
static Hashtable sharedFonts = new Hashtable();
@@ -392,10 +400,15 @@ public class StyleContext
EventListenerList listenerList;
Hashtable styleTable;
+ /**
+ * Creates a new instance of the style context. Add the default style
+ * to the style table.
+ */
public StyleContext()
{
listenerList = new EventListenerList();
styleTable = new Hashtable();
+ styleTable.put(DEFAULT_STYLE, defaultStyle);
}
protected SmallAttributeSet createSmallAttributeSet(AttributeSet a)
@@ -436,11 +449,25 @@ public class StyleContext
styleTable.remove(name);
}
+ /**
+ * Get the style from the style table. If the passed name
+ * matches {@link #DEFAULT_STYLE}, returns the default style.
+ * Otherwise returns the previously defined style of
+ * <code>null</code> if the style with the given name is not defined.
+ *
+ * @param name the name of the style.
+ *
+ * @return the style with the given name or null if no such defined.
+ */
public Style getStyle(String name)
{
return (Style) styleTable.get(name);
}
-
+
+ /**
+ * Get the names of the style. The returned enumeration always
+ * contains at least one member, the default style.
+ */
public Enumeration getStyleNames()
{
return styleTable.keys();
diff --git a/javax/swing/text/StyledDocument.java b/javax/swing/text/StyledDocument.java
index 26b10ca22..ea277540f 100644
--- a/javax/swing/text/StyledDocument.java
+++ b/javax/swing/text/StyledDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/StyledEditorKit.java b/javax/swing/text/StyledEditorKit.java
index 148ebd32b..4dfbf9103 100644
--- a/javax/swing/text/StyledEditorKit.java
+++ b/javax/swing/text/StyledEditorKit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,458 +46,660 @@ import java.io.Serializable;
import javax.swing.Action;
import javax.swing.JEditorPane;
+import javax.swing.JTextPane;
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;
/**
- * StyledEditorKit
+ * An {@link EditorKit} that supports editing styled text.
*
* @author Andrew Selkirk
+ * @author Roman Kennke (roman@kennke.org)
*/
public class StyledEditorKit extends DefaultEditorKit
{
+ /** The serialVersionUID. */
private static final long serialVersionUID = 7002391892985555948L;
/**
- * UnderlineAction
+ * Toggles the underline attribute for the selected text.
*/
public static class UnderlineAction extends StyledEditorKit.StyledTextAction
{
/**
- * Constructor UnderlineAction
+ * Creates an instance of <code>UnderlineAction</code>.
*/
public UnderlineAction()
{
- super("TODO");
- // TODO
+ super("TODO"); // TODO: Figure out name for this action.
}
/**
- * actionPerformed
- * @param event TODO
+ * Performs the action.
+ *
+ * @param event the <code>ActionEvent</code> that describes the action
*/
public void actionPerformed(ActionEvent event)
{
- // TODO
+ JEditorPane editor = getEditor(event);
+ StyledDocument doc = getStyledDocument(editor);
+ Element el = doc.getCharacterElement(editor.getSelectionStart());
+ boolean isUnderline = StyleConstants.isUnderline(el.getAttributes());
+ SimpleAttributeSet atts = new SimpleAttributeSet();
+ StyleConstants.setUnderline(atts, ! isUnderline);
+ setCharacterAttributes(editor, atts, false);
}
}
/**
- * ItalicAction
+ * Toggles the italic attribute for the selected text.
*/
public static class ItalicAction extends StyledEditorKit.StyledTextAction
{
/**
- * Constructor ItalicAction
+ * Creates an instance of <code>ItalicAction</code>.
*/
public ItalicAction()
{
- super("TODO");
- // TODO
+ super("TODO"); // TODO: Figure out correct name of this Action.
}
/**
- * actionPerformed
- * @param event TODO
+ * Performs the action.
+ *
+ * @param event the <code>ActionEvent</code> that describes the action
*/
public void actionPerformed(ActionEvent event)
{
- // TODO
+ JEditorPane editor = getEditor(event);
+ StyledDocument doc = getStyledDocument(editor);
+ Element el = doc.getCharacterElement(editor.getSelectionStart());
+ boolean isItalic = StyleConstants.isItalic(el.getAttributes());
+ SimpleAttributeSet atts = new SimpleAttributeSet();
+ StyleConstants.setItalic(atts, ! isItalic);
+ setCharacterAttributes(editor, atts, false);
}
}
/**
- * BoldAction
+ * Toggles the bold attribute for the selected text.
*/
public static class BoldAction extends StyledEditorKit.StyledTextAction
{
/**
- * Constructor BoldAction
+ * Creates an instance of <code>BoldAction</code>.
*/
public BoldAction()
{
- super("TODO");
- // TODO
+ super("TODO"); // TODO: Figure out correct name of this Action.
}
/**
- * actionPerformed
- * @param event TODO
+ * Performs the action.
+ *
+ * @param event the <code>ActionEvent</code> that describes the action
*/
public void actionPerformed(ActionEvent event)
{
- // TODO
+ JEditorPane editor = getEditor(event);
+ StyledDocument doc = getStyledDocument(editor);
+ Element el = doc.getCharacterElement(editor.getSelectionStart());
+ boolean isBold = StyleConstants.isBold(el.getAttributes());
+ SimpleAttributeSet atts = new SimpleAttributeSet();
+ StyleConstants.setItalic(atts, ! isBold);
+ setCharacterAttributes(editor, atts, false);
}
}
/**
- * AlignmentAction
+ * Sets the alignment attribute on the selected text.
*/
public static class AlignmentAction extends StyledEditorKit.StyledTextAction
{
/**
- * a
+ * The aligment to set.
*/
private int a;
/**
- * Constructor AlignmentAction
- * @param nm TODO
- * @param a TODO
+ * Creates a new instance of <code>AlignmentAction</code> to set the
+ * alignment to <code>a</code>.
+ *
+ * @param nm the name of the Action
+ * @param a the alignment to set
*/
public AlignmentAction(String nm, int a)
{
- super("TODO");
- // TODO
+ super(nm);
+ this.a = a;
}
/**
- * actionPerformed
- * @param event TODO
+ * Performs the action.
+ *
+ * @param event the <code>ActionEvent</code> that describes the action
*/
public void actionPerformed(ActionEvent event)
{
- // TODO
+ SimpleAttributeSet atts = new SimpleAttributeSet();
+ StyleConstants.setAlignment(atts, a);
+ setParagraphAttributes(getEditor(event), atts, false);
}
}
/**
- * ForegroundAction
+ * Sets the foreground color attribute on the selected text.
*/
public static class ForegroundAction extends StyledEditorKit.StyledTextAction
{
/**
- * fg
+ * The foreground color to set.
*/
private Color fg;
/**
- * Constructor ForegroundAction
- * @param nm TODO
- * @param fg TODO
+ * Creates a new instance of <code>ForegroundAction</code> to set the
+ * foreground color to <code>fg</code>.
+ *
+ * @param nm the name of the Action
+ * @param fg the foreground color to set
*/
public ForegroundAction(String nm, Color fg)
{
- super("TODO");
- // TODO
+ super(nm);
+ this.fg = fg;
}
/**
- * actionPerformed
- * @param event TODO
+ * Performs the action.
+ *
+ * @param event the <code>ActionEvent</code> that describes the action
*/
public void actionPerformed(ActionEvent event)
{
- // TODO
+ SimpleAttributeSet atts = new SimpleAttributeSet();
+ StyleConstants.setForeground(atts, fg);
+ setCharacterAttributes(getEditor(event), atts, false);
}
}
/**
- * FontSizeAction
+ * Sets the font size attribute on the selected text.
*/
public static class FontSizeAction extends StyledEditorKit.StyledTextAction
{
/**
- * size
+ * The font size to set.
*/
private int size;
/**
- * Constructor FontSizeAction
- * @param nm TODO
- * @param size TODO
+ * Creates a new instance of <code>FontSizeAction</code> to set the
+ * font size to <code>size</code>.
+ *
+ * @param nm the name of the Action
+ * @param size the font size to set
*/
public FontSizeAction(String nm, int size)
{
- super("TODO");
- // TODO
+ super(nm);
+ this.size = size;
}
/**
- * actionPerformed
- * @param event TODO
+ * Performs the action.
+ *
+ * @param event the <code>ActionEvent</code> that describes the action
*/
public void actionPerformed(ActionEvent event)
{
- // TODO
+ SimpleAttributeSet atts = new SimpleAttributeSet();
+ StyleConstants.setFontSize(atts, size);
+ setCharacterAttributes(getEditor(event), atts, false);
}
}
/**
- * FontFamilyAction
+ * Sets the font family attribute on the selected text.
*/
public static class FontFamilyAction extends StyledEditorKit.StyledTextAction
{
/**
- * family
+ * The font family to set.
*/
private String family;
/**
- * Constructor FontFamilyAction
- * @param nm TODO
- * @param family TODO
+ * Creates a new instance of <code>FontFamilyAction</code> to set the
+ * font family to <code>family</code>.
+ *
+ * @param nm the name of the Action
+ * @param family the font family to set
*/
public FontFamilyAction(String nm, String family)
{
- super("TODO");
- // TODO
+ super(nm);
+ this.family = family;
}
/**
- * actionPerformed
- * @param event TODO
+ * Performs the action.
+ *
+ * @param event the <code>ActionEvent</code> that describes the action
*/
public void actionPerformed(ActionEvent event)
{
- // TODO
+ SimpleAttributeSet atts = new SimpleAttributeSet();
+ StyleConstants.setFontFamily(atts, family);
+ setCharacterAttributes(getEditor(event), atts, false);
}
}
/**
- * StyledTextAction
+ * The abstract superclass of all styled TextActions. This class
+ * provides some useful methods to manipulate the text attributes.
*/
public abstract static class StyledTextAction extends TextAction
{
/**
- * Constructor StyledTextAction
- * @param nm TODO
+ * Creates a new instance of <code>StyledTextAction</code>.
+ *
+ * @param nm the name of the <code>StyledTextAction</code>
*/
public StyledTextAction(String nm)
{
super(nm);
- // TODO
}
/**
- * getEditor
- * @param event TODO
- * @returns JEditorPane
+ * Returns the <code>JEditorPane</code> component from which the
+ * <code>ActionEvent</code> originated.
+ *
+ * @param event the <code>ActionEvent</code>
+ * @return the <code>JEditorPane</code> component from which the
+ * <code>ActionEvent</code> originated
*/
protected final JEditorPane getEditor(ActionEvent event)
{
- return null; // TODO
+ return (JEditorPane) getTextComponent(event);
}
/**
- * setCharacterAttributes
- * @param value0 TODO
- * @param value1 TODO
- * @param value2 TODO
+ * Sets the specified character attributes on the currently selected
+ * text of <code>editor</code>. If <code>editor</code> does not have
+ * a selection, then the attributes are used as input attributes
+ * for newly inserted content.
+ *
+ * @param editor the <code>JEditorPane</code> component
+ * @param atts the text attributes to set
+ * @param replace if <code>true</code> the current attributes of the
+ * selection are replaces, otherwise they are merged
*/
- protected final void setCharacterAttributes(JEditorPane value0,
- AttributeSet value1,
- boolean value2)
+ protected final void setCharacterAttributes(JEditorPane editor,
+ AttributeSet atts,
+ boolean replace)
{
- // TODO
+ Document doc = editor.getDocument();
+ if (doc instanceof StyledDocument)
+ {
+ StyledDocument styleDoc = (StyledDocument) editor.getDocument();
+ EditorKit kit = editor.getEditorKit();
+ if (!(kit instanceof StyledEditorKit))
+ {
+ StyledEditorKit styleKit = (StyledEditorKit) kit;
+ int start = editor.getSelectionStart();
+ int end = editor.getSelectionEnd();
+ int dot = editor.getCaret().getDot();
+ if (start == dot && end == dot)
+ {
+ // If there is no selection, then we only update the
+ // input attributes.
+ MutableAttributeSet inputAttributes =
+ styleKit.getInputAttributes();
+ inputAttributes.addAttributes(atts);
+ }
+ else
+ styleDoc.setCharacterAttributes(start, end, atts, replace);
+ }
+ else
+ throw new AssertionError("The EditorKit for StyledTextActions "
+ + "is expected to be a StyledEditorKit");
+ }
+ else
+ throw new AssertionError("The Document for StyledTextActions is "
+ + "expected to be a StyledDocument.");
}
/**
- * getStyledDocument
- * @param value0 TODO
- * @returns StyledDocument
+ * Returns the {@link StyledDocument} that is used by <code>editor</code>.
+ *
+ * @param editor the <code>JEditorPane</code> from which to get the
+ * <code>StyledDocument</code>
+ *
+ * @return the {@link StyledDocument} that is used by <code>editor</code>
*/
- protected final StyledDocument getStyledDocument(JEditorPane value0)
+ protected final StyledDocument getStyledDocument(JEditorPane editor)
{
- return null; // TODO
+ Document doc = editor.getDocument();
+ if (!(doc instanceof StyledDocument))
+ throw new AssertionError("The Document for StyledEditorKits is "
+ + "expected to be a StyledDocument.");
+
+ return (StyledDocument) doc;
}
/**
- * getStyledEditorKit
- * @param value0 TODO
- * @returns StyledEditorKit
+ * Returns the {@link StyledEditorKit} that is used by <code>editor</code>.
+ *
+ * @param editor the <code>JEditorPane</code> from which to get the
+ * <code>StyledEditorKit</code>
+ *
+ * @return the {@link StyledEditorKit} that is used by <code>editor</code>
*/
- protected final StyledEditorKit getStyledEditorKit(JEditorPane value0)
+ protected final StyledEditorKit getStyledEditorKit(JEditorPane editor)
{
- return null; // TODO
+ EditorKit kit = editor.getEditorKit();
+ if (!(kit instanceof StyledEditorKit))
+ throw new AssertionError("The EditorKit for StyledDocuments is "
+ + "expected to be a StyledEditorKit.");
+
+ return (StyledEditorKit) kit;
}
/**
- * setParagraphAttributes
- * @param value0 TODO
- * @param value1 TODO
- * @param value2 TODO
+ * Sets the specified character attributes on the paragraph that
+ * contains the currently selected
+ * text of <code>editor</code>. If <code>editor</code> does not have
+ * a selection, then the attributes are set on the paragraph that
+ * contains the current caret position.
+ *
+ * @param editor the <code>JEditorPane</code> component
+ * @param atts the text attributes to set
+ * @param replace if <code>true</code> the current attributes of the
+ * selection are replaces, otherwise they are merged
*/
- protected final void setParagraphAttributes(JEditorPane value0,
- AttributeSet value1,
- boolean value2)
+ protected final void setParagraphAttributes(JEditorPane editor,
+ AttributeSet atts,
+ boolean replace)
{
- // TODO
+ Document doc = editor.getDocument();
+ if (doc instanceof StyledDocument)
+ {
+ StyledDocument styleDoc = (StyledDocument) editor.getDocument();
+ EditorKit kit = editor.getEditorKit();
+ if (!(kit instanceof StyledEditorKit))
+ {
+ StyledEditorKit styleKit = (StyledEditorKit) kit;
+ int start = editor.getSelectionStart();
+ int end = editor.getSelectionEnd();
+ int dot = editor.getCaret().getDot();
+ if (start == dot && end == dot)
+ {
+ // If there is no selection, then we only update the
+ // input attributes.
+ MutableAttributeSet inputAttributes =
+ styleKit.getInputAttributes();
+ inputAttributes.addAttributes(atts);
+ }
+ else
+ styleDoc.setParagraphAttributes(start, end, atts, replace);
+ }
+ else
+ throw new AssertionError("The EditorKit for StyledTextActions "
+ + "is expected to be a StyledEditorKit");
+ }
+ else
+ throw new AssertionError("The Document for StyledTextActions is "
+ + "expected to be a StyledDocument.");
}
}
/**
- * StyledViewFactory
+ * A {@link ViewFactory} that is able to create {@link View}s for
+ * the <code>Element</code>s that are supported by
+ * <code>StyledEditorKit</code>, namely the following types of Elements:
+ *
+ * <ul>
+ * <li>{@link AbstractDocument.ContentElementName}</li>
+ * <li>{@link AbstractDocument.ParagraphElementName}</li>
+ * <li>{@link AbstractDocument.SectionElementName}</li>
+ * <li>{@link StyleContext.ComponentElementName}</li>
+ * <li>{@link StyleContext.IconElementName}</li>
+ * </ul>
*/
static class StyledViewFactory
implements ViewFactory
{
/**
- * Constructor StyledViewFactory
- */
- StyledViewFactory()
- {
- // TODO
- }
-
- /**
- * create
- * @param value0 TODO
- * @returns View
+ * Creates a {@link View} for the specified <code>Element</code>.
+ *
+ * @param element the <code>Element</code> to create a <code>View</code>
+ * for
+ * @return the <code>View</code> for the specified <code>Element</code>
+ * or <code>null</code> if the type of <code>element</code> is
+ * not supported
*/
- public View create(Element value0)
+ public View create(Element element)
{
- return null; // TODO
+ String name = element.getName();
+ View view = null;
+ if (name.equals(AbstractDocument.ContentElementName))
+ view = new LabelView(element);
+ else if (name.equals(AbstractDocument.ParagraphElementName))
+ view = new ParagraphView(element);
+ else if (name.equals(AbstractDocument.SectionElementName))
+ view = new BoxView(element);
+ else if (name.equals(StyleConstants.ComponentElementName))
+ view = new ComponentView(element);
+ else if (name.equals(StyleConstants.IconElementName))
+ view = new IconView(element);
+
+ return view;
}
}
/**
- * AttributeTracker
+ * Keeps track of the caret position and updates the currentRun
+ * <code>Element</code> and the <code>inputAttributes</code>.
*/
- class AttributeTracker
- implements CaretListener, PropertyChangeListener, Serializable
+ class CaretTracker
+ implements CaretListener
{
/**
- * Constructor AttributeTracker
- * @param value0 TODO
- */
- AttributeTracker(StyledEditorKit value0)
- {
- // TODO
- }
-
- /**
- * updateInputAttributes
- * @param value0 TODO
- * @param value1 TODO
- * @param value2 TODO
+ * Notifies an update of the caret position.
+ *
+ * @param ev the event for the caret update
*/
- void updateInputAttributes(int value0, int value1, JTextComponent value2)
+ public void caretUpdate(CaretEvent ev)
{
- // TODO
- }
-
- /**
- * propertyChange
- * @param value0 TODO
- */
- public void propertyChange(PropertyChangeEvent value0)
- {
- // TODO
- }
-
- /**
- * caretUpdate
- * @param value0 TODO
- */
- public void caretUpdate(CaretEvent value0)
- {
- // TODO
+ Object source = ev.getSource();
+ if (!(source instanceof JTextComponent))
+ throw new AssertionError("CaretEvents are expected to come from a"
+ + "JTextComponent.");
+
+ JTextComponent text = (JTextComponent) source;
+ Document doc = text.getDocument();
+ if (!(doc instanceof StyledDocument))
+ throw new AssertionError("The Document used by StyledEditorKits is"
+ + "expected to be a StyledDocument");
+
+ StyledDocument styleDoc = (StyledDocument) doc;
+ currentRun = styleDoc.getCharacterElement(ev.getDot());
+ createInputAttributes(currentRun, inputAttributes);
}
}
/**
- * currentRun
+ * Stores the <code>Element</code> at the current caret position. This
+ * is updated by {@link CaretTracker}.
*/
Element currentRun;
/**
- * currentParagraph
+ * The current input attributes. This is updated by {@link CaretTracker}.
*/
- Element currentParagraph;
+ MutableAttributeSet inputAttributes;
/**
- * inputAttributes
+ * The CaretTracker that keeps track of the current input attributes, and
+ * the current character run Element.
*/
- MutableAttributeSet inputAttributes;
+ CaretTracker caretTracker;
+
+ /**
+ * The ViewFactory for StyledEditorKits.
+ */
+ StyledViewFactory viewFactory;
/**
- * Constructor StyledEditorKit
+ * Creates a new instance of <code>StyledEditorKit</code>.
*/
public StyledEditorKit()
{
- // TODO
+ inputAttributes = new SimpleAttributeSet();
}
/**
- * clone
- * @returns Object
+ * Creates an exact copy of this <code>StyledEditorKit</code>.
+ *
+ * @return an exact copy of this <code>StyledEditorKit</code>
*/
public Object clone()
{
- return null; // TODO
+ StyledEditorKit clone = (StyledEditorKit) super.clone();
+ // FIXME: Investigate which fields must be copied.
+ return clone;
}
/**
- * getActions
- * @returns Action[]
+ * Returns the <code>Action</code>s supported by this {@link EditorKit}.
+ * This includes the {@link BoldAction}, {@link ItalicAction} and
+ * {@link UnderlineAction} as well as the <code>Action</code>s supported
+ * by {@link DefaultEditorKit}.
+ *
+ * The other <code>Action</code>s of <code>StyledEditorKit</code> are not
+ * returned here, since they require a parameter and thus custom
+ * instantiation.
+ *
+ * @return the <code>Action</code>s supported by this {@link EditorKit}
*/
public Action[] getActions()
{
- return null; // TODO
+ Action[] actions1 = super.getActions();
+ Action[] myActions = new Action[] { new BoldAction(), new ItalicAction(),
+ new UnderlineAction() };
+ return TextAction.augmentList(actions1, myActions);
}
/**
- * getInputAttributes
- * @returns MutableAttributeSet
+ * Returns the current input attributes. These are automatically set on
+ * any newly inserted content, if not specified otherwise.
+ *
+ * @return the current input attributes
*/
public MutableAttributeSet getInputAttributes()
{
- return null; // TODO
+ return inputAttributes;
}
/**
- * getCharacterAttributeRun
- * @returns Element
+ * Returns the {@link Element} that represents the character run at the
+ * current caret position.
+ *
+ * @return the {@link Element} that represents the character run at the
+ * current caret position
*/
public Element getCharacterAttributeRun()
{
- return null; // TODO
+ return currentRun;
}
/**
- * createDefaultDocument
- * @returns Document
+ * Creates the default {@link Document} supported by this
+ * <code>EditorKit</code>. This is an instance of
+ * {@link DefaultStyledDocument} in this case but may be overridden by
+ * subclasses.
+ *
+ * @return an instance of <code>DefaultStyledDocument</code>
*/
public Document createDefaultDocument()
{
- return null; // TODO
+ return new DefaultStyledDocument();
}
/**
- * install
- * @param component TODO
+ * Installs this <code>EditorKit</code> on the specified {@link JEditorPane}.
+ * This basically involves setting up required listeners on the
+ * <code>JEditorPane</code>.
+ *
+ * @param component the <code>JEditorPane</code> to install this
+ * <code>EditorKit</code> on
*/
public void install(JEditorPane component)
{
- // TODO
+ CaretTracker tracker = new CaretTracker();
+ component.addCaretListener(tracker);
}
/**
- * deinstall
- * @param component TODO
+ * Deinstalls this <code>EditorKit</code> from the specified
+ * {@link JEditorPane}. This basically involves removing all listeners from
+ * <code>JEditorPane</code> that have been set up by this
+ * <code>EditorKit</code>.
+ *
+ * @param component the <code>JEditorPane</code> from which to deinstall this
+ * <code>EditorKit</code>
*/
public void deinstall(JEditorPane component)
{
- // TODO
+ CaretTracker t = caretTracker;
+ if (t != null)
+ component.removeCaretListener(t);
+ caretTracker = null;
}
/**
- * getViewFactory
- * @returns ViewFactory
+ * Returns a {@link ViewFactory} that is able to create {@link View}s
+ * for {@link Element}s that are supported by this <code>EditorKit</code>,
+ * namely the following types of <code>Element</code>s:
+ *
+ * <ul>
+ * <li>{@link AbstractDocument.ContentElementName}</li>
+ * <li>{@link AbstractDocument.ParagraphElementName}</li>
+ * <li>{@link AbstractDocument.SectionElementName}</li>
+ * <li>{@link StyleContext.ComponentElementName}</li>
+ * <li>{@link StyleContext.IconElementName}</li>
+ * </ul>
+ *
+ * @return a {@link ViewFactory} that is able to create {@link View}s
+ * for {@link Element}s that are supported by this <code>EditorKit</code>
*/
public ViewFactory getViewFactory()
{
- return null; // TODO
+ if (viewFactory == null)
+ viewFactory = new StyledViewFactory();
+ return viewFactory;
}
/**
- * createInputAttributes
- * @param element TODO
- * @param set TODO
+ * Copies the text attributes from <code>element</code> to <code>set</code>.
+ * This is called everytime when the caret position changes to keep
+ * track of the current input attributes. The attributes in <code>set</code>
+ * are cleaned before adding the attributes of <code>element</code>.
+ *
+ * This method filters out attributes for element names, <code>Icon</code>s
+ * and <code>Component</code>s.
+ *
+ * @param element the <code>Element</code> from which to copy the text
+ * attributes
+ * @param set the inputAttributes to copy the attributes to
*/
- protected void createInputAttributes(Element element, MutableAttributeSet set)
+ protected void createInputAttributes(Element element,
+ MutableAttributeSet set)
{
- // TODO
+ AttributeSet atts = element.getAttributes();
+ set.removeAttributes(set);
+ // FIXME: Filter out component, icon and element name attributes.
+ set.addAttributes(atts);
}
}
diff --git a/javax/swing/text/TabExpander.java b/javax/swing/text/TabExpander.java
index 56940f552..d70dd4604 100644
--- a/javax/swing/text/TabExpander.java
+++ b/javax/swing/text/TabExpander.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/TabSet.java b/javax/swing/text/TabSet.java
index 58ae65ef0..146f545aa 100644
--- a/javax/swing/text/TabSet.java
+++ b/javax/swing/text/TabSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/TabStop.java b/javax/swing/text/TabStop.java
index 2c95a63e4..032da8bca 100644
--- a/javax/swing/text/TabStop.java
+++ b/javax/swing/text/TabStop.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/TabableView.java b/javax/swing/text/TabableView.java
index 9d244be19..2a96ea94d 100644
--- a/javax/swing/text/TabableView.java
+++ b/javax/swing/text/TabableView.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/TextAction.java b/javax/swing/text/TextAction.java
index 0191a2dc4..8588e3cd2 100644
--- a/javax/swing/text/TextAction.java
+++ b/javax/swing/text/TextAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/Utilities.java b/javax/swing/text/Utilities.java
index 79047014d..d40408ddc 100644
--- a/javax/swing/text/Utilities.java
+++ b/javax/swing/text/Utilities.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/View.java b/javax/swing/text/View.java
index 760e3b0ae..7b6ce24b4 100644
--- a/javax/swing/text/View.java
+++ b/javax/swing/text/View.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -459,5 +459,58 @@ public abstract class View implements SwingConstants
if (ec != null)
preferenceChanged(this, true, true);
}
-}
+ /**
+ * Maps a position in the document into the coordinate space of the View.
+ * The output rectangle usually reflects the font height but has a width
+ * of zero.
+ *
+ * @param pos the position of the character in the model
+ * @param a the area that is occupied by the view
+ * @param bias either {@link Position.Bias.Forward} or
+ * {@link Position.Bias.Backward} depending on the preferred
+ * direction bias. If <code>null</code> this defaults to
+ * <code>Position.Bias.Forward</code>
+ *
+ * @return a rectangle that gives the location of the document position
+ * inside the view coordinate space
+ *
+ * @throws BadLocationException if <code>pos</code> is invalid
+ * @throws IllegalArgumentException if b is not one of the above listed
+ * valid values
+ */
+ public abstract Shape modelToView(int pos, Shape a, Position.Bias b)
+ throws BadLocationException;
+
+ /**
+ * Maps a region in the document into the coordinate space of the View.
+ *
+ * @param p1 the beginning position inside the document
+ * @param b1 the direction bias for the beginning position
+ * @param p2 the end position inside the document
+ * @param b2 the direction bias for the end position
+ * @param a the area that is occupied by the view
+ *
+ * @return a rectangle that gives the span of the document region
+ * inside the view coordinate space
+ *
+ * @throws BadLocationException if <code>p1</code> or <code>p2</code> are
+ * invalid
+ * @throws IllegalArgumentException if b1 or b2 is not one of the above
+ * listed valid values
+ */
+ public Shape modelToView(int p1, Position.Bias b1,
+ int p2, Position.Bias b2, Shape a)
+ throws BadLocationException
+ {
+ if (b1 != Position.Bias.Forward && b1 != Position.Bias.Backward)
+ throw new IllegalArgumentException
+ ("b1 must be either Position.Bias.Forward or Position.Bias.Backward");
+ if (b2 != Position.Bias.Forward && b2 != Position.Bias.Backward)
+ throw new IllegalArgumentException
+ ("b2 must be either Position.Bias.Forward or Position.Bias.Backward");
+ Shape s1 = modelToView(p1, a, b1);
+ Shape s2 = modelToView(p2, a, b2);
+ return s1.getBounds().union(s2.getBounds());
+ }
+}
diff --git a/javax/swing/text/ViewFactory.java b/javax/swing/text/ViewFactory.java
index c9cc4b792..079488017 100644
--- a/javax/swing/text/ViewFactory.java
+++ b/javax/swing/text/ViewFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/html/HTML.java b/javax/swing/text/html/HTML.java
index 06e0ef403..3c03a63a4 100644
--- a/javax/swing/text/html/HTML.java
+++ b/javax/swing/text/html/HTML.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -965,6 +965,21 @@ public class HTML
final int flags;
/**
+ * Create the unitialised instance of HTML.Tag.
+ *
+ * The {@link #breaksFlow()}, {@link #isBlock()}
+ * and {@link #isPreformatted()} will always return false.
+ * The {@link #toString()} will return <code>null</code>.
+ *
+ * @since 1.3
+ */
+ public Tag()
+ {
+ name = null;
+ flags = 0;
+ }
+
+ /**
* Creates a new Tag with the specified id, and with causesBreak
* and isBlock set to false.
*/
diff --git a/javax/swing/text/html/HTMLDocument.java b/javax/swing/text/html/HTMLDocument.java
index 45c87c7b7..a95e496ec 100644
--- a/javax/swing/text/html/HTMLDocument.java
+++ b/javax/swing/text/html/HTMLDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/html/HTMLEditorKit.java b/javax/swing/text/html/HTMLEditorKit.java
index 742eab36e..c0182fe6a 100644
--- a/javax/swing/text/html/HTMLEditorKit.java
+++ b/javax/swing/text/html/HTMLEditorKit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,19 +38,25 @@ exception statement from your version. */
package javax.swing.text.html;
+import java.io.IOException;
import java.io.Reader;
+import java.io.Serializable;
import javax.swing.text.BadLocationException;
import javax.swing.text.MutableAttributeSet;
+import javax.swing.text.StyledEditorKit;
/**
* This class is NOT implemented. This file currently holds only
* declarations of the two enclosing classes, necessary for testing
* the implemented javax.swing.text.html.parser package.
+ *
* @author No authorship is taken, implement the class and be!
* TODO: replace this header after implementing the class.
*/
public class HTMLEditorKit
+ extends StyledEditorKit
+ implements Serializable, Cloneable
{
/**
* The abstract HTML parser declaration.
@@ -70,7 +76,7 @@ public class HTMLEditorKit
public abstract void parse(Reader reader, ParserCallback callback,
boolean ignoreCharSet
)
- throws java.io.IOException;
+ throws IOException;
}
/**
@@ -118,8 +124,8 @@ public class HTMLEditorKit
* The method is called when the HTML closing tag ((like &lt;/table&gt;)
* is found or if the parser concludes that the one should be present
* in the current position.
- * @param The tag being handled
- * @position the tag position in the text being parsed.
+ * @param tag The tag being handled
+ * @param position the tag position in the text being parsed.
*/
public void handleEndTag(HTML.Tag tag, int position)
{
@@ -153,7 +159,7 @@ public class HTMLEditorKit
* is found or if the parser concludes that the one should be present
* in the current position.
* @param tag The tag being handled
- * @param position The tag position in the text bein parsed
+ * @param position The tag position in the text being parsed
*/
public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes,
int position
@@ -170,4 +176,75 @@ public class HTMLEditorKit
{
}
}
-}
+
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 8751997116710384592L;
+
+ /**
+ * Default cascading stylesheed file ("default.css").
+ */
+ public static final String DEFAULT_CSS = "default.css";
+
+ /**
+ * The <b>bold</b> action identifier.
+ */
+ public static final String BOLD_ACTION = "html-bold-action";
+
+ /**
+ * The <i>italic</i> action identifier.
+ */
+ public static final String ITALIC_ACTION = "html-italic-action";
+
+ /**
+ * The <font color="#FF0000">color</font> action indentifier
+ * (passing the color as an argument).
+ */
+ public static final String COLOR_ACTION = "html-color-action";
+
+ /**
+ * The <font size="+1">increase</font> font action identifier.
+ */
+ public static final String FONT_CHANGE_BIGGER = "html-font-bigger";
+
+ /**
+ * The <font size="-1">decrease</font> font action identifier.
+ */
+ public static final String FONT_CHANGE_SMALLER = "html-font-smaller";
+
+ /**
+ * Align images at the bottom.
+ */
+ public static final String IMG_ALIGN_BOTTOM = "html-image-align-bottom";
+
+ /**
+ * Align images at the middle.
+ */
+ public static final String IMG_ALIGN_MIDDLE = "html-image-align-middle";
+
+ /**
+ * Align images at the top.
+ */
+ public static final String IMG_ALIGN_TOP = "html-image-align-top";
+
+ /**
+ * Align images at the border.
+ */
+ public static final String IMG_BORDER = "html-image-border";
+
+ /**
+ * The "logical style" action identifier, passing that style as parameter.
+ */
+ public static final String LOGICAL_STYLE_ACTION = "html-logical-style-action";
+
+ /**
+ * The "ident paragraph left" action.
+ */
+ public static final String PARA_INDENT_LEFT = "html-para-indent-left";
+
+ /**
+ * The "ident paragraph right" action.
+ */
+ public static final String PARA_INDENT_RIGHT = "html-para-indent-right";
+} \ No newline at end of file
diff --git a/javax/swing/text/html/HTMLFrameHyperlinkEvent.java b/javax/swing/text/html/HTMLFrameHyperlinkEvent.java
index 82de2a803..dc0ab10a8 100644
--- a/javax/swing/text/html/HTMLFrameHyperlinkEvent.java
+++ b/javax/swing/text/html/HTMLFrameHyperlinkEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/html/package.html b/javax/swing/text/html/package.html
index 622c4fcc1..c7e774428 100644
--- a/javax/swing/text/html/package.html
+++ b/javax/swing/text/html/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/html/parser/AttributeList.java b/javax/swing/text/html/parser/AttributeList.java
index c74f35953..5bca0bfa7 100644
--- a/javax/swing/text/html/parser/AttributeList.java
+++ b/javax/swing/text/html/parser/AttributeList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/html/parser/ContentModel.java b/javax/swing/text/html/parser/ContentModel.java
index 7c8ff35a2..deb7b1602 100644
--- a/javax/swing/text/html/parser/ContentModel.java
+++ b/javax/swing/text/html/parser/ContentModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/html/parser/DTD.java b/javax/swing/text/html/parser/DTD.java
index 270c8158f..f17ca011e 100644
--- a/javax/swing/text/html/parser/DTD.java
+++ b/javax/swing/text/html/parser/DTD.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -62,7 +62,8 @@ import java.util.Vector;
* <p>
* If you need more information about SGML DTD documents,
* the author suggests to read SGML tutorial on
- * {@link http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html}.
+ * <a href="http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html"
+ * >http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html</a>.
* We also recommend Goldfarb C.F (1991) <i>The SGML Handbook</i>,
* Oxford University Press, 688 p, ISBN: 0198537379.
* </p>
@@ -402,7 +403,7 @@ public class DTD
* placed to the field
* {@link javax.swing.text.html.parser.AttributeList#next },
* creating a linked list.
- * @return
+ * @return The attributes.
*/
protected AttributeList defAttributeList(String name, int type, int modifier,
String default_value,
@@ -541,7 +542,7 @@ public class DTD
* The unknown elements are automatically defined and added
* to the element table.
* @param elements
- * @return
+ * @return The bit set.
*/
private BitSet bitSet(String[] elements)
{
diff --git a/javax/swing/text/html/parser/DTDConstants.java b/javax/swing/text/html/parser/DTDConstants.java
index 29218c25d..75e7afb4d 100644
--- a/javax/swing/text/html/parser/DTDConstants.java
+++ b/javax/swing/text/html/parser/DTDConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,14 +40,16 @@ package javax.swing.text.html.parser;
/**
* <p>This class defines the SGML basic types, used for describing HTML 4.01
- * at {@link http://www.w3.org/TR/html4/types.html }. Not all constants,
+ * at <a href="http://www.w3.org/TR/html4/types.html"
+ * >http://www.w3.org/TR/html4/types.html</a>. Not all constants,
* defined here, are actually used in HTML 4.01 SGML specification. Some others
* are defined just as part of the required implementation.
* </p>
* <p>
* If you need more information about SGML DTD documents,
* the author suggests to read SGML tutorial on
- * {@link http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html}.
+ * <a href="http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html"
+ * >http://www.w3.org/TR/WD-html40-970708/intro/sgmltut.html</a>.
* We also recommend Goldfarb C.F (1991) <i>The SGML Handbook</i>,
* Oxford University Press, 688 p, ISBN: 0198537379.
* </p>
diff --git a/javax/swing/text/html/parser/DocumentParser.java b/javax/swing/text/html/parser/DocumentParser.java
index f210d4f88..164297f18 100644
--- a/javax/swing/text/html/parser/DocumentParser.java
+++ b/javax/swing/text/html/parser/DocumentParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -167,7 +167,7 @@ public class DocumentParser
* to get a default DTD; you must either refer to the implementation -
* specific packages, write your own DTD or obtain the working instance
* of parser in other way, for example, by calling
- * {@link javax.swing.text.html.HTMLEditorKit#getParser() }.
+ * {@link javax.swing.text.html.HTMLEditorKit#getParser()}.
* @param a_dtd a DTD to use.
*/
public DocumentParser(DTD a_dtd)
@@ -180,18 +180,18 @@ public class DocumentParser
* Parses the HTML document, calling methods of the provided
* callback. This method must be multithread - safe.
* @param reader The reader to read the HTML document from
- * @param callback The callback that is notifyed about the presence
+ * @param aCallback The callback that is notifyed about the presence
* of HTML elements in the document.
* @param ignoreCharSet If thrue, any charset changes during parsing
* are ignored.
* @throws java.io.IOException
*/
- public void parse(Reader reader, HTMLEditorKit.ParserCallback a_callback,
+ public void parse(Reader reader, HTMLEditorKit.ParserCallback aCallback,
boolean ignoreCharSet
)
throws IOException
{
- callBack = a_callback;
+ callBack = aCallback;
gnu.parse(reader);
callBack.handleEndOfLineString(gnu.getEndOfLineSequence());
@@ -230,7 +230,7 @@ public class DocumentParser
* The method is called when the HTML closing tag ((like &lt;/table&gt;)
* is found or if the parser concludes that the one should be present
* in the current position.
- * @param The tag being handled
+ * @param tag The tag being handled
*/
protected void handleEndTag(TagElement tag)
{
@@ -245,7 +245,7 @@ public class DocumentParser
* The method is called when the HTML opening tag ((like &lt;table&gt;)
* is found or if the parser concludes that the one should be present
* in the current position.
- * @param The tag being handled
+ * @param tag The tag being handled
*/
protected void handleStartTag(TagElement tag)
{
diff --git a/javax/swing/text/html/parser/Element.java b/javax/swing/text/html/parser/Element.java
index 4f39fbef0..098983c69 100644
--- a/javax/swing/text/html/parser/Element.java
+++ b/javax/swing/text/html/parser/Element.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -225,7 +225,7 @@ public final class Element
/**
* Get all attributes of this document as an attribute list.
- * @return
+ * @return The attribute list.
*/
public AttributeList getAttributes()
{
diff --git a/javax/swing/text/html/parser/Entity.java b/javax/swing/text/html/parser/Entity.java
index ba79552c7..766984f9c 100644
--- a/javax/swing/text/html/parser/Entity.java
+++ b/javax/swing/text/html/parser/Entity.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/html/parser/Parser.java b/javax/swing/text/html/parser/Parser.java
index 7202f6b5b..7ff6853da 100644
--- a/javax/swing/text/html/parser/Parser.java
+++ b/javax/swing/text/html/parser/Parser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -327,7 +327,7 @@ public class Parser
* Handle the tag with no content, like &lt;br&gt;. The method is
* called for the elements that, in accordance with the current DTD,
* has an empty content.
- * @param The tag being handled.
+ * @param tag The tag being handled.
* @throws javax.swing.text.ChangedCharSetException
*/
protected void handleEmptyTag(TagElement tag)
@@ -339,7 +339,7 @@ public class Parser
* The method is called when the HTML closing tag ((like &lt;/table&gt;)
* is found or if the parser concludes that the one should be present
* in the current position.
- * @param The tag being handled
+ * @param tag The tag being handled
*/
protected void handleEndTag(TagElement tag)
{
@@ -354,7 +354,7 @@ public class Parser
* The method is called when the HTML opening tag ((like &lt;table&gt;)
* is found or if the parser concludes that the one should be present
* in the current position.
- * @param The tag being handled
+ * @param tag The tag being handled
*/
protected void handleStartTag(TagElement tag)
{
@@ -383,7 +383,7 @@ public class Parser
* both title starting and closing tags are already behind.
* The passed argument contains the concatenation of all
* title text sections.
- * @param The title text.
+ * @param title The title text.
*/
protected void handleTitle(char[] title)
{
@@ -402,7 +402,7 @@ public class Parser
/**
* Constructs the tag from the given element.
- * @param the tag base {@link javax.swing.text.html.parser.Element}
+ * @param element the tag base {@link javax.swing.text.html.parser.Element}
* @param isSupposed true if the tag is not actually present in the
* html input, but the parser supposes that it should to occur in
* the current location.
@@ -427,7 +427,7 @@ public class Parser
* is found or if the parser concludes that the one should be present
* in the current position. The method is called immediately before
* calling the handleStartTag.
- * @param The tag
+ * @param tag The tag
*/
protected void startTag(TagElement tag)
throws ChangedCharSetException
diff --git a/javax/swing/text/html/parser/ParserDelegator.java b/javax/swing/text/html/parser/ParserDelegator.java
index 30f77ca7c..e5d2db4df 100644
--- a/javax/swing/text/html/parser/ParserDelegator.java
+++ b/javax/swing/text/html/parser/ParserDelegator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -113,7 +113,9 @@ public class ParserDelegator
DTD getDTD()
{
- return dtd;
+ // Accessing the inherited gnu.javax.swing.text.html.parser.support.Parser
+ // field. super. is a workaround, required to support JDK1.3's javac.
+ return super.dtd;
}
}
@@ -141,7 +143,7 @@ public class ParserDelegator
* Parses the HTML document, calling methods of the provided
* callback. This method must be multithread - safe.
* @param reader The reader to read the HTML document from
- * @param callback The callback that is notifyed about the presence
+ * @param a_callback The callback that is notifyed about the presence
* of HTML elements in the document.
* @param ignoreCharSet If thrue, any charset changes during parsing
* are ignored.
@@ -189,7 +191,7 @@ public class ParserDelegator
* all subsequent calls to the parse(...) . If you need to specify
* your DTD locally, simply {@link javax.swing.text.html.parser.Parser}
* instead.
- * @param dtd The DTD that will be used to parse documents by this class.
+ * @param a_dtd The DTD that will be used to parse documents by this class.
* @param name The name of this DTD.
* @return No standard is specified on which instance of DTD must be
* returned by this method, and it is recommended to leave the returned
diff --git a/javax/swing/text/html/parser/TagElement.java b/javax/swing/text/html/parser/TagElement.java
index ab9465261..4558b15eb 100644
--- a/javax/swing/text/html/parser/TagElement.java
+++ b/javax/swing/text/html/parser/TagElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/html/parser/package.html b/javax/swing/text/html/parser/package.html
index d9cceb01c..5d5157fb2 100644
--- a/javax/swing/text/html/parser/package.html
+++ b/javax/swing/text/html/parser/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/package.html b/javax/swing/text/package.html
index 9e5bebb9f..50043b6c4 100644
--- a/javax/swing/text/package.html
+++ b/javax/swing/text/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/rtf/ControlWordToken.java b/javax/swing/text/rtf/ControlWordToken.java
index 043cae412..7008f0fd4 100644
--- a/javax/swing/text/rtf/ControlWordToken.java
+++ b/javax/swing/text/rtf/ControlWordToken.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/rtf/RTFEditorKit.java b/javax/swing/text/rtf/RTFEditorKit.java
index 8a6e88a84..b2ebe3dd1 100644
--- a/javax/swing/text/rtf/RTFEditorKit.java
+++ b/javax/swing/text/rtf/RTFEditorKit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/rtf/RTFParseException.java b/javax/swing/text/rtf/RTFParseException.java
index dba51d2e0..2a9c64f05 100644
--- a/javax/swing/text/rtf/RTFParseException.java
+++ b/javax/swing/text/rtf/RTFParseException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/rtf/RTFParser.java b/javax/swing/text/rtf/RTFParser.java
index fe837fbff..4f0f967c1 100644
--- a/javax/swing/text/rtf/RTFParser.java
+++ b/javax/swing/text/rtf/RTFParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/rtf/RTFScanner.java b/javax/swing/text/rtf/RTFScanner.java
index d964a4347..3cdd6e8e0 100644
--- a/javax/swing/text/rtf/RTFScanner.java
+++ b/javax/swing/text/rtf/RTFScanner.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/rtf/TextToken.java b/javax/swing/text/rtf/TextToken.java
index e326792cc..2d6d527d1 100644
--- a/javax/swing/text/rtf/TextToken.java
+++ b/javax/swing/text/rtf/TextToken.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/text/rtf/Token.java b/javax/swing/text/rtf/Token.java
index a7a955269..7d5adaaf0 100644
--- a/javax/swing/text/rtf/Token.java
+++ b/javax/swing/text/rtf/Token.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/AbstractLayoutCache.java b/javax/swing/tree/AbstractLayoutCache.java
index 6fb75f77f..adece101d 100644
--- a/javax/swing/tree/AbstractLayoutCache.java
+++ b/javax/swing/tree/AbstractLayoutCache.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,7 +48,8 @@ import javax.swing.event.TreeModelEvent;
*
* @author Andrew Selkirk
*/
-public abstract class AbstractLayoutCache implements RowMapper
+public abstract class AbstractLayoutCache
+ implements RowMapper
{
/**
* class NodeDimensions
@@ -74,8 +75,7 @@ public abstract class AbstractLayoutCache implements RowMapper
* @return Rectangle
*/
public abstract Rectangle getNodeDimensions(Object value0, int value1,
- int value2, boolean value3,
- Rectangle value4);
+ int value2, boolean value3, Rectangle value4);
}
/**
@@ -108,7 +108,7 @@ public abstract class AbstractLayoutCache implements RowMapper
*/
public AbstractLayoutCache()
{
- // Do nothing here.
+ // Do nothing here.
}
/**
@@ -134,27 +134,31 @@ public abstract class AbstractLayoutCache implements RowMapper
/**
* getNodeDimensions
*
- * @param value0 TODO
- * @param value1 TODO
- * @param value2 TODO
- * @param value3 TODO
- * @param value4 TODO
+ * @param value TODO
+ * @param row TODO
+ * @param depth TODO
+ * @param expanded TODO
+ * @param bounds TODO
*
* @return Rectangle
*/
- protected Rectangle getNodeDimensions(Object value0, int value1, int value2, boolean value3, Rectangle value4)
+ protected Rectangle getNodeDimensions(Object value, int row, int depth,
+ boolean expanded, Rectangle bounds)
{
- return null; // TODO
+ if (bounds == null)
+ return new Rectangle();
+ return null;
+ // TODO
}
/**
* Sets the model that provides the tree data.
*
- * @param the model
+ * @param model the model
*/
public void setModel(TreeModel model)
{
- treeModel = model;
+ treeModel = model;
}
/**
@@ -314,7 +318,7 @@ public abstract class AbstractLayoutCache implements RowMapper
*
* @return int
*/
- public abstract int getVisibleChildCount(TreePath value0);
+ public abstract int getVisibleChildCount(TreePath path);
/**
* setExpandedState
diff --git a/javax/swing/tree/DefaultMutableTreeNode.java b/javax/swing/tree/DefaultMutableTreeNode.java
index de34ee072..e709e2a04 100644
--- a/javax/swing/tree/DefaultMutableTreeNode.java
+++ b/javax/swing/tree/DefaultMutableTreeNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,14 +45,19 @@ import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
+import java.util.LinkedList;
+import java.util.NoSuchElementException;
import java.util.Stack;
import java.util.Vector;
+
/**
* DefaultMutableTreeNode
*
* @author Andrew Selkirk
+ * @author Robert Schuster (robertschuster@fsfe.org)
*/
public class DefaultMutableTreeNode
implements Cloneable, MutableTreeNode, Serializable
@@ -232,7 +237,7 @@ public class DefaultMutableTreeNode
* Inserts given child node at the given index.
*
* @param node the child node
- * @param value the index.
+ * @param index the index.
*/
public void insert(MutableTreeNode node, int index)
{
@@ -353,7 +358,7 @@ public class DefaultMutableTreeNode
*/
public void removeFromParent()
{
- // FIXME: IS this implementation really correct ?
+ parent.remove(this);
parent = null;
}
@@ -389,7 +394,7 @@ public class DefaultMutableTreeNode
/**
* isNodeDescendant
*
- * @param node0 TODO
+ * @param node TODO
*
* @return boolean
*/
@@ -656,7 +661,7 @@ public class DefaultMutableTreeNode
*/
public Enumeration preorderEnumeration()
{
- return null; // TODO: Implement me.
+ return new PreorderEnumeration(this);
}
/**
@@ -666,7 +671,7 @@ public class DefaultMutableTreeNode
*/
public Enumeration postorderEnumeration()
{
- return null; // TODO: Implement me.
+ return new PostorderEnumeration(this);
}
/**
@@ -676,7 +681,7 @@ public class DefaultMutableTreeNode
*/
public Enumeration breadthFirstEnumeration()
{
- return null; // TODO: Implement me.
+ return new BreadthFirstEnumeration(this);
}
/**
@@ -913,6 +918,7 @@ public class DefaultMutableTreeNode
if (parent == null)
return null;
+ // TODO: Fix implementation.
return null;
//return parent.getChildAfter(this);
}
@@ -926,7 +932,8 @@ public class DefaultMutableTreeNode
{
if (parent == null)
return null;
-
+
+ // TODO: Fix implementation.
return null;
//return parent.getChildBefore(this);
}
@@ -951,4 +958,155 @@ public class DefaultMutableTreeNode
return count;
}
+
+ /** Provides an enumeration of a tree in breadth-first traversal
+ * order.
+ */
+ static class BreadthFirstEnumeration implements Enumeration
+ {
+
+ LinkedList queue = new LinkedList();
+
+ BreadthFirstEnumeration(TreeNode node)
+ {
+ queue.add(node);
+ }
+
+ public boolean hasMoreElements()
+ {
+ return !queue.isEmpty();
+ }
+
+ public Object nextElement()
+ {
+ if(queue.isEmpty())
+ throw new NoSuchElementException("No more elements left.");
+
+ TreeNode node = (TreeNode) queue.removeFirst();
+
+ Enumeration children = node.children();
+ while (children.hasMoreElements())
+ queue.add(children.nextElement());
+
+ return node;
+ }
+ }
+
+ /** Provides an enumeration of a tree traversing it
+ * preordered.
+ */
+ static class PreorderEnumeration implements Enumeration
+ {
+ TreeNode next;
+
+ Stack childrenEnums = new Stack();
+
+ PreorderEnumeration(TreeNode node)
+ {
+ next = node;
+ childrenEnums.push(node.children());
+ }
+
+ public boolean hasMoreElements()
+ {
+ return next != null;
+ }
+
+ public Object nextElement()
+ {
+ if( next == null )
+ throw new NoSuchElementException("No more elements left.");
+
+ Object current = next;
+
+ Enumeration children = (Enumeration) childrenEnums.peek();
+
+ // Retrieves the next element.
+ next = traverse(children);
+
+ return current;
+ }
+
+ private TreeNode traverse(Enumeration children)
+ {
+ // If more children are available step down.
+ if( children.hasMoreElements() )
+ {
+ TreeNode child = (TreeNode) children.nextElement();
+ childrenEnums.push(child.children());
+
+ return child;
+ }
+
+ // If no children are left, we return to a higher level.
+ childrenEnums.pop();
+
+ // If there are no more levels left, there is no next
+ // element to return.
+ if ( childrenEnums.isEmpty() )
+ return null;
+ else
+ {
+ return traverse((Enumeration) childrenEnums.peek());
+ }
+ }
+ }
+
+ /** Provides an enumeration of a tree traversing it
+ * postordered (= depth-first).
+ */
+ static class PostorderEnumeration implements Enumeration
+ {
+
+ Stack nodes = new Stack();
+ Stack childrenEnums = new Stack();
+
+ PostorderEnumeration(TreeNode node)
+ {
+ nodes.push(node);
+ childrenEnums.push(node.children());
+ }
+
+ public boolean hasMoreElements()
+ {
+ return !nodes.isEmpty();
+ }
+
+ public Object nextElement()
+ {
+ if( nodes.isEmpty() )
+ throw new NoSuchElementException("No more elements left!");
+
+ Enumeration children = (Enumeration) childrenEnums.peek();
+
+ return traverse(children);
+ }
+
+ private Object traverse(Enumeration children)
+ {
+ if ( children.hasMoreElements() )
+ {
+ TreeNode node = (TreeNode) children.nextElement();
+ nodes.push(node);
+
+ Enumeration newChildren = node.children();
+ childrenEnums.push(newChildren);
+
+ return traverse(newChildren);
+ }
+ else
+ {
+ childrenEnums.pop();
+
+ // Returns the node whose children
+ // have all been visited. (= postorder)
+ Object next = nodes.peek();
+ nodes.pop();
+
+ return next;
+ }
+ }
+
+ }
+
}
diff --git a/javax/swing/tree/DefaultTreeCellEditor.java b/javax/swing/tree/DefaultTreeCellEditor.java
index af280201b..e509d2c18 100644
--- a/javax/swing/tree/DefaultTreeCellEditor.java
+++ b/javax/swing/tree/DefaultTreeCellEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/DefaultTreeCellRenderer.java b/javax/swing/tree/DefaultTreeCellRenderer.java
index beae3840b..0f1792161 100644
--- a/javax/swing/tree/DefaultTreeCellRenderer.java
+++ b/javax/swing/tree/DefaultTreeCellRenderer.java
@@ -1,6 +1,6 @@
-/* DefaultTreeCellRenderer.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
-
+/* DefaultTreeCellRenderer.java
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -35,7 +35,6 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package javax.swing.tree;
import java.awt.Color;
@@ -54,15 +53,16 @@ import javax.swing.plaf.UIResource;
/**
* DefaultTreeCellRenderer
+ *
* @author Andrew Selkirk
*/
public class DefaultTreeCellRenderer
- extends JLabel
- implements TreeCellRenderer
+ extends JLabel
+ implements TreeCellRenderer
{
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
// Variables --------------------------------------------------
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
/**
* selected
@@ -118,380 +118,475 @@ public class DefaultTreeCellRenderer
* borderSelectionColor
*/
protected Color borderSelectionColor;
+
-
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
// Initialization ---------------------------------------------
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
/**
* Constructor DefaultTreeCellRenderer
*/
- public DefaultTreeCellRenderer() {
- UIDefaults defaults = UIManager.getLookAndFeelDefaults();
-
- setLeafIcon(getDefaultLeafIcon());
- setOpenIcon(getDefaultOpenIcon());
- setClosedIcon(getDefaultClosedIcon());
-
- setTextNonSelectionColor(defaults.getColor("Tree.textForeground"));
- setTextSelectionColor(defaults.getColor("Tree.selectionForeground"));
- setBackgroundNonSelectionColor(defaults.getColor("Tree.textBackground"));
- setBackgroundSelectionColor(defaults.getColor("Tree.selectionBackground"));
- setBorderSelectionColor(defaults.getColor("Tree.selectionBorderColor"));
+ public DefaultTreeCellRenderer()
+ {
+ UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+
+ setLeafIcon(getDefaultLeafIcon());
+ setOpenIcon(getDefaultOpenIcon());
+ setClosedIcon(getDefaultClosedIcon());
+
+ setTextNonSelectionColor(defaults.getColor("Tree.textForeground"));
+ setTextSelectionColor(defaults.getColor("Tree.selectionForeground"));
+ setBackgroundNonSelectionColor(defaults
+ .getColor("Tree.nonSelectionBackground"));
+ setBackgroundSelectionColor(defaults
+ .getColor("Tree.selectionBackground"));
+ setBorderSelectionColor(defaults
+ .getColor("Tree.selectionBorderColor"));
}
-
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
// Methods ----------------------------------------------------
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
/**
* getDefaultOpenIcon
+ *
* @returns Icon
*/
- public Icon getDefaultOpenIcon() {
- return UIManager.getLookAndFeelDefaults().getIcon("Tree.openIcon");
+ public Icon getDefaultOpenIcon()
+ {
+ return UIManager.getLookAndFeelDefaults().getIcon("Tree.openIcon");
}
/**
* getDefaultClosedIcon
+ *
* @returns Icon
*/
- public Icon getDefaultClosedIcon() {
- return UIManager.getLookAndFeelDefaults().getIcon("Tree.closedIcon");
+ public Icon getDefaultClosedIcon()
+ {
+ return UIManager.getLookAndFeelDefaults().getIcon("Tree.closedIcon");
}
/**
* getDefaultLeafIcon
+ *
* @returns Icon
*/
- public Icon getDefaultLeafIcon() {
- return UIManager.getLookAndFeelDefaults().getIcon("Tree.leafIcon");
+ public Icon getDefaultLeafIcon()
+ {
+ return UIManager.getLookAndFeelDefaults().getIcon("Tree.leafIcon");
}
/**
* setOpenIcon
- * @param value0 TODO
+ *
+ * @param i the icon.
*/
- public void setOpenIcon(Icon i) {
- openIcon = i;
+ public void setOpenIcon(Icon i)
+ {
+ openIcon = i;
}
/**
* getOpenIcon
+ *
* @returns Icon
*/
- public Icon getOpenIcon() {
- return openIcon;
- }
+ public Icon getOpenIcon()
+ {
+ return openIcon;
+ }
/**
* setClosedIcon
- * @param value0 TODO
+ *
+ * @param i the icon.
*/
- public void setClosedIcon(Icon i) {
- closedIcon = i;
- }
+ public void setClosedIcon(Icon i)
+ {
+ closedIcon = i;
+ }
/**
* getClosedIcon
+ *
* @returns Icon
*/
- public Icon getClosedIcon() {
- return closedIcon;
- }
+ public Icon getClosedIcon()
+ {
+ return closedIcon;
+ }
/**
* setLeafIcon
- * @param value0 TODO
+ *
+ * @param i the icon.
*/
- public void setLeafIcon(Icon i) {
- leafIcon = i;
+ public void setLeafIcon(Icon i)
+ {
+ leafIcon = i;
}
/**
* getLeafIcon
+ *
* @returns Icon
*/
- public Icon getLeafIcon() {
- return leafIcon;
+ public Icon getLeafIcon()
+ {
+ return leafIcon;
}
/**
* setTextSelectionColor
- * @param value0 TODO
+ *
+ * @param c the color.
*/
- public void setTextSelectionColor(Color c) {
- textSelectionColor = c;
+ public void setTextSelectionColor(Color c)
+ {
+ textSelectionColor = c;
}
/**
* getTextSelectionColor
+ *
* @returns Color
*/
- public Color getTextSelectionColor() {
- return textSelectionColor;
+ public Color getTextSelectionColor()
+ {
+ return textSelectionColor;
}
/**
* setTextNonSelectionColor
- * @param value0 TODO
+ *
+ * @param c the color.
*/
- public void setTextNonSelectionColor(Color c) {
- textNonSelectionColor = c;
+ public void setTextNonSelectionColor(Color c)
+ {
+ textNonSelectionColor = c;
}
/**
* getTextNonSelectionColor
+ *
* @returns Color
*/
- public Color getTextNonSelectionColor() {
- return textNonSelectionColor;
+ public Color getTextNonSelectionColor()
+ {
+ return textNonSelectionColor;
}
/**
* setBackgroundSelectionColor
- * @param value0 TODO
+ *
+ * @param c the color.
*/
- public void setBackgroundSelectionColor(Color c) {
- backgroundSelectionColor = c;
+ public void setBackgroundSelectionColor(Color c)
+ {
+ backgroundSelectionColor = c;
}
/**
* getBackgroundSelectionColor
+ *
* @returns Color
*/
- public Color getBackgroundSelectionColor() {
- return backgroundSelectionColor;
+ public Color getBackgroundSelectionColor()
+ {
+ return backgroundSelectionColor;
}
/**
* setBackgroundNonSelectionColor
- * @param value0 TODO
+ *
+ * @param c the color.
*/
- public void setBackgroundNonSelectionColor(Color c) {
- backgroundNonSelectionColor = c;
+ public void setBackgroundNonSelectionColor(Color c)
+ {
+ backgroundNonSelectionColor = c;
}
/**
* getBackgroundNonSelectionColor
+ *
* @returns Color
*/
- public Color getBackgroundNonSelectionColor() {
- return backgroundNonSelectionColor;
+ public Color getBackgroundNonSelectionColor()
+ {
+ return backgroundNonSelectionColor;
}
/**
* setBorderSelectionColor
- * @param value0 TODO
+ *
+ * @param c the color.
*/
- public void setBorderSelectionColor(Color c) {
- borderSelectionColor = c;
+ public void setBorderSelectionColor(Color c)
+ {
+ borderSelectionColor = c;
}
/**
* getBorderSelectionColor
+ *
* @returns Color
*/
- public Color getBorderSelectionColor() {
- return borderSelectionColor;
+ public Color getBorderSelectionColor()
+ {
+ return borderSelectionColor;
}
/**
* setFont
- * @param value0 TODO
- */
- public void setFont(Font f) {
- if (f != null && f instanceof UIResource)
- f = null;
- super.setFont(f);
+ *
+ * @param f the font.
+ */
+ public void setFont(Font f)
+ {
+ if (f != null && f instanceof UIResource)
+ f = null;
+ super.setFont(f);
}
/**
* setBackground
- * @param value0 TODO
- */
- public void setBackground(Color c) {
- if (c != null && c instanceof UIResource)
- c = null;
- super.setBackground(c);
+ *
+ * @param c the color.
+ */
+ public void setBackground(Color c)
+ {
+ if (c != null && c instanceof UIResource)
+ c = null;
+ super.setBackground(c);
}
/**
* getTreeCellRendererComponent
- * @param value0 TODO
- * @param value1 TODO
- * @param value2 TODO
- * @param value3 TODO
- * @param value4 TODO
- * @param value5 TODO
- * @param value6 TODO
+ *
+ * @param tree TODO
+ * @param val TODO
+ * @param selected TODO
+ * @param expanded TODO
+ * @param leaf TODO
+ * @param row TODO
+ * @param hasFocus TODO
* @returns Component
*/
- public Component getTreeCellRendererComponent(JTree tree,
- Object val,
- boolean selected,
- boolean expanded,
- boolean leaf,
- int row,
- boolean hasFocus) {
- this.selected = selected;
- this.hasFocus = hasFocus;
-
- if (leaf)
- setIcon(getLeafIcon());
- else if (expanded)
- setIcon(getOpenIcon());
- else
- setIcon(getClosedIcon());
-
- setText(val.toString());
- setHorizontalAlignment(LEFT);
- setVerticalAlignment(TOP);
-
- return this;
+ public Component getTreeCellRendererComponent(JTree tree, Object val,
+ boolean selected, boolean expanded, boolean leaf, int row,
+ boolean hasFocus)
+ {
+ if (leaf)
+ setIcon(getLeafIcon());
+ else if (expanded)
+ setIcon(getOpenIcon());
+ else
+ setIcon(getClosedIcon());
+
+ setText(val.toString());
+ this.selected = selected;
+ this.hasFocus = hasFocus;
+ setHorizontalAlignment(LEFT);
+ setOpaque(true);
+ setVerticalAlignment(TOP);
+ setEnabled(true);
+ super.setFont(UIManager.getLookAndFeelDefaults().getFont("Tree.font"));
+
+ if (selected)
+ {
+ super.setBackground(getBackgroundSelectionColor());
+ setForeground(getTextSelectionColor());
+ }
+ else
+ {
+ super.setBackground(getBackgroundNonSelectionColor());
+ setForeground(getTextNonSelectionColor());
+ }
+
+ return this;
+ }
+
+ /**
+ * getFont
+ *
+ * @return the current Font
+ */
+ public Font getFont()
+ {
+ return super.getFont();
}
/**
* paint
- * @param value0 TODO
+ *
+ * @param g the graphics device.
*/
- public void paint(Graphics g) {
- super.paint(g);
+ public void paint(Graphics g)
+ {
+ super.paint(g);
}
/**
* getPreferredSize
+ *
* @returns Dimension
*/
- public Dimension getPreferredSize() {
+ public Dimension getPreferredSize()
+ {
return null; // TODO
} // getPreferredSize()
/**
* validate
*/
- public void validate() {
- // TODO
+ public void validate()
+ {
+ // Overridden for performance reasons.
} // validate()
/**
* revalidate
*/
- public void revalidate() {
- // TODO
+ public void revalidate()
+ {
+ // Overridden for performance reasons.
} // revalidate()
/**
* repaint
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
* @param value3 TODO
* @param value4 TODO
*/
- public void repaint(long value0, int value1, int value2, int value3, int value4) {
- // TODO
+ public void repaint(long value0, int value1, int value2, int value3,
+ int value4)
+ {
+ // Overridden for performance reasons.
} // repaint()
/**
* repaint
+ *
* @param value0 TODO
*/
- public void repaint(Rectangle value0) {
- // TODO
+ public void repaint(Rectangle value0)
+ {
+ // Overridden for performance reasons.
} // repaint()
/**
* firePropertyChange
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
*/
- protected void firePropertyChange(String value0, Object value1, Object value2) {
- // TODO
+ protected void firePropertyChange(String value0, Object value1,
+ Object value2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
/**
* firePropertyChange
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
*/
- public void firePropertyChange(String value0, byte value1, byte value2) {
- // TODO
+ public void firePropertyChange(String value0, byte value1, byte value2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
/**
* firePropertyChange
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
*/
- public void firePropertyChange(String value0, char value1, char value2) {
- // TODO
+ public void firePropertyChange(String value0, char value1, char value2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
/**
* firePropertyChange
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
*/
- public void firePropertyChange(String value0, short value1, short value2) {
- // TODO
+ public void firePropertyChange(String value0, short value1, short value2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
/**
* firePropertyChange
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
*/
- public void firePropertyChange(String value0, int value1, int value2) {
- // TODO
+ public void firePropertyChange(String value0, int value1, int value2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
/**
* firePropertyChange
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
*/
- public void firePropertyChange(String value0, long value1, long value2) {
- // TODO
+ public void firePropertyChange(String value0, long value1, long value2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
/**
* firePropertyChange
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
*/
- public void firePropertyChange(String value0, float value1, float value2) {
- // TODO
+ public void firePropertyChange(String value0, float value1, float value2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
/**
* firePropertyChange
+ *
* @param value0 TODO
* @param value1 TODO
* @param value2 TODO
*/
- public void firePropertyChange(String value0, double value1, double value2) {
- // TODO
+ public void firePropertyChange(String value0, double value1, double value2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
/**
* firePropertyChange
- * @param value0 TODO
- * @param value1 TODO
- * @param value2 TODO
- */
- public void firePropertyChange(String value0, boolean value1, boolean value2) {
- // TODO
+ *
+ * @param name the property name.
+ * @param v1 the old value.
+ * @param v2 the new value.
+ */
+ public void firePropertyChange(String name, boolean v1, boolean v2)
+ {
+ // Overridden for performance reasons.
} // firePropertyChange()
-
} // DefaultTreeCellRenderer
diff --git a/javax/swing/tree/DefaultTreeModel.java b/javax/swing/tree/DefaultTreeModel.java
index 2e34a3522..e4291e130 100644
--- a/javax/swing/tree/DefaultTreeModel.java
+++ b/javax/swing/tree/DefaultTreeModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,405 +47,409 @@ import java.util.EventListener;
import javax.swing.event.EventListenerList;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
+import javax.swing.tree.DefaultMutableTreeNode;
/**
* DefaultTreeModel
* @author Andrew Selkirk
*/
public class DefaultTreeModel
- implements Serializable, TreeModel
+ implements Serializable, TreeModel
{
- static final long serialVersionUID = -2621068368932566998L;
-
- /**
- * root
- */
- protected TreeNode root = null;
-
- /**
- * listenerList
- */
- protected EventListenerList listenerList = new EventListenerList();
-
- /**
- * asksAllowsChildren
- */
- protected boolean asksAllowsChildren;
-
- /**
- * Constructor DefaultTreeModel
- * @param value0 TODO
- */
- public DefaultTreeModel(TreeNode root)
- {
- setRoot(root);
- }
-
- /**
- * Constructor DefaultTreeModel
- * @param value0 TODO
- * @param value1 TODO
- */
- public DefaultTreeModel(TreeNode root, boolean asksAllowsChildren)
- {
- setRoot(root);
- this.asksAllowsChildren = asksAllowsChildren;
- }
-
- /**
- * writeObject
- * @param value0 TODO
- * @exception IOException TODO
- */
- private void writeObject(ObjectOutputStream value0) throws IOException
- {
- // TODO
- }
-
- /**
- * readObject
- * @param value0 TODO
- * @exception IOException TODO
- * @exception ClassNotFoundException TODO
- */
- private void readObject(ObjectInputStream value0)
- throws IOException, ClassNotFoundException
- {
- // TODO
- }
-
- /**
- * asksAllowsChildren
- * @return boolean
- */
- public boolean asksAllowsChildren()
- {
- return asksAllowsChildren;
- }
-
- /**
- * setAsksAllowsChildren
- * @param value0 TODO
- */
- public void setAsksAllowsChildren(boolean value)
- {
- asksAllowsChildren = value; // TODO
- }
-
- /**
- * setRoot
- * @param value0 TODO
- */
- public void setRoot(TreeNode root)
- {
- // Sanity Check
- if (root == null)
- {
- throw new IllegalArgumentException("null root");
- }
- // Set new root
- this.root = root;
-
- // TODO
- }
-
- /**
- * getRoot
- * @return Object
- */
- public Object getRoot()
- {
- return root;
- }
-
- /**
- * getIndexOfChild
- * @param value0 TODO
- * @param value1 TODO
- * @return int
- */
- public int getIndexOfChild(Object parent, Object child)
- {
- return 0; // TODO
- }
-
- /**
- * getChild
- * @param value0 TODO
- * @param value1 TODO
- * @return Object
- */
- public Object getChild(Object node, int idx)
- {
- if (node instanceof TreeNode)
- return ((TreeNode)node).getChildAt(idx);
- else
- return null;
- }
-
- /**
- * getChildCount
- * @param value0 TODO
- * @return int
- */
- public int getChildCount(Object node)
- {
- if (node instanceof TreeNode)
- return ((TreeNode)node).getChildCount();
- else
- return 0;
- }
-
- /**
- * isLeaf
- * @param value0 TODO
- * @return boolean
- */
- public boolean isLeaf(Object node)
- {
- if (node instanceof TreeNode)
- return ((TreeNode)node).isLeaf();
- else
- return true;
- }
-
- /**
- * reload
- */
- public void reload()
- {
- // TODO
- }
-
- /**
- * reload
- * @param value0 TODO
- */
- public void reload(TreeNode value0)
- {
- // TODO
- }
-
- /**
- * valueForPathChanged
- * @param value0 TODO
- * @param value1 TODO
- */
- public void valueForPathChanged(TreePath value0, Object value1)
- {
- // TODO
- }
-
- /**
- * insertNodeInto
- * @param value0 TODO
- * @param value1 TODO
- * @param value2 TODO
- */
- public void insertNodeInto(MutableTreeNode value0, MutableTreeNode value1,
- int value2)
- {
- // TODO
- }
-
- /**
- * removeNodeFromParent
- * @param value0 TODO
- */
- public void removeNodeFromParent(MutableTreeNode value0)
- {
- // TODO
- }
-
- /**
- * nodeChanged
- * @param value0 TODO
- */
- public void nodeChanged(TreeNode value0)
- {
- // TODO
- }
-
- /**
- * nodesWereInserted
- * @param value0 TODO
- * @param value1 TODO
- */
- public void nodesWereInserted(TreeNode value0, int[] value1)
- {
- // TODO
- }
-
- /**
- * nodesWereRemoved
- * @param value0 TODO
- * @param value1 TODO
- * @param value2 TODO
- */
- public void nodesWereRemoved(TreeNode value0, int[] value1, Object[] value2)
- {
- // TODO
- }
-
- /**
- * nodesChanged
- * @param value0 TODO
- * @param value1 TODO
- */
- public void nodesChanged(TreeNode value0, int[] value1)
- {
- // TODO
- }
-
- /**
- * nodeStructureChanged
- * @param value0 TODO
- */
- public void nodeStructureChanged(TreeNode value0)
- {
- // TODO
- }
-
- /**
- * getPathToRoot
- * @param value0 TODO
- * @return TreeNode[]
- */
- public TreeNode[] getPathToRoot(TreeNode value0)
- {
- return null; // TODO
- }
-
- /**
- * getPathToRoot
- * @param value0 TODO
- * @param value1 TODO
- * @return TreeNode[]
- */
- protected TreeNode[] getPathToRoot(TreeNode value0, int value1)
- {
- return null; // TODO
- }
-
- /**
- * Registers a listere to the model.
- *
- * @param listener the listener to add
- */
- public void addTreeModelListener(TreeModelListener listener)
- {
- listenerList.add(TreeModelListener.class, listener);
- }
-
- /**
- * Removes a listener from the model.
- *
- * @param listener the listener to remove
- */
- public void removeTreeModelListener(TreeModelListener listener)
- {
- listenerList.remove(TreeModelListener.class, listener);
- }
-
- /**
- * Returns all registered <code>TreeModelListener</code> listeners.
- *
- * @return an array of listeners.
- *
- * @since 1.4
- */
- public TreeModelListener[] getTreeModelListeners()
- {
- return (TreeModelListener[]) listenerList.getListeners(TreeModelListener.class);
- }
-
- /**
- * fireTreeNodesChanged
- *
- * @param source the node being changed
- * @param path the path to the root node
- * @param childIndices the indices of the changed elements
- * @param children the changed elements
- */
- protected void fireTreeNodesChanged(Object source, Object[] path,
- int[] childIndices, Object[] children)
- {
- TreeModelEvent event =
- new TreeModelEvent(source, path, childIndices, children);
- TreeModelListener[] listeners = getTreeModelListeners();
-
- for (int i = listeners.length - 1; i >= 0; --i)
- listeners[i].treeNodesChanged(event);
- }
-
- /**
- * fireTreeNodesInserted
- *
- * @param source the node where new nodes got inserted
- * @param path the path to the root node
- * @param childIndices the indices of the new elements
- * @param children the new elements
- */
- protected void fireTreeNodesInserted(Object source, Object[] path,
- int[] childIndices, Object[] children)
- {
- TreeModelEvent event =
- new TreeModelEvent(source, path, childIndices, children);
- TreeModelListener[] listeners = getTreeModelListeners();
-
- for (int i = listeners.length - 1; i >= 0; --i)
- listeners[i].treeNodesInserted(event);
- }
-
- /**
- * fireTreeNodesRemoved
- *
- * @param source the node where nodes got removed-
- * @param path the path to the root node
- * @param childIndices the indices of the removed elements
- * @param children the removed elements
- */
- protected void fireTreeNodesRemoved(Object source, Object[] path,
- int[] childIndices, Object[] children)
- {
- TreeModelEvent event =
- new TreeModelEvent(source, path, childIndices, children);
- TreeModelListener[] listeners = getTreeModelListeners();
-
- for (int i = listeners.length - 1; i >= 0; --i)
- listeners[i].treeNodesRemoved(event);
- }
-
- /**
- * fireTreeStructureChanged
- *
- * @param source the node where the model has changed
- * @param path the path to the root node
- * @param childIndices the indices of the affected elements
- * @param children the affected elements
- */
- protected void fireTreeStructureChanged(Object source, Object[] path,
- int[] childIndices, Object[] children)
- {
- TreeModelEvent event =
- new TreeModelEvent(source, path, childIndices, children);
- TreeModelListener[] listeners = getTreeModelListeners();
-
- for (int i = listeners.length - 1; i >= 0; --i)
- listeners[i].treeStructureChanged(event);
- }
-
- /**
- * Returns the registered listeners of a given type.
- *
- * @param listenerType the listener type to return
- *
- * @return an array of listeners
- *
- * @since 1.3
- */
- public EventListener[] getListeners(Class listenerType)
- {
- return listenerList.getListeners(listenerType);
- }
+ static final long serialVersionUID = -2621068368932566998L;
+
+ /**
+ * root
+ */
+ protected TreeNode root = null;
+
+ /**
+ * listenerList
+ */
+ protected EventListenerList listenerList = new EventListenerList();
+
+ /**
+ * asksAllowsChildren
+ */
+ protected boolean asksAllowsChildren;
+
+ /**
+ * Constructor DefaultTreeModel
+ * @param root the tree root.
+ */
+ public DefaultTreeModel(TreeNode root)
+ {
+ if (root == null)
+ root = new DefaultMutableTreeNode();
+ setRoot(root);
+ }
+
+ /**
+ * Constructor DefaultTreeModel
+ * @param root the tree root.
+ * @param asksAllowsChildren TODO
+ */
+ public DefaultTreeModel(TreeNode root, boolean asksAllowsChildren)
+ {
+ setRoot(root);
+ this.asksAllowsChildren = asksAllowsChildren;
+ }
+
+ /**
+ * writeObject
+ * @param obj the object.
+ * @exception IOException TODO
+ */
+ private void writeObject(ObjectOutputStream obj) throws IOException
+ {
+ // TODO
+ }
+
+ /**
+ * readObject
+ * @param value0 TODO
+ * @exception IOException TODO
+ * @exception ClassNotFoundException TODO
+ */
+ private void readObject(ObjectInputStream value0) throws IOException,
+ ClassNotFoundException
+ {
+ // TODO
+ }
+
+ /**
+ * asksAllowsChildren
+ * @return boolean
+ */
+ public boolean asksAllowsChildren()
+ {
+ return asksAllowsChildren;
+ }
+
+ /**
+ * setAsksAllowsChildren
+ * @param value TODO
+ */
+ public void setAsksAllowsChildren(boolean value)
+ {
+ asksAllowsChildren = value; // TODO
+ }
+
+ /**
+ * setRoot
+ * @param root the root node.
+ */
+ public void setRoot(TreeNode root)
+ {
+ // Sanity Check
+ if (root == null)
+ {
+ throw new IllegalArgumentException("null root");
+ }
+ // Set new root
+ this.root = root;
+
+ // TODO
+ }
+
+ /**
+ * getRoot
+ * @return Object
+ */
+ public Object getRoot()
+ {
+ return root;
+ }
+
+ /**
+ * getIndexOfChild
+ * @param parent TODO
+ * @param child TODO
+ * @return int
+ */
+ public int getIndexOfChild(Object parent, Object child)
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * getChild
+ * @param node TODO
+ * @param idx TODO
+ * @return Object
+ */
+ public Object getChild(Object node, int idx)
+ {
+ if (node instanceof TreeNode)
+ return ((TreeNode) node).getChildAt(idx);
+ else
+ return null;
+ }
+
+ /**
+ * getChildCount
+ * @param node TODO
+ * @return int
+ */
+ public int getChildCount(Object node)
+ {
+ if (node instanceof TreeNode)
+ return ((TreeNode) node).getChildCount();
+ else
+ return 0;
+ }
+
+ /**
+ * isLeaf
+ * @param node TODO
+ * @return boolean
+ */
+ public boolean isLeaf(Object node)
+ {
+ if (node instanceof TreeNode)
+ return ((TreeNode) node).isLeaf();
+ else
+ return true;
+ }
+
+ /**
+ * reload
+ */
+ public void reload()
+ {
+ // TODO
+ }
+
+ /**
+ * reload
+ * @param value0 TODO
+ */
+ public void reload(TreeNode value0)
+ {
+ // TODO
+ }
+
+ /**
+ * valueForPathChanged
+ * @param value0 TODO
+ * @param value1 TODO
+ */
+ public void valueForPathChanged(TreePath value0, Object value1)
+ {
+ // TODO
+ }
+
+ /**
+ * insertNodeInto
+ * @param value0 TODO
+ * @param value1 TODO
+ * @param value2 TODO
+ */
+ public void insertNodeInto(MutableTreeNode value0, MutableTreeNode value1,
+ int value2)
+ {
+ // TODO
+ }
+
+ /**
+ * removeNodeFromParent
+ * @param value0 TODO
+ */
+ public void removeNodeFromParent(MutableTreeNode value0)
+ {
+ // TODO
+ }
+
+ /**
+ * nodeChanged
+ * @param value0 TODO
+ */
+ public void nodeChanged(TreeNode value0)
+ {
+ // TODO
+ }
+
+ /**
+ * nodesWereInserted
+ * @param value0 TODO
+ * @param value1 TODO
+ */
+ public void nodesWereInserted(TreeNode value0, int[] value1)
+ {
+ // TODO
+ }
+
+ /**
+ * nodesWereRemoved
+ * @param value0 TODO
+ * @param value1 TODO
+ * @param value2 TODO
+ */
+ public void nodesWereRemoved(TreeNode value0, int[] value1, Object[] value2)
+ {
+ // TODO
+ }
+
+ /**
+ * nodesChanged
+ * @param value0 TODO
+ * @param value1 TODO
+ */
+ public void nodesChanged(TreeNode value0, int[] value1)
+ {
+ // TODO
+ }
+
+ /**
+ * nodeStructureChanged
+ * @param value0 TODO
+ */
+ public void nodeStructureChanged(TreeNode value0)
+ {
+ // TODO
+ }
+
+ /**
+ * getPathToRoot
+ * @param value0 TODO
+ * @return TreeNode[]
+ */
+ public TreeNode[] getPathToRoot(TreeNode value0)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getPathToRoot
+ * @param value0 TODO
+ * @param value1 TODO
+ * @return TreeNode[]
+ */
+ protected TreeNode[] getPathToRoot(TreeNode value0, int value1)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * Registers a listere to the model.
+ *
+ * @param listener the listener to add
+ */
+ public void addTreeModelListener(TreeModelListener listener)
+ {
+ listenerList.add(TreeModelListener.class, listener);
+ }
+
+ /**
+ * Removes a listener from the model.
+ *
+ * @param listener the listener to remove
+ */
+ public void removeTreeModelListener(TreeModelListener listener)
+ {
+ listenerList.remove(TreeModelListener.class, listener);
+ }
+
+ /**
+ * Returns all registered <code>TreeModelListener</code> listeners.
+ *
+ * @return an array of listeners.
+ *
+ * @since 1.4
+ */
+ public TreeModelListener[] getTreeModelListeners()
+ {
+ return (TreeModelListener[]) listenerList
+ .getListeners(TreeModelListener.class);
+ }
+
+ /**
+ * fireTreeNodesChanged
+ *
+ * @param source the node being changed
+ * @param path the path to the root node
+ * @param childIndices the indices of the changed elements
+ * @param children the changed elements
+ */
+ protected void fireTreeNodesChanged(Object source, Object[] path,
+ int[] childIndices, Object[] children)
+ {
+ TreeModelEvent event = new TreeModelEvent(source, path, childIndices,
+ children);
+ TreeModelListener[] listeners = getTreeModelListeners();
+
+ for (int i = listeners.length - 1; i >= 0; --i)
+ listeners[i].treeNodesChanged(event);
+ }
+
+ /**
+ * fireTreeNodesInserted
+ *
+ * @param source the node where new nodes got inserted
+ * @param path the path to the root node
+ * @param childIndices the indices of the new elements
+ * @param children the new elements
+ */
+ protected void fireTreeNodesInserted(Object source, Object[] path,
+ int[] childIndices, Object[] children)
+ {
+ TreeModelEvent event = new TreeModelEvent(source, path, childIndices,
+ children);
+ TreeModelListener[] listeners = getTreeModelListeners();
+
+ for (int i = listeners.length - 1; i >= 0; --i)
+ listeners[i].treeNodesInserted(event);
+ }
+
+ /**
+ * fireTreeNodesRemoved
+ *
+ * @param source the node where nodes got removed-
+ * @param path the path to the root node
+ * @param childIndices the indices of the removed elements
+ * @param children the removed elements
+ */
+ protected void fireTreeNodesRemoved(Object source, Object[] path,
+ int[] childIndices, Object[] children)
+ {
+ TreeModelEvent event = new TreeModelEvent(source, path, childIndices,
+ children);
+ TreeModelListener[] listeners = getTreeModelListeners();
+
+ for (int i = listeners.length - 1; i >= 0; --i)
+ listeners[i].treeNodesRemoved(event);
+ }
+
+ /**
+ * fireTreeStructureChanged
+ *
+ * @param source the node where the model has changed
+ * @param path the path to the root node
+ * @param childIndices the indices of the affected elements
+ * @param children the affected elements
+ */
+ protected void fireTreeStructureChanged(Object source, Object[] path,
+ int[] childIndices, Object[] children)
+ {
+ TreeModelEvent event = new TreeModelEvent(source, path, childIndices,
+ children);
+ TreeModelListener[] listeners = getTreeModelListeners();
+
+ for (int i = listeners.length - 1; i >= 0; --i)
+ listeners[i].treeStructureChanged(event);
+ }
+
+ /**
+ * Returns the registered listeners of a given type.
+ *
+ * @param listenerType the listener type to return
+ *
+ * @return an array of listeners
+ *
+ * @since 1.3
+ */
+ public EventListener[] getListeners(Class listenerType)
+ {
+ return listenerList.getListeners(listenerType);
+ }
}
diff --git a/javax/swing/tree/DefaultTreeSelectionModel.java b/javax/swing/tree/DefaultTreeSelectionModel.java
index d53de53aa..de27dad04 100644
--- a/javax/swing/tree/DefaultTreeSelectionModel.java
+++ b/javax/swing/tree/DefaultTreeSelectionModel.java
@@ -1,6 +1,6 @@
-/* DefaultTreeSelectionModel.java --
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-
+/* DefaultTreeSelectionModel.java
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -35,7 +35,6 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package javax.swing.tree;
import java.beans.PropertyChangeListener;
@@ -54,593 +53,702 @@ import javax.swing.event.TreeSelectionListener;
/**
* DefaultTreeSelectionModel
+ *
* @author Andrew Selkirk
*/
public class DefaultTreeSelectionModel
- implements Cloneable, Serializable, TreeSelectionModel
+ implements Cloneable, Serializable, TreeSelectionModel
{
- static final long serialVersionUID = 3288129636638950196L;
-
- /**
- * SELECTION_MODE_PROPERTY
- */
- public static final String SELECTION_MODE_PROPERTY = "selectionMode";
-
- /**
- * Our Swing property change support.
- */
- protected SwingPropertyChangeSupport changeSupport;
-
- /**
- * The current selection.
- */
- protected TreePath[] selection;
-
- /**
- * Our TreeSelectionListeners.
- */
- protected EventListenerList listenerList;
-
- /**
- * The current RowMapper.
- */
- protected transient RowMapper rowMapper;
-
- /**
- * The current listSelectionModel.
- */
- protected DefaultListSelectionModel listSelectionModel;
-
- /**
- * The current selection mode.
- */
- protected int selectionMode;
-
- /**
- * The path that has been added last.
- */
- protected TreePath leadPath;
-
- /**
- * The index of the last added path.
- */
- protected int leadIndex;
-
- /**
- * The row of the last added path according to the RowMapper.
- */
- protected int leadRow;
-
- /**
- * Constructs a new DefaultTreeSelectionModel.
- */
- public DefaultTreeSelectionModel()
- {
- setSelectionMode(DISCONTIGUOUS_TREE_SELECTION);
- listenerList = new EventListenerList();
- }
-
- /**
- * Creates a clone of this DefaultTreeSelectionModel with the same
- * selection.
- *
- * @exception CloneNotSupportedException should not be thrown here
- *
- * @return a clone of this DefaultTreeSelectionModel
- */
- public Object clone() throws CloneNotSupportedException
- {
- return null; // TODO
- }
-
- /**
- * Returns a string that shows this object's properties.
- *
- * @return a string that shows this object's properties
- */
- public String toString()
- {
- return null; // TODO
- }
-
- /**
- * writeObject
- * @param value0 TODO
- * @exception IOException TODO
- */
- private void writeObject(ObjectOutputStream value0) throws IOException
- {
- // TODO
- }
-
- /**
- * readObject
- * @param value0 TODO
- * @exception IOException TODO
- * @exception ClassNotFoundException TODO
- */
- private void readObject(ObjectInputStream value0)
- throws IOException, ClassNotFoundException
- {
- // TODO
- }
-
- /**
- * Sets the RowMapper that should be used to map between paths and their
- * rows.
- *
- * @param rowMapper the RowMapper to set
- *
- * @see {@link RowMapper
- */
- public void setRowMapper(RowMapper value0)
- {
- // TODO
- }
-
- /**
- * Returns the RowMapper that is currently used to map between paths and
- * their rows.
- *
- * @return the current RowMapper
- *
- * @see {@link RowMapper
- */
- public RowMapper getRowMapper()
- {
- return rowMapper;
- }
-
- /**
- * Sets the current selection mode. Possible values are
- * {@link #SINGLE_TREE_SELECTION}, {@link CONTIGUOUS_TREE_SELECTION}
- * and {@link #DISCONTIGUOUS_TREE_SELECTION}.
- *
- * @param mode the selection mode to be set
- *
- * @see {@link #getSelectionMode}
- * @see {@link #SINGLE_TREE_SELECTION}
- * @see {@link #CONTIGUOUS_TREE_SELECTION}
- * @see {@link #DISCONTIGUOUS_TREE_SELECTION}
- */
- public void setSelectionMode(int mode)
- {
- selectionMode = mode;
- }
-
- /**
- * Returns the current selection mode.
- *
- * @return the current selection mode
- *
- * @see {@link #setSelectionMode}
- * @see {@link #SINGLE_TREE_SELECTION}
- * @see {@link #CONTIGUOUS_TREE_SELECTION}
- * @see {@link #DISCONTIGUOUS_TREE_SELECTION}
- */
- public int getSelectionMode()
- {
- return selectionMode;
- }
-
- /**
- * Sets this path as the only selection.
- *
- * If this changes the selection the registered TreeSelectionListeners
- * are notified.
- *
- * @param path the path to set as selection
- */
- public void setSelectionPath(TreePath path)
- {
- selection = new TreePath[] { path };
- }
-
- /**
- * Sets the paths as selection. This method checks for duplicates and
- * removes them.
- *
- * If this changes the selection the registered TreeSelectionListeners
- * are notified.
- *
- * @param paths the paths to set as selection
- */
- public void setSelectionPaths(TreePath[] value0)
- {
- // TODO
- }
-
- /**
- * Adds a path to the list of selected paths. This method checks if the
- * path is already selected and doesn't add the same path twice.
- *
- * If this changes the selection the registered TreeSelectionListeners
- * are notified.
- *
- * @param path the path to add to the selection
- */
- public void addSelectionPath(TreePath value0)
- {
- // TODO
- }
-
- /**
- * Adds the paths to the list of selected paths. This method checks if the
- * paths are already selected and doesn't add the same path twice.
- *
- * If this changes the selection the registered TreeSelectionListeners
- * are notified.
- *
- * @param paths the paths to add to the selection
- */
- public void addSelectionPaths(TreePath[] value0)
- {
- // TODO
- }
-
- /**
- * Removes the path from the selection.
- *
- * If this changes the selection the registered TreeSelectionListeners
- * are notified.
- *
- * @param path the path to remove
- */
- public void removeSelectionPath(TreePath value0)
- {
- // TODO
- }
-
- /**
- * Removes the paths from the selection.
- *
- * If this changes the selection the registered TreeSelectionListeners
- * are notified.
- *
- * @param paths the path to remove
- */
- public void removeSelectionPaths(TreePath[] value0)
- {
- // TODO
- }
-
- /**
- * Returns the first path in the selection. This is especially useful
- * when the selectionMode is {@link #SINGLE_TREE_SELECTION}.
- *
- * @return the first path in the selection
- */
- public TreePath getSelectionPath()
- {
- if ((selection == null) || (selection.length == 0))
- return null;
- else
- return selection[0];
- }
-
- /**
- * Returns the complete selection.
- *
- * @return the complete selection
- */
- public TreePath[] getSelectionPaths()
- {
- return selection;
- }
-
- /**
- * Returns the number of paths in the selection.
- *
- * @return the number of paths in the selection
- */
- public int getSelectionCount()
- {
- if (selection == null)
- return 0;
- else
- return selection.length;
- }
-
- /**
- * Checks if a given path is in the selection.
- *
- * @param path the path to check
- *
- * @return <code>true</code> if the path is in the selection,
- * <code>false</code> otherwise
- */
- public boolean isPathSelected(TreePath value0)
- {
- return false; // TODO
- }
-
- /**
- * Checks if the selection is empty.
- *
- * @return <code>true</code> if the selection is empty,
- * <code>false</code> otherwise
- */
- public boolean isSelectionEmpty()
- {
- return ((selection == null) || (selection.length == 0));
- }
-
- /**
- * Removes all paths from the selection.
- */
- public void clearSelection()
- {
- // TODO
- }
-
- /**
- * Adds a <code>TreeSelectionListener</code> object to this model.
- *
- * @param listener the listener to add
- */
- public void addTreeSelectionListener(TreeSelectionListener listener)
- {
- listenerList.add(TreeSelectionListener.class, listener);
- }
-
- /**
- * Removes a <code>TreeSelectionListener</code> object from this model.
- *
- * @param listener the listener to remove
- */
- public void removeTreeSelectionListener(TreeSelectionListener listener)
- {
- listenerList.remove(TreeSelectionListener.class, listener);
- }
-
- /**
- * Returns all <code>TreeSelectionListener</code> added to this model.
- *
- * @return an array of listeners
- *
- * @since 1.4
- */
- public TreeSelectionListener[] getTreeSelectionListeners()
- {
- return (TreeSelectionListener[]) listenerList.getListeners(TreeSelectionListener.class);
- }
-
- /**
- * fireValueChanged
- *
- * @param event the event to fire.
- */
- protected void fireValueChanged(TreeSelectionEvent event)
- {
- TreeSelectionListener[] listeners = getTreeSelectionListeners();
-
- for (int i = listeners.length - 1; i >= 0; --i)
- listeners[i].valueChanged(event);
- }
-
- /**
- * Returns all added listeners of a special type.
- *
- * @param listenerType the listener type
- *
- * @return an array of listeners
- *
- * @since 1.3
- */
- public EventListener[] getListeners(Class listenerType)
- {
- return listenerList.getListeners(listenerType);
- }
-
- /**
- * Returns the currently selected rows.
- *
- * @return the currently selected rows
- */
- public int[] getSelectionRows()
- {
- if (rowMapper == null)
- return null;
- else
- return rowMapper.getRowsForPaths(selection);
- }
-
- /**
- * Returns the smallest row index from the selection.
- *
- * @return the smallest row index from the selection
- */
- public int getMinSelectionRow()
- {
- if ((rowMapper == null) || (selection == null) || (selection.length == 0))
- return -1;
- else {
- int[] rows = rowMapper.getRowsForPaths(selection);
- int minRow = Integer.MAX_VALUE;
- for (int index = 0; index < rows.length; index++)
- minRow = Math.min(minRow, rows[index]);
- return minRow;
- }
- }
-
- /**
- * Returns the largest row index from the selection.
- *
- * @return the largest row index from the selection
- */
- public int getMaxSelectionRow()
- {
- if ((rowMapper == null) || (selection == null) || (selection.length == 0))
- return -1;
- else {
- int[] rows = rowMapper.getRowsForPaths(selection);
- int maxRow = -1;
- for (int index = 0; index < rows.length; index++)
- maxRow = Math.max(maxRow, rows[index]);
- return maxRow;
- }
- }
-
- /**
- * Checks if a particular row is selected.
- *
- * @param row the index of the row to check
- *
- * @return <code>true</code> if the row is in this selection,
- * <code>false</code> otherwise
- */
- public boolean isRowSelected(int value0)
- {
- return false; // TODO
- }
-
- /**
- * Updates the mappings from TreePaths to row indices.
- */
- public void resetRowSelection()
- {
- // TODO
- }
-
- /**
- * getLeadSelectionRow
- * @return int
- */
- public int getLeadSelectionRow()
- {
- if ((rowMapper == null) || (leadPath == null))
- return -1;
- else
- return rowMapper.getRowsForPaths(new TreePath[]{ leadPath })[0];
- }
-
- /**
- * getLeadSelectionPath
- * @return TreePath
- */
- public TreePath getLeadSelectionPath()
- {
- return leadPath;
- }
-
- /**
- * Adds a <code>PropertyChangeListener</code> object to this model.
- *
- * @param listener the listener to add.
- */
- public void addPropertyChangeListener(PropertyChangeListener listener)
- {
- changeSupport.addPropertyChangeListener(listener);
- }
-
- /**
- * Removes a <code>PropertyChangeListener</code> object from this model.
- *
- * @param listener the listener to remove.
- */
- public void removePropertyChangeListener(PropertyChangeListener listener)
- {
- changeSupport.removePropertyChangeListener(listener);
- }
-
- /**
- * Returns all added <code>PropertyChangeListener</code> objects.
- *
- * @return an array of listeners.
- *
- * @since 1.4
- */
- public PropertyChangeListener[] getPropertyChangeListeners()
- {
- return changeSupport.getPropertyChangeListeners();
- }
-
- /**
- * Makes sure the currently selected paths are valid according to the
- * current selectionMode.
- *
- * If the selectionMode is set to {@link CONTIGUOUS_TREE_SELECTION}
- * and the selection isn't contiguous then the selection is reset to
- * the first set of contguous paths.
- *
- * If the selectionMode is set to {@link SINGLE_TREE_SELECTION}
- * and the selection has more than one path, the selection is reset to
- * the contain only the first path.
- */
- protected void insureRowContinuity()
- {
- // TODO
- }
-
- /**
- * Returns <code>true</code> if the paths are contiguous or we
- * have no RowMapper assigned.
- *
- * @param paths the paths to check for continuity
- * @return <code>true</code> if the paths are contiguous or we
- * have no RowMapper assigned
- */
- protected boolean arePathsContiguous(TreePath[] value0)
- {
- return false; // TODO
- }
-
- /**
- * Checks if the paths can be added. This returns <code>true</code> if:
- * <ul>
- * <li><code>paths</code> is <code>null</code> or empty</li>
- * <li>we have no RowMapper assigned</li>
- * <li>nothing is currently selected</li>
- * <li>selectionMode is {@link DISCONTIGUOUS_TREE_SELECTION</li>
- * <li>adding the paths to the selection still results in a contiguous set
- * of paths</li>
- *
- * @param paths the paths to check
- *
- * @return <code>true</code> if the paths can be added with respect to the
- * selectionMode
- */
- protected boolean canPathsBeAdded(TreePath[] value0)
- {
- return false; // TODO
- }
-
- /**
- * Checks if the paths can be removed without breaking the continuity of
- * the selection according to selectionMode.
- *
- * @param paths the paths to check
- * @return <code>true</code> if the paths can be removed with respect to the
- * selectionMode
- */
- protected boolean canPathsBeRemoved(TreePath[] value0)
- {
- return false; // TODO
- }
-
- /**
- * notifyPathChange
- * @param value0 TODO
- * @param value1 TODO
- */
- protected void notifyPathChange(Vector value0, TreePath value1)
- {
- // TODO
- }
-
- /**
- * Updates the lead index instance field.
- */
- protected void updateLeadIndex()
- {
- // TODO
- }
-
- /**
- * Deprecated and not used.
- */
- protected void insureUniqueness()
- {
- // TODO
- }
+ static final long serialVersionUID = 3288129636638950196L;
+
+ /**
+ * SELECTION_MODE_PROPERTY
+ */
+ public static final String SELECTION_MODE_PROPERTY = "selectionMode";
+
+ /**
+ * Our Swing property change support.
+ */
+ protected SwingPropertyChangeSupport changeSupport;
+
+ /**
+ * The current selection.
+ */
+ protected TreePath[] selection;
+
+ /**
+ * Our TreeSelectionListeners.
+ */
+ protected EventListenerList listenerList;
+
+ /**
+ * The current RowMapper.
+ */
+ protected transient RowMapper rowMapper;
+
+ /**
+ * The current listSelectionModel.
+ */
+ protected DefaultListSelectionModel listSelectionModel;
+
+ /**
+ * The current selection mode.
+ */
+ protected int selectionMode;
+
+ /**
+ * The path that has been added last.
+ */
+ protected TreePath leadPath;
+
+ /**
+ * The index of the last added path.
+ */
+ protected int leadIndex;
+
+ /**
+ * The row of the last added path according to the RowMapper.
+ */
+ protected int leadRow;
+
+ /**
+ * Constructs a new DefaultTreeSelectionModel.
+ */
+ public DefaultTreeSelectionModel()
+ {
+ setSelectionMode(DISCONTIGUOUS_TREE_SELECTION);
+ listenerList = new EventListenerList();
+ }
+
+ /**
+ * Creates a clone of this DefaultTreeSelectionModel with the same
+ * selection.
+ *
+ * @exception CloneNotSupportedException should not be thrown here
+ *
+ * @return a clone of this DefaultTreeSelectionModel
+ */
+ public Object clone() throws CloneNotSupportedException
+ {
+ return null; // TODO
+ }
+
+ /**
+ * Returns a string that shows this object's properties.
+ *
+ * @return a string that shows this object's properties
+ */
+ public String toString()
+ {
+ return null; // TODO
+ }
+
+ /**
+ * writeObject
+ *
+ * @param value0 TODO
+ * @exception IOException TODO
+ */
+ private void writeObject(ObjectOutputStream value0) throws IOException
+ {
+ // TODO
+ }
+
+ /**
+ * readObject
+ *
+ * @param value0 TODO
+ * @exception IOException TODO
+ * @exception ClassNotFoundException TODO
+ */
+ private void readObject(ObjectInputStream value0) throws IOException,
+ ClassNotFoundException
+ {
+ // TODO
+ }
+
+ /**
+ * Sets the RowMapper that should be used to map between paths and their
+ * rows.
+ *
+ * @param rowMapper the RowMapper to set
+ *
+ * @see RowMapper
+ */
+ public void setRowMapper(RowMapper rowMapper)
+ {
+ // TODO
+ }
+
+ /**
+ * Returns the RowMapper that is currently used to map between paths and
+ * their rows.
+ *
+ * @return the current RowMapper
+ *
+ * @see RowMapper
+ */
+ public RowMapper getRowMapper()
+ {
+ return rowMapper;
+ }
+
+ /**
+ * Sets the current selection mode. Possible values are
+ * {@link #SINGLE_TREE_SELECTION}, {@link #CONTIGUOUS_TREE_SELECTION} and
+ * {@link #DISCONTIGUOUS_TREE_SELECTION}.
+ *
+ * @param mode the selection mode to be set
+ *
+ * @see #getSelectionMode
+ * @see #SINGLE_TREE_SELECTION
+ * @see #CONTIGUOUS_TREE_SELECTION
+ * @see #DISCONTIGUOUS_TREE_SELECTION
+ */
+ public void setSelectionMode(int mode)
+ {
+ selectionMode = mode;
+ }
+
+ /**
+ * Returns the current selection mode.
+ *
+ * @return the current selection mode
+ *
+ * @see #setSelectionMode
+ * @see #SINGLE_TREE_SELECTION
+ * @see #CONTIGUOUS_TREE_SELECTION
+ * @see #DISCONTIGUOUS_TREE_SELECTION
+ */
+ public int getSelectionMode()
+ {
+ return selectionMode;
+ }
+
+ /**
+ * Sets this path as the only selection.
+ *
+ * If this changes the selection the registered TreeSelectionListeners are
+ * notified.
+ *
+ * @param path the path to set as selection
+ */
+ public void setSelectionPath(TreePath path)
+ {
+ selection = new TreePath[] {
+ path };
+ }
+
+ /**
+ * Sets the paths as selection. This method checks for duplicates and
+ * removes them.
+ *
+ * If this changes the selection the registered TreeSelectionListeners are
+ * notified.
+ *
+ * @param paths the paths to set as selection
+ */
+ public void setSelectionPaths(TreePath[] paths)
+ {
+ // TODO
+ }
+
+ /**
+ * Adds a path to the list of selected paths. This method checks if the path
+ * is already selected and doesn't add the same path twice.
+ *
+ * If this changes the selection the registered TreeSelectionListeners are
+ * notified.
+ *
+ * @param path the path to add to the selection
+ */
+ public void addSelectionPath(TreePath path)
+ {
+ if (!isPathSelected(path))
+ {
+ if (isSelectionEmpty())
+ setSelectionPath(path);
+ else
+ {
+ TreePath[] temp = new TreePath[selection.length + 1];
+ System.arraycopy(selection, 0, temp, 0, selection.length);
+ temp[temp.length - 1] = path;
+ selection = new TreePath[temp.length];
+ System.arraycopy(temp, 0, selection, 0, temp.length);
+ }
+ leadPath = path;
+ fireValueChanged(new TreeSelectionEvent(this, path, true,
+ leadPath, path));
+ }
+ }
+
+ /**
+ * Adds the paths to the list of selected paths. This method checks if the
+ * paths are already selected and doesn't add the same path twice.
+ *
+ * If this changes the selection the registered TreeSelectionListeners are
+ * notified.
+ *
+ * @param paths the paths to add to the selection
+ */
+ public void addSelectionPaths(TreePath[] paths)
+ {
+ if (paths != null)
+ {
+ TreePath v0 = null;
+ for (int i = 0; i < paths.length; i++)
+ {
+ v0 = paths[i];
+ if (!isPathSelected(v0))
+ {
+ if (isSelectionEmpty())
+ setSelectionPath(v0);
+ else
+ {
+ TreePath[] temp = new TreePath[selection.length + 1];
+ System.arraycopy(selection, 0, temp, 0,
+ selection.length);
+ temp[temp.length - 1] = v0;
+ selection = new TreePath[temp.length];
+ System.arraycopy(temp, 0, selection, 0, temp.length);
+ }
+ leadPath = paths[paths.length - 1];
+ fireValueChanged(new TreeSelectionEvent(this, v0, true,
+ leadPath, paths[0]));
+ }
+ }
+ }
+ }
+
+ /**
+ * Removes the path from the selection.
+ *
+ * If this changes the selection the registered TreeSelectionListeners are
+ * notified.
+ *
+ * @param path the path to remove
+ */
+ public void removeSelectionPath(TreePath path)
+ {
+ int index = -1;
+ if (isPathSelected(path))
+ {
+ for (int i = 0; i < selection.length; i++)
+ {
+ if (selection[i].equals(path))
+ {
+ index = i;
+ break;
+ }
+ }
+ TreePath[] temp = new TreePath[selection.length - 1];
+ System.arraycopy(selection, 0, temp, 0, index);
+ System.arraycopy(selection, index + 1, temp, index,
+ selection.length - index - 1);
+ selection = new TreePath[temp.length];
+ System.arraycopy(temp, 0, selection, 0, temp.length);
+
+ fireValueChanged(new TreeSelectionEvent(this, path, false,
+ leadPath, path));
+ }
+ }
+
+ /**
+ * Removes the paths from the selection.
+ *
+ * If this changes the selection the registered TreeSelectionListeners are
+ * notified.
+ *
+ * @param paths the paths to remove
+ */
+ public void removeSelectionPaths(TreePath[] paths)
+ {
+ if (paths != null)
+ {
+ int index = -1;
+ TreePath v0 = null;
+ for (int i = 0; i < paths.length; i++)
+ {
+ v0 = paths[i];
+ if (isPathSelected(v0))
+ {
+ for (int x = 0; x < selection.length; x++)
+ {
+ if (selection[i].equals(v0))
+ {
+ index = x;
+ break;
+ }
+ }
+ TreePath[] temp = new TreePath[selection.length - 1];
+ System.arraycopy(selection, 0, temp, 0, index);
+ System.arraycopy(selection, index + 1, temp, index,
+ selection.length - index - 1);
+ selection = new TreePath[temp.length];
+ System.arraycopy(temp, 0, selection, 0, temp.length);
+
+ fireValueChanged(new TreeSelectionEvent(this, v0, false,
+ leadPath, paths[0]));
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the first path in the selection. This is especially useful when
+ * the selectionMode is {@link #SINGLE_TREE_SELECTION}.
+ *
+ * @return the first path in the selection
+ */
+ public TreePath getSelectionPath()
+ {
+ if ((selection == null) || (selection.length == 0))
+ return null;
+ else
+ return selection[0];
+ }
+
+ /**
+ * Returns the complete selection.
+ *
+ * @return the complete selection
+ */
+ public TreePath[] getSelectionPaths()
+ {
+ return selection;
+ }
+
+ /**
+ * Returns the number of paths in the selection.
+ *
+ * @return the number of paths in the selection
+ */
+ public int getSelectionCount()
+ {
+ if (selection == null)
+ return 0;
+ else
+ return selection.length;
+ }
+
+ /**
+ * Checks if a given path is in the selection.
+ *
+ * @param path the path to check
+ *
+ * @return <code>true</code> if the path is in the selection,
+ * <code>false</code> otherwise
+ */
+ public boolean isPathSelected(TreePath path)
+ {
+ if (selection == null)
+ return false;
+
+ for (int i = 0; i < selection.length; i++)
+ {
+ if (selection[i].equals(path))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Checks if the selection is empty.
+ *
+ * @return <code>true</code> if the selection is empty, <code>false</code>
+ * otherwise
+ */
+ public boolean isSelectionEmpty()
+ {
+ return ((selection == null) || (selection.length == 0));
+ }
+
+ /**
+ * Removes all paths from the selection.
+ */
+ public void clearSelection()
+ {
+ leadPath = null;
+ selection = null;
+ }
+
+ /**
+ * Adds a <code>TreeSelectionListener</code> object to this model.
+ *
+ * @param listener the listener to add
+ */
+ public void addTreeSelectionListener(TreeSelectionListener listener)
+ {
+ listenerList.add(TreeSelectionListener.class, listener);
+ }
+
+ /**
+ * Removes a <code>TreeSelectionListener</code> object from this model.
+ *
+ * @param listener the listener to remove
+ */
+ public void removeTreeSelectionListener(TreeSelectionListener listener)
+ {
+ listenerList.remove(TreeSelectionListener.class, listener);
+ }
+
+ /**
+ * Returns all <code>TreeSelectionListener</code> added to this model.
+ *
+ * @return an array of listeners
+ *
+ * @since 1.4
+ */
+ public TreeSelectionListener[] getTreeSelectionListeners()
+ {
+ return (TreeSelectionListener[])
+ getListeners(TreeSelectionListener.class);
+ }
+
+ /**
+ * fireValueChanged
+ *
+ * @param event the event to fire.
+ */
+ protected void fireValueChanged(TreeSelectionEvent event)
+ {
+ TreeSelectionListener[] listeners = getTreeSelectionListeners();
+
+ for (int i = 0; i < listeners.length; ++i)
+ listeners[i].valueChanged(event);
+ }
+
+ /**
+ * Returns all added listeners of a special type.
+ *
+ * @param listenerType the listener type
+ *
+ * @return an array of listeners
+ *
+ * @since 1.3
+ */
+ public EventListener[] getListeners(Class listenerType)
+ {
+ return listenerList.getListeners(listenerType);
+ }
+
+ /**
+ * Returns the currently selected rows.
+ *
+ * @return the currently selected rows
+ */
+ public int[] getSelectionRows()
+ {
+ if (rowMapper == null)
+ return null;
+ else
+ return rowMapper.getRowsForPaths(selection);
+ }
+
+ /**
+ * Returns the smallest row index from the selection.
+ *
+ * @return the smallest row index from the selection
+ */
+ public int getMinSelectionRow()
+ {
+ if ((rowMapper == null) || (selection == null)
+ || (selection.length == 0))
+ return -1;
+ else
+ {
+ int[] rows = rowMapper.getRowsForPaths(selection);
+ int minRow = Integer.MAX_VALUE;
+ for (int index = 0; index < rows.length; index++)
+ minRow = Math.min(minRow, rows[index]);
+ return minRow;
+ }
+ }
+
+ /**
+ * Returns the largest row index from the selection.
+ *
+ * @return the largest row index from the selection
+ */
+ public int getMaxSelectionRow()
+ {
+ if ((rowMapper == null) || (selection == null)
+ || (selection.length == 0))
+ return -1;
+ else
+ {
+ int[] rows = rowMapper.getRowsForPaths(selection);
+ int maxRow = -1;
+ for (int index = 0; index < rows.length; index++)
+ maxRow = Math.max(maxRow, rows[index]);
+ return maxRow;
+ }
+ }
+
+ /**
+ * Checks if a particular row is selected.
+ *
+ * @param row the index of the row to check
+ *
+ * @return <code>true</code> if the row is in this selection,
+ * <code>false</code> otherwise
+ */
+ public boolean isRowSelected(int row)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * Updates the mappings from TreePaths to row indices.
+ */
+ public void resetRowSelection()
+ {
+ // TODO
+ }
+
+ /**
+ * getLeadSelectionRow
+ *
+ * @return int
+ */
+ public int getLeadSelectionRow()
+ {
+ if ((rowMapper == null) || (leadPath == null))
+ return -1;
+ else
+ return rowMapper.getRowsForPaths(new TreePath[] {
+ leadPath })[0];
+ }
+
+ /**
+ * getLeadSelectionPath
+ *
+ * @return TreePath
+ */
+ public TreePath getLeadSelectionPath()
+ {
+ return leadPath;
+ }
+
+ /**
+ * Adds a <code>PropertyChangeListener</code> object to this model.
+ *
+ * @param listener the listener to add.
+ */
+ public void addPropertyChangeListener(PropertyChangeListener listener)
+ {
+ changeSupport.addPropertyChangeListener(listener);
+ }
+
+ /**
+ * Removes a <code>PropertyChangeListener</code> object from this model.
+ *
+ * @param listener the listener to remove.
+ */
+ public void removePropertyChangeListener(PropertyChangeListener listener)
+ {
+ changeSupport.removePropertyChangeListener(listener);
+ }
+
+ /**
+ * Returns all added <code>PropertyChangeListener</code> objects.
+ *
+ * @return an array of listeners.
+ *
+ * @since 1.4
+ */
+ public PropertyChangeListener[] getPropertyChangeListeners()
+ {
+ return changeSupport.getPropertyChangeListeners();
+ }
+
+ /**
+ * Makes sure the currently selected paths are valid according to the
+ * current selectionMode.
+ *
+ * If the selectionMode is set to {@link #CONTIGUOUS_TREE_SELECTION} and the
+ * selection isn't contiguous then the selection is reset to the first set
+ * of contguous paths.
+ *
+ * If the selectionMode is set to {@link #SINGLE_TREE_SELECTION} and the
+ * selection has more than one path, the selection is reset to the contain
+ * only the first path.
+ */
+ protected void insureRowContinuity()
+ {
+ // TODO
+ }
+
+ /**
+ * Returns <code>true</code> if the paths are contiguous or we have no
+ * RowMapper assigned.
+ *
+ * @param paths the paths to check for continuity
+ * @return <code>true</code> if the paths are contiguous or we have no
+ * RowMapper assigned
+ */
+ protected boolean arePathsContiguous(TreePath[] paths)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * Checks if the paths can be added. This returns <code>true</code> if:
+ * <ul>
+ * <li><code>paths</code> is <code>null</code> or empty</li>
+ * <li>we have no RowMapper assigned</li>
+ * <li>nothing is currently selected</li>
+ * <li>selectionMode is {@link #DISCONTIGUOUS_TREE_SELECTION}</li>
+ * <li>adding the paths to the selection still results in a contiguous set
+ * of paths</li>
+ *
+ * @param paths the paths to check
+ *
+ * @return <code>true</code> if the paths can be added with respect to the
+ * selectionMode
+ */
+ protected boolean canPathsBeAdded(TreePath[] paths)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * Checks if the paths can be removed without breaking the continuity of the
+ * selection according to selectionMode.
+ *
+ * @param paths the paths to check
+ * @return <code>true</code> if the paths can be removed with respect to
+ * the selectionMode
+ */
+ protected boolean canPathsBeRemoved(TreePath[] paths)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * notifyPathChange
+ *
+ * @param value0 TODO
+ * @param value1 TODO
+ */
+ protected void notifyPathChange(Vector value0, TreePath value1)
+ {
+ // TODO
+ }
+
+ /**
+ * Updates the lead index instance field.
+ */
+ protected void updateLeadIndex()
+ {
+ // TODO
+ }
+
+ /**
+ * Deprecated and not used.
+ */
+ protected void insureUniqueness()
+ {
+ // TODO
+ }
}
diff --git a/javax/swing/tree/ExpandVetoException.java b/javax/swing/tree/ExpandVetoException.java
index 5edf09a11..1c8827c8a 100644
--- a/javax/swing/tree/ExpandVetoException.java
+++ b/javax/swing/tree/ExpandVetoException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/FixedHeightLayoutCache.java b/javax/swing/tree/FixedHeightLayoutCache.java
index 5cb6d3a2a..535417ec3 100644
--- a/javax/swing/tree/FixedHeightLayoutCache.java
+++ b/javax/swing/tree/FixedHeightLayoutCache.java
@@ -1,5 +1,5 @@
/* FixedHeightLayoutCache.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -35,7 +35,6 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package javax.swing.tree;
import java.awt.Rectangle;
@@ -45,192 +44,201 @@ import javax.swing.event.TreeModelEvent;
/**
* FixedHeightLayoutCache
+ *
* @author Andrew Selkirk
*/
-public class FixedHeightLayoutCache extends AbstractLayoutCache {
+public class FixedHeightLayoutCache
+ extends AbstractLayoutCache
+{
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
// Variables --------------------------------------------------
- //-------------------------------------------------------------
-
+ // -------------------------------------------------------------
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
// Initialization ---------------------------------------------
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
/**
* Constructor FixedHeightLayoutCache
*/
- public FixedHeightLayoutCache() {
+ public FixedHeightLayoutCache()
+ {
// TODO
} // FixedHeightLayoutCache()
-
- //-------------------------------------------------------------
+ // -------------------------------------------------------------
// Methods ----------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * setModel
- * @param value0 TODO
- */
- public void setModel(TreeModel value0) {
- // TODO
- } // setModel()
-
- /**
- * setRootVisible
- * @param value0 TODO
- */
- public void setRootVisible(boolean value0) {
- // TODO
- } // setRootVisible()
-
- /**
- * setRowHeight
- * @param value0 TODO
- */
- public void setRowHeight(int value0) {
- // TODO
- } // setRowHeight()
+ // -------------------------------------------------------------
/**
* getRowCount
+ *
* @returns int
*/
- public int getRowCount() {
+ public int getRowCount()
+ {
return 0; // TODO
} // getRowCount()
/**
* invalidatePathBounds
+ *
* @param value0 TODO
*/
- public void invalidatePathBounds(TreePath value0) {
+ public void invalidatePathBounds(TreePath value0)
+ {
// TODO
} // invalidatePathBounds()
/**
* invalidateSizes
*/
- public void invalidateSizes() {
+ public void invalidateSizes()
+ {
// TODO
} // invalidateSizes()
/**
* isExpanded
+ *
* @param value0 TODO
* @returns boolean
*/
- public boolean isExpanded(TreePath value0) {
+ public boolean isExpanded(TreePath value0)
+ {
return false; // TODO
} // isExpanded()
/**
* getBounds
+ *
* @param value0 TODO
* @param value1 TODO
* @returns Rectangle
*/
- public Rectangle getBounds(TreePath value0, Rectangle value1) {
+ public Rectangle getBounds(TreePath value0, Rectangle value1)
+ {
return null; // TODO
} // getBounds()
/**
* getPathForRow
- * @param value0 TODO
+ *
+ * @param row TODO
* @returns TreePath
*/
- public TreePath getPathForRow(int value0) {
- return null; // TODO
+ public TreePath getPathForRow(int row)
+ {
+ //TODO
+ return null;
} // getPathForRow()
/**
* getRowForPath
+ *
* @param value0 TODO
* @returns int
*/
- public int getRowForPath(TreePath value0) {
- return 0; // TODO
+ public int getRowForPath(TreePath value0)
+ {
+ return 0;
} // getRowForPath()
/**
* getPathClosestTo
+ *
* @param value0 TODO
* @param value1 TODO
* @returns TreePath
*/
- public TreePath getPathClosestTo(int value0, int value1) {
+ public TreePath getPathClosestTo(int value0, int value1)
+ {
return null; // TODO
} // getPathClosestTo()
/**
* getVisibleChildCount
+ *
* @param value0 TODO
* @returns int
*/
- public int getVisibleChildCount(TreePath value0) {
+ public int getVisibleChildCount(TreePath value0)
+ {
return 0; // TODO
} // getVisibleChildCount()
/**
* getVisiblePathsFrom
+ *
* @param value0 TODO
* @returns Enumeration
*/
- public Enumeration getVisiblePathsFrom(TreePath value0) {
+ public Enumeration getVisiblePathsFrom(TreePath value0)
+ {
return null; // TODO
} // getVisiblePathsFrom()
/**
* setExpandedState
+ *
* @param value0 TODO
* @param value1 TODO
*/
- public void setExpandedState(TreePath value0, boolean value1) {
+ public void setExpandedState(TreePath value0, boolean value1)
+ {
// TODO
} // setExpandedState()
/**
* getExpandedState
+ *
* @param value0 TODO
* @returns boolean
*/
- public boolean getExpandedState(TreePath value0) {
+ public boolean getExpandedState(TreePath value0)
+ {
return false; // TODO
} // getExpandedState()
/**
* treeNodesChanged
+ *
* @param value0 TODO
*/
- public void treeNodesChanged(TreeModelEvent value0) {
+ public void treeNodesChanged(TreeModelEvent value0)
+ {
// TODO
} // treeNodesChanged()
/**
* treeNodesInserted
+ *
* @param value0 TODO
*/
- public void treeNodesInserted(TreeModelEvent value0) {
+ public void treeNodesInserted(TreeModelEvent value0)
+ {
// TODO
} // treeNodesInserted()
/**
* treeNodesRemoved
+ *
* @param value0 TODO
*/
- public void treeNodesRemoved(TreeModelEvent value0) {
+ public void treeNodesRemoved(TreeModelEvent value0)
+ {
// TODO
} // treeNodesRemoved()
/**
* treeStructureChanged
+ *
* @param value0 TODO
*/
- public void treeStructureChanged(TreeModelEvent value0) {
+ public void treeStructureChanged(TreeModelEvent value0)
+ {
// TODO
} // treeStructureChanged()
-
} // FixedHeightLayoutCache
diff --git a/javax/swing/tree/MutableTreeNode.java b/javax/swing/tree/MutableTreeNode.java
index 1f0c943aa..9f0ff4ded 100644
--- a/javax/swing/tree/MutableTreeNode.java
+++ b/javax/swing/tree/MutableTreeNode.java
@@ -1,5 +1,5 @@
/* MutableTreeNode.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -61,7 +61,7 @@ public interface MutableTreeNode extends TreeNode
*
* @param index the index
*
- * @see #add(MutableTreeNode,int)
+ * @see #insert(MutableTreeNode,int)
* @see #remove(MutableTreeNode)
* @see #removeFromParent()
*/
@@ -72,7 +72,7 @@ public interface MutableTreeNode extends TreeNode
*
* @param node the node to remove
*
- * @see #add(MutableTreeNode,int)
+ * @see #insert(MutableTreeNode,int)
* @see #remove(int)
* @see #removeFromParent()
*/
@@ -98,7 +98,7 @@ public interface MutableTreeNode extends TreeNode
*
* @param parent the parent
*
- * @see insert(MutableTreeNode,int)
+ * @see #insert(MutableTreeNode,int)
*/
void setParent(MutableTreeNode parent);
}
diff --git a/javax/swing/tree/RowMapper.java b/javax/swing/tree/RowMapper.java
index ea3122a46..690efb77e 100644
--- a/javax/swing/tree/RowMapper.java
+++ b/javax/swing/tree/RowMapper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/TreeCellEditor.java b/javax/swing/tree/TreeCellEditor.java
index 4b4357a16..691cbc163 100644
--- a/javax/swing/tree/TreeCellEditor.java
+++ b/javax/swing/tree/TreeCellEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/TreeCellRenderer.java b/javax/swing/tree/TreeCellRenderer.java
index ebd173efa..ebbe3fa91 100644
--- a/javax/swing/tree/TreeCellRenderer.java
+++ b/javax/swing/tree/TreeCellRenderer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/TreeModel.java b/javax/swing/tree/TreeModel.java
index 00bd88b4c..759aaac58 100644
--- a/javax/swing/tree/TreeModel.java
+++ b/javax/swing/tree/TreeModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/TreeNode.java b/javax/swing/tree/TreeNode.java
index d7967f0ef..fb8f880f2 100644
--- a/javax/swing/tree/TreeNode.java
+++ b/javax/swing/tree/TreeNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/TreePath.java b/javax/swing/tree/TreePath.java
index 7c16fc21e..37ec632c9 100644
--- a/javax/swing/tree/TreePath.java
+++ b/javax/swing/tree/TreePath.java
@@ -1,5 +1,5 @@
/* TreePath.java --
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,13 +38,14 @@ exception statement from your version. */
package javax.swing.tree;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.io.Serializable;
+import java.util.Arrays;
/**
- * TreePath
+ * A <code>TreePath</code> represents a sequence of tree elements that form
+ * a path starting from the root of a tree. A tree element can be represented
+ * by any {@link Object}.
+ *
* @author Andrew Selkirk
*/
public class TreePath implements Serializable
@@ -58,39 +59,48 @@ public class TreePath implements Serializable
/**
- * Constructor TreePath
- * @param path TODO
+ * Creates a path from the list of objects representing tree elements. The
+ * incoming array is copied so that subsequent changes do not affect this
+ * tree path.
+ *
+ * @param path the elements in the path (<code>null</code> not permitted).
+ *
+ * @throws IllegalArgumentException if <code>path</code> is <code>null</code>.
*/
public TreePath(Object[] path)
{
- // Create Path
+ if (path == null)
+ throw new IllegalArgumentException("Null 'path' not permitted.");
this.path = new Object[path.length];
System.arraycopy(path, 0, this.path, 0, path.length);
}
/**
- * Constructor TreePath
- * @param element TODO
+ * Creates a new path from a single element.
+ *
+ * @param element the element (<code>null</code> not permitted).
+ *
+ * @throws IllegalArgumentException if <code>element</code> is
+ * <code>null</code>.
*/
public TreePath(Object element)
{
- // Create Path
path = new Object[1];
path[0] = element;
}
/**
- * Constructor TreePath
- * @param path TODO
- * @param element TODO
+ * Creates a new tree path by adding the specified <code>element</code> to
+ * the <code>path</code>.
+ *
+ * @param path a tree path.
+ * @param element a path element.
*/
protected TreePath(TreePath path, Object element)
{
- // Variables
- Object[] treepath;
-
- // Get Tree Path
- treepath = path.getPath();
+ if (element == null)
+ throw new NullPointerException("Null 'element' argument.");
+ Object[] treepath = path.getPath();
// Create Tree Path
this.path = new Object[treepath.length + 1];
@@ -99,9 +109,11 @@ public class TreePath implements Serializable
}
/**
- * Constructor TreePath
- * @param path TODO
- * @param length TODO
+ * Creates a new tree path using the first <code>length</code> elements
+ * from the given array.
+ *
+ * @param path the path elements.
+ * @param length the path length.
*/
protected TreePath(Object[] path, int length)
{
@@ -111,7 +123,7 @@ public class TreePath implements Serializable
}
/**
- * Constructor TreePath
+ * Default constructor.
*/
protected TreePath()
{
@@ -120,8 +132,9 @@ public class TreePath implements Serializable
/**
- * hashCode
- * @returns int
+ * Returns a hashcode for the path.
+ *
+ * @return A hashcode.
*/
public int hashCode()
{
@@ -129,30 +142,33 @@ public class TreePath implements Serializable
}
/**
- * equals
- * @param object TODO
- * @returns boolean
+ * Tests this path for equality with an arbitrary object. An object is
+ * considered equal to this path if and only if:
+ * <ul>
+ * <li>the object is not <code>null</code>;</li>
+ * <li>the object is an instanceof {@link TreePath};</li>
+ * <li>the object contains the same elements in the same order as this
+ * {@link TreePath};</li>
+ * </ul>
+ *
+ * @param object the object (<code>null</code> permitted).
+ *
+ * @returns <code>true</code> if <code>obj</code> is equal to this tree path,
+ * and <code>false</code> otherwise.
*/
public boolean equals(Object object)
{
- // Variables
- Object[] treepath;
- int index;
+ Object[] treepath;
+ int index;
- // Check for TreePath
if (object instanceof TreePath)
{
- // Get Path Elements
treepath = ((TreePath) object).getPath();
-
- // Check length
if (treepath.length != path.length)
return false;
-
- // Check Elements
for (index = 0; index < path.length; index++)
{
- if (treepath[index] != path[index])
+ if (!treepath[index].equals(path[index]))
return false;
}
@@ -165,49 +181,32 @@ public class TreePath implements Serializable
}
/**
- * toString
- * @returns String
+ * Returns a string representation of this path.
+ *
+ * @return A string representation of this path.
*/
public String toString()
{
- return null; // TODO
+ if (path.length == 1)
+ return String.valueOf(path[0]);
+ else
+ return Arrays.asList(path).toString();
}
/**
- * writeObject
- * @param value0 TODO
- * @exception IOException TODO
- */
- private void writeObject(ObjectOutputStream value0)
- throws IOException
- {
- // TODO
- }
-
- /**
- * readObject
- * @param value0 TODO
- * @exception IOException TODO
- * @exception ClassNotFoundException TODO
- */
- private void readObject(ObjectInputStream value0)
- throws IOException, ClassNotFoundException
- {
- // TODO
- }
-
- /**
- * getPath
- * @returns Object[]
+ * Returns an array containing the path elements.
+ *
+ * @returns An array containing the path elements.
*/
public Object[] getPath()
{
- return path;
+ return (Object[]) path.clone();
}
/**
- * getLastPathComponent
- * @returns Object
+ * Returns the last object in the path.
+ *
+ * @return The last object in the path.
*/
public Object getLastPathComponent()
{
@@ -215,8 +214,9 @@ public class TreePath implements Serializable
}
/**
- * getPathCount
- * @returns int
+ * Returns the number of elements in the path.
+ *
+ * @returns The number of elements in the path.
*/
public int getPathCount()
{
@@ -224,57 +224,55 @@ public class TreePath implements Serializable
}
/**
- * getPathComponent
- * @param position TODO
- * @returns Object
+ * Returns the element at the specified position in the path.
+ *
+ * @param position the element position (<code>0 &lt N - 1</code>, where
+ * <code>N</code> is the number of elements in the path).
+ *
+ * @return The element at the specified position.
+ *
+ * @throws IllegalArgumentException if <code>position</code> is outside the
+ * valid range.
*/
public Object getPathComponent(int position)
{
+ if (position < 0 || position >= getPathCount())
+ throw new IllegalArgumentException("Invalid position: " + position);
return path[position];
}
/**
- * isDescendant
- * @param path TODO
- * @returns boolean
+ * Returns <code>true</code> if <code>path</code> is a descendant of this
+ * path, and <code>false</code> otherwise. If <code>path</code> is
+ * <code>null</code>, this method returns <code>false</code>.
+ *
+ * @param path the path to check (<code>null</code> permitted).
+ *
+ * @returns <code>true</code> if <code>path</code> is a descendant of this
+ * path, and <code>false</code> otherwise
*/
public boolean isDescendant(TreePath path)
{
-
- // Variables
- Object[] treepath;
- int index;
- int index2;
-
- // Get Descendant path
- treepath = path.getPath();
-
- // Locate Start Index
- index = 0;
- index2 = 0;
- while (treepath[index] != this.path[index2])
- index++;
-
- // Verify Paths
- while (treepath[index] == this.path[index2])
- {
- index++;
- index2++;
- }
-
- // Check for descendant
- if (index2 != this.path.length)
+ if (path == null)
return false;
-
- // Is Descendant
+ int count = getPathCount();
+ if (path.getPathCount() < count)
+ return false;
+ for (int i = 0; i < count; i++)
+ {
+ if (!this.path[i].equals(path.getPathComponent(i)))
+ return false;
+ }
return true;
-
}
/**
- * pathByAddingChild
- * @param element TODO
- * @returns TreePath
+ * Creates a new path that is equivalent to this path plus the specified
+ * element.
+ *
+ * @param element the element.
+ *
+ * @returns A tree path.
*/
public TreePath pathByAddingChild(Object element)
{
@@ -282,8 +280,12 @@ public class TreePath implements Serializable
}
/**
- * getParentPath
- * @returns TreePath
+ * Returns the parent path, which is a path containing all the same elements
+ * as this path, except for the last one. If this path contains only one
+ * element, the method returns <code>null</code>.
+ *
+ * @returns The parent path, or <code>null</code> if this path has only one
+ * element.
*/
public TreePath getParentPath()
{
diff --git a/javax/swing/tree/TreeSelectionModel.java b/javax/swing/tree/TreeSelectionModel.java
index c72617bff..4072ccc64 100644
--- a/javax/swing/tree/TreeSelectionModel.java
+++ b/javax/swing/tree/TreeSelectionModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/tree/VariableHeightLayoutCache.java b/javax/swing/tree/VariableHeightLayoutCache.java
index 14e6ea902..2c9136c51 100644
--- a/javax/swing/tree/VariableHeightLayoutCache.java
+++ b/javax/swing/tree/VariableHeightLayoutCache.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -87,14 +87,6 @@ public class VariableHeightLayoutCache extends AbstractLayoutCache {
} // setRootVisible()
/**
- * setRowHeight
- * @param value0 TODO
- */
- public void setRowHeight(int value0) {
- // TODO
- } // setRowHeight()
-
- /**
* setNodeDimensions
* @param value0 TODO
*/
diff --git a/javax/swing/tree/package.html b/javax/swing/tree/package.html
index 32d3d3c3e..22538e4ba 100644
--- a/javax/swing/tree/package.html
+++ b/javax/swing/tree/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.tree package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.tree</title></head>
<body>
-<p></p>
+<p>Interfaces and classes that support the {@link javax.swing.JTree}
+component.</p>
</body>
</html>
diff --git a/javax/swing/undo/AbstractUndoableEdit.java b/javax/swing/undo/AbstractUndoableEdit.java
index 5ba68f580..34c41aea2 100644
--- a/javax/swing/undo/AbstractUndoableEdit.java
+++ b/javax/swing/undo/AbstractUndoableEdit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/undo/CannotRedoException.java b/javax/swing/undo/CannotRedoException.java
index f482b75bb..7d70a38c2 100644
--- a/javax/swing/undo/CannotRedoException.java
+++ b/javax/swing/undo/CannotRedoException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/undo/CannotUndoException.java b/javax/swing/undo/CannotUndoException.java
index 0193921ed..9fc0ec3bd 100644
--- a/javax/swing/undo/CannotUndoException.java
+++ b/javax/swing/undo/CannotUndoException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/undo/CompoundEdit.java b/javax/swing/undo/CompoundEdit.java
index 730d5b253..e1cfbb619 100644
--- a/javax/swing/undo/CompoundEdit.java
+++ b/javax/swing/undo/CompoundEdit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/undo/StateEdit.java b/javax/swing/undo/StateEdit.java
index 633807b71..80e4e33ec 100644
--- a/javax/swing/undo/StateEdit.java
+++ b/javax/swing/undo/StateEdit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/undo/StateEditable.java b/javax/swing/undo/StateEditable.java
index a3dc40019..9a7fb0954 100644
--- a/javax/swing/undo/StateEditable.java
+++ b/javax/swing/undo/StateEditable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/undo/UndoManager.java b/javax/swing/undo/UndoManager.java
index fcdcf34ec..565b5ca88 100644
--- a/javax/swing/undo/UndoManager.java
+++ b/javax/swing/undo/UndoManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -78,7 +78,7 @@ import javax.swing.event.UndoableEditListener;
* <code>javax.swing.undo</code> package, the public methods of an
* <code>UndoManager</code> are safe to call from concurrent threads.
* The caller does not need to perform external synchronization, and
- * {@link javax.swing.event.UndoableEvent} sources do not need to
+ * {@link javax.swing.event.UndoableEditEvent} sources do not need to
* broadcast their events from inside the Swing worker thread.
*
* @author Sascha Brawer (brawer@dandelis.ch)
@@ -607,7 +607,7 @@ public class UndoManager
* <p><b>Thread Safety:</b> This method may safely be invoked from
* concurrent threads. The caller does not need to perform external
* synchronization. This means that {@link
- * javax.swing.event.UndoableEvent} sources do not need to broadcast
+ * javax.swing.event.UndoableEditEvent} sources do not need to broadcast
* their events from inside the Swing worker thread.
*
* @param event the event whose <code>edit</code> will be
diff --git a/javax/swing/undo/UndoableEdit.java b/javax/swing/undo/UndoableEdit.java
index 055fae0cd..982d7f2a7 100644
--- a/javax/swing/undo/UndoableEdit.java
+++ b/javax/swing/undo/UndoableEdit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/swing/undo/UndoableEditSupport.java b/javax/swing/undo/UndoableEditSupport.java
index 80234aa8a..918e73523 100644
--- a/javax/swing/undo/UndoableEditSupport.java
+++ b/javax/swing/undo/UndoableEditSupport.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -187,7 +187,7 @@ public class UndoableEditSupport
/**
- * If {@link #beginEdit} has been called (so that the current
+ * If {@link #beginUpdate} has been called (so that the current
* update level is greater than zero), adds the specified edit
* to {@link #compoundEdit}. Otherwise, notify listeners of the
* edit by calling {@link #_postEdit(UndoableEdit)}.
@@ -233,12 +233,12 @@ public class UndoableEditSupport
/**
- * Creates a new instance of {@link #CompoundEdit}. Called by {@link
+ * Creates a new instance of {@link CompoundEdit}. Called by {@link
* #beginUpdate}. If a subclass wants {@link #beginUpdate} to work
* on a specific {@link #compoundEdit}, it should override this
* method.
*
- * @returns a newly created instance of {@link #CompoundEdit}.
+ * @returns a newly created instance of {@link CompoundEdit}.
*/
protected CompoundEdit createCompoundEdit()
{
diff --git a/javax/swing/undo/package.html b/javax/swing/undo/package.html
index a2b3599c0..125bd4446 100644
--- a/javax/swing/undo/package.html
+++ b/javax/swing/undo/package.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- package.html - describes classes in javax.swing.undo package.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,7 @@ exception statement from your version. -->
<head><title>GNU Classpath - javax.swing.undo</title></head>
<body>
-<p></p>
+<p>Provides a mechanism to support undo/redo operations.</p>
</body>
</html>
diff --git a/javax/transaction/HeuristicCommitException.java b/javax/transaction/HeuristicCommitException.java
index 15d3091f2..60ac7756a 100644
--- a/javax/transaction/HeuristicCommitException.java
+++ b/javax/transaction/HeuristicCommitException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/HeuristicMixedException.java b/javax/transaction/HeuristicMixedException.java
index 8ac7ecd7d..b5e89fb1a 100644
--- a/javax/transaction/HeuristicMixedException.java
+++ b/javax/transaction/HeuristicMixedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/HeuristicRollbackException.java b/javax/transaction/HeuristicRollbackException.java
index e3f77c412..3ad34fa47 100644
--- a/javax/transaction/HeuristicRollbackException.java
+++ b/javax/transaction/HeuristicRollbackException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/InvalidTransactionException.java b/javax/transaction/InvalidTransactionException.java
index bcc31eb29..82eefe67e 100644
--- a/javax/transaction/InvalidTransactionException.java
+++ b/javax/transaction/InvalidTransactionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/NotSupportedException.java b/javax/transaction/NotSupportedException.java
index 16462beb1..a416d133a 100644
--- a/javax/transaction/NotSupportedException.java
+++ b/javax/transaction/NotSupportedException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/RollbackException.java b/javax/transaction/RollbackException.java
index 2f0ad46c8..4fd51cf6e 100644
--- a/javax/transaction/RollbackException.java
+++ b/javax/transaction/RollbackException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/Status.java b/javax/transaction/Status.java
index 3f47b5227..6bbbffbf0 100644
--- a/javax/transaction/Status.java
+++ b/javax/transaction/Status.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/Synchronization.java b/javax/transaction/Synchronization.java
index 7cd02489f..eea50277c 100644
--- a/javax/transaction/Synchronization.java
+++ b/javax/transaction/Synchronization.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/SystemException.java b/javax/transaction/SystemException.java
index e2339938b..d614fb3c5 100644
--- a/javax/transaction/SystemException.java
+++ b/javax/transaction/SystemException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/Transaction.java b/javax/transaction/Transaction.java
index 0c0910c17..b5b7108f0 100644
--- a/javax/transaction/Transaction.java
+++ b/javax/transaction/Transaction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/TransactionManager.java b/javax/transaction/TransactionManager.java
index f8a26f1df..85a4da9f5 100644
--- a/javax/transaction/TransactionManager.java
+++ b/javax/transaction/TransactionManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/TransactionRequiredException.java b/javax/transaction/TransactionRequiredException.java
index ec624270f..6c8894810 100644
--- a/javax/transaction/TransactionRequiredException.java
+++ b/javax/transaction/TransactionRequiredException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/TransactionRolledbackException.java b/javax/transaction/TransactionRolledbackException.java
index 45ac60fd8..49c22a70e 100644
--- a/javax/transaction/TransactionRolledbackException.java
+++ b/javax/transaction/TransactionRolledbackException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/UserTransaction.java b/javax/transaction/UserTransaction.java
index 00dbd2062..86922932e 100644
--- a/javax/transaction/UserTransaction.java
+++ b/javax/transaction/UserTransaction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/package.html b/javax/transaction/package.html
index 652762617..974d41d09 100644
--- a/javax/transaction/package.html
+++ b/javax/transaction/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/xa/XAException.java b/javax/transaction/xa/XAException.java
index 96e614e84..ceb76f090 100644
--- a/javax/transaction/xa/XAException.java
+++ b/javax/transaction/xa/XAException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/xa/XAResource.java b/javax/transaction/xa/XAResource.java
index 194b02f86..394063441 100644
--- a/javax/transaction/xa/XAResource.java
+++ b/javax/transaction/xa/XAResource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/xa/Xid.java b/javax/transaction/xa/Xid.java
index e34256dc8..51e3102b6 100644
--- a/javax/transaction/xa/Xid.java
+++ b/javax/transaction/xa/Xid.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/transaction/xa/package.html b/javax/transaction/xa/package.html
index 0a2db3690..7e1ecb707 100644
--- a/javax/transaction/xa/package.html
+++ b/javax/transaction/xa/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/XMLConstants.java b/javax/xml/XMLConstants.java
index 4c256f443..735620755 100644
--- a/javax/xml/XMLConstants.java
+++ b/javax/xml/XMLConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/datatype/DatatypeConfigurationException.java b/javax/xml/datatype/DatatypeConfigurationException.java
index 0e3243b87..c17a89a7d 100644
--- a/javax/xml/datatype/DatatypeConfigurationException.java
+++ b/javax/xml/datatype/DatatypeConfigurationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/datatype/DatatypeConstants.java b/javax/xml/datatype/DatatypeConstants.java
index 5724502e7..3919d03da 100644
--- a/javax/xml/datatype/DatatypeConstants.java
+++ b/javax/xml/datatype/DatatypeConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/datatype/DatatypeFactory.java b/javax/xml/datatype/DatatypeFactory.java
index b3c8cf431..3f3a22479 100644
--- a/javax/xml/datatype/DatatypeFactory.java
+++ b/javax/xml/datatype/DatatypeFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/datatype/Duration.java b/javax/xml/datatype/Duration.java
index b7d188cd7..fb1d65537 100644
--- a/javax/xml/datatype/Duration.java
+++ b/javax/xml/datatype/Duration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/datatype/XMLGregorianCalendar.java b/javax/xml/datatype/XMLGregorianCalendar.java
index 48280381c..c0b68681c 100644
--- a/javax/xml/datatype/XMLGregorianCalendar.java
+++ b/javax/xml/datatype/XMLGregorianCalendar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/namespace/NamespaceContext.java b/javax/xml/namespace/NamespaceContext.java
index 4b768dcde..1bcb85006 100644
--- a/javax/xml/namespace/NamespaceContext.java
+++ b/javax/xml/namespace/NamespaceContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/namespace/QName.java b/javax/xml/namespace/QName.java
index fbb222efc..c1ec4519d 100644
--- a/javax/xml/namespace/QName.java
+++ b/javax/xml/namespace/QName.java
@@ -1,39 +1,40 @@
-/* QName.java --
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
+/*
+ * QName.java
+ * Copyright (C) 2004 The Free Software Foundation
+ *
+ * This file is part of GNU JAXP, a library.
+ *
+ * GNU JAXP is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GNU JAXP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under
+ * terms of your choice, provided that you also meet, for each linked
+ * independent module, the terms and conditions of the license of that
+ * module. An independent module is a module which is not derived from
+ * or based on this library. If you modify this library, you may extend
+ * this exception to your version of the library, but you are not
+ * obliged to do so. If you do not wish to do so, delete this
+ * exception statement from your version.
+ */
package javax.xml.namespace;
@@ -43,7 +44,7 @@ import javax.xml.XMLConstants;
* An XML
* <a href='http://www.w3.org/TR/REC-xml-names/#ns-qualnames'>qualified name</a>.
*
- * @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
+ * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
* @since 1.3
*/
public class QName
@@ -53,6 +54,7 @@ public class QName
private final String localPart;
private final String prefix;
private final String qName;
+ int hashCode = -1;
public QName(String namespaceURI, String localPart)
{
@@ -126,7 +128,16 @@ public class QName
public final int hashCode()
{
- return qName.hashCode();
+ if (hashCode == -1)
+ {
+ StringBuffer buf = new StringBuffer();
+ buf.append('{');
+ buf.append(namespaceURI);
+ buf.append('}');
+ buf.append(localPart);
+ hashCode = buf.toString().hashCode();
+ }
+ return hashCode;
}
public String toString()
diff --git a/javax/xml/parsers/DocumentBuilder.java b/javax/xml/parsers/DocumentBuilder.java
index 15130e895..56c55a3e3 100644
--- a/javax/xml/parsers/DocumentBuilder.java
+++ b/javax/xml/parsers/DocumentBuilder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/parsers/DocumentBuilderFactory.java b/javax/xml/parsers/DocumentBuilderFactory.java
index 1ba51d021..1cbb9a79f 100644
--- a/javax/xml/parsers/DocumentBuilderFactory.java
+++ b/javax/xml/parsers/DocumentBuilderFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/parsers/FactoryConfigurationError.java b/javax/xml/parsers/FactoryConfigurationError.java
index 351b340a0..96d0fc082 100644
--- a/javax/xml/parsers/FactoryConfigurationError.java
+++ b/javax/xml/parsers/FactoryConfigurationError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/parsers/ParserConfigurationException.java b/javax/xml/parsers/ParserConfigurationException.java
index a8cd546cf..412872f17 100644
--- a/javax/xml/parsers/ParserConfigurationException.java
+++ b/javax/xml/parsers/ParserConfigurationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/parsers/SAXParser.java b/javax/xml/parsers/SAXParser.java
index f05cc510d..1a6b1558d 100644
--- a/javax/xml/parsers/SAXParser.java
+++ b/javax/xml/parsers/SAXParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/parsers/SAXParserFactory.java b/javax/xml/parsers/SAXParserFactory.java
index 7b87bf24e..8a89fdd92 100644
--- a/javax/xml/parsers/SAXParserFactory.java
+++ b/javax/xml/parsers/SAXParserFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/ErrorListener.java b/javax/xml/transform/ErrorListener.java
index 153de5c66..5a9eee81f 100644
--- a/javax/xml/transform/ErrorListener.java
+++ b/javax/xml/transform/ErrorListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/OutputKeys.java b/javax/xml/transform/OutputKeys.java
index f034a921b..8a86c1369 100644
--- a/javax/xml/transform/OutputKeys.java
+++ b/javax/xml/transform/OutputKeys.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/Result.java b/javax/xml/transform/Result.java
index 88b4659ca..58afebafe 100644
--- a/javax/xml/transform/Result.java
+++ b/javax/xml/transform/Result.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/Source.java b/javax/xml/transform/Source.java
index ef1730a68..d6edb036b 100644
--- a/javax/xml/transform/Source.java
+++ b/javax/xml/transform/Source.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/SourceLocator.java b/javax/xml/transform/SourceLocator.java
index bc39e52db..5304d2547 100644
--- a/javax/xml/transform/SourceLocator.java
+++ b/javax/xml/transform/SourceLocator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/Templates.java b/javax/xml/transform/Templates.java
index 2cae7adfb..b4d1fbe68 100644
--- a/javax/xml/transform/Templates.java
+++ b/javax/xml/transform/Templates.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/Transformer.java b/javax/xml/transform/Transformer.java
index fe2a9ce34..905412559 100644
--- a/javax/xml/transform/Transformer.java
+++ b/javax/xml/transform/Transformer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/TransformerConfigurationException.java b/javax/xml/transform/TransformerConfigurationException.java
index 9915d1a0d..b2153c2cb 100644
--- a/javax/xml/transform/TransformerConfigurationException.java
+++ b/javax/xml/transform/TransformerConfigurationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/TransformerException.java b/javax/xml/transform/TransformerException.java
index 7e40cd294..a72ee1c2f 100644
--- a/javax/xml/transform/TransformerException.java
+++ b/javax/xml/transform/TransformerException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/TransformerFactory.java b/javax/xml/transform/TransformerFactory.java
index 53d9173cd..e3c895361 100644
--- a/javax/xml/transform/TransformerFactory.java
+++ b/javax/xml/transform/TransformerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/TransformerFactoryConfigurationError.java b/javax/xml/transform/TransformerFactoryConfigurationError.java
index ae1521f93..9b16b2b2e 100644
--- a/javax/xml/transform/TransformerFactoryConfigurationError.java
+++ b/javax/xml/transform/TransformerFactoryConfigurationError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/URIResolver.java b/javax/xml/transform/URIResolver.java
index a859b7a92..a3d8e8f41 100644
--- a/javax/xml/transform/URIResolver.java
+++ b/javax/xml/transform/URIResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/dom/DOMLocator.java b/javax/xml/transform/dom/DOMLocator.java
index 29953bed2..7f2370659 100644
--- a/javax/xml/transform/dom/DOMLocator.java
+++ b/javax/xml/transform/dom/DOMLocator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/dom/DOMResult.java b/javax/xml/transform/dom/DOMResult.java
index 5a4ee3337..6656f42d4 100644
--- a/javax/xml/transform/dom/DOMResult.java
+++ b/javax/xml/transform/dom/DOMResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/dom/DOMSource.java b/javax/xml/transform/dom/DOMSource.java
index d87c4fba7..2321496dd 100644
--- a/javax/xml/transform/dom/DOMSource.java
+++ b/javax/xml/transform/dom/DOMSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/sax/SAXResult.java b/javax/xml/transform/sax/SAXResult.java
index 94cbacdf4..ea6b8dd4b 100644
--- a/javax/xml/transform/sax/SAXResult.java
+++ b/javax/xml/transform/sax/SAXResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/sax/SAXSource.java b/javax/xml/transform/sax/SAXSource.java
index f26a43352..4b1f5ee2a 100644
--- a/javax/xml/transform/sax/SAXSource.java
+++ b/javax/xml/transform/sax/SAXSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/sax/SAXTransformerFactory.java b/javax/xml/transform/sax/SAXTransformerFactory.java
index e73b31696..8508777d2 100644
--- a/javax/xml/transform/sax/SAXTransformerFactory.java
+++ b/javax/xml/transform/sax/SAXTransformerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/sax/TemplatesHandler.java b/javax/xml/transform/sax/TemplatesHandler.java
index f4d288b32..ae8e6640e 100644
--- a/javax/xml/transform/sax/TemplatesHandler.java
+++ b/javax/xml/transform/sax/TemplatesHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/sax/TransformerHandler.java b/javax/xml/transform/sax/TransformerHandler.java
index 3341f621c..f31c3f8de 100644
--- a/javax/xml/transform/sax/TransformerHandler.java
+++ b/javax/xml/transform/sax/TransformerHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/stream/StreamResult.java b/javax/xml/transform/stream/StreamResult.java
index df7b0dd99..8fbf3a365 100644
--- a/javax/xml/transform/stream/StreamResult.java
+++ b/javax/xml/transform/stream/StreamResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/transform/stream/StreamSource.java b/javax/xml/transform/stream/StreamSource.java
index f6499a4d9..65e2c7078 100644
--- a/javax/xml/transform/stream/StreamSource.java
+++ b/javax/xml/transform/stream/StreamSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/validation/Schema.java b/javax/xml/validation/Schema.java
index fc196e104..46926c8c8 100644
--- a/javax/xml/validation/Schema.java
+++ b/javax/xml/validation/Schema.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/validation/SchemaFactory.java b/javax/xml/validation/SchemaFactory.java
index 3c5155d22..35bf20564 100644
--- a/javax/xml/validation/SchemaFactory.java
+++ b/javax/xml/validation/SchemaFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/validation/TypeInfoProvider.java b/javax/xml/validation/TypeInfoProvider.java
index 11da16c15..99bf2832f 100644
--- a/javax/xml/validation/TypeInfoProvider.java
+++ b/javax/xml/validation/TypeInfoProvider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/validation/Validator.java b/javax/xml/validation/Validator.java
index 48107ee1d..4a96fc13a 100644
--- a/javax/xml/validation/Validator.java
+++ b/javax/xml/validation/Validator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/validation/ValidatorHandler.java b/javax/xml/validation/ValidatorHandler.java
index c7427e680..50cd15165 100644
--- a/javax/xml/validation/ValidatorHandler.java
+++ b/javax/xml/validation/ValidatorHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPath.java b/javax/xml/xpath/XPath.java
index d451c5a8d..1bcfa63d2 100644
--- a/javax/xml/xpath/XPath.java
+++ b/javax/xml/xpath/XPath.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathConstants.java b/javax/xml/xpath/XPathConstants.java
index 70b9d4551..3b2d5d2d9 100644
--- a/javax/xml/xpath/XPathConstants.java
+++ b/javax/xml/xpath/XPathConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathException.java b/javax/xml/xpath/XPathException.java
index a6e59ae23..030d0a9c1 100644
--- a/javax/xml/xpath/XPathException.java
+++ b/javax/xml/xpath/XPathException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathExpression.java b/javax/xml/xpath/XPathExpression.java
index b87fbd2d5..9ead27b8f 100644
--- a/javax/xml/xpath/XPathExpression.java
+++ b/javax/xml/xpath/XPathExpression.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathExpressionException.java b/javax/xml/xpath/XPathExpressionException.java
index ff10c3014..91716f150 100644
--- a/javax/xml/xpath/XPathExpressionException.java
+++ b/javax/xml/xpath/XPathExpressionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathFactory.java b/javax/xml/xpath/XPathFactory.java
index 8aad6cf7a..e87475f13 100644
--- a/javax/xml/xpath/XPathFactory.java
+++ b/javax/xml/xpath/XPathFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathFactoryConfigurationException.java b/javax/xml/xpath/XPathFactoryConfigurationException.java
index 64ffbbeec..a89646336 100644
--- a/javax/xml/xpath/XPathFactoryConfigurationException.java
+++ b/javax/xml/xpath/XPathFactoryConfigurationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathFunction.java b/javax/xml/xpath/XPathFunction.java
index c9e450a21..c7ea73314 100644
--- a/javax/xml/xpath/XPathFunction.java
+++ b/javax/xml/xpath/XPathFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathFunctionException.java b/javax/xml/xpath/XPathFunctionException.java
index fb784171a..ebc8ce7d3 100644
--- a/javax/xml/xpath/XPathFunctionException.java
+++ b/javax/xml/xpath/XPathFunctionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathFunctionResolver.java b/javax/xml/xpath/XPathFunctionResolver.java
index bf1cd82e1..208f43216 100644
--- a/javax/xml/xpath/XPathFunctionResolver.java
+++ b/javax/xml/xpath/XPathFunctionResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/javax/xml/xpath/XPathVariableResolver.java b/javax/xml/xpath/XPathVariableResolver.java
index d0f4f57ca..35226894a 100644
--- a/javax/xml/xpath/XPathVariableResolver.java
+++ b/javax/xml/xpath/XPathVariableResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f5d9f1419..9875fd09d 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -7,25 +7,23 @@ sinclude $(JAVA_DEPEND)
propertydirs := $(shell cd $(top_srcdir)/resource && $(FIND) gnu java org META-INF -type d ! -name CVS -print)
propertyfiles := $(shell cd $(top_srcdir)/resource && $(FIND) gnu java org -name \*\.properties -print)
-metafiles := $(shell cd $(top_srcdir)/resource && $(FIND) META-INF -print)
+metafiles := $(shell cd $(top_srcdir)/resource && $(FIND) META-INF -path \*/CVS -prune -o -type f -print)
+iconfiles := $(shell cd $(top_srcdir) && $(FIND) gnu/javax/swing/plaf/gtk/icons -name *.png -type f -print)
-compile_classpath = $(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:.:$(USER_CLASSLIB)
+compile_classpath = $(vm_classes):$(top_srcdir):$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:.:$(USER_CLASSLIB)
# handling source to bytecode compiler programs like gcj, jikes and kjc
if FOUND_ECJ
JAVAC = $(ECJ) -1.5 -warn:-deprecation,serial -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
else
if FOUND_GCJ
-## Like GCJ but include some common flags.
-GCJF = $(GCJ) -Wno-deprecated --encoding=UTF-8 \
- --bootclasspath '' --classpath $(compile_classpath)
-JAVAC = $(GCJF) -C -d . @classes.standard \
-&& $(GCJF) -C -d . @classes.awt \
-&& $(GCJF) -C -d . @classes.xml \
-&& $(GCJF) -C -d . @classes.standardx
+# Since we don't feed all classes at once gcj needs to know where to find
+# the generated classes (in top_builddir).
+JAVAC = $(srcdir)/split-for-gcj.sh && $(MAKE) -f $(srcdir)/Makefile.gcj \
+ GCJ='$(GCJ)' compile_classpath='$(top_builddir):$(compile_classpath)'
else
if FOUND_JIKES
-JAVAC = $(JIKES) +Pno-shadow +Pno-switchcheck +F -encoding UTF-8 -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes
+JAVAC = $(JIKES) +Pno-shadow +Pno-switchcheck +F $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes
else
if FOUND_KJC
## FIXME: from what I can tell, kjc does not support a -encoding option.
@@ -51,9 +49,11 @@ pkgdata_DATA = glibj.zip
endif # INSTALL_GLIBJ_ZIP
-if INSTALL_CLASS_FILES
-
+if BUILD_CLASS_FILES
noinst_DATA = genclasses compile-classes resources
+endif # BUILD_CLASS_FILES
+
+if INSTALL_CLASS_FILES
install-data-local: genclasses compile-classes
-$(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)
@@ -82,6 +82,7 @@ resources:
if ! [ -e gnu ]; then mkdir gnu; fi
if ! [ -e gnu/java ]; then mkdir gnu/java; fi
if ! [ -e gnu/java/locale ]; then mkdir gnu/java/locale; fi
+ if ! [ -e gnu/javax/swing/plaf/gtk/icons ]; then mkdir -p gnu/javax/swing/plaf/gtk/icons; fi
@list='$(propertydirs)'; for p in $$list; do \
if ! [ -e $$p ]; then mkdir $$p; fi; \
done
@@ -91,6 +92,9 @@ resources:
@list='$(metafiles)'; for p in $$list; do \
cp $(top_srcdir)/resource/$$p $$p; \
done
+ @list='$(iconfiles)'; for p in $$list; do \
+ cp $(top_srcdir)/$$p $$p; \
+ done
touch resources
classes: genclasses
@@ -100,7 +104,7 @@ $(top_builddir)/java/util/LocaleData.java: $(top_srcdir)/scripts/generate-locale
$(top_srcdir)/scripts/generate-locale-list.sh > $(top_builddir)/java/util/LocaleData.java
genclasses: gen-classlist.sh standard.omit $(top_builddir)/java/util/LocaleData.java gen-xpath-parser
- top_builddir=$(top_builddir) $(SHELL) ./gen-classlist.sh standard
+ top_builddir=$(top_builddir) top_srcdir=$(top_srcdir) $(SHELL) ./gen-classlist.sh standard
# Only rebuild parsers when explicitly asked to.
if REGEN_PARSERS
@@ -123,7 +127,7 @@ compile-classes: classes $(JAVA_SRCS) Makefile
$(JAVAC)
touch compile-classes
-EXTRA_DIST = standard.omit mkcollections.pl.in
+EXTRA_DIST = standard.omit mkcollections.pl.in Makefile.gcj split-for-gcj.sh
CLEANFILES = compile-classes resources classes \
classes.standard classes.awt classes.standardx classes.xml \
glibj.zip classes.1 \
@@ -136,6 +140,8 @@ clean-local:
-rm -rf javax
-rm -rf org
-rm -rf META-INF
+ -rm -rf lists
+ -rm -f Makefile.deps
dist-hook:
mkdir -p $(distdir)
@@ -146,6 +152,3 @@ dist-hook:
$(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax $(top_distdir)/org $(top_distdir)/vm -name class-dependencies.conf -print | xargs rm -f
rm -f $(top_distdir)/gnu/classpath/Configuration.java
rm -f $(top_distdir)/java/util/LocaleData.java
-# Omit files listed in standard.omit.
- ( cd $(top_distdir)/lib ; cat $(top_builddir)/lib/standard.omit | sed -e 's/\$$//' | sed -e 's/\/\.\*//' | xargs rm -fr )
-
diff --git a/lib/Makefile.gcj b/lib/Makefile.gcj
new file mode 100644
index 000000000..815238f66
--- /dev/null
+++ b/lib/Makefile.gcj
@@ -0,0 +1,32 @@
+# This Makefile is used when building with gcj. It is separate from
+# the ordinary Makefile as it does special GNU-make-specific things,
+# and this avoids making other builds unnecessarily ugly.
+
+# A .list file is made by split-for-gcj.sh.
+# It lists all the files in a given package.
+all_list_files := $(shell echo lists/*.list)
+# The corresponding stamp files.
+# Each .class file depends on its package's stamp file.
+# Each stamp file depends on the corresponding list file.
+# Each list file depends on the java files in its package.
+# This way touching a single java source will cause the minimum
+# number of rebuilds.
+all_stamp_files := $(all_list_files:.list=.stamp)
+# The dependency file generated by gcj.
+all_deps_files := $(all_list_files:.list=.deps)
+
+all: $(all_stamp_files)
+
+-include Makefile.deps $(all_deps_files)
+
+## Like GCJ but include some common flags.
+GCJF = $(GCJ) -Wno-deprecated --encoding=UTF-8 \
+ --bootclasspath '' --classpath $(compile_classpath) \
+ -C -d .
+
+# Rule to rebuild a stamp file and update the deps file. Note that we
+# make the target be the stamp file. This ensures that if a needed
+# source is changed, this rule is re-run for the appropriate package.
+%.stamp: %.list
+ $(GCJF) -MD -MF ${@:.stamp=.deps} -MT $@ -MP @$<
+ echo timestamp > $@
diff --git a/lib/gen-classlist.sh.in b/lib/gen-classlist.sh.in
index 6b08da290..c091caa20 100755
--- a/lib/gen-classlist.sh.in
+++ b/lib/gen-classlist.sh.in
@@ -7,11 +7,29 @@ LANG=C; export LANG
echo "Adding java source files from srcdir '@top_srcdir@'."
@FIND@ @top_srcdir@/java @top_srcdir@/javax @top_srcdir@/gnu \
- @top_srcdir@/org @top_srcdir@/vm/reference \
+ @top_srcdir@/org \
@top_srcdir@/external/w3c_dom @top_srcdir@/external/sax \
-follow -type f -print | sort | grep '\.java$' \
> ${top_builddir}/lib/classes.1
+# Generate files for the VM classes.
+: > vm.omit
+: > vm.add
+vm_dirlist=`echo "@vm_classes@" | sed -e 's/:/ /g'`
+echo "Adding java source files from VM directory $vm_dirlist"
+for dir in $vm_dirlist; do
+ (cd $dir
+ for subdir in java javax gnu org; do
+ if test -d $subdir; then
+ @FIND@ $subdir -name '*.java' -print
+ fi
+ done) |
+ while read f; do
+ echo $dir/$f >> vm.add
+ echo $f >> vm.omit
+ done
+done
+
# Only include generated files once.
if test ! "${top_builddir}" -ef "@top_srcdir@"; then
echo "Adding generated files in builddir '${top_builddir}'."
@@ -19,7 +37,33 @@ if test ! "${top_builddir}" -ef "@top_srcdir@"; then
| sort | grep '\.java$' >> ${top_builddir}/lib/classes.1
fi
-for filexp in `cat @top_srcdir@/lib/$1.omit` ; do { grep -v ${filexp} < ${top_builddir}/lib/classes.1 > ${top_builddir}/lib/classes.2 ; mv ${top_builddir}/lib/classes.2 ${top_builddir}/lib/classes.1 ; } ; done
+
+cat @top_srcdir@/lib/$1.omit vm.omit > tmp.omit
+for dir in $vm_dirlist; do
+ if test -f $dir/$1.omit; then
+ cat $dir/$1.omit >> tmp.omit
+ fi
+done
+
+for filexp in `cat tmp.omit`; do
+ grep -v ${filexp} < ${top_builddir}/lib/classes.1 > ${top_builddir}/lib/classes.2
+ mv ${top_builddir}/lib/classes.2 ${top_builddir}/lib/classes.1
+done
+
+
+for dir in $vm_dirlist; do
+ if test -f $dir/$1.omit; then
+ for filexp in `cat $dir/$1.omit`; do
+ grep -v $filexp < vm.add > vm.add.1
+ mv vm.add.1 vm.add
+ done
+ fi
+done
+cat vm.add >> classes.1
+
+rm vm.omit
+rm vm.add
+rm tmp.omit
new=
if test -e ${top_builddir}/lib/classes; then
@@ -40,11 +84,4 @@ if test "$new" = "true"; then
done
fi
-# Split in multiple parts for gcj
-grep -v /javax/ classes | grep -v /awt/ \
- | grep -v /beans/ \
- | grep -v /xml/ > classes.standard
-grep /awt/ classes > classes.awt
-grep /beans/ classes >> classes.awt
-grep /xml/ classes > classes.xml
-grep /javax/ classes | grep -v /xml/ > classes.standardx
+exit 0
diff --git a/lib/libgcj.omit b/lib/libgcj.omit
deleted file mode 100644
index 3333d5249..000000000
--- a/lib/libgcj.omit
+++ /dev/null
@@ -1,7 +0,0 @@
-^../java/net/Authenticator.java$
-^../java/net/JarURLConnection.java$
-^../java/lang/RuntimePermission.java$
-^../gnu/test/.*$
-^../gnu/java/awt/.*$
-^../gnu/javax/swing/plaf/gtk/.*$
-^../java/awt/.*$
diff --git a/lib/mkcollections.pl.in b/lib/mkcollections.pl.in
index ea34a39f2..be81430c7 100755
--- a/lib/mkcollections.pl.in
+++ b/lib/mkcollections.pl.in
@@ -19,7 +19,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
-# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA
my $destpath=pop || "gnu/java/util/collections";
my $classpath="..";
diff --git a/lib/split-for-gcj.sh b/lib/split-for-gcj.sh
new file mode 100755
index 000000000..bda7fda88
--- /dev/null
+++ b/lib/split-for-gcj.sh
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+# Split in multiple parts for gcj. This uses a somewhat hacky
+# procedure for finding the package of a given file.
+echo "Splitting for gcj"
+rm -f Makefile.deps > /dev/null 2>&1
+test -d lists || mkdir lists
+for dir in java javax gnu org; do
+ for file in `cat classes | fgrep /$dir/`; do
+ pkg=`echo "$file " | sed -n -e "s,^.*/\($dir/.*\)/[^/]*$,\1,p"`
+ list=lists/`echo $pkg | sed -e 's,/,-,g'`
+ echo "$file" >> ${list}.list.1
+ f2=`echo "$file" | sed -n -e "s,^.*/\($dir/.*\)$,\1,p"`
+ f2=${f2%.java}.class
+ echo "$f2: ${list}.stamp" >> Makefile.deps
+ echo "${list}.list: $file" >> Makefile.deps
+ done
+done
+
+# Only update a .list file if it changed.
+for file in lists/*.list.1; do
+ real=${file%.1}
+ if ! cmp -s $real $file; then
+ mv $file $real
+ else
+ rm $file
+ fi
+done
diff --git a/lib/standard.omit b/lib/standard.omit
index 4cc1ae1c3..2f0f66c43 100644
--- a/lib/standard.omit
+++ b/lib/standard.omit
@@ -1,2 +1,2 @@
../gnu/test/.*$
-../gnu/javax/swing/plaf/gtk/.*$
+../gnu/classpath/jdwp/.*$
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index 431cfd0c0..e9cb21e27 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -147,7 +147,7 @@ AC_DEFUN([CLASSPATH_CHECK_JIKES],
JIKES_VERSION=`$JIKES --version | awk '/^Jikes Compiler/' | cut -d ' ' -f 5`
JIKES_VERSION_MAJOR=`echo "$JIKES_VERSION" | cut -d '.' -f 1`
JIKES_VERSION_MINOR=`echo "$JIKES_VERSION" | cut -d '.' -f 2`
- if expr "$JIKES_VERSION_MAJOR" == 1 > /dev/null; then
+ if expr "$JIKES_VERSION_MAJOR" = 1 > /dev/null; then
if expr "$JIKES_VERSION_MINOR" \< 19 > /dev/null; then
JIKES=""
fi
@@ -157,6 +157,12 @@ AC_DEFUN([CLASSPATH_CHECK_JIKES],
else
AC_MSG_WARN($JIKES_VERSION: jikes 1.19 or higher required)
fi
+
+ JIKESENCODING=
+ if test -n "`$JIKES --help 2>&1 | grep encoding`"; then
+ JIKESENCODING='-encoding UTF-8'
+ fi
+ AC_SUBST(JIKESENCODING)
fi
])
@@ -301,6 +307,11 @@ AC_DEFUN([CLASSPATH_WITH_CLASSLIB],
],
[ conditional_with_classlib=false ])
AM_CONDITIONAL(USER_SPECIFIED_CLASSLIB, test "x${conditional_with_classlib}" = xtrue)
+
+ AC_ARG_WITH([vm-classes],
+ [AS_HELP_STRING(--with-vm-classes,specify path to VM override source files)], [vm_classes="$with_vm_classes"],
+ [vm_classes='${top_srcdir}/vm/reference'])
+ AC_SUBST(vm_classes)
])
dnl -----------------------------------------------------------
@@ -309,20 +320,28 @@ dnl -----------------------------------------------------------
AC_DEFUN([CLASSPATH_WITH_GLIBJ],
[
AC_ARG_WITH([glibj],
- [AS_HELP_STRING([--with-glibj],[define what to install (zip|flat|both|none) [default=zip]])],
+ [AS_HELP_STRING([--with-glibj],[define what to install (zip|flat|both|none|build) [default=zip]])],
[
if test "x${withval}" = xyes || test "x${withval}" = xzip; then
AC_PATH_PROG(ZIP, zip)
install_class_files=no
+ build_class_files=yes
elif test "x${withval}" = xboth; then
AC_PATH_PROG(ZIP, zip)
install_class_files=yes
+ build_class_files=yes
elif test "x${withval}" = xflat; then
ZIP=
install_class_files=yes
+ build_class_files=yes
elif test "x${withval}" = xno || test "x${withval}" = xnone; then
ZIP=
install_class_files=no
+ build_class_files=no
+ elif test "x${withval}" = xbuild; then
+ ZIP=
+ install_class_files=no
+ build_class_files=yes
else
AC_MSG_ERROR([unknown value given to --with-glibj])
fi
@@ -333,6 +352,7 @@ AC_DEFUN([CLASSPATH_WITH_GLIBJ],
])
AM_CONDITIONAL(INSTALL_GLIBJ_ZIP, test "x${ZIP}" != x)
AM_CONDITIONAL(INSTALL_CLASS_FILES, test "x${install_class_files}" = xyes)
+ AM_CONDITIONAL(BUILD_CLASS_FILES, test "x${build_class_files}" = xyes)
AC_ARG_ENABLE([examples],
[AS_HELP_STRING(--enable-examples,enable build of the examples [default=yes])],
diff --git a/missing b/missing
index 6a37006e8..2c025eb6b 100755
--- a/missing
+++ b/missing
@@ -15,8 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
diff --git a/native/fdlibm/Makefile.am b/native/fdlibm/Makefile.am
index c4f460a16..e3e3eecd2 100644
--- a/native/fdlibm/Makefile.am
+++ b/native/fdlibm/Makefile.am
@@ -28,6 +28,7 @@ libfdlibm_la_SOURCES = \
s_cos.c \
s_fabs.c \
sf_fabs.c \
+ s_finite.c \
s_floor.c \
sf_rint.c \
s_rint.c \
diff --git a/native/fdlibm/s_finite.c b/native/fdlibm/s_finite.c
new file mode 100644
index 000000000..3e6c8122b
--- /dev/null
+++ b/native/fdlibm/s_finite.c
@@ -0,0 +1,31 @@
+
+/* @(#)s_finite.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * finite(x) returns 1 is x is finite, else 0;
+ * no branching!
+ */
+
+#include "fdlibm.h"
+
+#ifdef __STDC__
+ int finite(double x)
+#else
+ int finite(x)
+ double x;
+#endif
+{
+ uint32_t high;
+ GET_HIGH_WORD(high,x);
+ return (unsigned)((high&0x7fffffff)-0x7ff00000)>>31;
+}
diff --git a/native/jni/classpath/classpath_jawt.h b/native/jni/classpath/classpath_jawt.h
new file mode 100644
index 000000000..66ba9c70a
--- /dev/null
+++ b/native/jni/classpath/classpath_jawt.h
@@ -0,0 +1,64 @@
+/* classpath_awt.h -- libjawt's interface to the peer library
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+/*
+ * libjawt.so is linked directly to the peer library with -l. This
+ * header declares all the functions that libjawt.so needs -- X-based
+ * peer libraries wanting to support libjawt.so must implement these
+ * functions.
+ */
+
+#ifndef __classpath_jawt_h__
+#define __classpath_jawt_h__
+
+#include <jni.h>
+#include <X11/Xlib.h>
+
+#define CLASSPATH_JAWT_VERSION 0x10004
+
+jint classpath_jawt_get_awt_version ();
+Display* classpath_jawt_get_default_display (JNIEnv* env, jobject canvas);
+Drawable classpath_jawt_get_drawable (JNIEnv* env, jobject canvas);
+VisualID classpath_jawt_get_visualID (JNIEnv* env, jobject canvas);
+jint classpath_jawt_object_lock (jobject lock);
+void classpath_jawt_object_unlock (jobject lock);
+jint classpath_jawt_lock ();
+void classpath_jawt_unlock ();
+jobject classpath_jawt_create_lock ();
+void classpath_jawt_destroy_lock (jobject lock);
+
+#endif /* __classpath_jawt_h__ */
diff --git a/native/jni/classpath/jcl.c b/native/jni/classpath/jcl.c
index 1f2d38f48..ab66a2e71 100644
--- a/native/jni/classpath/jcl.c
+++ b/native/jni/classpath/jcl.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -178,3 +178,47 @@ JCL_FindClass (JNIEnv * env, const char *className)
}
return retval;
}
+
+
+/*
+ * Build a RawData object. The function caches the class type
+ */
+
+static jclass rawDataClass;
+static jfieldID rawData_fid;
+static jmethodID rawData_mid;
+
+JNIEXPORT jobject JNICALL
+JCL_NewRawDataObject (JNIEnv * env, void *data)
+{
+ if (rawDataClass == NULL)
+ {
+#ifdef POINTERS_ARE_64BIT
+ rawDataClass = (*env)->FindClass (env, "gnu/classpath/RawData64");
+ rawData_mid = (*env)->GetMethodID (env, rawDataClass, "<init>", "(J)V");
+ rawData_fid = (*env)->GetFieldID (env, rawDataClass, "data", "J");
+#else
+ rawDataClass = (*env)->FindClass (env, "gnu/classpath/RawData32");
+ rawData_mid = (*env)->GetMethodID (env, rawDataClass, "<init>", "(I)V");
+ rawData_fid = (*env)->GetFieldID (env, rawDataClass, "data", "I");
+#endif
+ (*env)->DeleteLocalRef(env, rawDataClass);
+ rawDataClass = (*env)->NewGlobalRef (env, rawDataClass);
+ }
+
+#ifdef POINTERS_ARE_64BIT
+ return (*env)->NewObject (env, rawDataClass, rawData_mid, (jlong) data);
+#else
+ return (*env)->NewObject (env, rawDataClass, rawData_mid, (jint) data);
+#endif
+}
+
+JNIEXPORT void * JNICALL
+JCL_GetRawData (JNIEnv * env, jobject rawdata)
+{
+#ifdef POINTERS_ARE_64BIT
+ return (void *) (*env)->GetLongField (env, rawdata, rawData_fid);
+#else
+ return (void *) (*env)->GetIntField (env, rawdata, rawData_fid);
+#endif
+}
diff --git a/native/jni/classpath/jcl.h b/native/jni/classpath/jcl.h
index 86af28391..c4b2c44a6 100644
--- a/native/jni/classpath/jcl.h
+++ b/native/jni/classpath/jcl.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,6 +56,9 @@ JNIEXPORT void JNICALL JCL_free_cstring (JNIEnv * env, jstring s,
JNIEXPORT jint JNICALL JCL_MonitorEnter (JNIEnv * env, jobject o);
JNIEXPORT jint JNICALL JCL_MonitorExit (JNIEnv * env, jobject o);
+JNIEXPORT jobject JNICALL JCL_NewRawDataObject (JNIEnv * env, void *data);
+JNIEXPORT void * JNICALL JCL_GetRawData (JNIEnv * env, jobject rawdata);
+
#define JCL_RETHROW_EXCEPTION(env) if((*(env))->ExceptionOccurred((env)) != NULL) return NULL;
/* Simple debug macro */
diff --git a/native/jni/classpath/jnilink.c b/native/jni/classpath/jnilink.c
index 64f26a1dc..15e73a721 100644
--- a/native/jni/classpath/jnilink.c
+++ b/native/jni/classpath/jnilink.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/classpath/jnilink.h b/native/jni/classpath/jnilink.h
index 56c98176a..dd94b3a7a 100644
--- a/native/jni/classpath/jnilink.h
+++ b/native/jni/classpath/jnilink.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/classpath/native_state.c b/native/jni/classpath/native_state.c
index 3853cce2c..2cb43d614 100644
--- a/native/jni/classpath/native_state.c
+++ b/native/jni/classpath/native_state.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -36,13 +36,14 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
#include <stdlib.h>
+#include <assert.h>
#include <jni.h>
#include "native_state.h"
#define DEFAULT_TABLE_SIZE 97
struct state_table *
-init_state_table_with_size (JNIEnv * env, jclass clazz, jint size)
+cp_gtk_init_state_table_with_size (JNIEnv * env, jclass clazz, jint size)
{
struct state_table *table;
jfieldID hash;
@@ -67,9 +68,9 @@ init_state_table_with_size (JNIEnv * env, jclass clazz, jint size)
}
struct state_table *
-init_state_table (JNIEnv * env, jclass clazz)
+cp_gtk_init_state_table (JNIEnv * env, jclass clazz)
{
- return init_state_table_with_size (env, clazz, DEFAULT_TABLE_SIZE);
+ return cp_gtk_init_state_table_with_size (env, clazz, DEFAULT_TABLE_SIZE);
}
static void *
@@ -165,8 +166,20 @@ add_node (struct state_node **head, jint obj_id, void *state)
*head = new_node;
}
+#ifndef NDEBUG
+static void
+cp_gtk_check_compat (JNIEnv * env, jobject obj, struct state_table *table)
+{
+ jclass objclazz;
+
+ objclazz = (*env)->GetObjectClass(env, obj);
+ assert ((*env)->IsAssignableFrom(env, objclazz, table->clazz));
+ (*env)->DeleteLocalRef(env, objclazz);
+}
+#endif
+
void
-set_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
+cp_gtk_set_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
jint obj_id, void *state)
{
jint hash;
@@ -179,7 +192,7 @@ set_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
}
void *
-get_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
+cp_gtk_get_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
jint obj_id)
{
jint hash;
@@ -195,7 +208,7 @@ get_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
}
void *
-remove_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
+cp_gtk_remove_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
jint obj_id)
{
jint hash;
@@ -211,38 +224,53 @@ remove_state_oid (JNIEnv * env, jobject lock, struct state_table *table,
}
int
-set_state (JNIEnv * env, jobject obj, struct state_table *table, void *state)
+cp_gtk_set_state (JNIEnv * env, jobject obj, struct state_table *table, void *state)
{
jint obj_id;
+
+#ifndef NDEBUG
+ cp_gtk_check_compat(env, obj, table);
+#endif
+
obj_id = (*env)->GetIntField (env, obj, table->hash);
if ((*env)->ExceptionOccurred (env) != NULL)
return -1;
- set_state_oid (env, table->clazz, table, obj_id, state);
+ cp_gtk_set_state_oid (env, table->clazz, table, obj_id, state);
return 0;
}
void *
-get_state (JNIEnv * env, jobject obj, struct state_table *table)
+cp_gtk_get_state (JNIEnv * env, jobject obj, struct state_table *table)
{
jint obj_id;
+
+#ifndef NDEBUG
+ cp_gtk_check_compat(env, obj, table);
+#endif
+
obj_id = (*env)->GetIntField (env, obj, table->hash);
if ((*env)->ExceptionOccurred (env) != NULL)
return NULL;
- return get_state_oid (env, table->clazz, table, obj_id);
+ return cp_gtk_get_state_oid (env, table->clazz, table, obj_id);
}
void *
-remove_state_slot (JNIEnv * env, jobject obj, struct state_table *table)
+cp_gtk_remove_state_slot (JNIEnv * env, jobject obj, struct state_table *table)
{
jint obj_id;
+
+#ifndef NDEBUG
+ cp_gtk_check_compat(env, obj, table);
+#endif
+
obj_id = (*env)->GetIntField (env, obj, table->hash);
if ((*env)->ExceptionOccurred (env) != NULL)
return NULL;
- return remove_state_oid (env, table->clazz, table, obj_id);
+ return cp_gtk_remove_state_oid (env, table->clazz, table, obj_id);
}
diff --git a/native/jni/classpath/native_state.h b/native/jni/classpath/native_state.h
index 19b52d0be..641e58882 100644
--- a/native/jni/classpath/native_state.h
+++ b/native/jni/classpath/native_state.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,17 +55,17 @@ struct state_node
struct state_node *next;
};
-struct state_table *init_state_table_with_size (JNIEnv *, jclass, jint);
-struct state_table *init_state_table (JNIEnv *, jclass);
+struct state_table *cp_gtk_init_state_table_with_size (JNIEnv *, jclass, jint);
+struct state_table *cp_gtk_init_state_table (JNIEnv *, jclass);
/* lowlevel api */
-void set_state_oid (JNIEnv *, jobject, struct state_table *, jint, void *);
-void *get_state_oid (JNIEnv *, jobject, struct state_table *, jint);
-void *remove_state_oid (JNIEnv *, jobject, struct state_table *, jint);
+void cp_gtk_set_state_oid (JNIEnv *, jobject, struct state_table *, jint, void *);
+void *cp_gtk_get_state_oid (JNIEnv *, jobject, struct state_table *, jint);
+void *cp_gtk_remove_state_oid (JNIEnv *, jobject, struct state_table *, jint);
/* highlevel api */
-int set_state (JNIEnv *, jobject, struct state_table *, void *);
-void *get_state (JNIEnv *, jobject, struct state_table *);
-void *remove_state_slot (JNIEnv *, jobject, struct state_table *);
+int cp_gtk_set_state (JNIEnv *, jobject, struct state_table *, void *);
+void *cp_gtk_get_state (JNIEnv *, jobject, struct state_table *);
+void *cp_gtk_remove_state_slot (JNIEnv *, jobject, struct state_table *);
#endif
diff --git a/native/jni/classpath/primlib.c b/native/jni/classpath/primlib.c
index 5236335be..e6773ba53 100644
--- a/native/jni/classpath/primlib.c
+++ b/native/jni/classpath/primlib.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/classpath/primlib.h b/native/jni/classpath/primlib.h
index 0cd0b284f..3cdaaa4a1 100644
--- a/native/jni/classpath/primlib.h
+++ b/native/jni/classpath/primlib.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/gtk-peer/Makefile.am b/native/jni/gtk-peer/Makefile.am
index 8c3965b1b..f4e7bdfcc 100644
--- a/native/jni/gtk-peer/Makefile.am
+++ b/native/jni/gtk-peer/Makefile.am
@@ -25,7 +25,6 @@ libgtkpeer_la_SOURCES = $(gtk_cairo_c_source_files) \
gnu_java_awt_peer_gtk_GtkClipboard.c \
gnu_java_awt_peer_gtk_GtkComponentPeer.c \
gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c \
- gnu_java_awt_peer_gtk_GtkEvents.c \
gnu_java_awt_peer_gtk_GtkFileDialogPeer.c \
gnu_java_awt_peer_gtk_GtkFramePeer.c \
gnu_java_awt_peer_gtk_GtkGenericPeer.c \
@@ -38,10 +37,9 @@ libgtkpeer_la_SOURCES = $(gtk_cairo_c_source_files) \
gnu_java_awt_peer_gtk_GtkMenuPeer.c \
gnu_java_awt_peer_gtk_GtkPanelPeer.c \
gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c \
- gnu_java_awt_peer_gtk_GtkScrollBarPeer.c \
+ gnu_java_awt_peer_gtk_GtkScrollbarPeer.c \
gnu_java_awt_peer_gtk_GtkScrollPanePeer.c \
gnu_java_awt_peer_gtk_GtkTextAreaPeer.c \
- gnu_java_awt_peer_gtk_GtkTextComponentPeer.c \
gnu_java_awt_peer_gtk_GtkTextFieldPeer.c \
gnu_java_awt_peer_gtk_GtkToolkit.c \
gnu_java_awt_peer_gtk_GtkWindowPeer.c \
@@ -51,7 +49,8 @@ libgtkpeer_la_SOURCES = $(gtk_cairo_c_source_files) \
gtkcairopeer.h \
gtkpeer.h
-libgtkpeer_la_LIBADD = $(top_builddir)/native/jni/classpath/native_state.lo
+libgtkpeer_la_LIBADD = $(top_builddir)/native/jni/classpath/native_state.lo \
+ $(top_builddir)/native/jni/classpath/jcl.lo
AM_LDFLAGS = @CLASSPATH_MODULE@ @GTK_LIBS@ @CAIRO_LIBS@ @PANGOFT2_LIBS@ @X_LIBS@ -lXtst
AM_CPPFLAGS = @CLASSPATH_INCLUDES@
diff --git a/native/jni/gtk-peer/gdkfont.h b/native/jni/gtk-peer/gdkfont.h
index 3370152e4..cf2333015 100644
--- a/native/jni/gtk-peer/gdkfont.h
+++ b/native/jni/gtk-peer/gdkfont.h
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,47 +45,47 @@
#include <pango/pango-fontmap.h>
#include <pango/pangoft2.h>
-extern struct state_table *native_font_state_table;
+extern struct state_table *cp_gtk_native_font_state_table;
extern struct state_table *native_glyphvector_state_table;
-extern struct state_table *native_text_layout_state_table;
+extern struct state_table *cp_gtk_native_text_layout_state_table;
#define NSA_FONT_INIT(env, clazz) \
- native_font_state_table = init_state_table (env, clazz)
+ cp_gtk_native_font_state_table = cp_gtk_init_state_table (env, clazz)
#define NSA_GET_FONT_PTR(env, obj) \
- get_state (env, obj, native_font_state_table)
+ cp_gtk_get_state (env, obj, cp_gtk_native_font_state_table)
#define NSA_SET_FONT_PTR(env, obj, ptr) \
- set_state (env, obj, native_font_state_table, (void *)ptr)
+ cp_gtk_set_state (env, obj, cp_gtk_native_font_state_table, (void *)ptr)
#define NSA_DEL_FONT_PTR(env, obj) \
- remove_state_slot (env, obj, native_font_state_table)
+ cp_gtk_remove_state_slot (env, obj, cp_gtk_native_font_state_table)
#define NSA_GV_INIT(env, clazz) \
- native_glyphvector_state_table = init_state_table (env, clazz)
+ native_glyphvector_state_table = cp_gtk_init_state_table (env, clazz)
#define NSA_GET_GV_PTR(env, obj) \
- get_state (env, obj, native_glyphvector_state_table)
+ cp_gtk_get_state (env, obj, native_glyphvector_state_table)
#define NSA_SET_GV_PTR(env, obj, ptr) \
- set_state (env, obj, native_glyphvector_state_table, (void *)ptr)
+ cp_gtk_set_state (env, obj, native_glyphvector_state_table, (void *)ptr)
#define NSA_DEL_GV_PTR(env, obj) \
- remove_state_slot (env, obj, native_glyphvector_state_table)
+ cp_gtk_remove_state_slot (env, obj, native_glyphvector_state_table)
#define NSA_TEXT_LAYOUT_INIT(env, clazz) \
- native_text_layout_state_table = init_state_table (env, clazz)
+ cp_gtk_native_text_layout_state_table = cp_gtk_init_state_table (env, clazz)
#define NSA_GET_TEXT_LAYOUT_PTR(env, obj) \
- get_state (env, obj, native_text_layout_state_table)
+ cp_gtk_get_state (env, obj, cp_gtk_native_text_layout_state_table)
#define NSA_SET_TEXT_LAYOUT_PTR(env, obj, ptr) \
- set_state (env, obj, native_text_layout_state_table, (void *)ptr)
+ cp_gtk_set_state (env, obj, cp_gtk_native_text_layout_state_table, (void *)ptr)
#define NSA_DEL_TEXT_LAYOUT_PTR(env, obj) \
- remove_state_slot (env, obj, native_text_layout_state_table)
+ cp_gtk_remove_state_slot (env, obj, cp_gtk_native_text_layout_state_table)
#define FONT_METRICS_ASCENT 0
#define FONT_METRICS_MAX_ASCENT 1
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.c
index 7787eb4c4..595c1a28a 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c
index 7a8a2ceef..401d62337 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,7 +38,7 @@
#include "gdkfont.h"
#include "gnu_java_awt_peer_gtk_GdkFontPeer.h"
-struct state_table *native_font_state_table;
+struct state_table *cp_gtk_native_font_state_table;
enum java_awt_font_style {
java_awt_font_PLAIN = 0,
@@ -75,11 +75,14 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_initState
(JNIEnv *env, jobject self)
{
struct peerfont *pfont = NULL;
+
gdk_threads_enter ();
+
g_assert (self != NULL);
pfont = (struct peerfont *) g_malloc0 (sizeof (struct peerfont));
g_assert (pfont != NULL);
NSA_SET_FONT_PTR (env, self, pfont);
+
gdk_threads_leave ();
}
@@ -91,6 +94,7 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_dispose
struct peerfont *pfont = NULL;
gdk_threads_enter ();
+
pfont = (struct peerfont *)NSA_DEL_FONT_PTR (env, self);
g_assert (pfont != NULL);
if (pfont->layout != NULL)
@@ -102,6 +106,7 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_dispose
if (pfont->desc != NULL)
pango_font_description_free (pfont->desc);
g_free (pfont);
+
gdk_threads_leave ();
}
@@ -114,11 +119,13 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_getGlyphVector
jobject fontRenderContext)
{
struct peerfont *pfont = NULL;
- GList *items = NULL, *i = NULL;
+ GList *items = NULL;
+ GList *i = NULL;
gchar *str = NULL;
- int len, j;
- double *native_extents;
- int *native_codes;
+ int len = 0;
+ int j = 0;
+ double *native_extents = NULL;
+ int *native_codes = NULL;
jintArray java_codes = NULL;
jdoubleArray java_extents = NULL;
@@ -127,7 +134,7 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_getGlyphVector
pfont = (struct peerfont *)NSA_GET_FONT_PTR (env, self);
g_assert (pfont != NULL);
- len = (*gdk_env())->GetStringUTFLength (env, chars);
+ len = (*cp_gtk_gdk_env())->GetStringUTFLength (env, chars);
str = (gchar *)(*env)->GetStringUTFChars (env, chars, NULL);
g_assert (str != NULL);
@@ -143,8 +150,12 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_getGlyphVector
if (i == NULL)
{
+ gdk_threads_leave ();
+
java_extents = (*env)->NewDoubleArray (env, 0);
java_codes = (*env)->NewIntArray (env, 0);
+
+ gdk_threads_enter ();
}
else
{
@@ -166,8 +177,13 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_getGlyphVector
int x = 0;
double scale = ((double) PANGO_SCALE);
+ gdk_threads_leave ();
+
java_extents = (*env)->NewDoubleArray (env, glyphs->num_glyphs * NUM_GLYPH_METRICS);
java_codes = (*env)->NewIntArray (env, glyphs->num_glyphs);
+
+ gdk_threads_enter ();
+
native_extents = (*env)->GetDoubleArrayElements (env, java_extents, NULL);
native_codes = (*env)->GetIntArrayElements (env, java_codes, NULL);
@@ -227,7 +243,7 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_getFontMetrics
{
struct peerfont *pfont = NULL;
jdouble *native_metrics = NULL;
- PangoFontMetrics *pango_metrics;
+ PangoFontMetrics *pango_metrics = NULL;
gdk_threads_enter();
@@ -329,9 +345,10 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_setFont
struct peerfont *pfont = NULL;
char const *family_name = NULL;
enum java_awt_font_style style;
- PangoFT2FontMap *ft2_map;
+ PangoFT2FontMap *ft2_map = NULL;
gdk_threads_enter ();
+
style = (enum java_awt_font_style) style_int;
g_assert (self != NULL);
@@ -372,8 +389,8 @@ Java_gnu_java_awt_peer_gtk_GdkFontPeer_setFont
else
{
/* GDK uses a slightly different DPI setting. */
- pango_font_description_set_size (pfont->desc,
- size * dpi_conversion_factor);
+ pango_font_description_set_size (pfont->desc,
+ size * cp_gtk_dpi_conversion_factor);
if (pfont->ctx == NULL)
pfont->ctx = gdk_pango_context_get();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
index f80343f22..4a87aa744 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,25 +41,75 @@ exception statement from your version. */
#include <gdk/gdkprivate.h>
#include <gdk/gdkx.h>
+static jmethodID initComponentGraphicsID;
+
+void
+cp_gtk_graphics_init_jni (void)
+{
+ jclass gdkgraphics;
+
+ gdkgraphics = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GdkGraphics");
+
+ initComponentGraphicsID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gdkgraphics,
+ "initComponentGraphics",
+ "()V");
+}
+
+struct state_table *cp_gtk_native_graphics_state_table;
+
+static struct state_table *native_graphics_global_ref_table;
+
+#define NSA_GLOBAL_G_INIT(env, clazz) \
+ native_graphics_global_ref_table = cp_gtk_init_state_table (env, clazz)
+
+#define NSA_GET_GLOBAL_G_REF(env, obj) \
+ cp_gtk_get_state (env, obj, native_graphics_global_ref_table)
+
+#define NSA_SET_GLOBAL_G_REF(env, obj) \
+ do {jobject *globRefPtr; \
+ globRefPtr = (jobject *) malloc (sizeof (jobject)); \
+ *globRefPtr = (*env)->NewGlobalRef (env, obj); \
+ cp_gtk_set_state (env, obj, native_graphics_global_ref_table, (void *)globRefPtr);} while (0)
+
+#define NSA_DEL_GLOBAL_G_REF(env, obj) \
+ do {jobject *globRefPtr = cp_gtk_get_state (env, obj, native_graphics_global_ref_table); \
+ cp_gtk_remove_state_slot (env, obj, native_graphics_global_ref_table); \
+ (*env)->DeleteGlobalRef (env, *globRefPtr); \
+ free (globRefPtr);} while (0)
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GdkGraphics_initStaticState
+ (JNIEnv *env, jclass clazz)
+{
+ gdk_threads_enter();
+
+ NSA_G_INIT (env, clazz);
+ NSA_GLOBAL_G_INIT (env, clazz);
+
+ gdk_threads_leave();
+}
+
#define GDK_STABLE_IS_PIXMAP(d) (GDK_IS_PIXMAP(d))
-GdkPoint *
-translate_points (JNIEnv *env, jintArray xpoints, jintArray ypoints,
- jint npoints, jint x_offset, jint y_offset);
-static void realize_cb (GtkWidget *widget, jobject peer);
+static GdkPoint *translate_points (JNIEnv *env, jintArray xpoints,
+ jintArray ypoints, jint npoints,
+ jint x_offset, jint y_offset);
+static void realize_cb (GtkWidget *widget, jobject jgraphics);
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_copyState
(JNIEnv *env, jobject obj, jobject old)
{
- struct graphics *g, *g_old;
+ struct graphics *g = NULL;
+ struct graphics *g_old = NULL;
- g = (struct graphics *) malloc (sizeof (struct graphics));
- g_old = (struct graphics *) NSA_GET_PTR (env, old);
+ gdk_threads_enter ();
- *g = *g_old;
+ g = (struct graphics *) g_malloc (sizeof (struct graphics));
+ g_old = (struct graphics *) NSA_GET_G_PTR (env, old);
- gdk_threads_enter ();
+ *g = *g_old;
g->gc = gdk_gc_new (g->drawable);
gdk_gc_copy (g->gc, g_old->gc);
@@ -71,56 +121,58 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_copyState
gdk_colormap_ref (g->cm);
- gdk_threads_leave ();
+ NSA_SET_G_PTR (env, obj, g);
- NSA_SET_PTR (env, obj, g);
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__II
(JNIEnv *env, jobject obj, jint width, jint height)
{
- struct graphics *g;
+ struct graphics *g = NULL;
+
+ gdk_threads_enter ();
- g = (struct graphics *) malloc (sizeof (struct graphics));
+ g = (struct graphics *) g_malloc (sizeof (struct graphics));
g->x_offset = g->y_offset = 0;
- gdk_threads_enter ();
g->drawable = (GdkDrawable *) gdk_pixmap_new (NULL, width, height,
gdk_rgb_get_visual ()->depth);
g->cm = gdk_rgb_get_cmap ();
gdk_colormap_ref (g->cm);
g->gc = gdk_gc_new (g->drawable);
- gdk_threads_leave ();
+ NSA_SET_G_PTR (env, obj, g);
- NSA_SET_PTR (env, obj, g);
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_initFromImage
(JNIEnv *env, jobject obj, jobject source)
{
- struct graphics *g;
- GdkPixmap *pixmap =
- gnu_java_awt_peer_gtk_GtkImage_getPixmap(env, source);
+ struct graphics *g = NULL;
+ GdkPixmap *pixmap = NULL;
+
+ gdk_threads_enter ();
+
+ pixmap = cp_gtk_image_get_pixmap (env, source);
g_assert(pixmap != NULL);
gdk_pixmap_ref (pixmap);
- g = (struct graphics *) malloc (sizeof (struct graphics));
+ g = (struct graphics *) g_malloc (sizeof (struct graphics));
g->x_offset = g->y_offset = 0;
- gdk_threads_enter ();
-
g->drawable = (GdkDrawable *)pixmap;
g->cm = gdk_drawable_get_colormap (g->drawable);
gdk_colormap_ref (g->cm);
g->gc = gdk_gc_new (g->drawable);
- gdk_threads_leave ();
+ NSA_SET_G_PTR (env, obj, g);
- NSA_SET_PTR (env, obj, g);
+ gdk_threads_leave ();
}
/* copy the native state of the peer (GtkWidget *) to the native state
@@ -129,16 +181,18 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__Lgnu_java_awt_peer_gtk_GtkComponentPeer_2
(JNIEnv *env, jobject obj, jobject peer)
{
- struct graphics *g = (struct graphics *) malloc (sizeof (struct graphics));
- void *ptr;
- GtkWidget *widget;
+ struct graphics *g = NULL;
+ void *ptr = NULL;
+ GtkWidget *widget = NULL;
GdkColor color;
- ptr = NSA_GET_PTR (env, peer);
- g->x_offset = g->y_offset = 0;
-
gdk_threads_enter ();
+ g = (struct graphics *) g_malloc (sizeof (struct graphics));
+ ptr = NSA_GET_PTR (env, peer);
+ g->x_offset = 0;
+ g->y_offset = 0;
+
widget = GTK_WIDGET (ptr);
g->drawable = (GdkDrawable *) widget->window;
@@ -149,24 +203,24 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__Lgnu_java_awt_peer_gtk_GtkComp
gdk_gc_copy (g->gc, widget->style->fg_gc[GTK_STATE_NORMAL]);
color = widget->style->fg[GTK_STATE_NORMAL];
- gdk_threads_leave ();
+ NSA_SET_G_PTR (env, obj, g);
- NSA_SET_PTR (env, obj, g);
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_connectSignals
(JNIEnv *env, jobject obj, jobject peer)
{
- void *ptr;
- jobject *gref;
+ void *ptr = NULL;
+ jobject *gref = NULL;
- NSA_SET_GLOBAL_REF (env, obj);
- gref = NSA_GET_GLOBAL_REF (env, obj);
+ gdk_threads_enter ();
- ptr = NSA_GET_PTR (env, peer);
+ NSA_SET_GLOBAL_G_REF (env, obj);
+ gref = NSA_GET_GLOBAL_G_REF (env, obj);
- gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, peer);
g_signal_connect_after (G_OBJECT (ptr), "realize",
G_CALLBACK (realize_cb), *gref);
@@ -178,14 +232,19 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_dispose
(JNIEnv *env, jobject obj)
{
- struct graphics *g;
+ struct graphics *g = NULL;
-
- g = (struct graphics *) NSA_DEL_PTR (env, obj);
-
- if (!g) return; /* dispose has been called more than once */
-
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_DEL_G_PTR (env, obj);
+
+ /* check if dispose has been called already */
+ if (!g)
+ {
+ gdk_threads_leave ();
+ return;
+ }
+
XFlush (GDK_DISPLAY ());
gdk_gc_destroy (g->gc);
@@ -197,22 +256,21 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_dispose
gdk_colormap_unref (g->cm);
- gdk_threads_leave ();
-
+ g_free (g);
- free (g);
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_translateNative
(JNIEnv *env, jobject obj, jint x, jint y)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
g->x_offset += x;
g->y_offset += y;
@@ -224,12 +282,14 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString
(JNIEnv *env, jobject obj, jobject font, jstring str, jint x, jint y)
{
struct peerfont *pfont = NULL;
- struct graphics *g;
- const char *cstr;
- int baseline_y;
- PangoLayoutIter *iter;
+ struct graphics *g = NULL;
+ const char *cstr = NULL;
+ int baseline_y = 0;
+ PangoLayoutIter *iter = NULL;
+
+ gdk_threads_enter ();
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
g_assert (g != NULL);
pfont = (struct peerfont *)NSA_GET_FONT_PTR (env, font);
@@ -237,8 +297,6 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString
cstr = (*env)->GetStringUTFChars (env, str, NULL);
- gdk_threads_enter ();
-
pango_layout_set_font_description (pfont->layout, pfont->desc);
pango_layout_set_text (pfont->layout, cstr, -1);
iter = pango_layout_get_iter (pfont->layout);
@@ -254,24 +312,27 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString
pango_layout_set_text (pfont->layout, "", -1);
gdk_flush ();
- gdk_threads_leave ();
(*env)->ReleaseStringUTFChars (env, str, cstr);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_drawLine
(JNIEnv *env, jobject obj, jint x, jint y, jint x2, jint y2)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_draw_line (g->drawable, g->gc,
x + g->x_offset, y + g->y_offset,
x2 + g->x_offset, y2 + g->y_offset);
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -279,15 +340,16 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_fillRect
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_draw_rectangle (g->drawable, g->gc, TRUE,
x + g->x_offset, y + g->y_offset, width, height);
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -295,14 +357,16 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_drawRect
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_draw_rectangle (g->drawable, g->gc, FALSE,
x + g->x_offset, y + g->y_offset, width, height);
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -311,11 +375,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_copyArea
(JNIEnv *env, jobject obj, jint x, jint y,
jint width, jint height, jint dx, jint dy)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_window_copy_area ((GdkWindow *)g->drawable,
g->gc,
x + g->x_offset + dx, y + g->y_offset + dy,
@@ -323,6 +388,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_copyArea
x + g->x_offset, y + g->y_offset,
width, height);
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -330,20 +396,21 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_clearRect
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
{
- struct graphics *g;
+ struct graphics *g = NULL;
GdkGCValues saved;
- GtkWidget *widget;
+ GtkWidget *widget = NULL;
union widget_union w;
- g = (struct graphics *) NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
if (!g)
{
gdk_threads_leave ();
return;
}
+
if (GDK_IS_WINDOW (g->drawable))
{
w.widget = &widget;
@@ -363,6 +430,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_clearRect
}
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -370,11 +438,14 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_setFunction
(JNIEnv *env, jobject obj, jint func)
{
- struct graphics *g;
- g = (struct graphics *) NSA_GET_PTR (env, obj);
-
+ struct graphics *g = NULL;
+
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_gc_set_function (g->gc, func);
+
gdk_threads_leave ();
}
@@ -384,15 +455,16 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_setFGColor
(JNIEnv *env, jobject obj, jint red, jint green, jint blue)
{
GdkColor color;
- struct graphics *g;
+ struct graphics *g = NULL;
+
+ gdk_threads_enter ();
color.red = red << 8;
color.green = green << 8;
color.blue = blue << 8;
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
- gdk_threads_enter ();
gdk_color_alloc (g->cm, &color);
gdk_gc_set_foreground (g->gc, &color);
@@ -404,19 +476,21 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_drawArc
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height,
jint angle1, jint angle2)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_draw_arc (g->drawable, g->gc, FALSE,
x + g->x_offset, y + g->y_offset,
width, height, angle1 << 6, angle2 << 6);
gdk_flush ();
+
gdk_threads_leave ();
}
-GdkPoint *
+static GdkPoint *
translate_points (JNIEnv *env, jintArray xpoints, jintArray ypoints,
jint npoints, jint x_offset, jint y_offset)
{
@@ -448,19 +522,21 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_drawPolyline
(JNIEnv *env, jobject obj, jintArray xpoints, jintArray ypoints,
jint npoints)
{
- struct graphics *g;
- GdkPoint *points;
+ struct graphics *g = NULL;
+ GdkPoint *points = NULL;
+
+ gdk_threads_enter ();
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
points = translate_points (env, xpoints, ypoints, npoints,
g->x_offset, g->y_offset);
- gdk_threads_enter ();
gdk_draw_lines (g->drawable, g->gc, points, npoints);
gdk_flush ();
- gdk_threads_leave ();
g_free (points);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -468,10 +544,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_drawPolygon
(JNIEnv *env, jobject obj, jintArray xpoints, jintArray ypoints,
jint npoints)
{
- struct graphics *g;
- GdkPoint *points;
+ struct graphics *g = NULL;
+ GdkPoint *points = NULL;
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
points = translate_points (env, xpoints, ypoints, npoints,
g->x_offset, g->y_offset);
@@ -480,12 +558,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_drawPolygon
if (points[0].x != points[npoints-1].x || points[0].y != points[npoints-1].y)
points[npoints++] = points[0];
- gdk_threads_enter ();
gdk_draw_lines (g->drawable, g->gc, points, npoints);
gdk_flush ();
- gdk_threads_leave ();
g_free (points);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -493,18 +571,20 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_fillPolygon
(JNIEnv *env, jobject obj, jintArray xpoints, jintArray ypoints,
jint npoints)
{
- struct graphics *g;
- GdkPoint *points;
+ struct graphics *g = NULL;
+ GdkPoint *points = NULL;
+
+ gdk_threads_enter ();
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
points = translate_points (env, xpoints, ypoints, npoints,
g->x_offset, g->y_offset);
- gdk_threads_enter ();
gdk_draw_polygon (g->drawable, g->gc, TRUE, points, npoints);
gdk_flush ();
- gdk_threads_leave ();
g_free (points);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -512,15 +592,17 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics_fillArc
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height,
jint angle1, jint angle2)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_draw_arc (g->drawable, g->gc, TRUE,
x + g->x_offset, y + g->y_offset,
width, height, angle1 << 6, angle2 << 6);
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -528,15 +610,17 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_drawOval
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_draw_arc (g->drawable, g->gc, FALSE,
x + g->x_offset, y + g->y_offset,
width, height, 0, 23040);
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -544,15 +628,17 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_fillOval
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
{
- struct graphics *g;
-
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ struct graphics *g = NULL;
gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
+
gdk_draw_arc (g->drawable, g->gc, TRUE,
x + g->x_offset, y + g->y_offset,
width, height, 0, 23040);
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -560,29 +646,31 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics_setClipRectangle
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
{
- struct graphics *g;
+ struct graphics *g = NULL;
GdkRectangle rectangle;
- g = (struct graphics *) NSA_GET_PTR (env, obj);
+ gdk_threads_enter ();
+
+ g = (struct graphics *) NSA_GET_G_PTR (env, obj);
rectangle.x = x + g->x_offset;
rectangle.y = y + g->y_offset;
rectangle.width = width;
rectangle.height = height;
- gdk_threads_enter ();
gdk_gc_set_clip_rectangle (g->gc, &rectangle);
+
gdk_threads_leave ();
}
-static void realize_cb (GtkWidget *widget __attribute__ ((unused)),
- jobject peer)
+static void
+realize_cb (GtkWidget *widget __attribute__ ((unused)), jobject jgraphics)
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer, initComponentGraphicsID);
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), jgraphics, initComponentGraphicsID);
- NSA_DEL_GLOBAL_REF (gdk_env(), peer);
+ NSA_DEL_GLOBAL_G_REF (cp_gtk_gdk_env(), jgraphics);
gdk_threads_enter ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
index e6535b463..b4bd676e7 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,7 @@
#include <gdk/gdktypes.h>
#include <gdk/gdkprivate.h>
#include <gdk/gdkx.h>
+#include <X11/extensions/Xrender.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gdk-pixdata.h>
@@ -51,26 +52,43 @@
#include <stdio.h>
#include <stdlib.h>
-struct state_table *native_graphics2d_state_table;
+static jmethodID initComponentGraphics2DID;
+
+void
+cp_gtk_graphics2d_init_jni (void)
+{
+ jclass gdkgraphics2d;
+
+ gdkgraphics2d = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GdkGraphics2D");
+
+ initComponentGraphics2DID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gdkgraphics2d,
+ "initComponentGraphics2D",
+ "()V");
+}
+
+static struct state_table *native_graphics2d_state_table;
#define NSA_G2D_INIT(env, clazz) \
- native_graphics2d_state_table = init_state_table (env, clazz)
+ native_graphics2d_state_table = cp_gtk_init_state_table (env, clazz)
#define NSA_GET_G2D_PTR(env, obj) \
- get_state (env, obj, native_graphics2d_state_table)
+ cp_gtk_get_state (env, obj, native_graphics2d_state_table)
#define NSA_SET_G2D_PTR(env, obj, ptr) \
- set_state (env, obj, native_graphics2d_state_table, (void *)ptr)
+ cp_gtk_set_state (env, obj, native_graphics2d_state_table, (void *)ptr)
#define NSA_DEL_G2D_PTR(env, obj) \
- remove_state_slot (env, obj, native_graphics2d_state_table)
+ cp_gtk_remove_state_slot (env, obj, native_graphics2d_state_table)
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initStaticState
(JNIEnv *env, jclass clazz)
{
gdk_threads_enter();
+
NSA_G2D_INIT (env, clazz);
+
gdk_threads_leave();
}
@@ -196,15 +214,16 @@ init_graphics2d_as_pixbuf (struct graphics2d *gr)
g_assert (gdk_pixbuf_get_bits_per_sample (gr->drawbuf) == bits_per_sample);
g_assert (gdk_pixbuf_get_n_channels (gr->drawbuf) == total_channels);
- gr->surface = cairo_surface_create_for_image ((char *) gdk_pixbuf_get_pixels (gr->drawbuf),
+ gr->surface = cairo_image_surface_create_for_data (gdk_pixbuf_get_pixels (gr->drawbuf),
CAIRO_FORMAT_ARGB32,
gdk_pixbuf_get_width (gr->drawbuf),
gdk_pixbuf_get_height (gr->drawbuf),
gdk_pixbuf_get_rowstride (gr->drawbuf));
g_assert (gr->surface != NULL);
- g_assert (gr->cr != NULL);
gr->mode = MODE_DRAWABLE_NO_RENDER;
- cairo_set_target_surface (gr->cr, gr->surface);
+ if (gr->cr != NULL)
+ cairo_destroy (gr->cr);
+ gr->cr = cairo_create (gr->surface);
}
static void
@@ -228,13 +247,12 @@ init_graphics2d_as_renderable (struct graphics2d *gr)
vis = gdk_x11_visual_get_xvisual (gdk_drawable_get_visual (gr->drawable));
g_assert (vis != NULL);
- gr->surface = cairo_xlib_surface_create (dpy, draw, vis,
- CAIRO_FORMAT_ARGB32,
- DefaultColormap (dpy, DefaultScreen (dpy)));
+ gr->surface = cairo_xlib_surface_create (dpy, draw, vis, gr->width, gr->height);
g_assert (gr->surface != NULL);
- g_assert (gr->cr != NULL);
gr->mode = MODE_DRAWABLE_WITH_RENDER;
- cairo_set_target_surface (gr->cr, gr->surface);
+ if (gr->cr != NULL)
+ cairo_destroy (gr->cr);
+ gr->cr = cairo_create (gr->surface);
}
static void
@@ -272,15 +290,18 @@ begin_drawing_operation (JNIEnv *env, struct graphics2d * gr)
break;
case MODE_JAVA_ARRAY:
- gr->javabuf = (*env)->GetIntArrayElements (env, gr->jarray, &gr->isCopy);
- gr->surface = cairo_surface_create_for_image ((char *) gr->javabuf,
- CAIRO_FORMAT_ARGB32,
- gr->width,
- gr->height,
- gr->width * 4);
- g_assert(gr->surface != NULL);
- g_assert(gr->cr != NULL);
- cairo_set_target_surface (gr->cr, gr->surface);
+ {
+ jboolean isCopy;
+ gr->javabuf = (*env)->GetPrimitiveArrayCritical (env, gr->jarray, &isCopy);
+ gr->isCopy |= isCopy;
+ if (gr->isCopy)
+ {
+ /* Make sure that the pixel buffer copy is already initalized,
+ i.e. we already failed to get direct access in initState. */
+ g_assert (gr->javabuf_copy != NULL);
+ memcpy (gr->javabuf_copy, gr->javabuf, gr->width * gr->height * 4);
+ }
+ }
break;
}
}
@@ -319,13 +340,9 @@ end_drawing_operation (JNIEnv *env, struct graphics2d * gr)
break;
case MODE_JAVA_ARRAY:
- /*
- * FIXME: Perhaps this should use the isCopy flag to try to avoid
- * tearing down the cairo surface.
- */
- cairo_surface_destroy (gr->surface);
- gr->surface = NULL;
- (*env)->ReleaseIntArrayElements (env, gr->jarray, gr->javabuf, JNI_COMMIT);
+ if (gr->isCopy)
+ memcpy (gr->javabuf, gr->javabuf_copy, gr->width * gr->height * 4);
+ (*env)->ReleasePrimitiveArrayCritical (env, gr->jarray, gr->javabuf, JNI_COMMIT);
}
}
@@ -333,21 +350,14 @@ end_drawing_operation (JNIEnv *env, struct graphics2d * gr)
static void
update_pattern_transform (struct graphics2d *gr)
{
- double a, b, c, d, tx, ty;
- cairo_matrix_t *mat = NULL;
+ cairo_matrix_t mat;
g_assert (gr != NULL);
if (gr->pattern == NULL)
return;
- return;
- /* temporarily disabled: ambiguous behavior */
- /* cairo_get_matrix (gr->cr, &a, &b, &c, &d, &tx, &ty); */
- mat = cairo_matrix_create ();
- g_assert (mat != NULL);
- cairo_matrix_set_affine (mat, a, b, c, d, tx, ty);
- cairo_pattern_set_matrix (gr->pattern, mat);
- cairo_matrix_destroy (mat);
+ cairo_get_matrix (gr->cr, &mat);
+ cairo_pattern_set_matrix (gr->pattern, &mat);
}
static void
@@ -361,7 +371,7 @@ realize_cb (GtkWidget *widget __attribute__ ((unused)), jobject peer)
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer, initComponentGraphics2DID);
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer, initComponentGraphics2DID);
gdk_threads_enter ();
}
@@ -373,7 +383,8 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_copyState
struct graphics2d *g = NULL, *g_old = NULL;
gdk_threads_enter();
- g = (struct graphics2d *) malloc (sizeof (struct graphics2d));
+
+ g = (struct graphics2d *) g_malloc (sizeof (struct graphics2d));
g_assert (g != NULL);
memset (g, 0, sizeof(struct graphics2d));
@@ -385,20 +396,32 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_copyState
g->debug = g_old->debug;
g->mode = g_old->mode;
+ g->width = g_old->width;
+ g->height = g_old->height;
+
if (g_old->mode == MODE_JAVA_ARRAY)
{
- g->width = g_old->width;
- g->height = g_old->height;
- g->jarray = (*env)->NewGlobalRef(env, g_old->jarray);
+ jint size = g->width * g->height * 4;
+
+ g->jarray = (*env)->NewGlobalRef (env, g_old->jarray);
+ g->javabuf = (*env)->GetIntArrayElements (env, g->jarray, &g->isCopy);
+ g->isCopy = JNI_TRUE;
+ g->javabuf_copy = (jint *) g_malloc (size);
+ memcpy (g->javabuf_copy, g->javabuf, size);
+ g->surface = cairo_image_surface_create_for_data ((unsigned char *) g->javabuf,
+ CAIRO_FORMAT_ARGB32,
+ g->width,
+ g->height,
+ g->width * 4);
+ g_assert (g->surface != NULL);
+ g->cr = cairo_create (g->surface);
+ g_assert (g->cr != NULL);
+ (*env)->ReleaseIntArrayElements (env, g->jarray, g->javabuf, JNI_ABORT);
}
else
{
g->drawable = g_old->drawable;
-
g_object_ref (g->drawable);
-
- g->cr = cairo_create();
- g_assert (g->cr != NULL);
if (x_server_has_render_extension ())
init_graphics2d_as_renderable (g);
@@ -406,9 +429,11 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_copyState
init_graphics2d_as_pixbuf (g);
}
- cairo_surface_set_filter (g->surface, CAIRO_FILTER_FAST);
+ if (g->pattern)
+ cairo_pattern_set_filter (g->pattern, CAIRO_FILTER_FAST);
NSA_SET_G2D_PTR (env, obj, g);
+
gdk_threads_leave();
}
@@ -417,10 +442,12 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState___3III
(JNIEnv *env, jobject obj, jintArray jarr, jint width, jint height)
{
- struct graphics2d *gr;
+ struct graphics2d *gr = NULL;
+ jint *cairobuf = NULL;
gdk_threads_enter();
- gr = (struct graphics2d *) malloc (sizeof (struct graphics2d));
+
+ gr = (struct graphics2d *) g_malloc (sizeof (struct graphics2d));
g_assert (gr != NULL);
memset (gr, 0, sizeof(struct graphics2d));
@@ -428,19 +455,42 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState___3III
if (gr->debug) printf ("constructing java-backed image of size (%d,%d)\n",
width, height);
-
- gr->cr = cairo_create();
- g_assert (gr->cr != NULL);
gr->width = width;
gr->height = height;
gr->jarray = (*env)->NewGlobalRef(env, jarr);
+ gr->javabuf = (*env)->GetPrimitiveArrayCritical (env, gr->jarray, &gr->isCopy);
+ if (gr->isCopy)
+ {
+ /* We didn't get direct access to the pixel buffer, so we'll have to
+ maintain a separate copy for Cairo. */
+ jint size = gr->width * gr->height * 4;
+ gr->javabuf_copy = (jint *) g_malloc (size);
+ memcpy (gr->javabuf_copy, gr->javabuf, size);
+ cairobuf = gr->javabuf_copy;
+ }
+ else
+ {
+ /* Have Cairo write directly to the Java array. */
+ cairobuf = gr->javabuf;
+ }
+ gr->surface = cairo_image_surface_create_for_data ((unsigned char *) cairobuf,
+ CAIRO_FORMAT_ARGB32,
+ gr->width,
+ gr->height,
+ gr->width * 4);
+ g_assert (gr->surface != NULL);
+ gr->cr = cairo_create (gr->surface);
+ g_assert (gr->cr != NULL);
+ (*env)->ReleasePrimitiveArrayCritical (env, gr->jarray, gr->javabuf, JNI_COMMIT);
+
gr->mode = MODE_JAVA_ARRAY;
if (gr->debug) printf ("constructed java-backed image of size (%d,%d)\n",
width, height);
NSA_SET_G2D_PTR (env, obj, gr);
+
gdk_threads_leave();
}
@@ -448,10 +498,11 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState__II
(JNIEnv *env, jobject obj, jint width, jint height)
{
- struct graphics2d *gr;
+ struct graphics2d *gr = NULL;
gdk_threads_enter();
- gr = (struct graphics2d *) malloc (sizeof (struct graphics2d));
+
+ gr = (struct graphics2d *) g_malloc (sizeof (struct graphics2d));
g_assert (gr != NULL);
memset (gr, 0, sizeof(struct graphics2d));
@@ -464,8 +515,8 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState__II
gdk_rgb_get_visual ()->depth);
g_assert (gr->drawable != NULL);
- gr->cr = cairo_create();
- g_assert (gr->cr != NULL);
+ gr->width = width;
+ gr->height = height;
if (x_server_has_render_extension ())
init_graphics2d_as_renderable (gr);
@@ -475,6 +526,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState__II
if (gr->debug) printf ("constructed offscreen drawable of size (%d,%d)\n",
width, height);
NSA_SET_G2D_PTR (env, obj, gr);
+
gdk_threads_leave();
}
@@ -482,13 +534,25 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics2D_gdkDrawDrawable
(JNIEnv *env, jobject self, jobject other, jint x, jint y)
{
- struct graphics2d *src = NULL, *dst = NULL;
- gint s_height, s_width, d_height, d_width, height, width;
- cairo_matrix_t *matrix;
+ struct graphics2d *src = NULL;
+ struct graphics2d *dst = NULL;
+ gint s_height;
+ gint s_width;
+ gint d_height;
+ gint d_width;
+ gint height;
+ gint width;
+ cairo_matrix_t matrix;
cairo_operator_t tmp_op;
gdk_threads_enter();
- if (peer_is_disposed(env, self)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, self))
+ {
+ gdk_threads_leave();
+ return;
+ }
+
src = (struct graphics2d *)NSA_GET_G2D_PTR (env, other);
dst = (struct graphics2d *)NSA_GET_G2D_PTR (env, self);
g_assert (src != NULL);
@@ -505,25 +569,26 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_gdkDrawDrawable
width = min (s_width, d_width);
height = min (s_height, d_height);
- matrix = cairo_matrix_create ();
- cairo_surface_get_matrix (src->surface, matrix);
- cairo_matrix_translate (matrix, (double)-x, (double)-y);
- cairo_surface_set_matrix (src->surface, matrix);
-
- tmp_op = cairo_current_operator (dst->cr);
- cairo_set_operator(dst->cr, CAIRO_OPERATOR_SRC);
- cairo_show_surface (dst->cr, src->surface, width, height);
+ cairo_get_matrix (src->cr, &matrix);
+ cairo_matrix_translate (&matrix, (double)-x, (double)-y);
+ if (src->pattern)
+ cairo_pattern_set_matrix (src->pattern, &matrix);
+ tmp_op = cairo_get_operator (dst->cr);
+ cairo_set_operator(dst->cr, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_surface (dst->cr, src->surface, 0, 0);
+ cairo_paint (dst->cr);
cairo_set_operator(dst->cr, tmp_op);
- cairo_matrix_translate (matrix, (double)x, (double)y);
- cairo_surface_set_matrix (src->surface, matrix);
- cairo_matrix_destroy (matrix);
+ cairo_matrix_translate (&matrix, (double)x, (double)y);
+ if (src->pattern)
+ cairo_pattern_set_matrix (src->pattern, &matrix);
gdk_flush();
end_drawing_operation(env, dst);
if (src->debug) printf ("copied %d x %d pixels from offscreen drawable\n", width, height);
+
gdk_threads_leave();
}
@@ -536,31 +601,38 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_initState__Lgnu_java_awt_peer_gtk_GtkCo
void *ptr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
+
ptr = NSA_GET_PTR (env, peer);
g_assert (ptr != NULL);
- gr = (struct graphics2d *) malloc (sizeof (struct graphics2d));
+ gr = (struct graphics2d *) g_malloc (sizeof (struct graphics2d));
g_assert (gr != NULL);
memset (gr, 0, sizeof(struct graphics2d));
check_for_debug (gr);
- gr->cr = cairo_create();
- g_assert (gr->cr != NULL);
-
widget = GTK_WIDGET (ptr);
g_assert (widget != NULL);
grab_current_drawable (widget, &(gr->drawable), &(gr->win));
g_assert (gr->drawable != NULL);
+ gr->width = widget->allocation.width;
+ gr->height = widget->allocation.height;
+
if (x_server_has_render_extension ())
init_graphics2d_as_renderable (gr);
else
init_graphics2d_as_pixbuf (gr);
NSA_SET_G2D_PTR (env, obj, gr);
+
gdk_threads_leave();
}
@@ -570,10 +642,10 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_connectSignals
{
void *ptr;
- ptr = NSA_GET_PTR (env, peer);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, peer);
+
g_signal_connect_after (G_OBJECT (ptr), "realize",
G_CALLBACK (realize_cb), obj);
@@ -587,7 +659,9 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_dispose
struct graphics2d *gr = NULL;
gdk_threads_enter();
+
gr = (struct graphics2d *) NSA_DEL_G2D_PTR (env, obj);
+
if (gr == NULL)
{
gdk_threads_leave();
@@ -602,7 +676,8 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_dispose
if (gr->drawbuf)
g_object_unref (gr->drawbuf);
- g_object_unref (gr->drawable);
+ if (gr->drawable)
+ g_object_unref (gr->drawable);
if (gr->pattern)
cairo_pattern_destroy (gr->pattern);
@@ -611,18 +686,22 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_dispose
cairo_surface_destroy (gr->pattern_surface);
if (gr->pattern_pixels)
- free (gr->pattern_pixels);
+ g_free (gr->pattern_pixels);
if (gr->mode == MODE_JAVA_ARRAY)
- (*env)->DeleteGlobalRef(env, gr->jarray);
+ {
+ (*env)->DeleteGlobalRef (env, gr->jarray);
+ if (gr->javabuf_copy)
+ g_free (gr->javabuf_copy);
+ }
if (gr->debug) printf ("disposed of graphics2d\n");
- free (gr);
+ g_free (gr);
+
gdk_threads_leave();
}
-
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setGradient
(JNIEnv *env, jobject obj,
@@ -634,50 +713,52 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setGradient
{
struct graphics2d *gr = NULL;
cairo_surface_t *surf = NULL;
- cairo_matrix_t *mat = NULL;
+ cairo_t *cr2 = NULL;
+ cairo_matrix_t mat;
+
+ gdk_threads_enter();
+
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
- gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
+
if (gr->debug) printf ("setGradient (%f,%f) -> (%f,%f); (%d,%d,%d,%d) -> (%d,%d,%d,%d)\n",
x1, y1,
x2, y2,
r1, g1, b1, a1,
r2, g2, b2, a2);
- cairo_save (gr->cr);
-
if (cyclic)
surf = cairo_surface_create_similar (gr->surface, CAIRO_FORMAT_ARGB32, 3, 2);
else
surf = cairo_surface_create_similar (gr->surface, CAIRO_FORMAT_ARGB32, 2, 2);
g_assert (surf != NULL);
- cairo_set_target_surface (gr->cr, surf);
+ cr2 = cairo_create (surf);
- cairo_identity_matrix (gr->cr);
+ cairo_identity_matrix (cr2);
- cairo_set_rgb_color (gr->cr, r1 / 255.0, g1 / 255.0, b1 / 255.0);
- cairo_set_alpha (gr->cr, a1 / 255.0);
- cairo_rectangle (gr->cr, 0, 0, 1, 2);
- cairo_fill (gr->cr);
+ cairo_set_source_rgba (cr2, r1 / 255.0, g1 / 255.0, b1 / 255.0, a1 / 255.0);
+ cairo_rectangle (cr2, 0, 0, 1, 2);
+ cairo_fill (cr2);
- cairo_set_rgb_color (gr->cr, r2 / 255.0, g2 / 255.0, b2 / 255.0);
- cairo_set_alpha (gr->cr, a2 / 255.0);
- cairo_rectangle (gr->cr, 1, 0, 1, 2);
- cairo_fill (gr->cr);
+ cairo_set_source_rgba (cr2, r2 / 255.0, g2 / 255.0, b2 / 255.0, a2 / 255.0);
+ cairo_rectangle (cr2, 1, 0, 1, 2);
+ cairo_fill (cr2);
if (cyclic)
{
- cairo_set_rgb_color (gr->cr, r1 / 255.0, g1 / 255.0, b1 / 255.0);
- cairo_set_alpha (gr->cr, a1 / 255.0);
- cairo_rectangle (gr->cr, 2, 0, 1, 2);
- cairo_fill (gr->cr);
+ cairo_set_source_rgba (cr2, r1 / 255.0, g1 / 255.0, b1 / 255.0, a1 / 255.0);
+ cairo_rectangle (cr2, 2, 0, 1, 2);
+ cairo_fill (cr2);
}
- mat = cairo_matrix_create ();
- g_assert (mat != NULL);
+ cairo_matrix_init_identity (&mat);
/*
consider the vector [x2 - x1, y2 - y1] = [p,q]
@@ -716,15 +797,16 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setGradient
double c = (y2 - y1 == 0.) ? 0. : (1. / (y2 - y1));
double dx = (x1 == 0.) ? 0. : 1. / x1;
double dy = (y1 == 0.) ? 0. : 1. / y1;
+ cairo_pattern_t *p;
- cairo_matrix_set_affine (mat,
- a, 0.,
- c, 0.,
- dx, dy);
+ cairo_matrix_init (&mat,
+ a, 0.,
+ c, 0.,
+ dx, dy);
- cairo_surface_set_matrix (surf, mat);
- cairo_matrix_destroy (mat);
- cairo_surface_set_filter (surf, CAIRO_FILTER_BILINEAR);
+ p = cairo_pattern_create_for_surface (surf);
+ cairo_pattern_set_matrix (p, &mat);
+ cairo_pattern_set_filter (p, CAIRO_FILTER_BILINEAR);
}
/* FIXME: repeating gradients (not to mention hold gradients) don't seem to work. */
@@ -737,14 +819,14 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setGradient
cairo_surface_destroy (gr->pattern_surface);
if (gr->pattern_pixels)
- free (gr->pattern_pixels);
+ g_free (gr->pattern_pixels);
gr->pattern_pixels = NULL;
gr->pattern_surface = surf;
gr->pattern = cairo_pattern_create_for_surface(surf);
- cairo_restore (gr->cr);
- cairo_set_pattern (gr->cr, gr->pattern);
+ cairo_set_source (gr->cr, gr->pattern);
+
gdk_threads_leave();
}
@@ -756,7 +838,13 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setTexturePixels
jint *jpixels = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
+
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -770,13 +858,13 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setTexturePixels
cairo_surface_destroy (gr->pattern_surface);
if (gr->pattern_pixels)
- free (gr->pattern_pixels);
+ g_free (gr->pattern_pixels);
gr->pattern = NULL;
gr->pattern_surface = NULL;
gr->pattern_pixels = NULL;
- gr->pattern_pixels = (char *) malloc (h * stride * 4);
+ gr->pattern_pixels = (char *) g_malloc (h * stride * 4);
g_assert (gr->pattern_pixels != NULL);
jpixels = (*env)->GetIntArrayElements (env, jarr, NULL);
@@ -784,14 +872,15 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_setTexturePixels
memcpy (gr->pattern_pixels, jpixels, h * stride * 4);
(*env)->ReleaseIntArrayElements (env, jarr, jpixels, 0);
- gr->pattern_surface = cairo_surface_create_for_image (gr->pattern_pixels,
+ gr->pattern_surface = cairo_image_surface_create_for_data ((unsigned char *)gr->pattern_pixels,
CAIRO_FORMAT_ARGB32,
w, h, stride * 4);
g_assert (gr->pattern_surface != NULL);
- cairo_surface_set_repeat (gr->pattern_surface, 1);
+ cairo_pattern_set_extend (gr->pattern, 1);
gr->pattern = cairo_pattern_create_for_surface (gr->pattern_surface);
g_assert (gr->pattern != NULL);
- cairo_set_pattern (gr->cr, gr->pattern);
+ cairo_set_source (gr->cr, gr->pattern);
+
gdk_threads_leave();
}
@@ -805,7 +894,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_drawPixels
jdouble *native_matrix = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -822,19 +916,24 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_drawPixels
begin_drawing_operation (env, gr);
{
- cairo_matrix_t *mat = NULL;
- cairo_surface_t *surf = cairo_surface_create_for_image ((char *)native_pixels,
+ cairo_matrix_t mat;
+ cairo_pattern_t *p;
+ cairo_surface_t *surf = cairo_image_surface_create_for_data ((unsigned char *)native_pixels,
CAIRO_FORMAT_ARGB32,
w, h, stride * 4);
- mat = cairo_matrix_create ();
- cairo_matrix_set_affine (mat,
- native_matrix[0], native_matrix[1],
- native_matrix[2], native_matrix[3],
- native_matrix[4], native_matrix[5]);
- cairo_surface_set_matrix (surf, mat);
- cairo_surface_set_filter (surf, cairo_surface_get_filter(gr->surface));
- cairo_show_surface (gr->cr, surf, w, h);
- cairo_matrix_destroy (mat);
+ cairo_matrix_init_identity (&mat);
+ cairo_matrix_init (&mat,
+ native_matrix[0], native_matrix[1],
+ native_matrix[2], native_matrix[3],
+ native_matrix[4], native_matrix[5]);
+
+ p = cairo_pattern_create_for_surface (surf);
+ cairo_pattern_set_matrix (p, &mat);
+ if (gr->pattern)
+ cairo_pattern_set_filter (p, cairo_pattern_get_filter (gr->pattern));
+ cairo_set_source (gr->cr, p);
+ cairo_paint (gr->cr);
+ cairo_pattern_destroy (p);
cairo_surface_destroy (surf);
}
@@ -855,12 +954,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSave
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_save\n");
cairo_save (gr->cr);
+
gdk_threads_leave();
}
@@ -871,13 +976,19 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRestore
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_restore\n");
cairo_restore (gr->cr);
update_pattern_transform (gr);
+
gdk_threads_leave();
}
@@ -889,12 +1000,22 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetMatrix
jdouble *native_matrix = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
+
/* cairoSetMatrix was called before this graphics object's component
was realized. */
- if (gr == NULL) { gdk_threads_leave (); return; }
+ if (gr == NULL)
+ {
+ gdk_threads_leave ();
+ return;
+ }
native_matrix = (*env)->GetDoubleArrayElements (env, java_matrix, NULL);
g_assert (native_matrix != NULL);
@@ -906,17 +1027,19 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetMatrix
native_matrix[4], native_matrix[5]);
{
- cairo_matrix_t * mat = cairo_matrix_create ();
- cairo_matrix_set_affine (mat,
- native_matrix[0], native_matrix[1],
- native_matrix[2], native_matrix[3],
- native_matrix[4], native_matrix[5]);
- cairo_set_matrix (gr->cr, mat);
- cairo_matrix_destroy (mat);
+ cairo_matrix_t mat;
+
+ cairo_matrix_init_identity (&mat);
+ cairo_matrix_init (&mat,
+ native_matrix[0], native_matrix[1],
+ native_matrix[2], native_matrix[3],
+ native_matrix[4], native_matrix[5]);
+ cairo_set_matrix (gr->cr, &mat);
}
(*env)->ReleaseDoubleArrayElements (env, java_matrix, native_matrix, 0);
update_pattern_transform (gr);
+
gdk_threads_leave();
}
@@ -925,7 +1048,7 @@ install_font_peer(cairo_t *cr,
struct peerfont *pfont,
int debug)
{
- cairo_font_t *ft;
+ cairo_font_face_t *ft;
FT_Face face = NULL;
g_assert(cr != NULL);
@@ -936,7 +1059,7 @@ install_font_peer(cairo_t *cr,
face = pango_ft2_font_get_face (pfont->font);
g_assert (face != NULL);
- ft = cairo_ft_font_create_for_ft_face (face);
+ ft = cairo_ft_font_face_create_for_ft_face (face, 0);
g_assert (ft != NULL);
if (debug) printf ("install_font_peer made new cairo font for '%s' at %f\n",
@@ -944,19 +1067,19 @@ install_font_peer(cairo_t *cr,
(pango_font_description_get_size (pfont->desc) /
(double)PANGO_SCALE));
- cairo_set_font (cr, ft);
- cairo_font_destroy (ft);
- cairo_scale_font (cr,
+ cairo_set_font_face (cr, ft);
+ cairo_font_face_destroy (ft);
+ cairo_set_font_size (cr,
(pango_font_description_get_size (pfont->desc) /
(double)PANGO_SCALE));
- ft = cairo_current_font (cr);
+ ft = cairo_get_font_face (cr);
pfont->graphics_resource = ft;
}
else
{
if (debug) printf ("install_font_peer reused existing font resource\n");
- ft = (cairo_font_t *) pfont->graphics_resource;
- cairo_set_font (cr, ft);
+ ft = (cairo_font_face_t *) pfont->graphics_resource;
+ cairo_set_font_face (cr, ft);
}
}
@@ -967,16 +1090,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_releasePeerGraphicsResource
{
struct peerfont *pfont = NULL;
+ gdk_threads_enter();
+
g_assert(java_font != NULL);
- gdk_threads_enter();
pfont = (struct peerfont *) NSA_GET_FONT_PTR (env, java_font);
g_assert (pfont != NULL);
if (pfont->graphics_resource != NULL)
{
- cairo_font_destroy ((cairo_font_t *) pfont->graphics_resource);
+ cairo_font_face_destroy ((cairo_font_face_t *) pfont->graphics_resource);
pfont->graphics_resource = NULL;
}
+
gdk_threads_leave();
}
@@ -1053,12 +1178,17 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoDrawGlyphVector
float *native_positions;
jint i = 0;
+ gdk_threads_enter ();
+
g_assert (self != NULL);
g_assert (java_codes != NULL);
g_assert (java_positions != NULL);
- gdk_threads_enter ();
- if (peer_is_disposed(env, self)) { gdk_threads_leave(); return; }
+ if (peer_is_disposed(env, self))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *)NSA_GET_G2D_PTR (env, self);
g_assert (gr != NULL);
@@ -1068,7 +1198,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoDrawGlyphVector
install_font_peer(gr->cr, pfont, gr->debug);
- glyphs = malloc( sizeof(cairo_glyph_t) * n);
+ glyphs = g_malloc( sizeof(cairo_glyph_t) * n);
g_assert (glyphs != NULL);
native_codes = (*env)->GetIntArrayElements (env, java_codes, NULL);
@@ -1088,8 +1218,9 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoDrawGlyphVector
cairo_show_glyphs (gr->cr, glyphs, n);
end_drawing_operation (env, gr);
+ g_free(glyphs);
+
gdk_threads_leave ();
- free(glyphs);
}
JNIEXPORT void JNICALL
@@ -1108,6 +1239,8 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoDrawGdkTextLayout
cairo_glyph_t *glyphs = NULL;
gint n_glyphs = 0;
+ gdk_threads_enter ();
+
g_assert (self != NULL);
g_assert (java_layout != NULL);
@@ -1120,8 +1253,11 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoDrawGdkTextLayout
if (gr->debug) printf ("painting pango layout\n");
- gdk_threads_enter ();
- if (peer_is_disposed(env, self)) { gdk_threads_leave(); return; }
+ if (peer_is_disposed(env, self))
+ {
+ gdk_threads_leave();
+ return;
+ }
i = pango_layout_get_iter (tl->pango_layout);
g_assert (i != NULL);
@@ -1142,6 +1278,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoDrawGdkTextLayout
cairo_translate (gr->cr, -x, -y);
pango_layout_iter_free (i);
+
gdk_threads_leave ();
}
@@ -1152,7 +1289,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetOperator
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -1164,7 +1306,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetOperator
break;
case java_awt_alpha_composite_SRC:
- cairo_set_operator (gr->cr, CAIRO_OPERATOR_SRC);
+ cairo_set_operator (gr->cr, CAIRO_OPERATOR_SOURCE);
break;
case java_awt_alpha_composite_SRC_OVER:
@@ -1172,7 +1314,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetOperator
break;
case java_awt_alpha_composite_DST_OVER:
- cairo_set_operator (gr->cr, CAIRO_OPERATOR_OVER_REVERSE);
+ cairo_set_operator (gr->cr, CAIRO_OPERATOR_DEST_OVER);
break;
case java_awt_alpha_composite_SRC_IN:
@@ -1180,7 +1322,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetOperator
break;
case java_awt_alpha_composite_DST_IN:
- cairo_set_operator (gr->cr, CAIRO_OPERATOR_IN_REVERSE);
+ cairo_set_operator (gr->cr, CAIRO_OPERATOR_DEST_IN);
break;
case java_awt_alpha_composite_SRC_OUT:
@@ -1188,11 +1330,11 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetOperator
break;
case java_awt_alpha_composite_DST_OUT:
- cairo_set_operator (gr->cr, CAIRO_OPERATOR_OUT_REVERSE);
+ cairo_set_operator (gr->cr, CAIRO_OPERATOR_DEST_OUT);
break;
case java_awt_alpha_composite_DST:
- cairo_set_operator (gr->cr, CAIRO_OPERATOR_DST);
+ cairo_set_operator (gr->cr, CAIRO_OPERATOR_DEST);
break;
case java_awt_alpha_composite_SRC_ATOP:
@@ -1200,24 +1342,30 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetOperator
break;
case java_awt_alpha_composite_DST_ATOP:
- cairo_set_operator (gr->cr, CAIRO_OPERATOR_ATOP_REVERSE);
+ cairo_set_operator (gr->cr, CAIRO_OPERATOR_DEST_ATOP);
break;
case java_awt_alpha_composite_XOR:
cairo_set_operator (gr->cr, CAIRO_OPERATOR_XOR);
break;
}
+
gdk_threads_leave();
}
JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetRGBColor
- (JNIEnv *env, jobject obj, jdouble r, jdouble g, jdouble b)
+Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetRGBAColor
+ (JNIEnv *env, jobject obj, jdouble r, jdouble g, jdouble b, jdouble a)
{
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -1227,29 +1375,13 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetRGBColor
draw to a PixBuf, you must exchange the R and B components of your
color. */
- if (gr->debug) printf ("cairo_set_rgb_color (%f, %f, %f)\n", r, g, b);
+ if (gr->debug) printf ("cairo_set_source_rgb (%f, %f, %f)\n", r, g, b);
if (gr->drawbuf)
- cairo_set_rgb_color (gr->cr, b, g, r);
+ cairo_set_source_rgba (gr->cr, b, g, r, a);
else
- cairo_set_rgb_color (gr->cr, r, g, b);
-
- gdk_threads_leave();
-}
-
-JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetAlpha
- (JNIEnv *env, jobject obj, jdouble a)
-{
- struct graphics2d *gr = NULL;
-
- gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+ cairo_set_source_rgba (gr->cr, r, g, b, a);
- gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
- g_assert (gr != NULL);
- if (gr->debug) printf ("cairo_set_alpha %f\n", a);
- cairo_set_alpha (gr->cr, a);
gdk_threads_leave();
}
@@ -1260,7 +1392,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetFillRule
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
if (gr->debug) printf ("cairo_set_fill_rule %d\n", rule);
@@ -1274,6 +1411,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetFillRule
cairo_set_fill_rule (gr->cr, CAIRO_FILL_RULE_EVEN_ODD);
break;
}
+
gdk_threads_leave();
}
@@ -1284,12 +1422,15 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineWidth
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ return;
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_set_line_width %f\n", width);
cairo_set_line_width (gr->cr, width);
+
gdk_threads_leave();
}
@@ -1300,7 +1441,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineCap
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -1319,17 +1465,23 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineCap
cairo_set_line_cap (gr->cr, CAIRO_LINE_CAP_SQUARE);
break;
}
+
gdk_threads_leave();
}
JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineJoin
+Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineJoin
(JNIEnv *env, jobject obj, jint join)
{
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -1348,6 +1500,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetLineJoin
cairo_set_line_join (gr->cr, CAIRO_LINE_JOIN_BEVEL);
break;
}
+
gdk_threads_leave();
}
@@ -1359,7 +1512,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetDash
jdouble *dasharr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -1368,6 +1526,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetDash
g_assert (dasharr != NULL);
cairo_set_dash (gr->cr, dasharr, ndash, offset);
(*env)->ReleaseDoubleArrayElements (env, dashes, dasharr, 0);
+
gdk_threads_leave();
}
@@ -1378,16 +1537,21 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSetMiterLimit
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_set_miter_limit %f\n", miter);
cairo_set_miter_limit (gr->cr, miter);
+
gdk_threads_leave();
}
-
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoNewPath
(JNIEnv *env, jobject obj)
@@ -1395,12 +1559,24 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoNewPath
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
- if (gr == NULL) { gdk_threads_leave (); return; }
+
+ if (gr == NULL)
+ {
+ gdk_threads_leave ();
+ return;
+ }
+
if (gr->debug) printf ("cairo_new_path\n");
cairo_new_path (gr->cr);
+
gdk_threads_leave();
}
@@ -1411,12 +1587,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoMoveTo
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_move_to (%f, %f)\n", x, y);
cairo_move_to (gr->cr, x, y);
+
gdk_threads_leave();
}
@@ -1427,12 +1609,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoLineTo
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_line_to (%f, %f)\n", x, y);
cairo_line_to (gr->cr, x, y);
+
gdk_threads_leave();
}
@@ -1443,12 +1631,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoCurveTo
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_curve_to (%f, %f), (%f, %f), (%f, %f)\n", x1, y1, x2, y2, x3, y3);
cairo_curve_to (gr->cr, x1, y1, x2, y2, x3, y3);
+
gdk_threads_leave();
}
@@ -1459,12 +1653,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRelMoveTo
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_rel_move_to (%f, %f)\n", dx, dy);
cairo_rel_move_to (gr->cr, dx, dy);
+
gdk_threads_leave();
}
@@ -1475,12 +1675,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRelLineTo
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_rel_line_to (%f, %f)\n", dx, dy);
cairo_rel_line_to (gr->cr, dx, dy);
+
gdk_threads_leave();
}
@@ -1491,12 +1697,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRelCurveTo
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_rel_curve_to (%f, %f), (%f, %f), (%f, %f)\n", dx1, dy1, dx2, dy2, dx3, dy3);
cairo_rel_curve_to (gr->cr, dx1, dy1, dx2, dy2, dx3, dy3);
+
gdk_threads_leave();
}
@@ -1507,12 +1719,24 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoRectangle
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
- if (gr == NULL) { gdk_threads_leave (); return; }
+
+ if (gr == NULL)
+ {
+ gdk_threads_leave ();
+ return;
+ }
+
if (gr->debug) printf ("cairo_rectangle (%f, %f) (%f, %f)\n", x, y, width, height);
cairo_rectangle (gr->cr, x, y, width, height);
+
gdk_threads_leave();
}
@@ -1523,12 +1747,18 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoClosePath
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
if (gr->debug) printf ("cairo_close_path\n");
cairo_close_path (gr->cr);
+
gdk_threads_leave();
}
@@ -1539,7 +1769,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoStroke
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -1547,6 +1782,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoStroke
begin_drawing_operation (env, gr);
cairo_stroke (gr->cr);
end_drawing_operation (env, gr);
+
gdk_threads_leave();
}
@@ -1557,7 +1793,12 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoFill
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
g_assert (gr != NULL);
@@ -1565,6 +1806,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoFill
begin_drawing_operation (env, gr);
cairo_fill (gr->cr);
end_drawing_operation (env, gr);
+
gdk_threads_leave();
}
@@ -1575,15 +1817,27 @@ Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoClip
struct graphics2d *gr = NULL;
gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave();
+ return;
+ }
gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
- if (gr == NULL) { gdk_threads_leave (); return; }
+
+ if (gr == NULL)
+ {
+ gdk_threads_leave ();
+ return;
+ }
+
if (gr->debug) printf ("cairo_clip\n");
begin_drawing_operation (env, gr);
- cairo_init_clip (gr->cr);
+ cairo_reset_clip (gr->cr);
cairo_clip (gr->cr);
end_drawing_operation (env, gr);
+
gdk_threads_leave();
}
@@ -1591,31 +1845,37 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoSurfaceSetFilter
(JNIEnv *env, jobject obj, jint filter)
{
- struct graphics2d *gr = NULL;
+ struct graphics2d *gr = NULL;
+
+ gdk_threads_enter();
+
+ if (peer_is_disposed(env, obj))
+ {
+ gdk_threads_leave ();
+ return;
+ }
+
+ gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
+ g_assert (gr != NULL);
+ if (gr->debug) printf ("cairo_surface_set_filter %d\n", filter);
+ switch ((enum java_awt_rendering_hints_filter) filter)
+ {
+ case java_awt_rendering_hints_VALUE_INTERPOLATION_NEAREST_NEIGHBOR:
+ cairo_pattern_set_filter (gr->pattern, CAIRO_FILTER_NEAREST);
+ break;
+ case java_awt_rendering_hints_VALUE_INTERPOLATION_BILINEAR:
+ cairo_pattern_set_filter (gr->pattern, CAIRO_FILTER_BILINEAR);
+ break;
+ case java_awt_rendering_hints_VALUE_ALPHA_INTERPOLATION_SPEED:
+ cairo_pattern_set_filter (gr->pattern, CAIRO_FILTER_FAST);
+ break;
+ case java_awt_rendering_hints_VALUE_ALPHA_INTERPOLATION_DEFAULT:
+ cairo_pattern_set_filter (gr->pattern, CAIRO_FILTER_NEAREST);
+ break;
+ case java_awt_rendering_hints_VALUE_ALPHA_INTERPOLATION_QUALITY:
+ cairo_pattern_set_filter (gr->pattern, CAIRO_FILTER_BEST);
+ break;
+ }
- gdk_threads_enter();
- if (peer_is_disposed(env, obj)) { gdk_threads_leave(); return; }
-
- gr = (struct graphics2d *) NSA_GET_G2D_PTR (env, obj);
- g_assert (gr != NULL);
- if (gr->debug) printf ("cairo_surface_set_filter %d\n", filter);
- switch ((enum java_awt_rendering_hints_filter) filter)
- {
- case java_awt_rendering_hints_VALUE_INTERPOLATION_NEAREST_NEIGHBOR:
- cairo_surface_set_filter (gr->surface, CAIRO_FILTER_NEAREST);
- break;
- case java_awt_rendering_hints_VALUE_INTERPOLATION_BILINEAR:
- cairo_surface_set_filter (gr->surface, CAIRO_FILTER_BILINEAR);
- break;
- case java_awt_rendering_hints_VALUE_ALPHA_INTERPOLATION_SPEED:
- cairo_surface_set_filter (gr->surface, CAIRO_FILTER_FAST);
- break;
- case java_awt_rendering_hints_VALUE_ALPHA_INTERPOLATION_DEFAULT:
- cairo_surface_set_filter (gr->surface, CAIRO_FILTER_NEAREST);
- break;
- case java_awt_rendering_hints_VALUE_ALPHA_INTERPOLATION_QUALITY:
- cairo_surface_set_filter (gr->surface, CAIRO_FILTER_BEST);
- break;
- }
gdk_threads_leave();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c
index 578acf601..0467c3c7a 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -52,9 +52,10 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetFontFamilies
(JNIEnv *env, jobject self __attribute__((unused)), jobjectArray family_name)
{
- PangoContext *context;
- PangoFontFamily **families;
- int n_families, idx;
+ PangoContext *context = NULL;
+ PangoFontFamily **families = NULL;
+ int n_families = 0;
+ int idx = 0;
gdk_threads_enter ();
@@ -72,6 +73,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetFontFamilies
(*env)->SetObjectArrayElement (env, family_name, idx, name);
}
g_free (families);
+
gdk_threads_leave ();
}
@@ -79,10 +81,10 @@ JNIEXPORT jint JNICALL
Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetNumFontFamilies
(JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)))
{
- PangoContext *context;
- PangoFontFamily **families;
- gint n_families;
- jint num;
+ PangoContext *context = NULL;
+ PangoFontFamily **families = NULL;
+ gint n_families = 0;
+ gint num = 0;
gdk_threads_enter ();
@@ -93,6 +95,7 @@ Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetNumFontFamilies
num = n_families;
g_free (families);
+
gdk_threads_leave ();
return num;
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c
index ab640455c..648cd6603 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c
@@ -1,5 +1,5 @@
/* gdkpixbufdecoder.c
- Copyright (C) 1999, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,13 +41,26 @@
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
#include <jni.h>
+#include <jcl.h>
#include "native_state.h"
#include "gnu_java_awt_peer_gtk_GdkPixbufDecoder.h"
#include <string.h>
#include <stdlib.h>
-struct state_table *native_pixbufdecoder_state_table;
+static struct state_table *native_pixbufdecoder_state_table;
+
+#define NSA_PB_INIT(env, clazz) \
+ native_pixbufdecoder_state_table = cp_gtk_init_state_table (env, clazz)
+
+#define NSA_GET_PB_PTR(env, obj) \
+ cp_gtk_get_state (env, obj, native_pixbufdecoder_state_table)
+
+#define NSA_SET_PB_PTR(env, obj, ptr) \
+ cp_gtk_set_state (env, obj, native_pixbufdecoder_state_table, (void *)ptr)
+
+#define NSA_DEL_PB_PTR(env, obj) \
+ cp_gtk_remove_state_slot (env, obj, native_pixbufdecoder_state_table)
/* Union used for type punning. */
union env_union
@@ -64,26 +77,28 @@ static jmethodID dataOutputWriteID;
static jmethodID registerFormatID;
static void
-area_prepared (GdkPixbufLoader *loader,
+area_prepared_cb (GdkPixbufLoader *loader,
jobject *decoder)
{
- JNIEnv *env;
+ JNIEnv *env = NULL;
union env_union e;
- jint width, height;
+ jint width = 0;
+ jint height = 0;
+ GdkPixbuf *pixbuf = NULL;
- GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- if (pixbuf == NULL)
- return;
+ pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
+ g_assert (pixbuf != NULL);
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
- gdk_threads_leave ();
-
g_assert (decoder != NULL);
e.jni_env = &env;
(*vm)->GetEnv (vm, e.void_env, JNI_VERSION_1_1);
+
+ gdk_threads_leave ();
+
(*env)->CallVoidMethod (env,
*decoder,
areaPreparedID,
@@ -93,7 +108,7 @@ area_prepared (GdkPixbufLoader *loader,
}
static void
-area_updated (GdkPixbufLoader *loader,
+area_updated_cb (GdkPixbufLoader *loader,
gint x, gint y,
gint width, gint height,
jobject *decoder)
@@ -127,7 +142,13 @@ area_updated (GdkPixbufLoader *loader,
e.jni_env = &env;
(*vm)->GetEnv (vm, e.void_env, JNI_VERSION_1_1);
+
+ gdk_threads_leave ();
+
jpixels = (*env)->NewIntArray (env, n_pixels);
+
+ gdk_threads_enter ();
+
java_pixels = (*env)->GetIntArrayElements (env, jpixels, NULL);
memcpy (java_pixels,
@@ -147,6 +168,7 @@ area_updated (GdkPixbufLoader *loader,
gdk_threads_leave ();
(*env)->ReleaseIntArrayElements (env, jpixels, java_pixels, 0);
+
(*env)->CallVoidMethod (env,
*decoder,
areaUpdatedID,
@@ -154,12 +176,14 @@ area_updated (GdkPixbufLoader *loader,
(jint) width, (jint) height,
jpixels,
stride_pixels);
+
(*env)->DeleteLocalRef(env, jpixels);
+
gdk_threads_enter ();
}
static void
-closed (GdkPixbufLoader *loader __attribute__((unused)), jobject *decoder)
+closed_cb (GdkPixbufLoader *loader __attribute__((unused)), jobject *decoder)
{
JNIEnv *env;
union env_union e;
@@ -167,8 +191,10 @@ closed (GdkPixbufLoader *loader __attribute__((unused)), jobject *decoder)
(*vm)->GetEnv (vm, e.void_env, JNI_VERSION_1_1);
gdk_threads_leave ();
+
(*env)->DeleteGlobalRef (env, *decoder);
- free (decoder);
+ g_free (decoder);
+
gdk_threads_enter ();
}
@@ -181,19 +207,21 @@ Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_initState
GdkPixbufLoader *loader = NULL;
jobject *decoder = NULL;
- decoder = (jobject *) malloc (sizeof (jobject));
+ gdk_threads_enter ();
+
+ decoder = (jobject *) g_malloc (sizeof (jobject));
g_assert (decoder != NULL);
*decoder = (*env)->NewGlobalRef (env, obj);
- gdk_threads_enter ();
loader = gdk_pixbuf_loader_new ();
g_assert (loader != NULL);
- g_signal_connect (loader, "area-prepared", G_CALLBACK (area_prepared), decoder);
- g_signal_connect (loader, "area-updated", G_CALLBACK (area_updated), decoder);
- g_signal_connect (loader, "closed", G_CALLBACK (closed), decoder);
- gdk_threads_leave ();
+ g_signal_connect (loader, "area-prepared", G_CALLBACK (area_prepared_cb), decoder);
+ g_signal_connect (loader, "area-updated", G_CALLBACK (area_updated_cb), decoder);
+ g_signal_connect (loader, "closed", G_CALLBACK (closed_cb), decoder);
NSA_SET_PB_PTR (env, obj, loader);
+
+ gdk_threads_leave ();
}
static void
@@ -299,20 +327,46 @@ Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_initStaticState
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_finish
- (JNIEnv *env, jobject obj)
+(JNIEnv *env, jobject obj, jboolean needs_close)
{
GdkPixbufLoader *loader = NULL;
+ gdk_threads_enter ();
+
loader = (GdkPixbufLoader *)NSA_DEL_PB_PTR (env, obj);
if (loader == NULL)
return;
- gdk_threads_enter ();
- gdk_pixbuf_loader_close (loader, NULL);
+ if (needs_close)
+ gdk_pixbuf_loader_close (loader, NULL);
g_object_unref (loader);
+
gdk_threads_leave ();
}
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_pumpDone
+(JNIEnv *env, jobject obj)
+{
+ GError *err = NULL;
+ GdkPixbufLoader *loader = NULL;
+
+ gdk_threads_enter ();
+
+ loader = (GdkPixbufLoader *)NSA_GET_PB_PTR (env, obj);
+ g_assert (loader != NULL);
+
+ gdk_pixbuf_loader_close (loader, &err);
+
+ if (err != NULL)
+ {
+ JCL_ThrowException (env, "java/io/IOException", err->message);
+ g_error_free (err);
+ }
+
+ gdk_threads_leave ();
+}
+
struct stream_save_request
{
JNIEnv *env;
@@ -331,13 +385,16 @@ save_to_stream(const gchar *buf,
jbyte *cbuf;
gdk_threads_leave ();
+
jbuf = (*(ssr->env))->NewByteArray ((ssr->env), count);
cbuf = (*(ssr->env))->GetByteArrayElements ((ssr->env), jbuf, NULL);
memcpy (cbuf, buf, count);
(*(ssr->env))->ReleaseByteArrayElements ((ssr->env), jbuf, cbuf, 0);
(*(ssr->env))->CallVoidMethod ((ssr->env), *(ssr->stream),
dataOutputWriteID, jbuf);
+
gdk_threads_enter ();
+
return TRUE;
}
@@ -354,8 +411,10 @@ Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_streamImage
GError *err = NULL;
const char *enctype;
int i;
-
struct stream_save_request ssr;
+
+ gdk_threads_enter ();
+
ssr.stream = &stream;
ssr.env = env;
@@ -399,7 +458,6 @@ Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_streamImage
*p++ = a;
}
- gdk_threads_enter ();
pixbuf = gdk_pixbuf_new_from_data (pix,
GDK_COLORSPACE_RGB,
(gboolean) hasAlpha,
@@ -416,31 +474,42 @@ Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_streamImage
g_object_unref (pixbuf);
- gdk_threads_leave ();
g_free(pix);
(*env)->ReleaseStringUTFChars (env, jenctype, enctype);
(*env)->ReleaseIntArrayElements (env, jarr, ints, 0);
+
+ gdk_threads_leave ();
}
+
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_pumpBytes
(JNIEnv *env, jobject obj, jbyteArray jarr, jint len)
{
GdkPixbufLoader *loader = NULL;
jbyte *bytes = NULL;
+ GError *err = NULL;
- if (len < 1)
- return;
+ gdk_threads_enter ();
+
+ g_assert (len >= 1);
+ g_assert (jarr != NULL);
bytes = (*env)->GetByteArrayElements (env, jarr, NULL);
g_assert (bytes != NULL);
loader = (GdkPixbufLoader *)NSA_GET_PB_PTR (env, obj);
g_assert (loader != NULL);
- gdk_threads_enter ();
- gdk_pixbuf_loader_write (loader, (const guchar *) bytes, len, NULL);
- gdk_threads_leave ();
+ gdk_pixbuf_loader_write (loader, (const guchar *) bytes, len, &err);
(*env)->ReleaseByteArrayElements (env, jarr, bytes, 0);
+
+ if (err != NULL)
+ {
+ JCL_ThrowException (env, "java/io/IOException", err->message);
+ g_error_free (err);
+ }
+
+ gdk_threads_leave ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkRobotPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkRobotPeer.c
index 6b1b4a9f3..8c0ac6ce3 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkRobotPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkRobotPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -102,6 +102,7 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_mouseMove
x, y, CurrentTime);
XFlush (xdisplay);
+
gdk_threads_leave ();
}
@@ -123,6 +124,7 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_mousePress
True, CurrentTime);
XFlush (xdisplay);
+
gdk_threads_leave ();
}
@@ -144,6 +146,7 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_mouseRelease
False, CurrentTime);
XFlush (xdisplay);
+
gdk_threads_leave ();
}
@@ -182,6 +185,7 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_mouseWheel
}
XFlush (xdisplay);
+
gdk_threads_leave ();
}
@@ -201,7 +205,8 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_keyPress
display = gdk_display_get_default ();
xdisplay = GDK_DISPLAY_XDISPLAY (display);
- lookup_keyval = awt_keycode_to_keysym (keycode, AWT_KEY_LOCATION_LEFT);
+ lookup_keyval = cp_gtk_awt_keycode_to_keysym (keycode,
+ AWT_KEY_LOCATION_LEFT);
if (!gdk_keymap_get_entries_for_keyval (gdk_keymap_get_default (),
lookup_keyval,
@@ -225,6 +230,7 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_keyPress
g_free (keymap_keys);
XFlush (xdisplay);
+
gdk_threads_leave ();
}
@@ -244,7 +250,8 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_keyRelease
display = gdk_display_get_default ();
xdisplay = GDK_DISPLAY_XDISPLAY (display);
- lookup_keyval = awt_keycode_to_keysym (keycode, AWT_KEY_LOCATION_LEFT);
+ lookup_keyval = cp_gtk_awt_keycode_to_keysym (keycode,
+ AWT_KEY_LOCATION_LEFT);
if (!gdk_keymap_get_entries_for_keyval (gdk_keymap_get_default (),
lookup_keyval,
@@ -268,6 +275,7 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_keyRelease
g_free (keymap_keys);
XFlush (xdisplay);
+
gdk_threads_leave ();
}
@@ -303,7 +311,12 @@ Java_gnu_java_awt_peer_gtk_GdkRobotPeer_nativeGetRGBPixels
n_pixels = height * stride_pixels;
gdk_pixels = gdk_pixbuf_get_pixels (pixbuf);
+ gdk_threads_leave ();
+
jpixels = (*env)->NewIntArray (env, n_pixels);
+
+ gdk_threads_enter ();
+
java_pixels = (*env)->GetIntArrayElements (env, jpixels, NULL);
memcpy (java_pixels,
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c
index d09d155b4..918ecfd0a 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,7 +42,7 @@
#include "gdkfont.h"
#include "gnu_java_awt_peer_gtk_GdkTextLayout.h"
-struct state_table *native_text_layout_state_table;
+struct state_table *cp_gtk_native_text_layout_state_table;
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkTextLayout_initStaticState
@@ -58,12 +58,14 @@ Java_gnu_java_awt_peer_gtk_GdkTextLayout_initState
struct textlayout *tl;
gdk_threads_enter ();
+
g_assert(self != NULL);
tl = g_malloc0 (sizeof (struct textlayout));
g_assert(tl != NULL);
tl->pango_layout = pango_layout_new(gdk_pango_context_get());
g_assert(tl->pango_layout != NULL);
NSA_SET_TEXT_LAYOUT_PTR (env, self, tl);
+
gdk_threads_leave ();
}
@@ -76,6 +78,7 @@ Java_gnu_java_awt_peer_gtk_GdkTextLayout_setText
gint len = 0;
gdk_threads_enter ();
+
g_assert(self != NULL);
g_assert(text != NULL);
@@ -90,6 +93,7 @@ Java_gnu_java_awt_peer_gtk_GdkTextLayout_setText
pango_layout_set_text (tl->pango_layout, text, len);
(*env)->ReleaseStringUTFChars (env, text, str);
+
gdk_threads_leave ();
}
@@ -102,6 +106,7 @@ Java_gnu_java_awt_peer_gtk_GdkTextLayout_indexToPos
jdouble *nativePos;
gdk_threads_enter ();
+
g_assert(self != NULL);
g_assert(javaPos != NULL);
@@ -121,6 +126,7 @@ Java_gnu_java_awt_peer_gtk_GdkTextLayout_indexToPos
nativePos[3] = (jdouble) pangoPos.height;
(*env)->ReleaseDoubleArrayElements (env, javaPos, nativePos, 0);
+
gdk_threads_leave ();
}
@@ -133,6 +139,7 @@ Java_gnu_java_awt_peer_gtk_GdkTextLayout_getExtents
jdouble *nativeInkExtents, *nativeLogExtents;
gdk_threads_enter ();
+
g_assert(self != NULL);
g_assert(javaInkExtents != NULL);
g_assert(javaLogExtents != NULL);
@@ -173,11 +180,13 @@ Java_gnu_java_awt_peer_gtk_GdkTextLayout_dispose
struct textlayout *tl;
gdk_threads_enter ();
+
g_assert(self != NULL);
tl = (struct textlayout *) NSA_DEL_TEXT_LAYOUT_PTR (env, self);
g_assert(tl != NULL);
if (tl->pango_layout != NULL)
g_object_unref (tl->pango_layout);
g_free(tl);
+
gdk_threads_leave ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
index 94e98bf96..5e8ab26c3 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,15 +39,27 @@ exception statement from your version. */
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkButtonPeer.h"
-static gboolean focus_in_cb (GtkWidget *widget,
- GdkEventFocus *event,
- jobject peer);
-static gboolean focus_out_cb (GtkWidget *widget,
- GdkEventFocus *event,
- jobject peer);
+static jmethodID beginNativeRepaintID;
+static jmethodID endNativeRepaintID;
+
+void
+cp_gtk_button_init_jni (void)
+{
+ jclass gtkbuttonpeer;
+
+ gtkbuttonpeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkButtonPeer");
+
+ beginNativeRepaintID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkbuttonpeer,
+ "beginNativeRepaint",
+ "()V");
+
+ endNativeRepaintID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkbuttonpeer,
+ "endNativeRepaint", "()V");
+}
-static void block_expose_events_cb (GtkWidget *widget,
- jobject peer);
+static void block_expose_event_cb (GtkWidget *widget,
+ jobject peer);
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkButtonPeer_create
@@ -57,21 +69,21 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_create
GtkWidget *eventbox;
GtkWidget *button;
+ gdk_threads_enter ();
+
NSA_SET_GLOBAL_REF (env, obj);
c_label = (*env)->GetStringUTFChars (env, label, NULL);
- gdk_threads_enter ();
-
eventbox = gtk_event_box_new ();
button = gtk_button_new_with_label (c_label);
gtk_container_add (GTK_CONTAINER (eventbox), button);
gtk_widget_show (button);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, label, c_label);
NSA_SET_PTR (env, obj, eventbox);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -82,30 +94,22 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_connectSignals
jobject *gref;
GtkWidget *button;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
gref = NSA_GET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
-
button = gtk_bin_get_child (GTK_BIN (ptr));
- g_signal_connect (G_OBJECT (ptr), "event",
- G_CALLBACK (pre_event_handler), *gref);
-
- g_signal_connect (G_OBJECT (button), "event",
- G_CALLBACK (pre_event_handler), *gref);
-
- g_signal_connect (G_OBJECT (button), "focus-in-event",
- G_CALLBACK (focus_in_cb), *gref);
-
- g_signal_connect (G_OBJECT (button), "focus-out-event",
- G_CALLBACK (focus_out_cb), *gref);
-
+ /* Button signals */
g_signal_connect_after (G_OBJECT (button), "pressed",
- G_CALLBACK (block_expose_events_cb), *gref);
+ G_CALLBACK (block_expose_event_cb), *gref);
g_signal_connect_after (G_OBJECT (button), "released",
- G_CALLBACK (block_expose_events_cb), *gref);
+ G_CALLBACK (block_expose_event_cb), *gref);
+
+ /* Component signals */
+ cp_gtk_component_connect_signals (G_OBJECT (button), gref);
gdk_threads_leave ();
}
@@ -119,19 +123,19 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkSetLabel
GtkWidget *label;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
text = (*env)->GetStringUTFChars (env, jtext, NULL);
- gdk_threads_enter ();
-
button = gtk_bin_get_child (GTK_BIN (ptr));
label = gtk_bin_get_child (GTK_BIN (button));
gtk_label_set_text (GTK_LABEL (label), text);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, jtext, text);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -144,17 +148,18 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkWidgetModifyFont
GtkWidget *label;
PangoFontDescription *font_desc;
+ gdk_threads_enter();
+
ptr = NSA_GET_PTR (env, obj);
font_name = (*env)->GetStringUTFChars (env, name, NULL);
- gdk_threads_enter();
-
button = gtk_bin_get_child (GTK_BIN (ptr));
label = gtk_bin_get_child (GTK_BIN (button));
font_desc = pango_font_description_from_string (font_name);
- pango_font_description_set_size (font_desc, size * dpi_conversion_factor);
+ pango_font_description_set_size (font_desc,
+ size * cp_gtk_dpi_conversion_factor);
if (style & AWT_STYLE_BOLD)
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
@@ -166,9 +171,9 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkWidgetModifyFont
pango_font_description_free (font_desc);
- gdk_threads_leave();
-
(*env)->ReleaseStringUTFChars (env, name, font_name);
+
+ gdk_threads_leave();
}
JNIEXPORT void JNICALL
@@ -184,6 +189,8 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkWidgetSetBackground
GtkWidget *button;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
normal_color.red = (red / 255.0) * 65535;
@@ -205,8 +212,6 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkWidgetSetBackground
prelight_color.green = prelight_green > 65535 ? 65535 : prelight_green;
prelight_color.blue = prelight_blue > 65535 ? 65535 : prelight_blue;
- gdk_threads_enter ();
-
button = gtk_bin_get_child (GTK_BIN (ptr));
gtk_widget_modify_bg (button, GTK_STATE_NORMAL, &normal_color);
@@ -225,14 +230,14 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkWidgetSetForeground
GtkWidget *label;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
color.red = (red / 255.0) * 65535;
color.green = (green / 255.0) * 65535;
color.blue = (blue / 255.0) * 65535;
- gdk_threads_enter ();
-
button = gtk_bin_get_child (GTK_BIN (ptr));
label = gtk_bin_get_child (GTK_BIN (button));
@@ -250,10 +255,10 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkActivate
GtkWidget *button;
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
button = gtk_bin_get_child (GTK_BIN (ptr));
gtk_widget_activate (GTK_WIDGET (button));
@@ -267,11 +272,13 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_gtkWidgetRequestFocus
void *ptr;
GtkWidget *button;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
button = gtk_bin_get_child (GTK_BIN (ptr));
gtk_widget_grab_focus (button);
+
gdk_threads_leave ();
}
@@ -282,10 +289,10 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_setNativeBounds
GtkWidget *widget, *child;
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
widget = GTK_WIDGET (ptr);
/* We assume that -1 is a width or height and not a request for the
@@ -310,46 +317,22 @@ Java_gnu_java_awt_peer_gtk_GtkButtonPeer_setNativeBounds
gdk_threads_leave ();
}
-static gboolean
-focus_in_cb (GtkWidget *widget __attribute((unused)),
- GdkEventFocus *event __attribute((unused)),
- jobject peer)
+static void
+block_expose_event_cb (GtkWidget *widget, jobject peer)
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postFocusEventID,
- AWT_FOCUS_GAINED,
- JNI_FALSE);
- gdk_threads_enter ();
- return FALSE;
-}
-static gboolean
-focus_out_cb (GtkWidget *widget __attribute((unused)),
- GdkEventFocus *event __attribute((unused)),
- jobject peer)
-{
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postFocusEventID,
- AWT_FOCUS_LOST,
- JNI_FALSE);
- gdk_threads_enter ();
- return FALSE;
-}
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ beginNativeRepaintID);
-static void
-block_expose_events_cb (GtkWidget *widget, jobject peer)
-{
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- beginNativeRepaintID);
gdk_threads_enter ();
gdk_window_process_updates (widget->window, TRUE);
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
endNativeRepaintID);
+
gdk_threads_enter ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c
index 63dd94416..52922ddb8 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,16 +45,14 @@ Java_gnu_java_awt_peer_gtk_GtkCanvasPeer_create
{
gpointer widget;
+ gdk_threads_enter ();
+
/* Create global reference and save it for future use */
NSA_SET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
-
widget = gtk_type_new (gtk_drawing_area_get_type ());
- gdk_threads_leave ();
-
NSA_SET_PTR (env, obj, widget);
-}
-
+ gdk_threads_leave ();
+}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer.c
index 90923fe3b..4f2875092 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,8 +56,9 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer_remove
void *ptr;
GSList *list;
- ptr = NSA_GET_PTR (env, checkbox);
gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, checkbox);
button = GTK_RADIO_BUTTON (ptr);
/* Update the group to point to some other widget in the group. We
@@ -70,8 +71,7 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer_remove
break;
}
- gdk_threads_leave ();
-
NSA_SET_PTR (env, obj, list ? list->data : NULL);
-}
+ gdk_threads_leave ();
+}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c
index ade743023..77836cedd 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,20 +46,20 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer_create
GtkWidget *widget;
const char *str;
+ gdk_threads_enter ();
+
NSA_SET_GLOBAL_REF (env, obj);
str = (*env)->GetStringUTFChars (env, label, NULL);
- gdk_threads_enter ();
-
widget = gtk_check_menu_item_new_with_label (str);
gtk_widget_show (widget);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, label, str);
NSA_SET_PTR (env, obj, widget);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -68,9 +68,11 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer_setState
{
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (ptr), state);
+
gdk_threads_leave ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
index 6c854eff8..cf883dd33 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,22 @@ exception statement from your version. */
#include "gnu_java_awt_peer_gtk_GtkCheckboxPeer.h"
#include "gnu_java_awt_peer_gtk_GtkComponentPeer.h"
-static void item_toggled (GtkToggleButton *item, jobject peer);
+static jmethodID postItemEventID;
+
+void
+cp_gtk_checkbox_init_jni (void)
+{
+ jclass gtkcheckboxpeer;
+
+ gtkcheckboxpeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkCheckboxPeer");
+
+ postItemEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkcheckboxpeer,
+ "postItemEvent",
+ "(Ljava/lang/Object;I)V");
+}
+
+static void item_toggled_cb (GtkToggleButton *item, jobject peer);
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_create
@@ -48,10 +63,10 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_create
{
GtkWidget *button;
- NSA_SET_GLOBAL_REF (env, obj);
-
gdk_threads_enter ();
+ NSA_SET_GLOBAL_REF (env, obj);
+
if (group == NULL)
button = gtk_check_button_new_with_label ("");
else
@@ -66,28 +81,31 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_create
}
}
- gdk_threads_leave ();
-
NSA_SET_PTR (env, obj, button);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_connectSignals
(JNIEnv *env, jobject obj)
{
- void *ptr = NSA_GET_PTR (env, obj);
- jobject *gref = NSA_GET_GLOBAL_REF (env, obj);
- g_assert (gref);
+ void *ptr = NULL;
+ jobject *gref = NULL;
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
+
+ /* Checkbox signals */
g_signal_connect (G_OBJECT (ptr), "toggled",
- GTK_SIGNAL_FUNC (item_toggled), *gref);
+ G_CALLBACK (item_toggled_cb), *gref);
- gdk_threads_leave ();
+ /* Component signals */
+ cp_gtk_component_connect_signals (G_OBJECT (ptr), gref);
- /* Connect the superclass signals. */
- Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj);
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -97,10 +115,10 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeSetCheckboxGroup
GtkRadioButton *button;
void *native_group, *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
/* FIXME: we can't yet switch between a checkbutton and a
radiobutton. However, AWT requires this. For now we just
crash. */
@@ -115,8 +133,6 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeSetCheckboxGroup
gtk_radio_button_group
(GTK_RADIO_BUTTON (native_group)));
- gdk_threads_leave ();
-
/* If the native group wasn't set on the new CheckboxGroup, then set
it now so that the right thing will happen with the next
radiobutton. The native state for a CheckboxGroup is a pointer
@@ -126,6 +142,8 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeSetCheckboxGroup
notified. */
if (native_group == NULL)
NSA_SET_PTR (env, group, native_group);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -134,10 +152,10 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkToggleButtonSetActive
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ptr), is_active);
gdk_threads_leave ();
@@ -153,20 +171,21 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkWidgetModifyFont
GtkWidget *label;
PangoFontDescription *font_desc;
+ gdk_threads_enter();
+
ptr = NSA_GET_PTR (env, obj);
button = GTK_WIDGET (ptr);
label = gtk_bin_get_child (GTK_BIN(button));
if (!label)
- return;
+ return;
font_name = (*env)->GetStringUTFChars (env, name, NULL);
- gdk_threads_enter();
-
font_desc = pango_font_description_from_string (font_name);
- pango_font_description_set_size (font_desc, size * dpi_conversion_factor);
+ pango_font_description_set_size (font_desc,
+ size * cp_gtk_dpi_conversion_factor);
if (style & AWT_STYLE_BOLD)
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
@@ -178,9 +197,9 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkWidgetModifyFont
pango_font_description_free (font_desc);
- gdk_threads_leave();
-
(*env)->ReleaseStringUTFChars (env, name, font_name);
+
+ gdk_threads_leave();
}
JNIEXPORT void JNICALL
@@ -191,27 +210,31 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkButtonSetLabel
GtkWidget *label_widget;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
c_label = (*env)->GetStringUTFChars (env, label, NULL);
- gdk_threads_enter ();
-
label_widget = gtk_bin_get_child (GTK_BIN (ptr));
gtk_label_set_text (GTK_LABEL (label_widget), c_label);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, label, c_label);
+
+ gdk_threads_leave ();
}
static void
-item_toggled (GtkToggleButton *item, jobject peer)
+item_toggled_cb (GtkToggleButton *item, jobject peer)
{
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postItemEventID,
- peer,
- item->active ?
- (jint) AWT_ITEM_SELECTED :
- (jint) AWT_ITEM_DESELECTED);
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postItemEventID,
+ peer,
+ item->active ?
+ (jint) AWT_ITEM_SELECTED :
+ (jint) AWT_ITEM_DESELECTED);
+
+ gdk_threads_enter ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
index b4e64e62d..ed9df5433 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,7 +39,22 @@ exception statement from your version. */
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkChoicePeer.h"
-static void selection_changed (GtkComboBox *combobox, jobject peer);
+static jmethodID postChoiceItemEventID;
+
+void
+cp_gtk_choice_init_jni (void)
+{
+ jclass gtkchoicepeer;
+
+ gtkchoicepeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkChoicePeer");
+
+ postChoiceItemEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkchoicepeer,
+ "postChoiceItemEvent",
+ "(Ljava/lang/String;I)V");
+}
+
+static void selection_changed_cb (GtkComboBox *combobox, jobject peer);
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkChoicePeer_create
@@ -48,19 +63,38 @@ Java_gnu_java_awt_peer_gtk_GtkChoicePeer_create
GtkWidget *combobox;
jobject *gref;
+ gdk_threads_enter ();
+
NSA_SET_GLOBAL_REF (env, obj);
gref = NSA_GET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
-
combobox = gtk_combo_box_new_text ();
- g_signal_connect (combobox, "changed",
- G_CALLBACK (selection_changed), *gref);
+ NSA_SET_PTR (env, obj, combobox);
gdk_threads_leave ();
+}
- NSA_SET_PTR (env, obj, combobox);
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkChoicePeer_connectSignals
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr = NULL;
+ jobject *gref = NULL;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
+
+ /* Choice signals */
+ g_signal_connect (G_OBJECT (ptr), "changed",
+ G_CALLBACK (selection_changed_cb), *gref);
+
+ /* Component signals */
+ cp_gtk_component_connect_signals (G_OBJECT (ptr), gref);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -70,10 +104,10 @@ Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append
gpointer ptr;
jsize count, i;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
count = (*env)->GetArrayLength (env, items);
for (i = 0; i < count; i++)
@@ -99,15 +133,17 @@ Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeAdd
void *ptr;
const char *label;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
label = (*env)->GetStringUTFChars (env, item, 0);
- gdk_threads_enter ();
gtk_combo_box_insert_text (GTK_COMBO_BOX (ptr), index, label);
- gdk_threads_leave ();
(*env)->ReleaseStringUTFChars (env, item, label);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -116,10 +152,12 @@ Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemove
{
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
gtk_combo_box_remove_text (GTK_COMBO_BOX (ptr), index);
+
gdk_threads_leave ();
}
@@ -131,10 +169,10 @@ Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemoveAll
GtkTreeModel *model;
gint count, i;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
model = gtk_combo_box_get_model (GTK_COMBO_BOX (ptr));
count = gtk_tree_model_iter_n_children (model, NULL);
@@ -154,10 +192,12 @@ Java_gnu_java_awt_peer_gtk_GtkChoicePeer_select
{
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
gtk_combo_box_set_active (GTK_COMBO_BOX (ptr), index);
+
gdk_threads_leave ();
}
@@ -168,16 +208,18 @@ Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeGetSelected
void *ptr;
int index;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
index = gtk_combo_box_get_active (GTK_COMBO_BOX (ptr));
+
gdk_threads_leave ();
return index;
}
-static void selection_changed (GtkComboBox *combobox, jobject peer)
+static void selection_changed_cb (GtkComboBox *combobox, jobject peer)
{
jstring label;
GtkTreeModel *model;
@@ -190,18 +232,17 @@ static void selection_changed (GtkComboBox *combobox, jobject peer)
if (index >= 0)
{
model = gtk_combo_box_get_model (combobox);
-
gtk_combo_box_get_active_iter (combobox, &iter);
-
gtk_tree_model_get (model, &iter, 0, &selected, -1);
+ label = (*cp_gtk_gdk_env())->NewStringUTF (cp_gtk_gdk_env(), selected);
gdk_threads_leave ();
- label = (*gdk_env())->NewStringUTF (gdk_env(), selected);
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- choicePostItemEventID,
- label,
- (jint) AWT_ITEM_SELECTED);
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postChoiceItemEventID,
+ label,
+ (jint) AWT_ITEM_SELECTED);
+
gdk_threads_enter ();
}
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c
index e05185790..dea9d4cc7 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,21 +39,25 @@ exception statement from your version. */
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkClipboard.h"
-jmethodID stringSelectionReceivedID;
-jmethodID stringSelectionHandlerID;
-jmethodID selectionClearID;
+static jmethodID stringSelectionReceivedID;
+static jmethodID stringSelectionHandlerID;
+static jmethodID selectionClearID;
-void selection_received (GtkWidget *, GtkSelectionData *, guint, gpointer);
-void selection_get (GtkWidget *, GtkSelectionData *, guint, guint, gpointer);
-gint selection_clear (GtkWidget *, GdkEventSelection *);
+static void selection_received_cb (GtkWidget *, GtkSelectionData *,
+ guint, gpointer);
+static void selection_get_cb (GtkWidget *, GtkSelectionData *, guint,
+ guint, gpointer);
+static gint selection_clear_cb (GtkWidget *, GdkEventSelection *);
-GtkWidget *clipboard;
-jobject cb_obj;
+static GtkWidget *clipboard;
+static jobject cb_obj;
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState (JNIEnv *env,
jobject obj)
{
+ gdk_threads_enter ();
+
if (!stringSelectionReceivedID)
{
jclass gtkclipboard;
@@ -72,20 +76,19 @@ Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState (JNIEnv *env,
cb_obj = (*env)->NewGlobalRef (env, obj);
- gdk_threads_enter ();
clipboard = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (G_OBJECT(clipboard), "selection_received",
- GTK_SIGNAL_FUNC (selection_received), NULL);
+ G_CALLBACK (selection_received_cb), NULL);
g_signal_connect (G_OBJECT(clipboard), "selection_clear_event",
- GTK_SIGNAL_FUNC (selection_clear), NULL);
+ G_CALLBACK (selection_clear_cb), NULL);
gtk_selection_add_target (clipboard, GDK_SELECTION_PRIMARY,
GDK_TARGET_STRING, 0);
g_signal_connect (G_OBJECT(clipboard), "selection_get",
- GTK_SIGNAL_FUNC (selection_get), NULL);
+ G_CALLBACK (selection_get_cb), NULL);
gdk_threads_leave ();
}
@@ -95,49 +98,63 @@ Java_gnu_java_awt_peer_gtk_GtkClipboard_requestStringConversion
(JNIEnv *env __attribute__((unused)), jclass clazz __attribute__((unused)))
{
gdk_threads_enter ();
+
gtk_selection_convert (clipboard, GDK_SELECTION_PRIMARY,
GDK_TARGET_STRING, GDK_CURRENT_TIME);
+
gdk_threads_leave ();
}
-void
-selection_received (GtkWidget *widget __attribute__((unused)),
- GtkSelectionData *selection_data __attribute__((unused)),
- guint time __attribute__((unused)),
- gpointer data __attribute__((unused)))
+static void
+selection_received_cb (GtkWidget *widget __attribute__((unused)),
+ GtkSelectionData *selection_data __attribute__((unused)),
+ guint time __attribute__((unused)),
+ gpointer data __attribute__((unused)))
{
/* Check to see if retrieval succeeded */
if (selection_data->length < 0
|| selection_data->type != GDK_SELECTION_TYPE_STRING)
{
- (*gdk_env())->CallVoidMethod (gdk_env(), cb_obj, stringSelectionReceivedID,
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), cb_obj, stringSelectionReceivedID,
NULL);
+
+ gdk_threads_enter ();
}
else
{
char *str = (char *) selection_data->data;
- (*gdk_env())->CallVoidMethod (gdk_env(), cb_obj, stringSelectionReceivedID,
- (*gdk_env())->NewStringUTF (gdk_env(), str));
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), cb_obj, stringSelectionReceivedID,
+ (*cp_gtk_gdk_env())->NewStringUTF (cp_gtk_gdk_env(), str));
+
+ gdk_threads_enter ();
}
return;
}
-void
-selection_get (GtkWidget *widget __attribute__((unused)),
- GtkSelectionData *selection_data,
- guint info __attribute__((unused)),
- guint time __attribute__((unused)),
- gpointer data __attribute__((unused)))
+static void
+selection_get_cb (GtkWidget *widget __attribute__((unused)),
+ GtkSelectionData *selection_data,
+ guint info __attribute__((unused)),
+ guint time __attribute__((unused)),
+ gpointer data __attribute__((unused)))
{
jstring jstr;
const char *utf;
jsize utflen;
- jstr = (*gdk_env())->CallObjectMethod (gdk_env(), cb_obj,
+ gdk_threads_leave ();
+
+ jstr = (*cp_gtk_gdk_env())->CallObjectMethod (cp_gtk_gdk_env(), cb_obj,
stringSelectionHandlerID);
+ gdk_threads_enter ();
+
if (!jstr)
{
gtk_selection_data_set (selection_data,
@@ -145,13 +162,13 @@ selection_get (GtkWidget *widget __attribute__((unused)),
return;
}
- utflen = (*gdk_env())->GetStringUTFLength (gdk_env(), jstr);
- utf = (*gdk_env())->GetStringUTFChars (gdk_env(), jstr, NULL);
+ utflen = (*cp_gtk_gdk_env())->GetStringUTFLength (cp_gtk_gdk_env(), jstr);
+ utf = (*cp_gtk_gdk_env())->GetStringUTFChars (cp_gtk_gdk_env(), jstr, NULL);
gtk_selection_data_set (selection_data, GDK_TARGET_STRING, 8,
(const unsigned char*)utf, utflen);
- (*gdk_env())->ReleaseStringUTFChars (gdk_env(), jstr, utf);
+ (*cp_gtk_gdk_env())->ReleaseStringUTFChars (cp_gtk_gdk_env(), jstr, utf);
}
JNIEXPORT void JNICALL
@@ -173,11 +190,15 @@ Java_gnu_java_awt_peer_gtk_GtkClipboard_selectionGet
gdk_threads_leave ();
}
-gint
-selection_clear (GtkWidget *widget __attribute__((unused)),
- GdkEventSelection *event __attribute__((unused)))
+static gint
+selection_clear_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventSelection *event __attribute__((unused)))
{
- (*gdk_env())->CallVoidMethod (gdk_env(), cb_obj, selectionClearID);
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), cb_obj, selectionClearID);
+
+ gdk_threads_enter ();
return TRUE;
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
index 4cd3f1657..bd9dde392 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,373 +38,148 @@ exception statement from your version. */
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkComponentPeer.h"
+
#include <gtk/gtkprivate.h>
-#include <gdk/gdkkeysyms.h>
+
+#define AWT_DEFAULT_CURSOR 0
+#define AWT_CROSSHAIR_CURSOR 1
+#define AWT_TEXT_CURSOR 2
+#define AWT_WAIT_CURSOR 3
+#define AWT_SW_RESIZE_CURSOR 4
+#define AWT_SE_RESIZE_CURSOR 5
+#define AWT_NW_RESIZE_CURSOR 6
+#define AWT_NE_RESIZE_CURSOR 7
+#define AWT_N_RESIZE_CURSOR 8
+#define AWT_S_RESIZE_CURSOR 9
+#define AWT_W_RESIZE_CURSOR 10
+#define AWT_E_RESIZE_CURSOR 11
+#define AWT_HAND_CURSOR 12
+#define AWT_MOVE_CURSOR 13
+
+#define AWT_BUTTON1_DOWN_MASK (1 << 10)
+#define AWT_BUTTON2_DOWN_MASK (1 << 11)
+#define AWT_BUTTON3_DOWN_MASK (1 << 12)
+
+/* FIXME: use gtk-double-click-time, gtk-double-click-distance */
+#define MULTI_CLICK_TIME 250
+/* as opposed to a MULTI_PASS_TIME :) */
+
+#define AWT_MOUSE_CLICKED 500
+#define AWT_MOUSE_PRESSED 501
+#define AWT_MOUSE_RELEASED 502
+#define AWT_MOUSE_MOVED 503
+#define AWT_MOUSE_ENTERED 504
+#define AWT_MOUSE_EXITED 505
+#define AWT_MOUSE_DRAGGED 506
+
+#define AWT_FOCUS_GAINED 1004
+#define AWT_FOCUS_LOST 1005
static GtkWidget *find_fg_color_widget (GtkWidget *widget);
static GtkWidget *find_bg_color_widget (GtkWidget *widget);
-static gboolean focus_in_cb (GtkWidget *widget,
- GdkEventFocus *event,
- jobject peer);
-static gboolean focus_out_cb (GtkWidget *widget,
- GdkEventFocus *event,
- jobject peer);
-/*
- * This method returns a GDK keyval that corresponds to one of the
- * keysyms in the X keymap table. The return value is only used to
- * determine the keyval's corresponding hardware keycode, and doesn't
- * reflect an accurate translation of a Java virtual key value to a
- * GDK keyval.
- */
-#ifdef __GNUC__
-__inline
-#endif
-guint
-awt_keycode_to_keysym (jint keyCode, jint keyLocation)
-{
- /* GDK_A through GDK_Z */
- if (keyCode >= VK_A && keyCode <= VK_Z)
- return gdk_keyval_to_lower (keyCode);
+static jmethodID postMouseEventID;
+static jmethodID setCursorID;
+static jmethodID postExposeEventID;
+static jmethodID postFocusEventID;
+
+void
+cp_gtk_component_init_jni (void)
+ {
+ jclass gtkcomponentpeer;
+
+ gtkcomponentpeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkComponentPeer");
- /* GDK_0 through GDK_9 */
- if (keyCode >= VK_0 && keyCode <= VK_9)
- return keyCode;
+ postMouseEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkcomponentpeer,
+ "postMouseEvent", "(IJIIIIZ)V");
- switch (keyCode)
+ setCursorID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkcomponentpeer,
+ "setCursor", "()V");
+
+ postExposeEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkcomponentpeer,
+ "postExposeEvent", "(IIII)V");
+
+ postFocusEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkcomponentpeer,
+ "postFocusEvent", "(IZ)V");
+}
+
+static gboolean component_button_press_cb (GtkWidget *widget,
+ GdkEventButton *event,
+ jobject peer);
+static gboolean component_button_release_cb (GtkWidget *widget,
+ GdkEventButton *event,
+ jobject peer);
+static gboolean component_motion_notify_cb (GtkWidget *widget,
+ GdkEventMotion *event,
+ jobject peer);
+static gboolean component_enter_notify_cb (GtkWidget *widget,
+ GdkEventCrossing *event,
+ jobject peer);
+static gboolean component_leave_notify_cb (GtkWidget *widget,
+ GdkEventCrossing *event,
+ jobject peer);
+static gboolean component_expose_cb (GtkWidget *widget,
+ GdkEventExpose *event,
+ jobject peer);
+static gboolean component_focus_in_cb (GtkWidget *widget,
+ GdkEventFocus *event,
+ jobject peer);
+static gboolean component_focus_out_cb (GtkWidget *widget,
+ GdkEventFocus *event,
+ jobject peer);
+
+static jint
+button_to_awt_mods (int button)
+{
+ switch (button)
{
- case VK_ENTER:
- return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Enter : GDK_Return;
- case VK_BACK_SPACE:
- return GDK_BackSpace;
- case VK_TAB:
- return GDK_Tab;
- case VK_CANCEL:
- return GDK_Cancel;
- case VK_CLEAR:
- return GDK_Clear;
- case VK_SHIFT:
- return keyLocation == AWT_KEY_LOCATION_LEFT ? GDK_Shift_L : GDK_Shift_R;
- case VK_CONTROL:
- return keyLocation == AWT_KEY_LOCATION_LEFT ? GDK_Control_L : GDK_Control_R;
- case VK_ALT:
- return keyLocation == AWT_KEY_LOCATION_LEFT ? GDK_Alt_L : GDK_Alt_R;
- case VK_PAUSE:
- return GDK_Pause;
- case VK_CAPS_LOCK:
- return GDK_Caps_Lock;
- case VK_ESCAPE:
- return GDK_Escape;
- case VK_SPACE:
- return GDK_space;
- case VK_PAGE_UP:
- return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Page_Up : GDK_Page_Up;
- case VK_PAGE_DOWN:
- return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Page_Down : GDK_Page_Down;
- case VK_END:
- return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_End : GDK_End;
- case VK_HOME:
- return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Home : GDK_Home;
- case VK_LEFT:
- return GDK_Left;
- case VK_UP:
- return GDK_Up;
- case VK_RIGHT:
- return GDK_Right;
- case VK_DOWN:
- return GDK_Down;
- case VK_COMMA:
- return GDK_comma;
- case VK_MINUS:
- return GDK_minus;
- case VK_PERIOD:
- return GDK_period;
- case VK_SLASH:
- return GDK_slash;
- /*
- case VK_0:
- case VK_1:
- case VK_2:
- case VK_3:
- case VK_4:
- case VK_5:
- case VK_6:
- case VK_7:
- case VK_8:
- case VK_9:
- */
- case VK_SEMICOLON:
- return GDK_semicolon;
- case VK_EQUALS:
- return GDK_equal;
- /*
- case VK_A:
- case VK_B:
- case VK_C:
- case VK_D:
- case VK_E:
- case VK_F:
- case VK_G:
- case VK_H:
- case VK_I:
- case VK_J:
- case VK_K:
- case VK_L:
- case VK_M:
- case VK_N:
- case VK_O:
- case VK_P:
- case VK_Q:
- case VK_R:
- case VK_S:
- case VK_T:
- case VK_U:
- case VK_V:
- case VK_W:
- case VK_X:
- case VK_Y:
- case VK_Z:
- */
- case VK_OPEN_BRACKET:
- return GDK_bracketleft;
- case VK_BACK_SLASH:
- return GDK_backslash;
- case VK_CLOSE_BRACKET:
- return GDK_bracketright;
- case VK_NUMPAD0:
- return GDK_KP_0;
- case VK_NUMPAD1:
- return GDK_KP_1;
- case VK_NUMPAD2:
- return GDK_KP_2;
- case VK_NUMPAD3:
- return GDK_KP_3;
- case VK_NUMPAD4:
- return GDK_KP_4;
- case VK_NUMPAD5:
- return GDK_KP_5;
- case VK_NUMPAD6:
- return GDK_KP_6;
- case VK_NUMPAD7:
- return GDK_KP_7;
- case VK_NUMPAD8:
- return GDK_KP_8;
- case VK_NUMPAD9:
- return GDK_KP_9;
- case VK_MULTIPLY:
- return GDK_KP_Multiply;
- case VK_ADD:
- return GDK_KP_Add;
- /*
- case VK_SEPARATER:
- */
- case VK_SEPARATOR:
- return GDK_KP_Separator;
- case VK_SUBTRACT:
- return GDK_KP_Subtract;
- case VK_DECIMAL:
- return GDK_KP_Decimal;
- case VK_DIVIDE:
- return GDK_KP_Divide;
- case VK_DELETE:
- return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Delete : GDK_Delete;
- case VK_NUM_LOCK:
- return GDK_Num_Lock;
- case VK_SCROLL_LOCK:
- return GDK_Scroll_Lock;
- case VK_F1:
- return GDK_F1;
- case VK_F2:
- return GDK_F2;
- case VK_F3:
- return GDK_F3;
- case VK_F4:
- return GDK_F4;
- case VK_F5:
- return GDK_F5;
- case VK_F6:
- return GDK_F6;
- case VK_F7:
- return GDK_F7;
- case VK_F8:
- return GDK_F8;
- case VK_F9:
- return GDK_F9;
- case VK_F10:
- return GDK_F10;
- case VK_F11:
- return GDK_F11;
- case VK_F12:
- return GDK_F12;
- case VK_F13:
- return GDK_F13;
- case VK_F14:
- return GDK_F14;
- case VK_F15:
- return GDK_F15;
- case VK_F16:
- return GDK_F16;
- case VK_F17:
- return GDK_F17;
- case VK_F18:
- return GDK_F18;
- case VK_F19:
- return GDK_F19;
- case VK_F20:
- return GDK_F20;
- case VK_F21:
- return GDK_F21;
- case VK_F22:
- return GDK_F22;
- case VK_F23:
- return GDK_F23;
- case VK_F24:
- return GDK_F24;
- case VK_PRINTSCREEN:
- return GDK_Print;
- case VK_INSERT:
- return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Insert : GDK_Insert;
- case VK_HELP:
- return GDK_Help;
- case VK_META:
- return keyLocation == AWT_KEY_LOCATION_LEFT ? GDK_Meta_L : GDK_Meta_R;
- case VK_BACK_QUOTE:
- return GDK_grave;
- case VK_QUOTE:
- return GDK_apostrophe;
- case VK_KP_UP:
- return GDK_KP_Up;
- case VK_KP_DOWN:
- return GDK_KP_Down;
- case VK_KP_LEFT:
- return GDK_KP_Left;
- case VK_KP_RIGHT:
- return GDK_KP_Right;
- case VK_DEAD_GRAVE:
- return GDK_dead_grave;
- case VK_DEAD_ACUTE:
- return GDK_dead_acute;
- case VK_DEAD_CIRCUMFLEX:
- return GDK_dead_circumflex;
- case VK_DEAD_TILDE:
- return GDK_dead_tilde;
- case VK_DEAD_MACRON:
- return GDK_dead_macron;
- case VK_DEAD_BREVE:
- return GDK_dead_breve;
- case VK_DEAD_ABOVEDOT:
- return GDK_dead_abovedot;
- case VK_DEAD_DIAERESIS:
- return GDK_dead_diaeresis;
- case VK_DEAD_ABOVERING:
- return GDK_dead_abovering;
- case VK_DEAD_DOUBLEACUTE:
- return GDK_dead_doubleacute;
- case VK_DEAD_CARON:
- return GDK_dead_caron;
- case VK_DEAD_CEDILLA:
- return GDK_dead_cedilla;
- case VK_DEAD_OGONEK:
- return GDK_dead_ogonek;
- case VK_DEAD_IOTA:
- return GDK_dead_iota;
- case VK_DEAD_VOICED_SOUND:
- return GDK_dead_voiced_sound;
- case VK_DEAD_SEMIVOICED_SOUND:
- return GDK_dead_semivoiced_sound;
- case VK_AMPERSAND:
- return GDK_ampersand;
- case VK_ASTERISK:
- return GDK_asterisk;
- case VK_QUOTEDBL:
- return GDK_quotedbl;
- case VK_LESS:
- return GDK_less;
- case VK_GREATER:
- return GDK_greater;
- case VK_BRACELEFT:
- return GDK_braceleft;
- case VK_BRACERIGHT:
- return GDK_braceright;
- case VK_AT:
- return GDK_at;
- case VK_COLON:
- return GDK_colon;
- case VK_CIRCUMFLEX:
- return GDK_asciicircum;
- case VK_DOLLAR:
- return GDK_dollar;
- case VK_EURO_SIGN:
- return GDK_EuroSign;
- case VK_EXCLAMATION_MARK:
- return GDK_exclam;
- case VK_INVERTED_EXCLAMATION_MARK:
- return GDK_exclamdown;
- case VK_LEFT_PARENTHESIS:
- return GDK_parenleft;
- case VK_NUMBER_SIGN:
- return GDK_numbersign;
- case VK_PLUS:
- return GDK_plus;
- case VK_RIGHT_PARENTHESIS:
- return GDK_parenright;
- case VK_UNDERSCORE:
- return GDK_underscore;
- /*
- case VK_FINAL:
- case VK_CONVERT:
- case VK_NONCONVERT:
- case VK_ACCEPT:
- */
- case VK_MODECHANGE:
- return GDK_Mode_switch;
- /*
- case VK_KANA:
- */
- case VK_KANJI:
- return GDK_Kanji;
- /*
- case VK_ALPHANUMERIC:
- */
- case VK_KATAKANA:
- return GDK_Katakana;
- case VK_HIRAGANA:
- return GDK_Hiragana;
- /*
- case VK_FULL_WIDTH:
- case VK_HALF_WIDTH:
- case VK_ROMAN_CHARACTERS:
- case VK_ALL_CANDIDATES:
- */
- case VK_PREVIOUS_CANDIDATE:
- return GDK_PreviousCandidate;
- case VK_CODE_INPUT:
- return GDK_Codeinput;
- /*
- case VK_JAPANESE_KATAKANA:
- case VK_JAPANESE_HIRAGANA:
- case VK_JAPANESE_ROMAN:
- */
- case VK_KANA_LOCK:
- return GDK_Kana_Lock;
- /*
- case VK_INPUT_METHOD_ON_OFF:
- case VK_CUT:
- case VK_COPY:
- case VK_PASTE:
- case VK_UNDO:
- case VK_AGAIN:
- case VK_FIND:
- case VK_PROPS:
- case VK_STOP:
- case VK_COMPOSE:
- case VK_ALT_GRAPH:
- */
- default:
- return GDK_VoidSymbol;
+ case 1:
+ return AWT_BUTTON1_MASK;
+ case 2:
+ return AWT_BUTTON2_MASK;
+ case 3:
+ return AWT_BUTTON3_MASK;
}
+
+ return 0;
}
+static jint
+state_to_awt_mods (guint state)
+{
+ jint result = 0;
+
+ if (state & GDK_SHIFT_MASK)
+ result |= AWT_SHIFT_DOWN_MASK;
+ if (state & GDK_CONTROL_MASK)
+ result |= AWT_CTRL_DOWN_MASK;
+ if (state & GDK_MOD1_MASK)
+ result |= AWT_ALT_DOWN_MASK;
+
+ return result;
+}
+
+static jint
+state_to_awt_mods_with_button_states (guint state)
+{
+ jint result = 0;
+
+ if (state & GDK_SHIFT_MASK)
+ result |= AWT_SHIFT_DOWN_MASK;
+ if (state & GDK_CONTROL_MASK)
+ result |= AWT_CTRL_DOWN_MASK;
+ if (state & GDK_MOD1_MASK)
+ result |= AWT_ALT_DOWN_MASK;
+ if (state & GDK_BUTTON1_MASK)
+ result |= AWT_BUTTON1_DOWN_MASK;
+ if (state & GDK_BUTTON2_MASK)
+ result |= AWT_BUTTON2_DOWN_MASK;
+ if (state & GDK_BUTTON3_MASK)
+ result |= AWT_BUTTON3_DOWN_MASK;
+
+ return result;
+}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetCursor
@@ -415,6 +190,8 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetCursor
GdkCursorType gdk_cursor_type;
GdkCursor *gdk_cursor;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
switch (type)
@@ -462,8 +239,6 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetCursor
gdk_cursor_type = GDK_LEFT_PTR;
}
- gdk_threads_enter ();
-
widget = GTK_WIDGET(ptr);
gdk_cursor = gdk_cursor_new (gdk_cursor_type);
@@ -482,11 +257,11 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetParent
GtkWidget *widget;
GtkWidget *parent_widget;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
parent_ptr = NSA_GET_PTR (env, parent);
- gdk_threads_enter ();
-
widget = GTK_WIDGET (ptr);
parent_widget = GTK_WIDGET (parent_ptr);
@@ -527,10 +302,10 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetSensitive
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
gtk_widget_set_sensitive (GTK_WIDGET (ptr), sensitive);
gdk_threads_leave ();
@@ -542,10 +317,12 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetRequestFocus
{
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
gtk_widget_grab_focus (GTK_WIDGET (ptr));
+
gdk_threads_leave ();
}
@@ -564,10 +341,10 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetDispatchKeyEvent
gint n_keys = 0;
guint lookup_keyval = 0;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
if (id == AWT_KEY_PRESSED)
event = gdk_event_new (GDK_KEY_PRESS);
else if (id == AWT_KEY_RELEASED)
@@ -617,7 +394,7 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetDispatchKeyEvent
event->key.length = 0;
event->key.string = NULL;
- lookup_keyval = awt_keycode_to_keysym (keyCode, keyLocation);
+ lookup_keyval = cp_gtk_awt_keycode_to_keysym (keyCode, keyLocation);
if (!gdk_keymap_get_entries_for_keyval (gdk_keymap_get_default (),
lookup_keyval,
@@ -679,11 +456,11 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetLocationOnScreen
void *ptr;
jint *point;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
point = (*env)->GetIntArrayElements (env, jpoint, 0);
- gdk_threads_enter ();
-
gdk_window_get_origin (GTK_WIDGET (ptr)->window, point, point+1);
if (!GTK_IS_CONTAINER (ptr))
@@ -692,9 +469,9 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetLocationOnScreen
*(point+1) += GTK_WIDGET(ptr)->allocation.y;
}
- gdk_threads_leave ();
-
(*env)->ReleaseIntArrayElements(env, jpoint, point, 0);
+
+ gdk_threads_leave ();
}
/*
@@ -708,21 +485,21 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetDimensions
jint *dims;
GtkRequisition requisition;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
dims = (*env)->GetIntArrayElements (env, jdims, 0);
dims[0] = dims[1] = 0;
- gdk_threads_enter ();
-
gtk_widget_size_request (GTK_WIDGET (ptr), &requisition);
dims[0] = requisition.width;
dims[1] = requisition.height;
- gdk_threads_leave ();
-
(*env)->ReleaseIntArrayElements (env, jdims, dims, 0);
+
+ gdk_threads_leave ();
}
/*
@@ -737,13 +514,13 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetPreferredDimensions
GtkRequisition current_req;
GtkRequisition natural_req;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
dims = (*env)->GetIntArrayElements (env, jdims, 0);
dims[0] = dims[1] = 0;
- gdk_threads_enter ();
-
/* Widgets that extend GtkWindow such as GtkFileChooserDialog may have
a default size. These values seem more useful then the natural
requisition values, particularly for GtkFileChooserDialog. */
@@ -772,9 +549,9 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetPreferredDimensions
dims[1] = natural_req.height;
}
- gdk_threads_leave ();
-
(*env)->ReleaseIntArrayElements (env, jdims, dims, 0);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -784,10 +561,10 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeBounds
GtkWidget *widget;
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
widget = GTK_WIDGET (ptr);
/* We assume that -1 is a width or height and not a request for the
@@ -819,13 +596,18 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetBackground
int *rgb;
GdkColor bg;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
bg = GTK_WIDGET (ptr)->style->bg[GTK_STATE_NORMAL];
+
gdk_threads_leave ();
array = (*env)->NewIntArray (env, 3);
+
+ gdk_threads_enter ();
+
rgb = (*env)->GetIntArrayElements (env, array, NULL);
/* convert color data from 16 bit values down to 8 bit values */
rgb[0] = bg.red >> 8;
@@ -833,6 +615,8 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetBackground
rgb[2] = bg.blue >> 8;
(*env)->ReleaseIntArrayElements (env, array, rgb, 0);
+ gdk_threads_leave ();
+
return array;
}
@@ -845,13 +629,18 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetForeground
jint *rgb;
GdkColor fg;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
fg = GTK_WIDGET (ptr)->style->fg[GTK_STATE_NORMAL];
+
gdk_threads_leave ();
array = (*env)->NewIntArray (env, 3);
+
+ gdk_threads_enter ();
+
rgb = (*env)->GetIntArrayElements (env, array, NULL);
/* convert color data from 16 bit values down to 8 bit values */
rgb[0] = fg.red >> 8;
@@ -859,6 +648,8 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetGetForeground
rgb[2] = fg.blue >> 8;
(*env)->ReleaseIntArrayElements (env, array, rgb, 0);
+ gdk_threads_leave ();
+
return array;
}
@@ -871,6 +662,8 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetBackground
GtkWidget *widget;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
normal_color.red = (red / 255.0) * 65535;
@@ -883,8 +676,6 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetBackground
active_color.green = 0.85 * (green / 255.0) * 65535;
active_color.blue = 0.85 * (blue / 255.0) * 65535;
- gdk_threads_enter ();
-
widget = find_bg_color_widget (GTK_WIDGET (ptr));
gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &normal_color);
@@ -902,14 +693,14 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetForeground
GtkWidget *widget;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
color.red = (red / 255.0) * 65535;
color.green = (green / 255.0) * 65535;
color.blue = (blue / 255.0) * 65535;
- gdk_threads_enter ();
-
widget = find_fg_color_widget (GTK_WIDGET (ptr));
gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, &color);
@@ -925,10 +716,12 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_show
{
void *ptr;
+ gdk_threads_enter();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter();
gtk_widget_show (GTK_WIDGET (ptr));
+
gdk_threads_leave();
}
@@ -938,10 +731,12 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_hide
{
void *ptr;
+ gdk_threads_enter();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter();
gtk_widget_hide (GTK_WIDGET (ptr));
+
gdk_threads_leave();
}
@@ -952,10 +747,12 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_isEnabled
void *ptr;
jboolean ret_val;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
ret_val = GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (ptr));
+
gdk_threads_leave ();
return ret_val;
@@ -968,13 +765,15 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_isRealized
void *ptr;
jboolean ret_val;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
if (ptr == NULL)
return FALSE;
- gdk_threads_enter ();
ret_val = GTK_WIDGET_REALIZED (GTK_WIDGET (ptr));
+
gdk_threads_leave ();
return ret_val;
@@ -988,8 +787,10 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_modalHasGrab
jboolean retval;
gdk_threads_enter ();
+
widget = gtk_grab_get_current ();
retval = (widget && GTK_IS_WINDOW (widget) && GTK_WINDOW (widget)->modal);
+
gdk_threads_leave ();
return retval;
@@ -1002,28 +803,44 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals
void *ptr;
jobject *gref;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
gref = NSA_GET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
+ cp_gtk_component_connect_signals (ptr, gref);
- /* Connect EVENT signal, which happens _before_ any specific signal. */
+ gdk_threads_leave ();
+}
- g_signal_connect (GTK_OBJECT (ptr), "event",
- G_CALLBACK (pre_event_handler), *gref);
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeEventMask
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
- g_signal_connect (G_OBJECT (ptr), "focus-in-event",
- G_CALLBACK (focus_in_cb), *gref);
+ gdk_threads_enter ();
- g_signal_connect (G_OBJECT (ptr), "focus-out-event",
- G_CALLBACK (focus_out_cb), *gref);
+ ptr = NSA_GET_PTR (env, obj);
- g_signal_connect_after (G_OBJECT (ptr), "realize",
- G_CALLBACK (connect_awt_hook_cb), *gref);
+ gtk_widget_add_events (GTK_WIDGET (ptr),
+ GDK_POINTER_MOTION_MASK
+ | GDK_BUTTON_MOTION_MASK
+ | GDK_BUTTON_PRESS_MASK
+ | GDK_BUTTON_RELEASE_MASK
+ | GDK_KEY_PRESS_MASK
+ | GDK_KEY_RELEASE_MASK
+ | GDK_ENTER_NOTIFY_MASK
+ | GDK_LEAVE_NOTIFY_MASK
+ | GDK_STRUCTURE_MASK
+ | GDK_KEY_PRESS_MASK
+ | GDK_FOCUS_CHANGE_MASK);
gdk_threads_leave ();
}
+/* FIXME: these functions should be implemented by overridding the
+ appropriate GtkComponentPeer methods. */
static GtkWidget *
find_fg_color_widget (GtkWidget *widget)
{
@@ -1049,30 +866,296 @@ find_bg_color_widget (GtkWidget *widget)
return bg_color_widget;
}
+void
+cp_gtk_component_connect_expose_signals (GObject *ptr, jobject *gref)
+{
+ g_signal_connect (G_OBJECT (ptr), "expose-event",
+ G_CALLBACK (component_expose_cb), *gref);
+}
+
+void
+cp_gtk_component_connect_focus_signals (GObject *ptr, jobject *gref)
+{
+ g_signal_connect (G_OBJECT (ptr), "focus-in-event",
+ G_CALLBACK (component_focus_in_cb), *gref);
+
+ g_signal_connect (G_OBJECT (ptr), "focus-out-event",
+ G_CALLBACK (component_focus_out_cb), *gref);
+}
+
+void
+cp_gtk_component_connect_mouse_signals (GObject *ptr, jobject *gref)
+{
+ g_signal_connect (G_OBJECT (ptr), "button-press-event",
+ G_CALLBACK (component_button_press_cb), *gref);
+
+ g_signal_connect (G_OBJECT (ptr), "button-release-event",
+ G_CALLBACK (component_button_release_cb), *gref);
+
+ g_signal_connect (G_OBJECT (ptr), "enter-notify-event",
+ G_CALLBACK (component_enter_notify_cb), *gref);
+
+ g_signal_connect (G_OBJECT (ptr), "leave-notify-event",
+ G_CALLBACK (component_leave_notify_cb), *gref);
+
+ g_signal_connect (G_OBJECT (ptr), "motion-notify-event",
+ G_CALLBACK (component_motion_notify_cb), *gref);
+}
+
+void
+cp_gtk_component_connect_signals (GObject *ptr, jobject *gref)
+{
+ cp_gtk_component_connect_expose_signals (ptr, gref);
+ cp_gtk_component_connect_focus_signals (ptr, gref);
+ cp_gtk_component_connect_mouse_signals (ptr, gref);
+}
+
+/* These variables are used to keep track of click counts. The AWT
+ allows more than a triple click to occur but GTK doesn't report
+ more-than-triple clicks. */
+static jint click_count = 1;
+static guint32 button_click_time = 0;
+static GdkWindow *button_window = NULL;
+static guint button_number = -1;
+static int hasBeenDragged;
+
static gboolean
-focus_in_cb (GtkWidget *widget __attribute((unused)),
- GdkEventFocus *event __attribute((unused)),
- jobject peer)
+component_button_press_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventButton *event,
+ jobject peer)
{
+ /* Ignore double and triple click events. */
+ if (event->type == GDK_2BUTTON_PRESS
+ || event->type == GDK_3BUTTON_PRESS)
+ return FALSE;
+
+ if ((event->time < (button_click_time + MULTI_CLICK_TIME))
+ && (event->window == button_window)
+ && (event->button == button_number))
+ click_count++;
+ else
+ click_count = 1;
+
+ button_click_time = event->time;
+ button_window = event->window;
+ button_number = event->button;
+
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postFocusEventID,
- AWT_FOCUS_GAINED,
- JNI_FALSE);
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postMouseEventID,
+ AWT_MOUSE_PRESSED,
+ (jlong)event->time,
+ state_to_awt_mods (event->state)
+ | button_to_awt_mods (event->button),
+ (jint)event->x,
+ (jint)event->y,
+ click_count,
+ (event->button == 3) ? JNI_TRUE :
+ JNI_FALSE);
+
gdk_threads_enter ();
+
+ hasBeenDragged = FALSE;
+
return FALSE;
}
static gboolean
-focus_out_cb (GtkWidget *widget __attribute((unused)),
- GdkEventFocus *event __attribute((unused)),
- jobject peer)
+component_button_release_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventButton *event,
+ jobject peer)
{
+ int width, height;
+
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postFocusEventID,
- AWT_FOCUS_LOST,
- JNI_FALSE);
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postMouseEventID,
+ AWT_MOUSE_RELEASED,
+ (jlong)event->time,
+ state_to_awt_mods (event->state)
+ | button_to_awt_mods (event->button),
+ (jint)event->x,
+ (jint)event->y,
+ click_count,
+ JNI_FALSE);
+
gdk_threads_enter ();
+
+ /* Generate an AWT click event only if the release occured in the
+ window it was pressed in, and the mouse has not been dragged since
+ the last time it was pressed. */
+ gdk_window_get_size (event->window, &width, &height);
+ if (! hasBeenDragged
+ && event->x >= 0
+ && event->y >= 0
+ && event->x <= width
+ && event->y <= height)
+ {
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postMouseEventID,
+ AWT_MOUSE_CLICKED,
+ (jlong)event->time,
+ state_to_awt_mods (event->state)
+ | button_to_awt_mods (event->button),
+ (jint)event->x,
+ (jint)event->y,
+ click_count,
+ JNI_FALSE);
+
+ gdk_threads_enter ();
+ }
+ return FALSE;
+}
+
+static gboolean
+component_motion_notify_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventMotion *event,
+ jobject peer)
+{
+ if (event->state & (GDK_BUTTON1_MASK
+ | GDK_BUTTON2_MASK
+ | GDK_BUTTON3_MASK
+ | GDK_BUTTON4_MASK
+ | GDK_BUTTON5_MASK))
+ {
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postMouseEventID,
+ AWT_MOUSE_DRAGGED,
+ (jlong)event->time,
+ state_to_awt_mods_with_button_states (event->state),
+ (jint)event->x,
+ (jint)event->y,
+ 0,
+ JNI_FALSE);
+
+ gdk_threads_enter ();
+
+ hasBeenDragged = TRUE;
+ }
+ else
+ {
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer, postMouseEventID,
+ AWT_MOUSE_MOVED,
+ (jlong)event->time,
+ state_to_awt_mods (event->state),
+ (jint)event->x,
+ (jint)event->y,
+ 0,
+ JNI_FALSE);
+
+ gdk_threads_enter ();
+ }
+ return FALSE;
+}
+
+static gboolean
+component_enter_notify_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventCrossing *event,
+ jobject peer)
+{
+ /* We are not interested in enter events that are due to
+ grab/ungrab and not to actually crossing boundaries */
+ if (event->mode == GDK_CROSSING_NORMAL)
+ {
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer, postMouseEventID,
+ AWT_MOUSE_ENTERED,
+ (jlong)event->time,
+ state_to_awt_mods_with_button_states (event->state),
+ (jint)event->x,
+ (jint)event->y,
+ 0,
+ JNI_FALSE);
+
+ gdk_threads_enter ();
+ }
+ return FALSE;
+}
+
+static gboolean
+component_leave_notify_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventCrossing *event,
+ jobject peer)
+{
+ /* We are not interested in leave events that are due to
+ grab/ungrab and not to actually crossing boundaries */
+ if (event->mode == GDK_CROSSING_NORMAL)
+ {
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postMouseEventID,
+ AWT_MOUSE_EXITED,
+ (jlong)event->time,
+ state_to_awt_mods_with_button_states (event->state),
+ (jint)event->x,
+ (jint)event->y,
+ 0,
+ JNI_FALSE);
+
+ gdk_threads_enter ();
+ }
+ return FALSE;
+}
+
+static gboolean
+component_expose_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventExpose *event,
+ jobject peer)
+{
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postExposeEventID,
+ (jint)event->area.x,
+ (jint)event->area.y,
+ (jint)event->area.width,
+ (jint)event->area.height);
+
+ gdk_threads_enter ();
+
+ return FALSE;
+}
+
+static gboolean
+component_focus_in_cb (GtkWidget *widget __attribute((unused)),
+ GdkEventFocus *event __attribute((unused)),
+ jobject peer)
+{
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postFocusEventID,
+ AWT_FOCUS_GAINED,
+ JNI_FALSE);
+
+ gdk_threads_enter ();
+
+ return FALSE;
+}
+
+static gboolean
+component_focus_out_cb (GtkWidget *widget __attribute((unused)),
+ GdkEventFocus *event __attribute((unused)),
+ jobject peer)
+{
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postFocusEventID,
+ AWT_FOCUS_LOST,
+ JNI_FALSE);
+
+ gdk_threads_enter ();
+
return FALSE;
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c
index 61e1af101..563a0257e 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,10 +47,10 @@ Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_create
GtkWidget *window;
GtkWidget *fixed;
- NSA_SET_GLOBAL_REF (env, obj);
-
gdk_threads_enter ();
+ NSA_SET_GLOBAL_REF (env, obj);
+
window = gtk_plug_new ((GdkNativeWindow) socket_id);
fixed = gtk_fixed_new ();
@@ -58,9 +58,9 @@ Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_create
gtk_widget_show (fixed);
- gdk_threads_leave ();
-
NSA_SET_PTR (env, obj, window);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -69,10 +69,10 @@ Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_construct
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
if (GTK_WIDGET_REALIZED (GTK_WIDGET (ptr)))
g_printerr ("ERROR: GtkPlug is already realized\n");
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
deleted file mode 100644
index 8d3dda93a..000000000
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
+++ /dev/null
@@ -1,1176 +0,0 @@
-/* gtkevents.c -- GDK/GTK event handlers
- Copyright (C) 1998, 1999, 2002, 2004 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-#include "gtkpeer.h"
-#include <X11/Xlib.h>
-#include <gdk/gdkkeysyms.h>
-#include <stdarg.h>
-#include <assert.h>
-
-/* A widget can be composed of multipled windows, so we need to hook
- events on all of them. */
-struct event_hook_info
-{
- jobject *peer_obj;
- int nwindows;
- /* array of pointers to (GdkWindow *) */
- GdkWindow ***windows;
-};
-
-static jint
-button_to_awt_mods (int button)
-{
- switch (button)
- {
- case 1:
- return AWT_BUTTON1_MASK;
- case 2:
- return AWT_BUTTON2_MASK;
- case 3:
- return AWT_BUTTON3_MASK;
- }
-
- return 0;
-}
-
-static jint
-state_to_awt_mods (guint state)
-{
- jint result = 0;
-
- if (state & GDK_SHIFT_MASK)
- result |= AWT_SHIFT_DOWN_MASK;
- if (state & GDK_CONTROL_MASK)
- result |= AWT_CTRL_DOWN_MASK;
- if (state & GDK_MOD1_MASK)
- result |= AWT_ALT_DOWN_MASK;
-
- return result;
-}
-
-static jint
-state_to_awt_mods_with_button_states (guint state)
-{
- jint result = 0;
-
- if (state & GDK_SHIFT_MASK)
- result |= AWT_SHIFT_DOWN_MASK;
- if (state & GDK_CONTROL_MASK)
- result |= AWT_CTRL_DOWN_MASK;
- if (state & GDK_MOD1_MASK)
- result |= AWT_ALT_DOWN_MASK;
- if (state & GDK_BUTTON1_MASK)
- result |= AWT_BUTTON1_DOWN_MASK;
- if (state & GDK_BUTTON2_MASK)
- result |= AWT_BUTTON2_DOWN_MASK;
- if (state & GDK_BUTTON3_MASK)
- result |= AWT_BUTTON3_DOWN_MASK;
-
- return result;
-}
-
-/* Modifier key events need special treatment. In Sun's peer
- implementation, when a modifier key is pressed, the KEY_PRESSED
- event has that modifier in its modifiers list. The corresponding
- KEY_RELEASED event's modifier list does not contain the modifier.
- For example, pressing and releasing the shift key will produce a
- key press event with modifiers=Shift, and a key release event with
- no modifiers. GDK's key events behave in the exact opposite way,
- so this translation code is needed. */
-jint
-keyevent_state_to_awt_mods (GdkEvent *event)
-{
- jint result = 0;
- guint state;
-
- if (event->type == GDK_KEY_PRESS)
- {
- state = event->key.state;
-
- if (event->key.keyval == GDK_Shift_L
- || event->key.keyval == GDK_Shift_R)
- result |= AWT_SHIFT_DOWN_MASK;
- else
- {
- if (state & GDK_SHIFT_MASK)
- result |= AWT_SHIFT_DOWN_MASK;
- }
-
- if (event->key.keyval == GDK_Control_L
- || event->key.keyval == GDK_Control_R)
- result |= AWT_CTRL_DOWN_MASK;
- else
- {
- if (state & GDK_CONTROL_MASK)
- result |= AWT_CTRL_DOWN_MASK;
- }
-
- if (event->key.keyval == GDK_Alt_L
- || event->key.keyval == GDK_Alt_R)
- result |= AWT_ALT_DOWN_MASK;
- else
- {
- if (state & GDK_MOD1_MASK)
- result |= AWT_ALT_DOWN_MASK;
- }
- }
- else if (event->type == GDK_KEY_RELEASE)
- {
- state = event->key.state;
-
- if (event->key.keyval != GDK_Shift_L
- && event->key.keyval != GDK_Shift_R)
- {
- if (state & GDK_SHIFT_MASK)
- result |= AWT_SHIFT_DOWN_MASK;
- }
- if (event->key.keyval != GDK_Control_L
- && event->key.keyval != GDK_Control_R)
- {
- if (state & GDK_CONTROL_MASK)
- result |= AWT_CTRL_DOWN_MASK;
- }
-
- if (event->key.keyval != GDK_Alt_L
- && event->key.keyval != GDK_Alt_R)
- {
- if (state & GDK_MOD1_MASK)
- result |= AWT_ALT_DOWN_MASK;
- }
- }
-
- return result;
-}
-
-/* Get the first keyval in the keymap for this event's keycode. The
- first keyval corresponds roughly to Java's notion of a virtual
- key. Returns the uppercase version of the first keyval. */
-static guint
-get_first_keyval_from_keymap (GdkEvent *event)
-{
- guint keyval;
- guint *keyvals;
- gint n_entries;
-
- if (!gdk_keymap_get_entries_for_keycode (NULL,
- event->key.hardware_keycode,
- NULL,
- &keyvals,
- &n_entries))
- {
- g_warning ("No keyval found for hardware keycode %d\n",
- event->key.hardware_keycode);
- /* Try to recover by using the keyval in the event structure. */
- keyvals = &(event->key.keyval);
- }
- keyval = keyvals[0];
- g_free (keyvals);
-
- return gdk_keyval_to_upper (keyval);
-}
-
-#ifdef __GNUC__
-__inline
-#endif
-static jint
-keysym_to_awt_keycode (GdkEvent *event)
-{
- guint ukeyval;
- guint state;
-
- ukeyval = get_first_keyval_from_keymap (event);
- state = event->key.state;
-
- /* VK_A through VK_Z */
- if (ukeyval >= GDK_A && ukeyval <= GDK_Z)
- return ukeyval;
-
- /* VK_0 through VK_9 */
- if (ukeyval >= GDK_0 && ukeyval <= GDK_9)
- return ukeyval;
-
- switch (ukeyval)
- {
- case GDK_Return:
- case GDK_KP_Enter:
- return VK_ENTER;
- case GDK_BackSpace:
- return VK_BACK_SPACE;
- case GDK_Tab:
- return VK_TAB;
- case GDK_Cancel:
- return VK_CANCEL;
- case GDK_Clear:
- return VK_CLEAR;
- case GDK_Shift_L:
- case GDK_Shift_R:
- return VK_SHIFT;
- case GDK_Control_L:
- case GDK_Control_R:
- return VK_CONTROL;
- case GDK_Alt_L:
- case GDK_Alt_R:
- return VK_ALT;
- case GDK_Pause:
- return VK_PAUSE;
- case GDK_Caps_Lock:
- return VK_CAPS_LOCK;
- case GDK_Escape:
- return VK_ESCAPE;
- case GDK_space:
- return VK_SPACE;
- case GDK_KP_Page_Up:
- /* For keys on the numeric keypad, the JVM produces one of two
- virtual keys, depending on the num lock state. */
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD9;
- else
- return VK_PAGE_UP;
- case GDK_Page_Up:
- return VK_PAGE_UP;
- case GDK_KP_Page_Down:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD3;
- else
- return VK_PAGE_DOWN;
- case GDK_Page_Down:
- return VK_PAGE_DOWN;
- case GDK_KP_End:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD1;
- else
- return VK_END;
- case GDK_End:
- return VK_END;
- case GDK_KP_Home:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD7;
- else
- return VK_HOME;
- case GDK_Home:
- return VK_HOME;
- case GDK_KP_Begin:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD5;
- else
- return VK_UNDEFINED;
- case GDK_Left:
- return VK_LEFT;
- case GDK_Up:
- return VK_UP;
- case GDK_Right:
- return VK_RIGHT;
- case GDK_Down:
- return VK_DOWN;
- case GDK_comma:
- return VK_COMMA;
- case GDK_minus:
- return VK_MINUS;
- case GDK_period:
- return VK_PERIOD;
- case GDK_slash:
- return VK_SLASH;
- /*
- return VK_0;
- return VK_1;
- return VK_2;
- return VK_3;
- return VK_4;
- return VK_5;
- return VK_6;
- return VK_7;
- return VK_8;
- return VK_9;
- */
- case GDK_semicolon:
- return VK_SEMICOLON;
- case GDK_equal:
- return VK_EQUALS;
- /*
- return VK_A;
- return VK_B;
- return VK_C;
- return VK_D;
- return VK_E;
- return VK_F;
- return VK_G;
- return VK_H;
- return VK_I;
- return VK_J;
- return VK_K;
- return VK_L;
- return VK_M;
- return VK_N;
- return VK_O;
- return VK_P;
- return VK_Q;
- return VK_R;
- return VK_S;
- return VK_T;
- return VK_U;
- return VK_V;
- return VK_W;
- return VK_X;
- return VK_Y;
- return VK_Z;
- */
- case GDK_bracketleft:
- return VK_OPEN_BRACKET;
- case GDK_backslash:
- return VK_BACK_SLASH;
- case GDK_bracketright:
- return VK_CLOSE_BRACKET;
- case GDK_KP_0:
- return VK_NUMPAD0;
- case GDK_KP_1:
- return VK_NUMPAD1;
- case GDK_KP_2:
- return VK_NUMPAD2;
- case GDK_KP_3:
- return VK_NUMPAD3;
- case GDK_KP_4:
- return VK_NUMPAD4;
- case GDK_KP_5:
- return VK_NUMPAD5;
- case GDK_KP_6:
- return VK_NUMPAD6;
- case GDK_KP_7:
- return VK_NUMPAD7;
- case GDK_KP_8:
- return VK_NUMPAD8;
- case GDK_KP_9:
- return VK_NUMPAD9;
- case GDK_KP_Multiply:
- return VK_MULTIPLY;
- case GDK_KP_Add:
- return VK_ADD;
- /*
- return VK_SEPARATER;
- */
- case GDK_KP_Separator:
- return VK_SEPARATOR;
- case GDK_KP_Subtract:
- return VK_SUBTRACT;
- case GDK_KP_Decimal:
- return VK_DECIMAL;
- case GDK_KP_Divide:
- return VK_DIVIDE;
- case GDK_KP_Delete:
- if (state & GDK_MOD2_MASK)
- return VK_DECIMAL;
- else
- return VK_DELETE;
- case GDK_Delete:
- return VK_DELETE;
- case GDK_Num_Lock:
- return VK_NUM_LOCK;
- case GDK_Scroll_Lock:
- return VK_SCROLL_LOCK;
- case GDK_F1:
- return VK_F1;
- case GDK_F2:
- return VK_F2;
- case GDK_F3:
- return VK_F3;
- case GDK_F4:
- return VK_F4;
- case GDK_F5:
- return VK_F5;
- case GDK_F6:
- return VK_F6;
- case GDK_F7:
- return VK_F7;
- case GDK_F8:
- return VK_F8;
- case GDK_F9:
- return VK_F9;
- case GDK_F10:
- return VK_F10;
- case GDK_F11:
- return VK_F11;
- case GDK_F12:
- return VK_F12;
- case GDK_F13:
- return VK_F13;
- case GDK_F14:
- return VK_F14;
- case GDK_F15:
- return VK_F15;
- case GDK_F16:
- return VK_F16;
- case GDK_F17:
- return VK_F17;
- case GDK_F18:
- return VK_F18;
- case GDK_F19:
- return VK_F19;
- case GDK_F20:
- return VK_F20;
- case GDK_F21:
- return VK_F21;
- case GDK_F22:
- return VK_F22;
- case GDK_F23:
- return VK_F23;
- case GDK_F24:
- return VK_F24;
- case GDK_Print:
- return VK_PRINTSCREEN;
- case GDK_KP_Insert:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD0;
- else
- return VK_INSERT;
- case GDK_Insert:
- return VK_INSERT;
- case GDK_Help:
- return VK_HELP;
- case GDK_Meta_L:
- case GDK_Meta_R:
- return VK_META;
- case GDK_grave:
- return VK_BACK_QUOTE;
- case GDK_apostrophe:
- return VK_QUOTE;
- case GDK_KP_Up:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD8;
- else
- return VK_KP_UP;
- case GDK_KP_Down:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD2;
- else
- return VK_KP_DOWN;
- case GDK_KP_Left:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD4;
- else
- return VK_KP_LEFT;
- case GDK_KP_Right:
- if (state & GDK_MOD2_MASK)
- return VK_NUMPAD6;
- else
- return VK_KP_RIGHT;
- case GDK_dead_grave:
- return VK_DEAD_GRAVE;
- case GDK_dead_acute:
- return VK_DEAD_ACUTE;
- case GDK_dead_circumflex:
- return VK_DEAD_CIRCUMFLEX;
- case GDK_dead_tilde:
- return VK_DEAD_TILDE;
- case GDK_dead_macron:
- return VK_DEAD_MACRON;
- case GDK_dead_breve:
- return VK_DEAD_BREVE;
- case GDK_dead_abovedot:
- return VK_DEAD_ABOVEDOT;
- case GDK_dead_diaeresis:
- return VK_DEAD_DIAERESIS;
- case GDK_dead_abovering:
- return VK_DEAD_ABOVERING;
- case GDK_dead_doubleacute:
- return VK_DEAD_DOUBLEACUTE;
- case GDK_dead_caron:
- return VK_DEAD_CARON;
- case GDK_dead_cedilla:
- return VK_DEAD_CEDILLA;
- case GDK_dead_ogonek:
- return VK_DEAD_OGONEK;
- case GDK_dead_iota:
- return VK_DEAD_IOTA;
- case GDK_dead_voiced_sound:
- return VK_DEAD_VOICED_SOUND;
- case GDK_dead_semivoiced_sound:
- return VK_DEAD_SEMIVOICED_SOUND;
- case GDK_ampersand:
- return VK_AMPERSAND;
- case GDK_asterisk:
- return VK_ASTERISK;
- case GDK_quotedbl:
- return VK_QUOTEDBL;
- case GDK_less:
- return VK_LESS;
- case GDK_greater:
- return VK_GREATER;
- case GDK_braceleft:
- return VK_BRACELEFT;
- case GDK_braceright:
- return VK_BRACERIGHT;
- case GDK_at:
- return VK_AT;
- case GDK_colon:
- return VK_COLON;
- case GDK_asciicircum:
- return VK_CIRCUMFLEX;
- case GDK_dollar:
- return VK_DOLLAR;
- case GDK_EuroSign:
- return VK_EURO_SIGN;
- case GDK_exclam:
- return VK_EXCLAMATION_MARK;
- case GDK_exclamdown:
- return VK_INVERTED_EXCLAMATION_MARK;
- case GDK_parenleft:
- return VK_LEFT_PARENTHESIS;
- case GDK_numbersign:
- return VK_NUMBER_SIGN;
- case GDK_plus:
- return VK_PLUS;
- case GDK_parenright:
- return VK_RIGHT_PARENTHESIS;
- case GDK_underscore:
- return VK_UNDERSCORE;
- /*
- return VK_FINAL;
- return VK_CONVERT;
- return VK_NONCONVERT;
- return VK_ACCEPT;
- */
- case GDK_Mode_switch:
- return VK_MODECHANGE;
- /*
- return VK_KANA;
- */
- case GDK_Kanji:
- return VK_KANJI;
- /*
- return VK_ALPHANUMERIC;
- */
- case GDK_Katakana:
- return VK_KATAKANA;
- case GDK_Hiragana:
- return VK_HIRAGANA;
- /*
- return VK_FULL_WIDTH;
- return VK_HALF_WIDTH;
- return VK_ROMAN_CHARACTERS;
- return VK_ALL_CANDIDATES;
- */
- case GDK_PreviousCandidate:
- return VK_PREVIOUS_CANDIDATE;
- case GDK_Codeinput:
- return VK_CODE_INPUT;
- /*
- return VK_JAPANESE_KATAKANA;
- return VK_JAPANESE_HIRAGANA;
- return VK_JAPANESE_ROMAN;
- */
- case GDK_Kana_Lock:
- return VK_KANA_LOCK;
- /*
- return VK_INPUT_METHOD_ON_OFF;
- return VK_CUT;
- return VK_COPY;
- return VK_PASTE;
- return VK_UNDO;
- return VK_AGAIN;
- return VK_FIND;
- return VK_PROPS;
- return VK_STOP;
- return VK_COMPOSE;
- return VK_ALT_GRAPH;
- */
- default:
- return VK_UNDEFINED;
- }
-}
-
-static jint
-keysym_to_awt_keylocation (GdkEvent *event)
-{
- guint ukeyval;
-
- ukeyval = get_first_keyval_from_keymap (event);
-
- /* VK_A through VK_Z */
- if (ukeyval >= GDK_A && ukeyval <= GDK_Z)
- return AWT_KEY_LOCATION_STANDARD;
-
- /* VK_0 through VK_9 */
- if (ukeyval >= GDK_0 && ukeyval <= GDK_9)
- return AWT_KEY_LOCATION_STANDARD;
-
- switch (ukeyval)
- {
- case GDK_Shift_L:
- case GDK_Control_L:
- case GDK_Alt_L:
- case GDK_Meta_L:
- return AWT_KEY_LOCATION_LEFT;
-
- case GDK_Shift_R:
- case GDK_Control_R:
- case GDK_Alt_R:
- case GDK_Meta_R:
- return AWT_KEY_LOCATION_RIGHT;
-
- case GDK_Return:
- case GDK_BackSpace:
- case GDK_Tab:
- case GDK_Cancel:
- case GDK_Clear:
- case GDK_Pause:
- case GDK_Caps_Lock:
- case GDK_Escape:
- case GDK_space:
- case GDK_Page_Up:
- case GDK_Page_Down:
- case GDK_End:
- case GDK_Home:
- case GDK_Left:
- case GDK_Up:
- case GDK_Right:
- case GDK_Down:
- case GDK_comma:
- case GDK_minus:
- case GDK_period:
- case GDK_slash:
- case GDK_semicolon:
- case GDK_equal:
- case GDK_bracketleft:
- case GDK_backslash:
- case GDK_bracketright:
- case GDK_Delete:
- case GDK_Scroll_Lock:
- case GDK_F1:
- case GDK_F2:
- case GDK_F3:
- case GDK_F4:
- case GDK_F5:
- case GDK_F6:
- case GDK_F7:
- case GDK_F8:
- case GDK_F9:
- case GDK_F10:
- case GDK_F11:
- case GDK_F12:
- case GDK_F13:
- case GDK_F14:
- case GDK_F15:
- case GDK_F16:
- case GDK_F17:
- case GDK_F18:
- case GDK_F19:
- case GDK_F20:
- case GDK_F21:
- case GDK_F22:
- case GDK_F23:
- case GDK_F24:
- case GDK_Print:
- case GDK_Insert:
- case GDK_Help:
- case GDK_grave:
- case GDK_apostrophe:
- case GDK_dead_grave:
- case GDK_dead_acute:
- case GDK_dead_circumflex:
- case GDK_dead_tilde:
- case GDK_dead_macron:
- case GDK_dead_breve:
- case GDK_dead_abovedot:
- case GDK_dead_diaeresis:
- case GDK_dead_abovering:
- case GDK_dead_doubleacute:
- case GDK_dead_caron:
- case GDK_dead_cedilla:
- case GDK_dead_ogonek:
- case GDK_dead_iota:
- case GDK_dead_voiced_sound:
- case GDK_dead_semivoiced_sound:
- case GDK_ampersand:
- case GDK_asterisk:
- case GDK_quotedbl:
- case GDK_less:
- case GDK_greater:
- case GDK_braceleft:
- case GDK_braceright:
- case GDK_at:
- case GDK_colon:
- case GDK_asciicircum:
- case GDK_dollar:
- case GDK_EuroSign:
- case GDK_exclam:
- case GDK_exclamdown:
- case GDK_parenleft:
- case GDK_numbersign:
- case GDK_plus:
- case GDK_parenright:
- case GDK_underscore:
- case GDK_Mode_switch:
- case GDK_Kanji:
- case GDK_Katakana:
- case GDK_Hiragana:
- case GDK_PreviousCandidate:
- case GDK_Codeinput:
- case GDK_Kana_Lock:
- return AWT_KEY_LOCATION_STANDARD;
-
- case GDK_KP_Enter:
- case GDK_KP_Page_Up:
- case GDK_KP_Page_Down:
- case GDK_KP_End:
- case GDK_KP_Home:
- case GDK_KP_Begin:
- case GDK_KP_0:
- case GDK_KP_1:
- case GDK_KP_2:
- case GDK_KP_3:
- case GDK_KP_4:
- case GDK_KP_5:
- case GDK_KP_6:
- case GDK_KP_7:
- case GDK_KP_8:
- case GDK_KP_9:
- case GDK_KP_Multiply:
- case GDK_KP_Add:
- case GDK_KP_Separator:
- case GDK_KP_Subtract:
- case GDK_KP_Decimal:
- case GDK_KP_Divide:
- case GDK_KP_Delete:
- case GDK_Num_Lock:
- case GDK_KP_Insert:
- case GDK_KP_Up:
- case GDK_KP_Down:
- case GDK_KP_Left:
- case GDK_KP_Right:
- return AWT_KEY_LOCATION_NUMPAD;
-
- default:
- return AWT_KEY_LOCATION_UNKNOWN;
- }
-}
-
-static jchar
-keyevent_to_awt_keychar (GdkEvent *event)
-{
- if (event->key.length > 0)
- {
- /* Translate GDK carriage return to Java linefeed. */
- if (event->key.string[0] == 13)
- return VK_ENTER;
- else
- return event->key.string[0];
- }
- else
- {
- switch (event->key.keyval)
- {
- case GDK_BackSpace:
- return VK_BACK_SPACE;
- case GDK_Tab:
- return VK_TAB;
- case GDK_Delete:
- case GDK_KP_Delete:
- return VK_DELETE;
- default:
- return AWT_KEY_CHAR_UNDEFINED;
- }
- }
-}
-
-void
-awt_event_handler (GdkEvent *event)
-{
- /* keep synthetic AWT events from being processed recursively */
- if (event->type & SYNTHETIC_EVENT_MASK && event->type != GDK_NOTHING)
- {
- event->type ^= SYNTHETIC_EVENT_MASK;
- }
-
- gtk_main_do_event (event);
-}
-
-gboolean
-pre_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer)
-{
- GtkWidget *event_widget;
- static guint32 button_click_time = 0;
- static GdkWindow *button_window = NULL;
- static guint button_number = -1;
- static jint click_count = 1;
- static int hasBeenDragged;
- union widget_union w;
-
- /* If it is not a focus change event, the widget must be realized already.
- If not, ignore the event (Gtk+ will do the same). */
- if (!(event->type == GDK_FOCUS_CHANGE || GTK_WIDGET_REALIZED(widget)))
- return FALSE;
-
- /* Do not handle propagated events. AWT has its own propagation rules */
- w.widget = &event_widget;
- gdk_window_get_user_data (event->any.window, w.void_widget);
- if (event_widget != widget)
- return FALSE;
-
- /* We only care about input events */
- if (!(event->type == GDK_BUTTON_PRESS
- || event->type == GDK_BUTTON_RELEASE
- || event->type == GDK_ENTER_NOTIFY
- || event->type == GDK_LEAVE_NOTIFY
- || event->type == GDK_CONFIGURE
- || event->type == GDK_EXPOSE
- || event->type == GDK_KEY_PRESS
- || event->type == GDK_KEY_RELEASE
- || event->type == GDK_FOCUS_CHANGE
- || event->type == GDK_MOTION_NOTIFY))
- {
- return FALSE;
- }
- /* g_print("event %u widget %s peer %p\n",
- event->type, gtk_widget_get_name (widget), peer); */
-
- /* If it has no jobject associated we can send no AWT event */
- if (!peer)
- return FALSE;
-
- /* for all input events, which have a window with a jobject attached,
- send the AWT input event corresponding to the Gtk event off to Java */
-
- /* keep track of clickCount ourselves, since the AWT allows more
- than a triple click to occur */
- if (event->type == GDK_BUTTON_PRESS)
- {
- if ((event->button.time < (button_click_time + MULTI_CLICK_TIME))
- && (event->button.window == button_window)
- && (event->button.button == button_number))
- click_count++;
- else
- click_count = 1;
-
- button_click_time = event->button.time;
- button_window = event->button.window;
- button_number = event->button.button;
- }
-
- switch (event->type)
- {
- case GDK_BUTTON_PRESS:
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postMouseEventID,
- AWT_MOUSE_PRESSED,
- (jlong)event->button.time,
- state_to_awt_mods (event->button.state)
- | button_to_awt_mods (event->button.button),
- (jint)event->button.x,
- (jint)event->button.y,
- click_count,
- (event->button.button == 3) ? JNI_TRUE :
- JNI_FALSE);
- gdk_threads_enter ();
- hasBeenDragged = FALSE;
- break;
- case GDK_BUTTON_RELEASE:
- {
- int width, height;
-
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postMouseEventID,
- AWT_MOUSE_RELEASED,
- (jlong)event->button.time,
- state_to_awt_mods (event->button.state)
- | button_to_awt_mods (event->button.button),
- (jint)event->button.x,
- (jint)event->button.y,
- click_count,
- JNI_FALSE);
- gdk_threads_enter ();
-
- /* Generate an AWT click event only if the release occured in the
- window it was pressed in, and the mouse has not been dragged since
- the last time it was pressed. */
- gdk_window_get_size (event->any.window, &width, &height);
- if (! hasBeenDragged
- && event->button.x >= 0
- && event->button.y >= 0
- && event->button.x <= width
- && event->button.y <= height)
- {
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postMouseEventID,
- AWT_MOUSE_CLICKED,
- (jlong)event->button.time,
- state_to_awt_mods (event->button.state)
- | button_to_awt_mods (event->button.button),
- (jint)event->button.x,
- (jint)event->button.y,
- click_count,
- JNI_FALSE);
- gdk_threads_enter ();
- }
- }
- break;
- case GDK_MOTION_NOTIFY:
- if (event->motion.state & (GDK_BUTTON1_MASK
- | GDK_BUTTON2_MASK
- | GDK_BUTTON3_MASK
- | GDK_BUTTON4_MASK
- | GDK_BUTTON5_MASK))
- {
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postMouseEventID,
- AWT_MOUSE_DRAGGED,
- (jlong)event->motion.time,
- state_to_awt_mods_with_button_states (event->motion.state),
- (jint)event->motion.x,
- (jint)event->motion.y,
- 0,
- JNI_FALSE);
- gdk_threads_enter ();
- hasBeenDragged = TRUE;
- }
- else
- {
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer, postMouseEventID,
- AWT_MOUSE_MOVED,
- (jlong)event->motion.time,
- state_to_awt_mods (event->motion.state),
- (jint)event->motion.x,
- (jint)event->motion.y,
- 0,
- JNI_FALSE);
- gdk_threads_enter ();
- }
-
- break;
- case GDK_ENTER_NOTIFY:
- /* We are not interested in enter events that are due to
- grab/ungrab and not to actually crossing boundaries */
- if (event->crossing.mode == GDK_CROSSING_NORMAL)
- {
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer, postMouseEventID,
- AWT_MOUSE_ENTERED,
- (jlong)event->crossing.time,
- state_to_awt_mods_with_button_states (event->crossing.state),
- (jint)event->crossing.x,
- (jint)event->crossing.y,
- 0,
- JNI_FALSE);
- gdk_threads_enter ();
- }
- break;
- case GDK_LEAVE_NOTIFY:
- /* We are not interested in leave events that are due to
- grab/ungrab and not to actually crossing boundaries */
- if (event->crossing.mode == GDK_CROSSING_NORMAL)
- {
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postMouseEventID,
- AWT_MOUSE_EXITED,
- (jlong)event->crossing.time,
- state_to_awt_mods_with_button_states (event->crossing.state),
- (jint)event->crossing.x,
- (jint)event->crossing.y,
- 0,
- JNI_FALSE);
- gdk_threads_enter ();
- }
- break;
- case GDK_CONFIGURE:
- {
- /* Only send configure events to visible top-level windows. */
- if (widget && GTK_WIDGET_TOPLEVEL (widget)
- && GTK_WIDGET_VISIBLE (widget))
- {
- /* Configure events are not posted to the AWT event
- queue, and as such, the gdk/gtk peer functions will
- be called back before postConfigureEvent
- returns. */
- gdk_threads_leave ();
-
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postConfigureEventID,
- (jint) event->configure.x,
- (jint) event->configure.y,
- (jint) event->configure.width,
- (jint) event->configure.height);
- gdk_threads_enter ();
- }
- }
- break;
- case GDK_EXPOSE:
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postExposeEventID,
- (jint)event->expose.area.x,
- (jint)event->expose.area.y,
- (jint)event->expose.area.width,
- (jint)event->expose.area.height);
- gdk_threads_enter ();
- break;
-
- case GDK_FOCUS_CHANGE:
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postFocusEventID,
- (jint) (event->focus_change.in) ?
- AWT_FOCUS_GAINED : AWT_FOCUS_LOST,
- JNI_FALSE);
- gdk_threads_enter ();
- break;
- case GDK_KEY_PRESS:
- if (GTK_IS_WINDOW (widget))
- {
- /* GdkEventKey *keyevent = (GdkEventKey *) event; */
- /* g_printerr ("key press event: sent: %d time: %d state: %d keyval: %d length: %d string: %s hardware_keycode: %d group: %d\n", keyevent->send_event, keyevent->time, keyevent->state, keyevent->keyval, keyevent->length, keyevent->string, keyevent->hardware_keycode, keyevent->group); */
-
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postKeyEventID,
- (jint) AWT_KEY_PRESSED,
- (jlong) event->key.time,
- keyevent_state_to_awt_mods (event),
- keysym_to_awt_keycode (event),
- keyevent_to_awt_keychar (event),
- keysym_to_awt_keylocation (event));
- gdk_threads_enter ();
- /* FIXME: generation of key typed events needs to be moved
- to GtkComponentPeer.postKeyEvent. If the key in a key
- press event is not an "action" key
- (KeyEvent.isActionKey) and is not a modifier key, then
- it should generate a key typed event. */
- return TRUE;
- }
- else
- return FALSE;
- break;
- case GDK_KEY_RELEASE:
- if (GTK_IS_WINDOW (widget))
- {
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postKeyEventID,
- (jint) AWT_KEY_RELEASED,
- (jlong) event->key.time,
- keyevent_state_to_awt_mods (event),
- keysym_to_awt_keycode (event),
- keyevent_to_awt_keychar (event),
- keysym_to_awt_keylocation (event));
- gdk_threads_enter ();
- return TRUE;
- }
- else
- return FALSE;
- break;
- default:
- break;
- }
-
- return FALSE;
-}
-
-static void
-attach_jobject (GdkWindow *window, jobject *obj)
-{
- GdkAtom addr_atom = gdk_atom_intern ("_GNU_GTKAWT_ADDR", FALSE);
- GdkAtom type_atom = gdk_atom_intern ("CARDINAL", FALSE);
-
- gdk_window_set_events (window,
- gdk_window_get_events (window)
- | GDK_POINTER_MOTION_MASK
- | GDK_BUTTON_MOTION_MASK
- | GDK_BUTTON_PRESS_MASK
- | GDK_BUTTON_RELEASE_MASK
- | GDK_KEY_PRESS_MASK
- | GDK_KEY_RELEASE_MASK
- | GDK_ENTER_NOTIFY_MASK
- | GDK_LEAVE_NOTIFY_MASK
- | GDK_STRUCTURE_MASK
- | GDK_KEY_PRESS_MASK
- | GDK_FOCUS_CHANGE_MASK);
-
- gdk_property_change (window,
- addr_atom,
- type_atom,
- 8,
- GDK_PROP_MODE_REPLACE,
- (guchar *)obj,
- sizeof (jobject));
-}
-
-void
-connect_awt_hook (JNIEnv *env, jobject peer_obj, int nwindows, ...)
-{
- va_list ap;
- jobject *obj;
-
- obj = NSA_GET_GLOBAL_REF (env, peer_obj);
- g_assert (obj);
-
- va_start (ap, nwindows);
- {
- int i;
- for (i = 0; i < nwindows; i++)
- {
- GdkWindow* attach = (va_arg (ap, GdkWindow *));
- attach_jobject(attach, obj);
- }
- }
- va_end (ap);
-}
-
-/*
- * Attach a Java object that is backed by widget. This callback is
- * called after the widget's window has been realized. That way, we
- * can be sure that widget->window is non-NULL, and so can have data
- * connected to it.
- */
-void connect_awt_hook_cb (GtkWidget *widget __attribute__((unused)),
- jobject peer)
-{
- void *ptr;
-
- ptr = NSA_GET_PTR (gdk_env(), peer);
-
- connect_awt_hook (gdk_env(), peer, 1, GTK_WIDGET (ptr)->window);
-
- gdk_threads_leave ();
-
- (*gdk_env())->CallVoidMethod (gdk_env(), peer, setCursorID);
-
- gdk_threads_enter ();
-}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
index 791916174..48478d3b9 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,9 +40,9 @@ exception statement from your version. */
#include "gnu_java_awt_peer_gtk_GtkComponentPeer.h"
#include "gnu_java_awt_peer_gtk_GtkFileDialogPeer.h"
-static void handle_response (GtkDialog *dialog,
- gint responseId,
- jobject peer_obj);
+static void handle_response_cb (GtkDialog *dialog,
+ gint responseId,
+ jobject peer_obj);
/*
* Make a new file selection dialog
@@ -55,13 +55,13 @@ Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_create
void *parentp;
gpointer widget;
+ gdk_threads_enter ();
+
/* Create global reference and save it for future use */
NSA_SET_GLOBAL_REF (env, obj);
parentp = NSA_GET_PTR(env, parent);
- gdk_threads_enter ();
-
/* FIXME: we should be using the default gnome-vfs backend but it is
not currently thread-safe. See:
http://bugzilla.gnome.org/show_bug.cgi?id=166852 */
@@ -79,31 +79,34 @@ Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_create
/* We must add this window to the group so input in the others are
disable while it is being shown */
- gtk_window_group_add_window (global_gtk_window_group, GTK_WINDOW (widget));
-
- gdk_threads_leave ();
+ gtk_window_group_add_window (cp_gtk_global_window_group,
+ GTK_WINDOW (widget));
NSA_SET_PTR (env, obj, widget);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_connectSignals
(JNIEnv *env, jobject obj)
{
- void *ptr = NSA_GET_PTR (env, obj);
- jobject *gref = NSA_GET_GLOBAL_REF (env, obj);
- g_assert (gref);
+ void *ptr = NULL;
+ jobject *gref = NULL;
gdk_threads_enter ();
- g_signal_connect (G_OBJECT (GTK_DIALOG (ptr)),
- "response",
- GTK_SIGNAL_FUNC (handle_response), *gref);
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
- gdk_threads_leave ();
+ /* FileDialog signals */
+ g_signal_connect (G_OBJECT (ptr), "response",
+ G_CALLBACK (handle_response_cb), *gref);
+
+ /* Component signals */
+ cp_gtk_component_connect_signals (G_OBJECT (ptr), gref);
- /* Connect the superclass signals. */
- Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj);
+ gdk_threads_leave ();
}
JNIEXPORT jstring JNICALL
@@ -113,10 +116,10 @@ Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeGetDirectory
void *ptr;
const char *str;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
str = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER(ptr));
gdk_threads_leave ();
@@ -137,14 +140,16 @@ static gboolean filenameFilterCallback (const GtkFileFilterInfo *filter_info,
jstring *filename;
gboolean accepted;
- cx = (*gdk_env())->GetObjectClass (gdk_env(), (jobject) obj);
- id = (*gdk_env())->GetMethodID (gdk_env(), cx, "filenameFilterCallback",
+ cx = (*cp_gtk_gdk_env())->GetObjectClass (cp_gtk_gdk_env(), (jobject) obj);
+ id = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), cx, "filenameFilterCallback",
"(Ljava/lang/String;)Z");
- filename = (*gdk_env())->NewStringUTF(gdk_env(), filter_info->filename);
+ filename = (*cp_gtk_gdk_env())->NewStringUTF(cp_gtk_gdk_env(), filter_info->filename);
gdk_threads_leave();
- accepted = (*gdk_env())->CallBooleanMethod(gdk_env(), obj, id, filename);
+
+ accepted = (*cp_gtk_gdk_env())->CallBooleanMethod(cp_gtk_gdk_env(), obj, id, filename);
+
gdk_threads_enter();
return accepted;
@@ -157,10 +162,10 @@ Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeSetFilenameFilter
void *ptr;
GtkFileFilter *filter;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
filter = gtk_file_filter_new();
gtk_file_filter_add_custom(filter, GTK_FILE_FILTER_FILENAME,
filenameFilterCallback, obj, NULL);
@@ -177,15 +182,17 @@ Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeSetDirectory
void *ptr;
const char *str;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
str = (*env)->GetStringUTFChars (env, directory, 0);
- gdk_threads_enter ();
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(ptr), str);
- gdk_threads_leave ();
(*env)->ReleaseStringUTFChars (env, directory, str);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -195,21 +202,23 @@ Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeSetFile
void *ptr;
const char *str;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
str = (*env)->GetStringUTFChars (env, filename, 0);
- gdk_threads_enter ();
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (ptr), str);
- gdk_threads_leave ();
(*env)->ReleaseStringUTFChars (env, filename, str);
+
+ gdk_threads_leave ();
}
static void
-handle_response (GtkDialog *dialog __attribute__((unused)),
- gint responseId,
- jobject peer_obj)
+handle_response_cb (GtkDialog *dialog __attribute__((unused)),
+ gint responseId,
+ jobject peer_obj)
{
static int isDisposeIDSet = 0;
static int isIDSet = 0;
@@ -227,47 +236,45 @@ handle_response (GtkDialog *dialog __attribute__((unused)),
&& responseId != GTK_RESPONSE_CANCEL)
return;
- ptr = NSA_GET_PTR (gdk_env(), peer_obj);
+ ptr = NSA_GET_PTR (cp_gtk_gdk_env(), peer_obj);
if (responseId == GTK_RESPONSE_DELETE_EVENT)
{
if (!isDisposeIDSet)
{
- jclass cx = (*gdk_env())->GetObjectClass (gdk_env(), peer_obj);
- disposeID = (*gdk_env())->GetMethodID (gdk_env(), cx, "gtkDisposeFileDialog", "()V");
+ jclass cx = (*cp_gtk_gdk_env())->GetObjectClass (cp_gtk_gdk_env(), peer_obj);
+ disposeID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), cx, "gtkDisposeFileDialog", "()V");
isDisposeIDSet = 1;
}
-
- gdk_threads_leave ();
/* We can dispose of the dialog now (and unblock show) */
- (*gdk_env())->CallVoidMethod (gdk_env(), peer_obj, disposeID);
-
+ gdk_threads_leave ();
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer_obj, disposeID);
gdk_threads_enter ();
+
return;
}
if (responseId == GTK_RESPONSE_ACCEPT) {
fileName = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (GTK_WIDGET (ptr)));
- str_fileName = (*gdk_env())->NewStringUTF (gdk_env(), fileName);
+ str_fileName = (*cp_gtk_gdk_env())->NewStringUTF (cp_gtk_gdk_env(), fileName);
}
if (!isIDSet)
{
- jclass cx = (*gdk_env())->GetObjectClass (gdk_env(), peer_obj);
- hideID = (*gdk_env())->GetMethodID (gdk_env(), cx, "gtkHideFileDialog", "()V");
- gtkSetFilenameID = (*gdk_env())->GetMethodID (gdk_env(), cx,
+ jclass cx = (*cp_gtk_gdk_env())->GetObjectClass (cp_gtk_gdk_env(), peer_obj);
+ hideID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), cx, "gtkHideFileDialog", "()V");
+ gtkSetFilenameID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), cx,
"gtkSetFilename", "(Ljava/lang/String;)V");
isIDSet = 1;
}
-
- gdk_threads_leave ();
-
+
/* Set the Java object field 'file' with this value. */
- (*gdk_env())->CallVoidMethod (gdk_env(), peer_obj, gtkSetFilenameID, str_fileName);
+ gdk_threads_leave ();
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer_obj, gtkSetFilenameID, str_fileName);
/* We can hide the dialog now (and unblock show) */
- (*gdk_env())->CallVoidMethod (gdk_env(), peer_obj, hideID);
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer_obj, hideID);
gdk_threads_enter ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c
index 6671a0526..41dfcea67 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,10 +38,6 @@
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkFramePeer.h"
-/* lives in GtkImage.c */
-GdkPixbuf *gnu_java_awt_peer_gtk_GtkImage_getPixbuf(JNIEnv *env, jobject obj);
-jboolean gnu_java_awt_peer_gtk_GtkImage_isOffScreen(JNIEnv *env, jobject obj);
-
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkFramePeer_removeMenuBarPeer
(JNIEnv *env, jobject obj)
@@ -51,10 +47,10 @@ Java_gnu_java_awt_peer_gtk_GtkFramePeer_removeMenuBarPeer
void *fixed;
GList* children;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
fixed = gtk_container_get_children (GTK_CONTAINER (ptr))->data;
children = gtk_container_get_children (GTK_CONTAINER (fixed));
@@ -86,11 +82,11 @@ Java_gnu_java_awt_peer_gtk_GtkFramePeer_setMenuBarPeer
void *mptr;
void *fixed;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
mptr = NSA_GET_PTR (env, menubar);
- gdk_threads_enter ();
-
fixed = gtk_container_get_children (GTK_CONTAINER (ptr))->data;
gtk_fixed_put (GTK_FIXED (fixed), mptr, 0, 0);
gtk_widget_show (mptr);
@@ -105,10 +101,10 @@ Java_gnu_java_awt_peer_gtk_GtkFramePeer_getMenuBarHeight
GtkWidget *ptr;
GtkRequisition requisition;
- ptr = NSA_GET_PTR (env, menubar);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, menubar);
+
gtk_widget_size_request (ptr, &requisition);
gdk_threads_leave ();
@@ -123,10 +119,10 @@ Java_gnu_java_awt_peer_gtk_GtkFramePeer_setMenuBarWidth
GtkWidget *ptr;
GtkRequisition natural_req;
- ptr = NSA_GET_PTR (env, menubar);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, menubar);
+
/* Get the menubar's natural size request. */
gtk_widget_set_size_request (GTK_WIDGET (ptr), -1, -1);
gtk_widget_size_request (GTK_WIDGET (ptr), &natural_req);
@@ -145,10 +141,10 @@ Java_gnu_java_awt_peer_gtk_GtkFramePeer_gtkFixedSetVisible
void *ptr;
void *fixed;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
fixed = gtk_container_get_children (GTK_CONTAINER (ptr))->data;
if (visible)
@@ -164,22 +160,21 @@ Java_gnu_java_awt_peer_gtk_GtkFramePeer_nativeSetIconImage
(JNIEnv *env, jobject obj, jobject gtkimage)
{
void *ptr;
- GdkPixbuf *pixbuf = gnu_java_awt_peer_gtk_GtkImage_getPixbuf(env, gtkimage);
+ GdkPixbuf *pixbuf = NULL;
+ gdk_threads_enter ();
+
+ pixbuf = cp_gtk_image_get_pixbuf (env, gtkimage);
g_assert (pixbuf != NULL);
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
-
gtk_window_set_icon (GTK_WINDOW (ptr), pixbuf);
/* if the GtkImage is offscreen, this is a temporary pixbuf which should
be thrown out. */
- if(gnu_java_awt_peer_gtk_GtkImage_isOffScreen(env, gtkimage) == JNI_TRUE)
+ if(cp_gtk_image_is_offscreen (env, gtkimage) == JNI_TRUE)
gdk_pixbuf_unref (pixbuf);
gdk_threads_leave ();
}
-
-
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkGenericPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkGenericPeer.c
index 49ccffcf6..0fae1da42 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkGenericPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkGenericPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,20 +45,20 @@ Java_gnu_java_awt_peer_gtk_GtkGenericPeer_dispose
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
/* For now the native state for any object must be a widget.
However, a subclass could override dispose() if required. */
gtk_widget_destroy (GTK_WIDGET (ptr));
- gdk_threads_leave ();
-
/* Remove entries from state tables */
NSA_DEL_GLOBAL_REF (env, obj);
NSA_DEL_PTR (env, obj);
+ gdk_threads_leave ();
+
/*
* Wake up the main thread, to make sure it re-checks the window
* destruction condition.
@@ -75,14 +75,15 @@ Java_gnu_java_awt_peer_gtk_GtkGenericPeer_gtkWidgetModifyFont
void *ptr;
PangoFontDescription *font_desc;
+ gdk_threads_enter();
+
ptr = NSA_GET_PTR (env, obj);
font_name = (*env)->GetStringUTFChars (env, name, NULL);
- gdk_threads_enter();
-
font_desc = pango_font_description_from_string (font_name);
- pango_font_description_set_size (font_desc, size * dpi_conversion_factor);
+ pango_font_description_set_size (font_desc,
+ size * cp_gtk_dpi_conversion_factor);
if (style & AWT_STYLE_BOLD)
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
@@ -94,7 +95,7 @@ Java_gnu_java_awt_peer_gtk_GtkGenericPeer_gtkWidgetModifyFont
pango_font_description_free (font_desc);
- gdk_threads_leave();
-
(*env)->ReleaseStringUTFChars (env, name, font_name);
+
+ gdk_threads_leave();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
index df76adb49..31b9f08d4 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -46,11 +46,6 @@ exception statement from your version. */
#define SCALE_REPLICATE 8
#define SCALE_AREA_AVERAGING 16
-/* functions used by other gtk peer native routines */
-GdkPixbuf *gnu_java_awt_peer_gtk_GtkImage_getPixbuf(JNIEnv *env, jobject obj);
-GdkPixmap *gnu_java_awt_peer_gtk_GtkImage_getPixmap(JNIEnv *env, jobject obj);
-jboolean gnu_java_awt_peer_gtk_GtkImage_isOffScreen(JNIEnv *env, jobject obj);
-
/* local stuff */
static GdkInterpType mapHints(jint hints);
static jboolean offScreen (JNIEnv * env, jobject obj);
@@ -69,30 +64,35 @@ Java_gnu_java_awt_peer_gtk_GtkImage_loadPixbuf
int width, height;
GdkPixbuf *pixbuf;
+ gdk_threads_enter ();
+
/* Don't use the JCL convert function because it throws an exception
on failure */
filename = (*env)->GetStringUTFChars (env, name, 0);
if (filename == NULL)
- return JNI_FALSE;
-
- gdk_threads_enter ();
+ {
+ gdk_threads_leave ();
+ return JNI_FALSE;
+ }
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
if (pixbuf == NULL)
{
- gdk_threads_leave ();
(*env)->ReleaseStringUTFChars (env, name, filename);
+ gdk_threads_leave ();
return JNI_FALSE;
}
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
- gdk_threads_leave ();
createRawData (env, obj, pixbuf);
setWidthHeight(env, obj, width, height);
(*env)->ReleaseStringUTFChars (env, name, filename);
+
+ gdk_threads_leave ();
+
return JNI_TRUE;
}
@@ -107,33 +107,60 @@ Java_gnu_java_awt_peer_gtk_GtkImage_getPixels(JNIEnv *env, jobject obj)
guchar *pixeldata;
jintArray result_array;
jint *result_array_iter, *dst;
- int i;
+ int i,j;
gdk_threads_enter ();
- pixbuf = gnu_java_awt_peer_gtk_GtkImage_getPixbuf(env, obj);
+ pixbuf = cp_gtk_image_get_pixbuf (env, obj);
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ /* Must release the GDK lock before allocating memory through the
+ JVM, since some JVMs use the same lock for allocations and
+ finalization. Deadlock can occur on those JVMs. */
+ gdk_threads_leave ();
+
result_array = (*env)->NewIntArray (env, (width * height));
+
+ gdk_threads_enter ();
+
dst = result_array_iter =
(*env)->GetIntArrayElements (env, result_array, NULL);
+
pixeldata = gdk_pixbuf_get_pixels (pixbuf);
- for(i = 0 ; i < height; i++)
+
+ g_assert (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8);
+
+ if (gdk_pixbuf_get_has_alpha (pixbuf))
{
- memcpy(dst, (void *)pixeldata, width * 4);
- dst += width;
- pixeldata += rowstride;
+ for(i = 0 ; i < height; i++)
+ {
+ memcpy(dst, (void *)pixeldata, width * 4);
+ dst += width;
+ pixeldata += rowstride;
+ }
+ } else {
+ for(i = 0; i < height; i++)
+ {
+ for(j = 0; j < width; j++)
+ dst[j] = 0xFF000000 |
+ (pixeldata[j*3 + 2] & 0xFF) << 16 |
+ (pixeldata[j*3 + 1] & 0xFF) << 8 |
+ (pixeldata[j*3] & 0xFF);
+ dst += width;
+ pixeldata += rowstride;
+ }
}
-
+
if (offScreen (env, obj) == JNI_TRUE)
gdk_pixbuf_unref (pixbuf);
+
+ (*env)->ReleaseIntArrayElements (env, result_array, result_array_iter, 0);
gdk_threads_leave ();
- (*env)->ReleaseIntArrayElements (env, result_array, result_array_iter, 0);
return result_array;
}
@@ -168,9 +195,9 @@ Java_gnu_java_awt_peer_gtk_GtkImage_setPixels(JNIEnv *env, jobject obj,
pixeldata += rowstride;
}
- gdk_threads_leave ();
-
(*env)->ReleaseIntArrayElements (env, pixels, src_array_iter, 0);
+
+ gdk_threads_leave ();
}
/**
@@ -183,6 +210,8 @@ Java_gnu_java_awt_peer_gtk_GtkImage_createPixmap(JNIEnv *env, jobject obj)
jclass cls;
jfieldID field;
+ gdk_threads_enter ();
+
cls = (*env)->GetObjectClass (env, obj);
field = (*env)->GetFieldID (env, cls, "width", "I");
g_assert (field != 0);
@@ -192,7 +221,6 @@ Java_gnu_java_awt_peer_gtk_GtkImage_createPixmap(JNIEnv *env, jobject obj)
g_assert (field != 0);
height = (*env)->GetIntField (env, obj, field);
- gdk_threads_enter ();
if (offScreen (env, obj) == JNI_FALSE)
createRawData (env, obj, gdk_pixbuf_new (GDK_COLORSPACE_RGB,
TRUE,
@@ -238,6 +266,8 @@ Java_gnu_java_awt_peer_gtk_GtkImage_createScaledPixmap(JNIEnv *env,
GdkPixbuf *pixbuf;
+ gdk_threads_enter ();
+
cls = (*env)->GetObjectClass (env, destination);
field = (*env)->GetFieldID (env, cls, "width", "I");
g_assert (field != 0);
@@ -247,9 +277,7 @@ Java_gnu_java_awt_peer_gtk_GtkImage_createScaledPixmap(JNIEnv *env,
g_assert (field != 0);
height = (*env)->GetIntField (env, destination, field);
- gdk_threads_enter ();
-
- pixbuf = gnu_java_awt_peer_gtk_GtkImage_getPixbuf(env, source);
+ pixbuf = cp_gtk_image_get_pixbuf (env, source);
dst = gdk_pixbuf_scale_simple(pixbuf,
width, height,
@@ -258,9 +286,9 @@ Java_gnu_java_awt_peer_gtk_GtkImage_createScaledPixmap(JNIEnv *env,
if (offScreen (env, source) == JNI_TRUE)
gdk_pixbuf_unref (pixbuf);
- gdk_threads_leave ();
-
createRawData (env, destination, (void *)dst);
+
+ gdk_threads_leave ();
}
/**
@@ -277,12 +305,12 @@ Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaled
struct graphics *g;
guint32 bgColor;
+ gdk_threads_enter ();
+
bgColor = ((bg_red & 0xFF) << 16) |
((bg_green & 0xFF) << 8) | (bg_blue & 0xFF);
- gdk_threads_enter ();
-
- g = (struct graphics *) NSA_GET_PTR (env, gc_obj);
+ g = (struct graphics *) NSA_GET_G_PTR (env, gc_obj);
if (!g || !GDK_IS_DRAWABLE (g->drawable))
{
@@ -350,12 +378,12 @@ Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaledFlipped
struct graphics *g;
guint32 bgColor;
+ gdk_threads_enter ();
+
bgColor = ((bg_red & 0xFF) << 16) |
((bg_green & 0xFF) << 8) | (bg_blue & 0xFF);
- gdk_threads_enter ();
-
- g = (struct graphics *) NSA_GET_PTR (env, gc_obj);
+ g = (struct graphics *) NSA_GET_G_PTR (env, gc_obj);
if (!g || !GDK_IS_DRAWABLE (g->drawable))
{
@@ -433,13 +461,14 @@ Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaledFlipped
GDK_RGB_DITHER_NORMAL, 0, 0);
gdk_pixbuf_unref (dst);
+
gdk_threads_leave ();
}
/**
* Used by GtkFramePeer
*/
-GdkPixbuf *gnu_java_awt_peer_gtk_GtkImage_getPixbuf(JNIEnv *env, jobject obj)
+GdkPixbuf *cp_gtk_image_get_pixbuf (JNIEnv *env, jobject obj)
{
int width, height;
GdkPixbuf *pixbuf;
@@ -473,14 +502,14 @@ GdkPixbuf *gnu_java_awt_peer_gtk_GtkImage_getPixbuf(JNIEnv *env, jobject obj)
/**
* Used by GdkGraphics
*/
-GdkPixmap *gnu_java_awt_peer_gtk_GtkImage_getPixmap(JNIEnv *env, jobject obj)
+GdkPixmap *cp_gtk_image_get_pixmap (JNIEnv *env, jobject obj)
{
if (offScreen (env, obj) == JNI_FALSE)
return NULL;
return (GdkPixmap *)getData (env, obj);
}
-jboolean gnu_java_awt_peer_gtk_GtkImage_isOffScreen(JNIEnv *env, jobject obj)
+jboolean cp_gtk_image_is_offscreen (JNIEnv *env, jobject obj)
{
return offScreen(env, obj);
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
index 25c895546..7968ca773 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,23 +47,23 @@ Java_gnu_java_awt_peer_gtk_GtkLabelPeer_create
GtkWidget *eventbox;
const char *str;
+ gdk_threads_enter ();
+
NSA_SET_GLOBAL_REF (env, obj);
str = (*env)->GetStringUTFChars (env, text, 0);
- gdk_threads_enter ();
-
eventbox = gtk_event_box_new ();
label = gtk_label_new (str);
gtk_misc_set_alignment (GTK_MISC (label), xalign, 0.5);
gtk_container_add (GTK_CONTAINER (eventbox), label);
gtk_widget_show (label);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, text, str);
NSA_SET_PTR (env, obj, eventbox);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -75,19 +75,23 @@ Java_gnu_java_awt_peer_gtk_GtkLabelPeer_gtkWidgetModifyFont
GtkWidget *label;
PangoFontDescription *font_desc;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
font_name = (*env)->GetStringUTFChars (env, name, NULL);
- gdk_threads_enter ();
-
label = gtk_bin_get_child (GTK_BIN (ptr));
if (!label)
- return;
+ {
+ gdk_threads_leave ();
+ return;
+ }
font_desc = pango_font_description_from_string (font_name);
- pango_font_description_set_size (font_desc, size * dpi_conversion_factor);
+ pango_font_description_set_size (font_desc,
+ size * cp_gtk_dpi_conversion_factor);
if (style & AWT_STYLE_BOLD)
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
@@ -99,9 +103,9 @@ Java_gnu_java_awt_peer_gtk_GtkLabelPeer_gtkWidgetModifyFont
pango_font_description_free (font_desc);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, name, font_name);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -112,19 +116,19 @@ Java_gnu_java_awt_peer_gtk_GtkLabelPeer_setText
void *ptr;
GtkWidget *label;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
str = (*env)->GetStringUTFChars (env, text, 0);
- gdk_threads_enter ();
-
label = gtk_bin_get_child (GTK_BIN (ptr));
gtk_label_set_label (GTK_LABEL (label), str);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, text, str);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -134,10 +138,10 @@ Java_gnu_java_awt_peer_gtk_GtkLabelPeer_nativeSetAlignment
void *ptr;
GtkWidget *label;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
label = gtk_bin_get_child (GTK_BIN(ptr));
gtk_misc_set_alignment (GTK_MISC (label), xalign, 0.5);
@@ -152,10 +156,10 @@ Java_gnu_java_awt_peer_gtk_GtkLabelPeer_setNativeBounds
GtkWidget *widget;
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
widget = GTK_WIDGET (ptr);
/* We assume that -1 is a width or height and not a request for the
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
index 468be06c1..d513176be 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,21 +38,33 @@
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkListPeer.h"
+static jmethodID postListItemEventID;
+
+void
+cp_gtk_list_init_jni (void)
+{
+ jclass gtklistpeer;
+
+ gtklistpeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkListPeer");
+
+ postListItemEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtklistpeer,
+ "postItemEvent",
+ "(II)V");
+}
+
enum
{
COLUMN_STRING,
N_COLUMNS
};
-gboolean item_highlighted (GtkTreeSelection *selection,
- GtkTreeModel *model,
- GtkTreePath *path,
- gboolean path_currently_selected,
- jobject peer);
-
+static gboolean item_highlighted_cb (GtkTreeSelection *selection,
+ GtkTreeModel *model,
+ GtkTreePath *path,
+ gboolean path_currently_selected,
+ jobject peer);
-#define TREE_VIEW_FROM_SW(obj) \
- (GTK_TREE_VIEW (GTK_SCROLLED_WINDOW (obj)->container.child))
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkListPeer_create
@@ -67,11 +79,11 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_create
GtkRequisition req;
gint i;
+ gdk_threads_enter ();
+
/* Create global reference and save it for future use */
NSA_SET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
-
list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING);
/* Add the number of rows so that we can calculate the tree view's
size request. */
@@ -111,9 +123,9 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_create
gtk_widget_show (list);
gtk_widget_show (sw);
- gdk_threads_leave ();
-
NSA_SET_PTR (env, obj, sw);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -122,25 +134,22 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_connectSignals
{
void *ptr;
jobject *gref;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreeSelection *selection;
- ptr = NSA_GET_PTR (env, obj);
- gref = NSA_GET_GLOBAL_REF (env, obj);
-
gdk_threads_enter ();
- g_assert (gref);
-
- list = TREE_VIEW_FROM_SW (ptr);
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
- g_signal_connect (G_OBJECT (list), "event",
- G_CALLBACK (pre_event_handler), *gref);
+ list = gtk_bin_get_child (GTK_BIN (ptr));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list));
- gtk_tree_selection_set_select_function (selection, item_highlighted,
+ gtk_tree_selection_set_select_function (selection, item_highlighted_cb,
*gref, NULL);
+ cp_gtk_component_connect_signals (G_OBJECT (list), gref);
+
gdk_threads_leave ();
}
@@ -153,16 +162,17 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_gtkWidgetModifyFont
GtkWidget *list;
PangoFontDescription *font_desc;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter();
- list = GTK_WIDGET (TREE_VIEW_FROM_SW (ptr));
+ ptr = NSA_GET_PTR (env, obj);
+
+ list = gtk_bin_get_child (GTK_BIN (ptr));
font_name = (*env)->GetStringUTFChars (env, name, NULL);
font_desc = pango_font_description_from_string (font_name);
- pango_font_description_set_size (font_desc, size * dpi_conversion_factor);
+ pango_font_description_set_size (font_desc,
+ size * cp_gtk_dpi_conversion_factor);
if (style & AWT_STYLE_BOLD)
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
@@ -186,11 +196,11 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_gtkWidgetRequestFocus
void *ptr;
GtkWidget *list;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
- list = GTK_WIDGET (TREE_VIEW_FROM_SW (ptr));
+ ptr = NSA_GET_PTR (env, obj);
+
+ list = gtk_bin_get_child (GTK_BIN (ptr));
gtk_widget_grab_focus (list);
gdk_threads_leave ();
@@ -201,20 +211,20 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_append
(JNIEnv *env, jobject obj, jobjectArray items)
{
void *ptr;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreeIter iter;
GtkTreeModel *list_store;
jint count;
jint i;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
count = (*env)->GetArrayLength (env, items);
- gdk_threads_enter ();
-
- list = TREE_VIEW_FROM_SW (ptr);
- list_store = gtk_tree_view_get_model (list);
+ list = gtk_bin_get_child (GTK_BIN (ptr));
+ list_store = gtk_tree_view_get_model (GTK_TREE_VIEW (list));
for (i = 0; i < count; i++)
{
@@ -240,17 +250,17 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_add
{
void *ptr;
const char *str;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreeIter iter;
GtkTreeModel *list_store;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
str = (*env)->GetStringUTFChars (env, text, NULL);
- gdk_threads_enter ();
-
- list = TREE_VIEW_FROM_SW (ptr);
- list_store = gtk_tree_view_get_model (list);
+ list = gtk_bin_get_child (GTK_BIN (ptr));
+ list_store = gtk_tree_view_get_model (GTK_TREE_VIEW (list));
if (index == -1)
gtk_list_store_append (GTK_LIST_STORE (list_store), &iter);
@@ -260,9 +270,9 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_add
gtk_list_store_set (GTK_LIST_STORE (list_store), &iter,
COLUMN_STRING, str, -1);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, text, str);
+
+ gdk_threads_leave ();
}
@@ -271,18 +281,18 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_delItems
(JNIEnv *env, jobject obj, jint start, jint end)
{
void *ptr;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreeIter iter;
GtkTreeModel *list_store;
jint i;
jint num_items;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
- list = TREE_VIEW_FROM_SW (ptr);
- list_store = gtk_tree_view_get_model (list);
+ ptr = NSA_GET_PTR (env, obj);
+
+ list = gtk_bin_get_child (GTK_BIN (ptr));
+ list_store = gtk_tree_view_get_model (GTK_TREE_VIEW (list));
/* Special case: remove all rows. */
if (end == -1)
@@ -307,16 +317,16 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_select
(JNIEnv *env, jobject obj, jint index)
{
void *ptr;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreePath *path;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
- list = TREE_VIEW_FROM_SW (ptr);
+ ptr = NSA_GET_PTR (env, obj);
+
+ list = gtk_bin_get_child (GTK_BIN (ptr));
path = gtk_tree_path_new_from_indices (index, -1);
- gtk_tree_view_set_cursor (list, path, NULL, FALSE);
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (list), path, NULL, FALSE);
gdk_threads_leave ();
}
@@ -326,16 +336,16 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_deselect
(JNIEnv *env, jobject obj, jint index)
{
void *ptr;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreeSelection *selection;
GtkTreePath *path;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
- list = TREE_VIEW_FROM_SW (ptr);
- selection = gtk_tree_view_get_selection (list);
+ ptr = NSA_GET_PTR (env, obj);
+
+ list = gtk_bin_get_child (GTK_BIN (ptr));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list));
path = gtk_tree_path_new_from_indices (index, -1);
gtk_tree_selection_unselect_path (selection, path);
@@ -351,13 +361,13 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_getSize
GtkRequisition current_req;
GtkRequisition natural_req;
+ gdk_threads_enter ();
+
dims = (*env)->GetIntArrayElements (env, jdims, NULL);
dims[0] = dims[1] = 0;
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
-
/* Save the widget's current size request. */
gtk_widget_size_request (GTK_WIDGET (ptr), &current_req);
@@ -381,9 +391,9 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_getSize
else
dims[1] = natural_req.height / visible_rows * rows;
- gdk_threads_leave ();
-
(*env)->ReleaseIntArrayElements (env, jdims, dims, 0);
+
+ gdk_threads_leave ();
}
@@ -392,7 +402,7 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_getSelectedIndexes
(JNIEnv *env, jobject obj)
{
void *ptr;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreeSelection *selection;
jintArray result_array;
jint *result_array_iter;
@@ -402,18 +412,23 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_getSelectedIndexes
jint count;
jint i;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
- list = TREE_VIEW_FROM_SW (ptr);
- selection = gtk_tree_view_get_selection (list);
+ ptr = NSA_GET_PTR (env, obj);
+
+ list = gtk_bin_get_child (GTK_BIN (ptr));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list));
count = gtk_tree_selection_count_selected_rows (selection);
if (count > 0)
{
current_row = rows = gtk_tree_selection_get_selected_rows (selection, NULL);
+ gdk_threads_leave ();
+
result_array = (*env)->NewIntArray (env, count);
+
+ gdk_threads_enter ();
+
result_array_iter = (*env)->GetIntArrayElements (env, result_array, NULL);
for (i = 0; i < count; i++)
@@ -429,16 +444,14 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_getSelectedIndexes
g_list_free (rows);
}
- gdk_threads_leave ();
-
(*env)->ReleaseIntArrayElements (env, result_array, result_array_iter, 0);
-
- return result_array;
}
else
- gdk_threads_leave ();
+ result_array = NULL;
- return (jintArray) NULL;
+ gdk_threads_leave ();
+
+ return result_array;
}
JNIEXPORT void JNICALL
@@ -446,16 +459,17 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_makeVisible
(JNIEnv *env, jobject obj, jint index)
{
void *ptr;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreePath *path;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
- list = TREE_VIEW_FROM_SW (ptr);
+ ptr = NSA_GET_PTR (env, obj);
+
+ list = gtk_bin_get_child (GTK_BIN (ptr));
path = gtk_tree_path_new_from_indices (index, -1);
- gtk_tree_view_scroll_to_cell (list, path, NULL, FALSE, 0.0, 0.0);
+ gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (list), path,
+ NULL, FALSE, 0.0, 0.0);
gdk_threads_leave ();
}
@@ -465,15 +479,15 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_setMultipleMode
(JNIEnv *env, jobject obj, jboolean mode)
{
void *ptr;
- GtkTreeView *list;
+ GtkWidget *list;
GtkTreeSelection *selection;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
- list = TREE_VIEW_FROM_SW (ptr);
- selection = gtk_tree_view_get_selection (list);
+ ptr = NSA_GET_PTR (env, obj);
+
+ list = gtk_bin_get_child (GTK_BIN (ptr));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list));
gtk_tree_selection_set_mode (selection,
mode ? GTK_SELECTION_MULTIPLE
: GTK_SELECTION_SINGLE);
@@ -481,12 +495,12 @@ Java_gnu_java_awt_peer_gtk_GtkListPeer_setMultipleMode
gdk_threads_leave ();
}
-gboolean
-item_highlighted (GtkTreeSelection *selection __attribute__((unused)),
- GtkTreeModel *model,
- GtkTreePath *path,
- gboolean path_currently_selected,
- jobject peer)
+static gboolean
+item_highlighted_cb (GtkTreeSelection *selection __attribute__((unused)),
+ GtkTreeModel *model,
+ GtkTreePath *path,
+ gboolean path_currently_selected,
+ jobject peer)
{
GtkTreeIter iter;
jint row;
@@ -498,15 +512,27 @@ item_highlighted (GtkTreeSelection *selection __attribute__((unused)),
row = indices ? indices[0] : -1;
if (!path_currently_selected)
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postListItemEventID,
- row,
- (jint) AWT_ITEM_SELECTED);
+ {
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postListItemEventID,
+ row,
+ (jint) AWT_ITEM_SELECTED);
+
+ gdk_threads_enter ();
+ }
else
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
- postListItemEventID,
- row,
- (jint) AWT_ITEM_DESELECTED);
+ {
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postListItemEventID,
+ row,
+ (jint) AWT_ITEM_DESELECTED);
+
+ gdk_threads_enter ();
+ }
}
return TRUE;
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c
index 563bf4810..3e21a0402 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,16 +45,16 @@ Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_create
{
GtkWidget *widget;
- NSA_SET_GLOBAL_REF (env, obj);
-
gdk_threads_enter ();
+ NSA_SET_GLOBAL_REF (env, obj);
+
widget = gtk_menu_bar_new ();
gtk_widget_show (widget);
- gdk_threads_leave ();
-
NSA_SET_PTR (env, obj, widget);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -63,11 +63,13 @@ Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_addMenu
{
void *mbar, *menu;
+ gdk_threads_enter ();
+
mbar = NSA_GET_PTR (env, obj);
menu = NSA_GET_PTR (env, menupeer);
- gdk_threads_enter ();
gtk_menu_shell_append (GTK_MENU_SHELL (mbar), GTK_WIDGET (menu));
+
gdk_threads_leave ();
}
@@ -79,10 +81,11 @@ Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_nativeSetHelpMenu
void *mbar, *menu;
GList *list;
+ gdk_threads_enter ();
+
mbar = NSA_GET_PTR (env, obj);
menu = NSA_GET_PTR (env, menupeer);
- gdk_threads_enter ();
if (helpmenu != NULL)
{
list = gtk_container_children (GTK_CONTAINER (mbar));
@@ -92,6 +95,7 @@ Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_nativeSetHelpMenu
gtk_container_remove (GTK_CONTAINER (mbar), GTK_WIDGET (list->data));
}
helpmenu = menu;
+
gdk_threads_leave ();
}
@@ -102,11 +106,13 @@ Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_delMenu
void *ptr;
GList *list;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
list = gtk_container_children (GTK_CONTAINER (ptr));
list = g_list_nth (list, index);
gtk_container_remove (GTK_CONTAINER (ptr), GTK_WIDGET (list->data));
+
gdk_threads_leave ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c
index c30ac29c9..01b74e46c 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c
index 1fe18f9f0..2746f1e4a 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,8 +40,24 @@ exception statement from your version. */
#include "gnu_java_awt_peer_gtk_GtkMenuItemPeer.h"
#include "gnu_java_awt_peer_gtk_GtkComponentPeer.h"
-static void item_activate (GtkMenuItem *item __attribute__((unused)),
- jobject peer_obj);
+static jmethodID postMenuActionEventID;
+
+void
+cp_gtk_menuitem_init_jni (void)
+{
+ jclass gtkmenuitempeer;
+
+ gtkmenuitempeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkMenuItemPeer");
+
+ postMenuActionEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(),
+ gtkmenuitempeer,
+ "postMenuActionEvent",
+ "()V");
+}
+
+static void item_activate_cb (GtkMenuItem *item __attribute__((unused)),
+ jobject peer_obj);
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_create
@@ -50,12 +66,12 @@ Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_create
GtkWidget *widget;
const char *str;
+ gdk_threads_enter ();
+
NSA_SET_GLOBAL_REF (env, obj);
str = (*env)->GetStringUTFChars (env, label, NULL);
- gdk_threads_enter ();
-
/* "-" signals that we need a separator. */
if (strcmp (str, "-") == 0)
widget = gtk_menu_item_new ();
@@ -64,25 +80,27 @@ Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_create
gtk_widget_show (widget);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, label, str);
NSA_SET_PTR (env, obj, widget);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_connectSignals
(JNIEnv *env, jobject obj)
{
- void *ptr = NSA_GET_PTR (env, obj);
- jobject *gref = NSA_GET_GLOBAL_REF (env, obj);
- g_assert (gref);
+ void *ptr;
+ jobject *gref;
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
+
g_signal_connect (G_OBJECT (ptr), "activate",
- G_CALLBACK (item_activate), *gref);
+ G_CALLBACK (item_activate_cb), *gref);
gdk_threads_leave ();
}
@@ -96,18 +114,19 @@ Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_gtkWidgetModifyFont
GtkWidget *label;
PangoFontDescription *font_desc;
+ gdk_threads_enter();
+
ptr = NSA_GET_PTR (env, obj);
font_name = (*env)->GetStringUTFChars (env, name, NULL);
- gdk_threads_enter();
-
label = gtk_bin_get_child (GTK_BIN (ptr));
if (label)
{
font_desc = pango_font_description_from_string (font_name);
- pango_font_description_set_size (font_desc, size * dpi_conversion_factor);
+ pango_font_description_set_size (font_desc,
+ size * cp_gtk_dpi_conversion_factor);
if (style & AWT_STYLE_BOLD)
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
@@ -120,9 +139,9 @@ Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_gtkWidgetModifyFont
pango_font_description_free (font_desc);
}
- gdk_threads_leave();
-
(*env)->ReleaseStringUTFChars (env, name, font_name);
+
+ gdk_threads_leave();
}
JNIEXPORT void JNICALL
@@ -131,10 +150,12 @@ Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_setEnabled
{
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
gtk_widget_set_sensitive (GTK_WIDGET (ptr), enabled);
+
gdk_threads_leave ();
}
@@ -146,25 +167,27 @@ Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_setLabel
const char *str;
GtkAccelLabel *accel_label;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
str = (*env)->GetStringUTFChars (env, label, NULL);
- gdk_threads_enter ();
-
accel_label = GTK_ACCEL_LABEL (GTK_BIN (ptr)->child);
gtk_label_set_text (GTK_LABEL (accel_label), str);
gtk_accel_label_refetch (accel_label);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, label, str);
+
+ gdk_threads_leave ();
}
static void
-item_activate (GtkMenuItem *item __attribute__((unused)), jobject peer_obj)
+item_activate_cb (GtkMenuItem *item __attribute__((unused)), jobject peer_obj)
{
- (*gdk_env())->CallVoidMethod (gdk_env(), peer_obj,
- postMenuActionEventID);
+ gdk_threads_leave ();
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer_obj,
+ postMenuActionEventID);
+ gdk_threads_enter ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c
index dd5511cf6..16018f001 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,9 +45,10 @@ Java_gnu_java_awt_peer_gtk_GtkMenuPeer_setupAccelGroup
{
void *ptr1, *ptr2;
+ gdk_threads_enter ();
+
ptr1 = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
if (!parent)
{
gtk_menu_set_accel_group (GTK_MENU (GTK_MENU_ITEM (ptr1)->submenu),
@@ -75,12 +76,12 @@ Java_gnu_java_awt_peer_gtk_GtkMenuPeer_create
GtkWidget *menu_title, *menu, *toplevel;
const char *str;
+ gdk_threads_enter ();
+
NSA_SET_GLOBAL_REF (env, obj);
str = (*env)->GetStringUTFChars (env, label, NULL);
- gdk_threads_enter ();
-
menu = gtk_menu_new ();
if (str != NULL)
@@ -94,7 +95,7 @@ Java_gnu_java_awt_peer_gtk_GtkMenuPeer_create
toplevel = gtk_widget_get_toplevel (menu);
if (GTK_IS_WINDOW (toplevel))
{
- gtk_window_group_add_window (global_gtk_window_group,
+ gtk_window_group_add_window (cp_gtk_global_window_group,
GTK_WINDOW(toplevel));
}
@@ -102,9 +103,9 @@ Java_gnu_java_awt_peer_gtk_GtkMenuPeer_create
NSA_SET_PTR (env, obj, menu_title);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, label, str);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -114,10 +115,10 @@ Java_gnu_java_awt_peer_gtk_GtkMenuPeer_addTearOff
void *ptr1;
GtkWidget *menu, *item;
- ptr1 = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr1 = NSA_GET_PTR (env, obj);
+
menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (ptr1));
item = gtk_tearoff_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
@@ -133,11 +134,11 @@ Java_gnu_java_awt_peer_gtk_GtkMenuPeer_addItem
void *ptr1, *ptr2;
GtkWidget *menu;
+ gdk_threads_enter ();
+
ptr1 = NSA_GET_PTR (env, obj);
ptr2 = NSA_GET_PTR (env, menuitempeer);
- gdk_threads_enter ();
-
menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(ptr1));
gtk_menu_shell_append (GTK_MENU_SHELL(menu), GTK_WIDGET (ptr2));
@@ -160,13 +161,13 @@ Java_gnu_java_awt_peer_gtk_GtkMenuPeer_delItem
void *ptr;
GList *list;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
list = gtk_container_children (GTK_CONTAINER (ptr));
list = g_list_nth (list, index);
gtk_container_remove (GTK_CONTAINER (ptr), GTK_WIDGET (list->data));
+
gdk_threads_leave ();
}
-
-
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c
index f432baf0c..8a130e1a4 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,23 +40,73 @@ exception statement from your version. */
#include "gnu_java_awt_peer_gtk_GtkComponentPeer.h"
#include "gnu_java_awt_peer_gtk_GtkPanelPeer.h"
+static gboolean panel_focus_in_cb (GtkWidget * widget,
+ GdkEventFocus *event,
+ jobject peer);
+static gboolean panel_focus_out_cb (GtkWidget * widget,
+ GdkEventFocus *event,
+ jobject peer);
+
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkPanelPeer_create
(JNIEnv *env, jobject obj)
{
GtkWidget *widget;
+ gdk_threads_enter ();
+
NSA_SET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
-
widget = gtk_fixed_new ();
gtk_fixed_set_has_window (GTK_FIXED (widget), TRUE);
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
+ NSA_SET_PTR (env, obj, widget);
+
gdk_threads_leave ();
+}
- NSA_SET_PTR (env, obj, widget);
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkPanelPeer_connectSignals
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ jobject *gref;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
+
+ /* Panel signals. These callbacks prevent expose events being
+ delivered to the panel when it is focused. */
+ g_signal_connect (G_OBJECT (ptr), "focus-in-event",
+ G_CALLBACK (panel_focus_in_cb), *gref);
+
+ g_signal_connect (G_OBJECT (ptr), "focus-out-event",
+ G_CALLBACK (panel_focus_out_cb), *gref);
+
+ /* Component signals. Exclude focus signals. */
+ cp_gtk_component_connect_expose_signals (ptr, gref);
+ cp_gtk_component_connect_mouse_signals (ptr, gref);
+
+ gdk_threads_leave ();
+}
+
+static gboolean
+panel_focus_in_cb (GtkWidget * widget __attribute__((unused)),
+ GdkEventFocus *event __attribute__((unused)),
+ jobject peer __attribute__((unused)))
+{
+ return TRUE;
+}
+
+static gboolean
+panel_focus_out_cb (GtkWidget * widget __attribute__((unused)),
+ GdkEventFocus *event __attribute__((unused)),
+ jobject peer __attribute__((unused)))
+{
+ return TRUE;
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
index 6cfe25497..e684a090f 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -65,18 +65,20 @@ Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_show
void *ptr;
struct pos *p;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
p = g_malloc (sizeof (struct pos));
p->x = x;
p->y = y;
- gdk_threads_enter ();
gtk_menu_popup (GTK_MENU (GTK_MENU_ITEM (ptr)->submenu),
NULL, NULL, menu_pos, p, 0, time);
- gdk_threads_leave ();
g_free (p);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -86,10 +88,11 @@ Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_setupAccelGroup
void *ptr1, *ptr2;
GtkMenu *menu;
+ gdk_threads_enter ();
+
ptr1 = NSA_GET_PTR (env, obj);
ptr2 = NSA_GET_PTR (env, parent);
- gdk_threads_enter ();
menu = GTK_MENU (GTK_MENU_ITEM (ptr1)->submenu);
gtk_menu_set_accel_group (menu, gtk_accel_group_new ());
/* FIXME: update this to use GTK-2.4 GtkActions. */
@@ -97,5 +100,6 @@ Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_setupAccelGroup
_gtk_accel_group_attach (gtk_menu_get_accel_group (menu),
G_OBJECT (gtk_widget_get_toplevel (ptr2)));
#endif
+
gdk_threads_leave ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c
index 79e5082bb..1445cec55 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,24 +39,28 @@ exception statement from your version. */
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkScrollPanePeer.h"
+#define AWT_SCROLLPANE_SCROLLBARS_AS_NEEDED 0
+#define AWT_SCROLLPANE_SCROLLBARS_ALWAYS 1
+#define AWT_SCROLLPANE_SCROLLBARS_NEVER 2
+
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_create
(JNIEnv *env, jobject obj, int width, int height)
{
GtkWidget *sw;
+ gdk_threads_enter ();
+
/* Create global reference and save it for future use */
NSA_SET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
-
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_size_request (sw, width, height);
- gdk_threads_leave ();
-
NSA_SET_PTR (env, obj, sw);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -67,9 +71,10 @@ Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_setScrollPosition
GtkScrolledWindow *sw;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
sw = GTK_SCROLLED_WINDOW (ptr);
hadj = gtk_scrolled_window_get_hadjustment (sw);
@@ -77,6 +82,7 @@ Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_setScrollPosition
gtk_adjustment_set_value (hadj, x);
gtk_adjustment_set_value (vadj, y);
+
gdk_threads_leave ();
}
@@ -88,9 +94,10 @@ Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_gtkScrolledWindowSetHScrollIncremen
GtkScrolledWindow *sw;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
sw = GTK_SCROLLED_WINDOW(ptr);
hadj = gtk_scrolled_window_get_hadjustment (sw);
@@ -107,9 +114,10 @@ Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_gtkScrolledWindowSetVScrollIncremen
GtkScrolledWindow *sw;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
sw = GTK_SCROLLED_WINDOW(ptr);
vadj = gtk_scrolled_window_get_hadjustment (sw);
@@ -128,9 +136,10 @@ Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_getHScrollbarHeight
jint height = 0;
jint spacing = 0;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
sw = GTK_SCROLLED_WINDOW (ptr);
gtk_widget_size_request (sw->hscrollbar, &requisition);
@@ -152,9 +161,10 @@ Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_getVScrollbarWidth
jint width = 0;
jint spacing = 0;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
sw = GTK_SCROLLED_WINDOW (ptr);
gtk_widget_size_request (sw->vscrollbar, &requisition);
@@ -172,6 +182,8 @@ Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_setPolicy
{
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
switch (policy)
@@ -187,7 +199,7 @@ Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_setPolicy
break;
}
- gdk_threads_enter ();
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (ptr), policy, policy);
+
gdk_threads_leave ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollbarPeer.c
index 10e53d43c..396862710 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollbarPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,10 +41,37 @@ exception statement from your version. */
#include "gnu_java_awt_peer_gtk_GtkComponentPeer.h"
#include "gnu_java_awt_peer_gtk_GtkScrollbarPeer.h"
+#define AWT_ADJUSTMENT_UNIT_INCREMENT 1
+#define AWT_ADJUSTMENT_UNIT_DECREMENT 2
+#define AWT_ADJUSTMENT_BLOCK_DECREMENT 3
+#define AWT_ADJUSTMENT_BLOCK_INCREMENT 4
+#define AWT_ADJUSTMENT_TRACK 5
+
+static jmethodID postAdjustmentEventID;
+
+void
+cp_gtk_scrollbar_init_jni (void)
+{
+ jclass gtkscrollbarpeer;
+
+ gtkscrollbarpeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkScrollbarPeer");
+
+ postAdjustmentEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(),
+ gtkscrollbarpeer,
+ "postAdjustmentEvent",
+ "(II)V");
+}
+
+#if GTK_MINOR_VERSION > 4
static gboolean slider_moved_cb (GtkRange *range,
GtkScrollType scroll,
gdouble value,
jobject obj);
+#else
+static void post_change_event_cb (GtkRange *range,
+ jobject peer);
+#endif
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_create
@@ -92,13 +119,19 @@ Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_connectSignals
gdk_threads_enter ();
+ /* Scrollbar signals */
+#if GTK_MINOR_VERSION > 4
g_signal_connect (G_OBJECT (ptr), "change-value",
- GTK_SIGNAL_FUNC (slider_moved_cb), *gref);
+ G_CALLBACK (slider_moved_cb), *gref);
+#else
+ g_signal_connect (G_OBJECT (ptr), "value-changed",
+ G_CALLBACK (post_change_event_cb), *gref);
+#endif
- gdk_threads_leave ();
+ /* Component signals */
+ cp_gtk_component_connect_signals (G_OBJECT (ptr), gref);
- /* Connect the superclass signals. */
- Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, obj);
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -157,6 +190,7 @@ Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_setValues
gdk_threads_leave ();
}
+#if GTK_MINOR_VERSION > 4
static gboolean
slider_moved_cb (GtkRange *range,
GtkScrollType scroll,
@@ -184,31 +218,41 @@ slider_moved_cb (GtkRange *range,
switch (scroll)
{
case GTK_SCROLL_STEP_BACKWARD:
- (*gdk_env())->CallVoidMethod (gdk_env(), obj, postAdjustmentEventID,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), obj, postAdjustmentEventID,
AWT_ADJUSTMENT_UNIT_DECREMENT,
(jint) value);
break;
case GTK_SCROLL_STEP_FORWARD:
- (*gdk_env())->CallVoidMethod (gdk_env(), obj, postAdjustmentEventID,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), obj, postAdjustmentEventID,
AWT_ADJUSTMENT_UNIT_INCREMENT,
(jint) value);
break;
case GTK_SCROLL_PAGE_BACKWARD:
- (*gdk_env())->CallVoidMethod (gdk_env(), obj, postAdjustmentEventID,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), obj, postAdjustmentEventID,
AWT_ADJUSTMENT_BLOCK_DECREMENT,
(jint) value);
break;
case GTK_SCROLL_PAGE_FORWARD:
- (*gdk_env())->CallVoidMethod (gdk_env(), obj, postAdjustmentEventID,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), obj, postAdjustmentEventID,
AWT_ADJUSTMENT_BLOCK_INCREMENT,
(jint) value);
break;
default:
/* GTK_SCROLL_JUMP: */
- (*gdk_env())->CallVoidMethod (gdk_env(), obj, postAdjustmentEventID,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), obj, postAdjustmentEventID,
AWT_ADJUSTMENT_TRACK,
(jint) value);
break;
}
return FALSE;
}
+#else
+static void
+post_change_event_cb (GtkRange *range, jobject peer)
+{
+ GtkAdjustment *adj;
+ adj = gtk_range_get_adjustment (range);
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer, postAdjustmentEventID,
+ AWT_ADJUSTMENT_TRACK, (jint) adj->value);
+}
+#endif
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
index 4b7f5dcca..9af88a026 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,7 +39,10 @@ exception statement from your version. */
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkTextAreaPeer.h"
-#define TEXT_FROM_SW(obj) (GTK_TEXT_VIEW(GTK_SCROLLED_WINDOW (obj)->container.child))
+#define AWT_TEXTAREA_SCROLLBARS_BOTH 0
+#define AWT_TEXTAREA_SCROLLBARS_VERTICAL_ONLY 1
+#define AWT_TEXTAREA_SCROLLBARS_HORIZONTAL_ONLY 2
+
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_create
(JNIEnv *env, jobject obj,
@@ -47,11 +50,11 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_create
{
GtkWidget *text, *sw;
+ gdk_threads_enter ();
+
/* Create global reference and save it for future use */
NSA_SET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
-
text = gtk_text_view_new ();
gtk_widget_set_size_request (text, textview_width, textview_height);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW (text), TRUE);
@@ -76,9 +79,37 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_create
|| scroll == AWT_TEXTAREA_SCROLLBARS_HORIZONTAL_ONLY)
? GTK_WRAP_NONE : GTK_WRAP_WORD);
+ NSA_SET_PTR (env, obj, sw);
+
gdk_threads_leave ();
+}
- NSA_SET_PTR (env, obj, sw);
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_connectSignals
+ (JNIEnv *env, jobject obj)
+{
+ GtkWidget *text = NULL;
+ GtkTextBuffer *buf;
+ void *ptr;
+ jobject *gref;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
+
+ /* Unwrap the text view from the scrolled window */
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+
+ /* TextComponent signals */
+ cp_gtk_textcomponent_connect_signals (G_OBJECT (buf), gref);
+
+ /* Component signals */
+ cp_gtk_component_connect_signals (G_OBJECT (text), gref);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -90,22 +121,21 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_insert
GtkWidget *text;
void *ptr;
const char *str;
- int pos=position;
+
+ gdk_threads_enter ();
ptr = NSA_GET_PTR (env, obj);
str = (*env)->GetStringUTFChars (env, contents, NULL);
- gdk_threads_enter ();
-
- text = GTK_WIDGET (TEXT_FROM_SW (ptr));
+ text = gtk_bin_get_child (GTK_BIN (ptr));
buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
- gtk_text_buffer_get_iter_at_offset (buf, &iter, pos);
+ gtk_text_buffer_get_iter_at_offset (buf, &iter, position);
gtk_text_buffer_insert (buf, &iter, str, strlen (str));
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, contents, str);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -120,12 +150,12 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_replaceRange
int mystart = start;
int myend = end;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
str = (*env)->GetStringUTFChars (env, contents, NULL);
- gdk_threads_enter ();
-
- text = GTK_WIDGET (TEXT_FROM_SW (ptr));
+ text = gtk_bin_get_child (GTK_BIN (ptr));
buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
@@ -136,8 +166,9 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_replaceRange
gtk_text_buffer_get_iter_at_offset (buf, &iter, mystart);
gtk_text_buffer_insert(buf, &iter, str, strlen (str));
- gdk_threads_leave ();
(*env)->ReleaseStringUTFChars (env, contents, str);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -149,16 +180,17 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_gtkWidgetModifyFont
GtkWidget *text;
PangoFontDescription *font_desc;
+ gdk_threads_enter();
+
ptr = NSA_GET_PTR (env, obj);
- text = GTK_WIDGET (TEXT_FROM_SW (ptr));
+ text = gtk_bin_get_child (GTK_BIN (ptr));
font_name = (*env)->GetStringUTFChars (env, name, NULL);
- gdk_threads_enter();
-
font_desc = pango_font_description_from_string (font_name);
- pango_font_description_set_size (font_desc, size * dpi_conversion_factor);
+ pango_font_description_set_size (font_desc,
+ size * cp_gtk_dpi_conversion_factor);
if (style & AWT_STYLE_BOLD)
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
@@ -170,9 +202,9 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_gtkWidgetModifyFont
pango_font_description_free (font_desc);
- gdk_threads_leave();
-
(*env)->ReleaseStringUTFChars (env, name, font_name);
+
+ gdk_threads_leave();
}
JNIEXPORT void JNICALL
@@ -182,11 +214,11 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_gtkWidgetRequestFocus
void *ptr;
GtkWidget *text;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
- text = GTK_WIDGET (TEXT_FROM_SW (ptr));
+ ptr = NSA_GET_PTR (env, obj);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
gtk_widget_grab_focus (text);
@@ -203,9 +235,10 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getHScrollbarHeight
jint height = 0;
jint spacing = 0;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
sw = GTK_SCROLLED_WINDOW (ptr);
if (sw)
@@ -230,9 +263,10 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getVScrollbarWidth
jint width = 0;
jint spacing = 0;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
- gdk_threads_enter ();
sw = GTK_SCROLLED_WINDOW (ptr);
if (sw)
@@ -246,3 +280,243 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getVScrollbarWidth
return width;
}
+
+JNIEXPORT jint JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getCaretPosition
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ int pos = 0;
+ GtkWidget *text = NULL;
+ GtkTextBuffer *buf;
+ GtkTextMark *mark;
+ GtkTextIter iter;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+ mark = gtk_text_buffer_get_insert (buf);
+ gtk_text_buffer_get_iter_at_mark (buf, &iter, mark);
+ pos = gtk_text_iter_get_offset (&iter);
+
+ gdk_threads_leave ();
+
+ return pos;
+}
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_setCaretPosition
+ (JNIEnv *env, jobject obj, jint pos)
+{
+ void *ptr;
+ GtkWidget *text = NULL;
+ GtkTextBuffer *buf;
+ GtkTextIter iter;
+ GtkTextMark *oldmark;
+ GtkTextIter olditer;
+ int oldpos;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+
+ /* Save old position. */
+ oldmark = gtk_text_buffer_get_insert (buf);
+ gtk_text_buffer_get_iter_at_mark (buf, &olditer, oldmark);
+ oldpos = gtk_text_iter_get_offset (&olditer);
+
+ /* Move to new position. */
+ gtk_text_buffer_get_iter_at_offset (buf, &iter, pos);
+ gtk_text_buffer_place_cursor (buf, &iter);
+
+ /* Scroll to new position. Alignment is determined
+ comparing the new position to the old position. */
+ if (oldpos > pos)
+ gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (text),
+ &iter, 0, TRUE, 0, 0);
+ else if (oldpos < pos)
+ gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (text),
+ &iter, 0, TRUE, 1, 1);
+
+ gdk_threads_leave ();
+}
+
+JNIEXPORT jint JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getSelectionStart
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ int pos = 0;
+ GtkWidget *text = NULL;
+ GtkTextBuffer *buf;
+ GtkTextIter start;
+ GtkTextIter end;
+ GtkTextMark *mark;
+ GtkTextIter iter;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+
+ if (gtk_text_buffer_get_selection_bounds (buf, &start, &end))
+ {
+ pos = gtk_text_iter_get_offset (&start);
+ }
+ else
+ {
+ mark = gtk_text_buffer_get_insert (buf);
+ gtk_text_buffer_get_iter_at_mark (buf, &iter, mark);
+ pos = gtk_text_iter_get_offset (&iter);
+ }
+
+ gdk_threads_leave ();
+
+ return pos;
+}
+
+JNIEXPORT jint JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getSelectionEnd
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ int pos = 0;
+ GtkWidget *text = NULL;
+ GtkTextBuffer *buf;
+ GtkTextIter start;
+ GtkTextIter end;
+ GtkTextMark *mark;
+ GtkTextIter iter;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+
+ if (gtk_text_buffer_get_selection_bounds (buf, &start, &end))
+ {
+ pos = gtk_text_iter_get_offset (&end);
+ }
+ else
+ {
+ mark = gtk_text_buffer_get_insert (buf);
+ gtk_text_buffer_get_iter_at_mark (buf, &iter, mark);
+ pos = gtk_text_iter_get_offset (&iter);
+ }
+
+ gdk_threads_leave ();
+
+ return pos;
+}
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_select
+ (JNIEnv *env, jobject obj, jint start, jint end)
+{
+ void *ptr;
+ GtkWidget *text = NULL;
+ GtkTextBuffer *buf;
+ GtkTextIter iter;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+ gtk_text_buffer_get_iter_at_offset (buf, &iter, start);
+ /* quickly move both 'insert' and 'selection_bound' to the
+ same position */
+ gtk_text_buffer_place_cursor (buf, &iter);
+ gtk_text_buffer_get_iter_at_offset (buf, &iter, end);
+ gtk_text_buffer_move_mark_by_name (buf, "selection_bound", &iter);
+
+ gdk_threads_leave ();
+}
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_setEditable
+ (JNIEnv *env, jobject obj, jboolean state)
+{
+ void *ptr;
+ GtkWidget *text = NULL;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ gtk_text_view_set_editable (GTK_TEXT_VIEW (text), state);
+
+ gdk_threads_leave ();
+}
+
+JNIEXPORT jstring JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_getText
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ char *contents = NULL;
+ jstring jcontents;
+ GtkWidget *text = NULL;
+ GtkTextBuffer *buf;
+ GtkTextIter start, end;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+ gtk_text_buffer_get_start_iter (buf, &start);
+ gtk_text_buffer_get_end_iter (buf, &end);
+ contents = gtk_text_buffer_get_text (buf, &start, &end, FALSE);
+
+ jcontents = (*env)->NewStringUTF (env, contents);
+ g_free (contents);
+
+ gdk_threads_leave ();
+
+ return jcontents;
+}
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_setText
+ (JNIEnv *env, jobject obj, jstring contents)
+{
+ void *ptr;
+ const char *str;
+ GtkWidget *text = NULL;
+ GtkTextBuffer *buf;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+ str = (*env)->GetStringUTFChars (env, contents, NULL);
+
+ text = gtk_bin_get_child (GTK_BIN (ptr));
+
+ buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+ gtk_text_buffer_set_text (buf, str, strlen (str));
+
+ (*env)->ReleaseStringUTFChars (env, contents, str);
+
+ gdk_threads_leave ();
+}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
deleted file mode 100644
index 6eb06e073..000000000
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
+++ /dev/null
@@ -1,498 +0,0 @@
-/* gtktextcomponentpeer.c -- Native implementation of GtkTextComponentPeer
- Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-
-#include "gtkpeer.h"
-#include "gnu_java_awt_peer_gtk_GtkComponentPeer.h"
-#include "gnu_java_awt_peer_gtk_GtkTextComponentPeer.h"
-
-static void textcomponent_changed_cb (GtkEditable *editable,
- jobject peer);
-
-JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_connectSignals
- (JNIEnv *env, jobject obj)
-{
- GtkTextView *text = NULL;
- GtkTextBuffer *buf;
- void *ptr = NSA_GET_PTR (env, obj);
- jobject *gref = NSA_GET_GLOBAL_REF (env, obj);
- g_assert (gref);
-
- gdk_threads_enter ();
-
- if (GTK_IS_ENTRY(ptr))
- {
- g_signal_connect (GTK_EDITABLE (ptr), "changed",
- G_CALLBACK (textcomponent_changed_cb), *gref);
-
- gdk_threads_leave ();
-
- /* Connect the superclass signals. */
- Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env, *gref);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child);
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_TEXT_VIEW (ptr);
- }
-
- if (text)
- {
- buf = gtk_text_view_get_buffer (text);
- if (buf)
- g_signal_connect (buf, "changed",
- G_CALLBACK (textcomponent_changed_cb), *gref);
-
- /* Connect the superclass signals. */
- /* FIXME: Cannot do that here or it will get the sw and not the list.
- We must a generic way of doing this. */
- /* Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals (env,
- obj); */
- g_signal_connect (GTK_OBJECT (text), "event",
- G_CALLBACK (pre_event_handler), *gref);
-
- gdk_threads_leave ();
- }
- }
-}
-
-JNIEXPORT jint JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getCaretPosition
- (JNIEnv *env, jobject obj)
-{
- void *ptr;
- int pos = 0;
- GtkEditable *editable;
- GtkWidget *text = NULL;
- GtkTextBuffer *buf;
- GtkTextMark *mark;
- GtkTextIter iter;
-
- ptr = NSA_GET_PTR (env, obj);
-
- gdk_threads_enter ();
-
- if (GTK_IS_EDITABLE (ptr))
- {
- editable = GTK_EDITABLE (ptr);
- pos = gtk_editable_get_position (editable);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child));
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_WIDGET (ptr);
- }
-
- if (text)
- {
- buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
- mark = gtk_text_buffer_get_insert (buf);
- gtk_text_buffer_get_iter_at_mark (buf, &iter, mark);
- pos = gtk_text_iter_get_offset (&iter);
- }
- }
-
- gdk_threads_leave ();
-
- return pos;
-}
-
-JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setCaretPosition
- (JNIEnv *env, jobject obj, jint pos)
-{
- void *ptr;
- GtkEditable *editable;
- GtkWidget *text = NULL;
- GtkTextBuffer *buf;
- GtkTextIter iter;
- GtkTextMark *oldmark;
- GtkTextIter olditer;
- int oldpos;
-
- ptr = NSA_GET_PTR (env, obj);
-
- gdk_threads_enter ();
- if (GTK_IS_EDITABLE (ptr))
- {
- editable = GTK_EDITABLE (ptr);
- gtk_editable_set_position (editable, pos);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child));
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_WIDGET (ptr);
- }
-
- if (text)
- {
- buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
-
- /* Save old position. */
- oldmark = gtk_text_buffer_get_insert (buf);
- gtk_text_buffer_get_iter_at_mark (buf, &olditer, oldmark);
- oldpos = gtk_text_iter_get_offset (&olditer);
-
- /* Move to new position. */
- gtk_text_buffer_get_iter_at_offset (buf, &iter, pos);
- gtk_text_buffer_place_cursor (buf, &iter);
-
- /* Scroll to new position. Alignment is determined
- comparing the new position to the old position. */
- if (oldpos > pos)
- gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (text),
- &iter, 0, TRUE, 0, 0);
- else if (oldpos < pos)
- gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (text),
- &iter, 0, TRUE, 1, 1);
- }
- }
-
- gdk_threads_leave ();
-}
-
-JNIEXPORT jint JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionStart
- (JNIEnv *env, jobject obj)
-{
- void *ptr;
- int pos = 0;
- GtkEditable *editable;
- GtkWidget *text = NULL;
- GtkTextBuffer *buf;
- GtkTextIter start;
- GtkTextIter end;
- int starti, endi;
- GtkTextMark *mark;
- GtkTextIter iter;
-
- ptr = NSA_GET_PTR (env, obj);
-
- gdk_threads_enter ();
-
- if (GTK_IS_EDITABLE (ptr))
- {
- editable = GTK_EDITABLE (ptr);
- if (gtk_editable_get_selection_bounds (editable, &starti, &endi))
- pos = starti;
- else
- pos = gtk_editable_get_position (editable);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child));
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_WIDGET (ptr);
- }
-
- if (text)
- {
- buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
- if (gtk_text_buffer_get_selection_bounds(buf, &start, &end))
- pos = gtk_text_iter_get_offset (&start);
- else
- {
- mark = gtk_text_buffer_get_insert (buf);
- gtk_text_buffer_get_iter_at_mark (buf, &iter, mark);
- pos = gtk_text_iter_get_offset (&iter);
- }
- }
- }
-
- gdk_threads_leave ();
-
- return pos;
-}
-
-JNIEXPORT jint JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionEnd
- (JNIEnv *env, jobject obj)
-{
- void *ptr;
- int pos = 0;
- GtkEditable *editable;
- GtkWidget *text = NULL;
- GtkTextBuffer *buf;
- GtkTextIter start;
- GtkTextIter end;
- int starti, endi;
- GtkTextMark *mark;
- GtkTextIter iter;
-
- ptr = NSA_GET_PTR (env, obj);
-
- gdk_threads_enter ();
-
- if (GTK_IS_EDITABLE (ptr))
- {
- editable = GTK_EDITABLE (ptr);
- if (gtk_editable_get_selection_bounds (editable, &starti, &endi))
- pos = endi;
- else
- pos = gtk_editable_get_position (editable);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child));
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_WIDGET (ptr);
- }
-
- if (text)
- {
- buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
- if (gtk_text_buffer_get_selection_bounds(buf, &start, &end))
- pos = gtk_text_iter_get_offset (&end);
- else
- {
- mark = gtk_text_buffer_get_insert (buf);
- gtk_text_buffer_get_iter_at_mark (buf, &iter, mark);
- pos = gtk_text_iter_get_offset (&iter);
- }
- }
- }
-
- gdk_threads_leave ();
-
- return pos;
-}
-
-JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_select
- (JNIEnv *env, jobject obj, jint start, jint end)
-{
- void *ptr;
- GtkEditable *editable;
- GtkWidget *text = NULL;
- GtkTextBuffer *buf;
- GtkTextIter iter;
-
- ptr = NSA_GET_PTR (env, obj);
-
- gdk_threads_enter ();
-
-
- if (GTK_IS_EDITABLE (ptr))
- {
- editable = GTK_EDITABLE (ptr);
- gtk_editable_select_region (editable, start, end);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child));
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_WIDGET (ptr);
- }
-
- if (text)
- {
- buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
- gtk_text_buffer_get_iter_at_offset (buf, &iter, start);
- /* quickly move both 'insert' and 'selection_bound' to the
- same position */
- gtk_text_buffer_place_cursor (buf, &iter);
- gtk_text_buffer_get_iter_at_offset (buf, &iter, end);
- gtk_text_buffer_move_mark_by_name (buf, "selection_bound", &iter);
- }
- }
-
- gdk_threads_leave ();
-}
-
-JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setEditable
- (JNIEnv *env, jobject obj, jboolean state)
-{
- void *ptr;
- GtkEditable *editable;
- GtkWidget *text = NULL;
-
- ptr = NSA_GET_PTR (env, obj);
-
- gdk_threads_enter ();
-
- if (GTK_IS_EDITABLE (ptr))
- {
- editable = GTK_EDITABLE (ptr);
- gtk_editable_set_editable (editable, state);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child));
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_WIDGET (ptr);
- }
-
- if (text)
- {
- gtk_text_view_set_editable (GTK_TEXT_VIEW (text), state);
- }
- }
-
- gdk_threads_leave ();
-}
-
-JNIEXPORT jstring JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getText
- (JNIEnv *env, jobject obj)
-{
- void *ptr;
- char *contents = NULL;
- jstring jcontents;
- GtkEditable *editable;
- GtkWidget *text = NULL;
- GtkTextBuffer *buf;
- GtkTextIter start, end;
-
- ptr = NSA_GET_PTR (env, obj);
-
- gdk_threads_enter ();
-
- if (GTK_IS_EDITABLE (ptr))
- {
- editable = GTK_EDITABLE (ptr);
- contents = gtk_editable_get_chars (editable, 0, -1);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child));
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_WIDGET (ptr);
- }
-
- if (text)
- {
- buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
- gtk_text_buffer_get_start_iter (buf, &start);
- gtk_text_buffer_get_end_iter (buf, &end);
- contents = gtk_text_buffer_get_text (buf, &start, &end, FALSE);
- }
- }
-
- gdk_threads_leave ();
-
- jcontents = (*env)->NewStringUTF (env, contents);
- g_free (contents);
-
- return jcontents;
-}
-
-JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setText
- (JNIEnv *env, jobject obj, jstring contents)
-{
- void *ptr;
- const char *str;
- GtkWidget *text = NULL;
- GtkTextBuffer *buf;
-
- ptr = NSA_GET_PTR (env, obj);
- str = (*env)->GetStringUTFChars (env, contents, NULL);
-
- gdk_threads_enter ();
-
- if (GTK_IS_EDITABLE (ptr))
- {
- gtk_entry_set_text (GTK_ENTRY (ptr), str);
- }
- else
- {
- if (GTK_IS_SCROLLED_WINDOW (ptr))
- {
- text = GTK_WIDGET (GTK_TEXT_VIEW (GTK_SCROLLED_WINDOW (ptr)->container.child));
- }
- else if (GTK_IS_TEXT_VIEW (ptr))
- {
- text = GTK_WIDGET (ptr);
- }
-
- if (text)
- {
- buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
- gtk_text_buffer_set_text (buf, str, strlen (str));
- }
- }
-
- gdk_threads_leave ();
-
- (*env)->ReleaseStringUTFChars (env, contents, str);
-}
-
-static void
-textcomponent_changed_cb (GtkEditable *editable __attribute__((unused)),
- jobject peer)
-{
- gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer, postTextEventID);
- gdk_threads_enter ();
-}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
index a7b0a4778..eb658339d 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,8 +39,30 @@ exception statement from your version. */
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkTextFieldPeer.h"
-static jint
-get_border_width (GtkWidget *entry);
+/* the color used for highlighting when the foreground is black,
+ since black highlights aren't a Good Idea. */
+#define BB_RED 16962
+#define BB_GREEN 26985
+#define BB_BLUE 31611
+
+static jmethodID postTextEventID;
+
+void
+cp_gtk_textcomponent_init_jni (void)
+{
+ jclass gtkcomponentpeer;
+
+ gtkcomponentpeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkComponentPeer");
+
+ postTextEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkcomponentpeer,
+ "postTextEvent",
+ "()V");
+}
+
+static void textcomponent_changed_cb (GtkEditable *editable, jobject peer);
+
+static jint get_border_width (GtkWidget *entry);
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_create
@@ -48,18 +70,39 @@ Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_create
{
GtkWidget *entry;
+ gdk_threads_enter ();
+
/* Create global reference and save it for future use */
NSA_SET_GLOBAL_REF (env, obj);
- gdk_threads_enter ();
-
entry = gtk_entry_new ();
gtk_widget_set_size_request (entry,
text_width + 2 * get_border_width (entry), -1);
+ NSA_SET_PTR (env, obj, entry);
+
gdk_threads_leave ();
+}
- NSA_SET_PTR (env, obj, entry);
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_connectSignals
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ jobject *gref;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
+
+ /* TextComponent signals */
+ cp_gtk_textcomponent_connect_signals (G_OBJECT (ptr), gref);
+
+ /* Component signals */
+ cp_gtk_component_connect_signals (G_OBJECT (ptr), gref);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -69,14 +112,14 @@ Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkWidgetSetBackground
GdkColor color;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
color.red = (red / 255.0) * 65535;
color.green = (green / 255.0) * 65535;
color.blue = (blue / 255.0) * 65535;
- gdk_threads_enter ();
-
gtk_widget_modify_base (GTK_WIDGET (ptr), GTK_STATE_NORMAL, &color);
gdk_threads_leave ();
@@ -89,15 +132,22 @@ Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkWidgetSetForeground
GdkColor color;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
color.red = (red / 255.0) * 65535;
color.green = (green / 255.0) * 65535;
color.blue = (blue / 255.0) * 65535;
-
- gdk_threads_enter ();
-
+
gtk_widget_modify_text (GTK_WIDGET (ptr), GTK_STATE_NORMAL, &color);
+
+ if ( red == 0 && green == 0 && blue == 0)
+ {
+ color.red = BB_RED;
+ color.green = BB_GREEN;
+ color.blue = BB_BLUE;
+ }
gtk_widget_modify_base (GTK_WIDGET (ptr), GTK_STATE_SELECTED, &color);
gdk_threads_leave ();
@@ -110,10 +160,10 @@ Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkEntryGetBorderWidth
void *ptr;
int border_width = 0;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
border_width = get_border_width (GTK_WIDGET (ptr));
gdk_threads_leave ();
@@ -155,10 +205,10 @@ Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setEchoChar
void *ptr;
GtkEntry *entry;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
entry = GTK_ENTRY (ptr);
if (c != 0)
@@ -180,18 +230,17 @@ Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkWidgetModifyFont
{
const char *font_name;
void *ptr;
- GtkWidget *entry;
PangoFontDescription *font_desc;
+ gdk_threads_enter();
+
ptr = NSA_GET_PTR (env, obj);
- entry = GTK_WIDGET (ptr);
font_name = (*env)->GetStringUTFChars (env, name, NULL);
- gdk_threads_enter();
-
font_desc = pango_font_description_from_string (font_name);
- pango_font_description_set_size (font_desc, size * dpi_conversion_factor);
+ pango_font_description_set_size (font_desc,
+ size * cp_gtk_dpi_conversion_factor);
if (style & AWT_STYLE_BOLD)
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
@@ -199,11 +248,176 @@ Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_gtkWidgetModifyFont
if (style & AWT_STYLE_ITALIC)
pango_font_description_set_style (font_desc, PANGO_STYLE_OBLIQUE);
- gtk_widget_modify_font (GTK_WIDGET(entry), font_desc);
+ gtk_widget_modify_font (GTK_WIDGET (ptr), font_desc);
pango_font_description_free (font_desc);
+ (*env)->ReleaseStringUTFChars (env, name, font_name);
+
gdk_threads_leave();
+}
- (*env)->ReleaseStringUTFChars (env, name, font_name);
+JNIEXPORT jint JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_getCaretPosition
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ int pos = 0;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ pos = gtk_editable_get_position (GTK_EDITABLE (ptr));
+
+ gdk_threads_leave ();
+
+ return pos;
+}
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setCaretPosition
+ (JNIEnv *env, jobject obj, jint pos)
+{
+ void *ptr;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ gtk_editable_set_position (GTK_EDITABLE (ptr), pos);
+
+ gdk_threads_leave ();
+}
+
+JNIEXPORT jint JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_getSelectionStart
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ int pos = 0;
+ int starti, endi;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ if (gtk_editable_get_selection_bounds (GTK_EDITABLE (ptr), &starti, &endi))
+ pos = starti;
+ else
+ pos = gtk_editable_get_position (GTK_EDITABLE (ptr));
+
+ gdk_threads_leave ();
+
+ return pos;
+}
+
+JNIEXPORT jint JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_getSelectionEnd
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ int pos = 0;
+ int starti, endi;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ if (gtk_editable_get_selection_bounds (GTK_EDITABLE (ptr), &starti, &endi))
+ pos = endi;
+ else
+ pos = gtk_editable_get_position (GTK_EDITABLE (ptr));
+
+ gdk_threads_leave ();
+
+ return pos;
+}
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_select
+ (JNIEnv *env, jobject obj, jint start, jint end)
+{
+ void *ptr;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ gtk_editable_select_region (GTK_EDITABLE (ptr), start, end);
+
+ gdk_threads_leave ();
+}
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setEditable
+ (JNIEnv *env, jobject obj, jboolean state)
+{
+ void *ptr;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ gtk_editable_set_editable (GTK_EDITABLE (ptr), state);
+
+ gdk_threads_leave ();
+}
+
+JNIEXPORT jstring JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_getText
+ (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+ char *contents = NULL;
+ jstring jcontents;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+
+ contents = gtk_editable_get_chars (GTK_EDITABLE (ptr), 0, -1);
+
+ jcontents = (*env)->NewStringUTF (env, contents);
+
+ g_free (contents);
+
+ gdk_threads_leave ();
+
+ return jcontents;
+}
+
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_setText
+ (JNIEnv *env, jobject obj, jstring contents)
+{
+ void *ptr;
+ const char *str;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
+ str = (*env)->GetStringUTFChars (env, contents, NULL);
+
+ gtk_entry_set_text (GTK_ENTRY (ptr), str);
+
+ (*env)->ReleaseStringUTFChars (env, contents, str);
+
+ gdk_threads_leave ();
+}
+
+void
+cp_gtk_textcomponent_connect_signals (GObject *ptr, jobject *gref)
+{
+ g_signal_connect (G_OBJECT(ptr), "changed",
+ G_CALLBACK (textcomponent_changed_cb), *gref);
+}
+
+static void
+textcomponent_changed_cb (GtkEditable *editable __attribute__((unused)),
+ jobject peer)
+{
+ gdk_threads_leave ();
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer, postTextEventID);
+ gdk_threads_enter ();
}
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
index f9fb4d63a..a8e1957ee 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,43 +39,47 @@ exception statement from your version. */
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkToolkit.h"
#include "gthread-jni.h"
+#include "jcl.h"
#include <sys/time.h>
-#ifdef JVM_SUN
- struct state_table *native_state_table;
- struct state_table *native_global_ref_table;
-#endif
-
-jmethodID setBoundsCallbackID;
-
-jmethodID postActionEventID;
-jmethodID postMenuActionEventID;
-jmethodID postMouseEventID;
-jmethodID postConfigureEventID;
-jmethodID postExposeEventID;
-jmethodID postKeyEventID;
-jmethodID postFocusEventID;
-jmethodID postAdjustmentEventID;
-jmethodID postItemEventID;
-jmethodID choicePostItemEventID;
-jmethodID postListItemEventID;
-jmethodID postTextEventID;
-jmethodID postWindowEventID;
-jmethodID postInsetsChangedEventID;
-jmethodID windowGetWidthID;
-jmethodID windowGetHeightID;
-
-jmethodID beginNativeRepaintID;
-jmethodID endNativeRepaintID;
-
-jmethodID initComponentGraphicsID;
-#ifdef GTK_CAIRO
-jmethodID initComponentGraphics2DID;
-#endif
-jmethodID setCursorID;
-
-JavaVM *java_vm;
+#define RC_FILE ".classpath-gtkrc"
+
+/* From java.awt.SystemColor */
+#define AWT_DESKTOP 0
+#define AWT_ACTIVE_CAPTION 1
+#define AWT_ACTIVE_CAPTION_TEXT 2
+#define AWT_ACTIVE_CAPTION_BORDER 3
+#define AWT_INACTIVE_CAPTION 4
+#define AWT_INACTIVE_CAPTION_TEXT 5
+#define AWT_INACTIVE_CAPTION_BORDER 6
+#define AWT_WINDOW 7
+#define AWT_WINDOW_BORDER 8
+#define AWT_WINDOW_TEXT 9
+#define AWT_MENU 10
+#define AWT_MENU_TEXT 11
+#define AWT_TEXT 12
+#define AWT_TEXT_TEXT 13
+#define AWT_TEXT_HIGHLIGHT 14
+#define AWT_TEXT_HIGHLIGHT_TEXT 15
+#define AWT_TEXT_INACTIVE_TEXT 16
+#define AWT_CONTROL 17
+#define AWT_CONTROL_TEXT 18
+#define AWT_CONTROL_HIGHLIGHT 19
+#define AWT_CONTROL_LT_HIGHLIGHT 20
+#define AWT_CONTROL_SHADOW 21
+#define AWT_CONTROL_DK_SHADOW 22
+#define AWT_SCROLLBAR 23
+#define AWT_INFO 24
+#define AWT_INFO_TEXT 25
+#define AWT_NUM_COLORS 26
+
+struct state_table *cp_gtk_native_state_table;
+struct state_table *cp_gtk_native_global_ref_table;
+
+static jclass gtkgenericpeer;
+static JavaVM *java_vm;
+static jmethodID printCurrentThreadID;
union env_union
{
@@ -84,7 +88,7 @@ union env_union
};
JNIEnv *
-gdk_env()
+cp_gtk_gdk_env()
{
union env_union tmp;
g_assert((*java_vm)->GetEnv(java_vm, &tmp.void_env, JNI_VERSION_1_2) == JNI_OK);
@@ -92,16 +96,23 @@ gdk_env()
}
-GtkWindowGroup *global_gtk_window_group;
+GtkWindowGroup *cp_gtk_global_window_group;
+double cp_gtk_dpi_conversion_factor;
static void init_glib_threads(JNIEnv *, jint);
-double dpi_conversion_factor;
-
static void init_dpi_conversion_factor (void);
static void dpi_changed_cb (GtkSettings *settings,
GParamSpec *pspec);
+#if GTK_MINOR_VERSION > 4
+static GLogFunc old_glog_func;
+static void glog_func (const gchar *log_domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer user_data);
+#endif
+
/*
* Call gtk_init. It is very important that this happen before any other
* gtk calls.
@@ -123,29 +134,20 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_gtkInit (JNIEnv *env,
char **argv;
char *homedir, *rcpath = NULL;
- jclass gtkgenericpeer, gtkcomponentpeer, gtkchoicepeer, gtkwindowpeer, gtkscrollbarpeer, gtklistpeer,
- gtkmenuitempeer, gtktextcomponentpeer, window, gdkgraphics;
-#ifdef GTK_CAIRO
- jclass gdkgraphics2d;
-#endif
-
gtkgenericpeer = (*env)->FindClass(env, "gnu/java/awt/peer/gtk/GtkGenericPeer");
+ printCurrentThreadID = (*env)->GetStaticMethodID (env, gtkgenericpeer,
+ "printCurrentThread", "()V");
+
NSA_INIT (env, gtkgenericpeer);
g_assert((*env)->GetJavaVM(env, &java_vm) == 0);
/* GTK requires a program's argc and argv variables, and requires that they
- be valid. Set it up. */
+ be valid. Set it up. */
argv = (char **) g_malloc (sizeof (char *) * 2);
argv[0] = (char *) g_malloc(1);
-#if 1
- strcpy(argv[0], "");
-#else /* The following is a more efficient alternative, but less intuitively
- * expresses what we are trying to do. This code is only run once, so
- * I'm going for intuitive. */
argv[0][0] = '\0';
-#endif
argv[1] = NULL;
init_glib_threads(env, portableNativeSync);
@@ -163,8 +165,6 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_gtkInit (JNIEnv *env,
we're shutting down. */
atexit (gdk_threads_enter);
- gdk_event_handler_set ((GdkEventFunc)awt_event_handler, NULL, NULL);
-
if ((homedir = getenv ("HOME")))
{
rcpath = (char *) g_malloc (strlen (homedir) + strlen (RC_FILE) + 2);
@@ -177,89 +177,26 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_gtkInit (JNIEnv *env,
g_free (argv[0]);
g_free (argv);
- /* setup cached IDs for posting GTK events to Java */
-
- window = (*env)->FindClass (env, "java/awt/Window");
-
- gtkcomponentpeer = (*env)->FindClass (env,
- "gnu/java/awt/peer/gtk/GtkComponentPeer");
- gtkchoicepeer = (*env)->FindClass (env,
- "gnu/java/awt/peer/gtk/GtkChoicePeer");
- gtkwindowpeer = (*env)->FindClass (env,
- "gnu/java/awt/peer/gtk/GtkWindowPeer");
- gtkscrollbarpeer = (*env)->FindClass (env,
- "gnu/java/awt/peer/gtk/GtkScrollbarPeer");
- gtklistpeer = (*env)->FindClass (env, "gnu/java/awt/peer/gtk/GtkListPeer");
- gtkmenuitempeer = (*env)->FindClass (env,
- "gnu/java/awt/peer/gtk/GtkMenuItemPeer");
- gtktextcomponentpeer = (*env)->FindClass (env,
- "gnu/java/awt/peer/gtk/GtkTextComponentPeer");
- gdkgraphics = (*env)->FindClass (env,
- "gnu/java/awt/peer/gtk/GdkGraphics");
-#ifdef GTK_CAIRO
- gdkgraphics2d = (*env)->FindClass (env,
- "gnu/java/awt/peer/gtk/GdkGraphics2D");
+ /* On errors or warning print a whole stacktrace. */
+#if GTK_MINOR_VERSION > 4
+ old_glog_func = g_log_set_default_handler (&glog_func, NULL);
#endif
- setBoundsCallbackID = (*env)->GetMethodID (env, window,
- "setBoundsCallback",
- "(IIII)V");
-
- postMenuActionEventID = (*env)->GetMethodID (env, gtkmenuitempeer,
- "postMenuActionEvent",
- "()V");
- postMouseEventID = (*env)->GetMethodID (env, gtkcomponentpeer,
- "postMouseEvent", "(IJIIIIZ)V");
- setCursorID = (*env)->GetMethodID (env, gtkcomponentpeer,
- "setCursor", "()V");
- beginNativeRepaintID = (*env)->GetMethodID (env, gtkcomponentpeer,
- "beginNativeRepaint", "()V");
-
- endNativeRepaintID = (*env)->GetMethodID (env, gtkcomponentpeer,
- "endNativeRepaint", "()V");
-
- postConfigureEventID = (*env)->GetMethodID (env, gtkwindowpeer,
- "postConfigureEvent", "(IIII)V");
- postWindowEventID = (*env)->GetMethodID (env, gtkwindowpeer,
- "postWindowEvent",
- "(ILjava/awt/Window;I)V");
- postInsetsChangedEventID = (*env)->GetMethodID (env, gtkwindowpeer,
- "postInsetsChangedEvent",
- "(IIII)V");
- windowGetWidthID = (*env)->GetMethodID (env, gtkwindowpeer,
- "getWidth", "()I");
- windowGetHeightID = (*env)->GetMethodID (env, gtkwindowpeer,
- "getHeight", "()I");
-
- postExposeEventID = (*env)->GetMethodID (env, gtkcomponentpeer,
- "postExposeEvent", "(IIII)V");
- postKeyEventID = (*env)->GetMethodID (env, gtkcomponentpeer,
- "postKeyEvent", "(IJIICI)V");
- postFocusEventID = (*env)->GetMethodID (env, gtkcomponentpeer,
- "postFocusEvent", "(IZ)V");
- postAdjustmentEventID = (*env)->GetMethodID (env, gtkscrollbarpeer,
- "postAdjustmentEvent",
- "(II)V");
- postItemEventID = (*env)->GetMethodID (env, gtkcomponentpeer,
- "postItemEvent",
- "(Ljava/lang/Object;I)V");
- choicePostItemEventID = (*env)->GetMethodID (env, gtkchoicepeer,
- "choicePostItemEvent",
- "(Ljava/lang/String;I)V");
- postListItemEventID = (*env)->GetMethodID (env, gtklistpeer,
- "postItemEvent",
- "(II)V");
- postTextEventID = (*env)->GetMethodID (env, gtktextcomponentpeer,
- "postTextEvent",
- "()V");
- initComponentGraphicsID = (*env)->GetMethodID (env, gdkgraphics,
- "initComponentGraphics",
- "()V");
-#ifdef GTK_CAIRO
- initComponentGraphics2DID = (*env)->GetMethodID (env, gdkgraphics2d,
- "initComponentGraphics2D",
- "()V");
+
+#if GTK_CAIRO
+ cp_gtk_graphics2d_init_jni ();
#endif
- global_gtk_window_group = gtk_window_group_new ();
+ cp_gtk_graphics_init_jni ();
+ cp_gtk_button_init_jni ();
+ cp_gtk_checkbox_init_jni ();
+ cp_gtk_choice_init_jni ();
+ cp_gtk_component_init_jni ();
+ cp_gtk_list_init_jni ();
+ cp_gtk_menuitem_init_jni ();
+ cp_gtk_scrollbar_init_jni ();
+ cp_gtk_textcomponent_init_jni ();
+ cp_gtk_window_init_jni ();
+
+ cp_gtk_global_window_group = gtk_window_group_new ();
init_dpi_conversion_factor ();
}
@@ -283,11 +220,11 @@ init_glib_threads(JNIEnv *env, jint portableNativeSync)
#endif
}
- (*env)->GetJavaVM( env, &the_vm );
+ (*env)->GetJavaVM( env, &cp_gtk_the_vm );
if (!g_thread_supported ())
{
if (portableNativeSync)
- g_thread_init ( &portable_native_sync_jni_functions );
+ g_thread_init ( &cp_gtk_portable_native_sync_jni_functions );
else
g_thread_init ( NULL );
}
@@ -305,6 +242,11 @@ init_glib_threads(JNIEnv *env, jint portableNativeSync)
/* printf("called gthread init\n"); */
}
+void
+cp_gtk_print_current_thread (void)
+{
+ (*cp_gtk_gdk_env())->CallStaticVoidMethod (cp_gtk_gdk_env(), gtkgenericpeer, printCurrentThreadID);
+}
/* This is a big hack, needed until this pango bug is resolved:
http://bugzilla.gnome.org/show_bug.cgi?id=119081.
@@ -324,16 +266,17 @@ init_dpi_conversion_factor ()
/* If int_dpi == -1 gtk-xft-dpi returns the default value. So we
have to do approximate calculation here. */
if (int_dpi < 0)
- dpi_conversion_factor = PANGO_SCALE * 72.0 / 96.;
+ cp_gtk_dpi_conversion_factor = PANGO_SCALE * 72.0 / 96.;
else
- dpi_conversion_factor = PANGO_SCALE * 72.0 / (int_dpi / PANGO_SCALE);
+ cp_gtk_dpi_conversion_factor =
+ PANGO_SCALE * 72.0 / (int_dpi / PANGO_SCALE);
g_signal_connect (settings, "notify::gtk-xft-dpi",
G_CALLBACK (dpi_changed_cb), NULL);
}
else
/* Approximate. */
- dpi_conversion_factor = PANGO_SCALE * 72.0 / 96.;
+ cp_gtk_dpi_conversion_factor = PANGO_SCALE * 72.0 / 96.;
}
static void
@@ -343,9 +286,10 @@ dpi_changed_cb (GtkSettings *settings,
int int_dpi;
g_object_get (settings, "gtk-xft-dpi", &int_dpi, NULL);
if (int_dpi < 0)
- dpi_conversion_factor = PANGO_SCALE * 72.0 / 96.;
+ cp_gtk_dpi_conversion_factor = PANGO_SCALE * 72.0 / 96.;
else
- dpi_conversion_factor = PANGO_SCALE * 72.0 / (int_dpi / PANGO_SCALE);
+ cp_gtk_dpi_conversion_factor =
+ PANGO_SCALE * 72.0 / (int_dpi / PANGO_SCALE);
}
static int
@@ -362,6 +306,31 @@ within_human_latency_tolerance(struct timeval *init)
return milliseconds_elapsed < 100;
}
+#if GTK_MINOR_VERSION > 4
+static void
+glog_func (const gchar *log_domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer user_data)
+{
+ old_glog_func (log_domain, log_level, message, user_data);
+ if (log_level & (G_LOG_LEVEL_ERROR
+ | G_LOG_LEVEL_CRITICAL
+ | G_LOG_LEVEL_WARNING))
+ {
+ JNIEnv *env = cp_gtk_gdk_env ();
+ jthrowable *exc = (*env)->ExceptionOccurred(env);
+ gchar *detail = g_strconcat (log_domain, ": ", message, NULL);
+ JCL_ThrowException (env, "java/lang/InternalError", detail);
+ g_free (detail);
+ (*env)->ExceptionDescribe (env);
+ if (exc != NULL)
+ (*env)->Throw (env, exc);
+ else
+ (*env)->ExceptionClear (env);
+ }
+}
+#endif
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkToolkit_iterateNativeQueue
@@ -418,9 +387,13 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_nativeQueueEmpty
(JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)))
{
jboolean empty = FALSE;
+
gdk_threads_enter ();
+
empty = ! gtk_events_pending();
+
gdk_threads_leave ();
+
return empty;
}
@@ -433,7 +406,9 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_beep
(JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)))
{
gdk_threads_enter ();
+
gdk_beep ();
+
gdk_threads_leave ();
}
@@ -442,7 +417,9 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_sync
(JNIEnv *env __attribute__((unused)), jobject obj __attribute__((unused)))
{
gdk_threads_enter ();
+
gdk_flush ();
+
gdk_threads_leave ();
}
@@ -474,6 +451,7 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_getScreenResolution
res = gdk_screen_width () / (gdk_screen_width_mm () / 25.4);
gdk_threads_leave ();
+
return res;
}
@@ -488,10 +466,10 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_loadSystemColors
jint *colors;
GtkStyle *style;
- colors = (*env)->GetIntArrayElements (env, jcolors, 0);
-
gdk_threads_enter ();
+ colors = (*env)->GetIntArrayElements (env, jcolors, 0);
+
style = gtk_widget_get_default_style ();
colors[AWT_DESKTOP] = CONVERT (bg, SELECTED);
@@ -521,9 +499,9 @@ Java_gnu_java_awt_peer_gtk_GtkToolkit_loadSystemColors
colors[AWT_INFO] = CONVERT (bg, NORMAL);
colors[AWT_INFO_TEXT] = CONVERT (fg, NORMAL);
- gdk_threads_leave ();
-
(*env)->ReleaseIntArrayElements(env, jcolors, colors, 0);
+
+ gdk_threads_leave ();
}
#undef CONVERT
diff --git a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
index 318b13ad1..650d9b603 100644
--- a/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
+++ b/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,971 @@ exception statement from your version. */
#include <gdk/gdkprivate.h>
#include <gdk/gdkx.h>
#include <X11/Xatom.h>
+#include <gdk/gdkkeysyms.h>
+
+#define AWT_WINDOW_OPENED 200
+#define AWT_WINDOW_CLOSING 201
+#define AWT_WINDOW_CLOSED 202
+#define AWT_WINDOW_ICONIFIED 203
+#define AWT_WINDOW_DEICONIFIED 204
+#define AWT_WINDOW_ACTIVATED 205
+#define AWT_WINDOW_DEACTIVATED 206
+#define AWT_WINDOW_GAINED_FOCUS 207
+#define AWT_WINDOW_LOST_FOCUS 208
+#define AWT_WINDOW_STATE_CHANGED 209
+
+/* Virtual Keys */
+/* This list should be kept in the same order as the VK_ field
+ declarations in KeyEvent.java. */
+#define VK_ENTER '\n'
+#define VK_BACK_SPACE '\b'
+#define VK_TAB '\t'
+#define VK_CANCEL 3
+#define VK_CLEAR 12
+#define VK_SHIFT 16
+#define VK_CONTROL 17
+#define VK_ALT 18
+#define VK_PAUSE 19
+#define VK_CAPS_LOCK 20
+#define VK_ESCAPE 27
+#define VK_SPACE ' '
+#define VK_PAGE_UP 33
+#define VK_PAGE_DOWN 34
+#define VK_END 35
+#define VK_HOME 36
+#define VK_LEFT 37
+#define VK_UP 38
+#define VK_RIGHT 39
+#define VK_DOWN 40
+#define VK_COMMA ','
+#define VK_MINUS '-'
+#define VK_PERIOD '.'
+#define VK_SLASH '/'
+#define VK_0 '0'
+#define VK_1 '1'
+#define VK_2 '2'
+#define VK_3 '3'
+#define VK_4 '4'
+#define VK_5 '5'
+#define VK_6 '6'
+#define VK_7 '7'
+#define VK_8 '8'
+#define VK_9 '9'
+#define VK_SEMICOLON ';'
+#define VK_EQUALS '='
+#define VK_A 'A'
+#define VK_B 'B'
+#define VK_C 'C'
+#define VK_D 'D'
+#define VK_E 'E'
+#define VK_F 'F'
+#define VK_G 'G'
+#define VK_H 'H'
+#define VK_I 'I'
+#define VK_J 'J'
+#define VK_K 'K'
+#define VK_L 'L'
+#define VK_M 'M'
+#define VK_N 'N'
+#define VK_O 'O'
+#define VK_P 'P'
+#define VK_Q 'Q'
+#define VK_R 'R'
+#define VK_S 'S'
+#define VK_T 'T'
+#define VK_U 'U'
+#define VK_V 'V'
+#define VK_W 'W'
+#define VK_X 'X'
+#define VK_Y 'Y'
+#define VK_Z 'Z'
+#define VK_OPEN_BRACKET '['
+#define VK_BACK_SLASH '\\'
+#define VK_CLOSE_BRACKET ']'
+/* See gtkpeer.h */
+/* #define VK_NUMPAD0 96 */
+/* #define VK_NUMPAD1 97 */
+/* #define VK_NUMPAD2 98 */
+/* #define VK_NUMPAD3 99 */
+/* #define VK_NUMPAD4 100 */
+/* #define VK_NUMPAD5 101 */
+/* #define VK_NUMPAD6 102 */
+/* #define VK_NUMPAD7 103 */
+/* #define VK_NUMPAD8 104 */
+/* #define VK_NUMPAD9 105 */
+#define VK_MULTIPLY 106
+#define VK_ADD 107
+#define VK_SEPARATER 108
+#define VK_SEPARATOR 108
+#define VK_SUBTRACT 109
+/* See gtkpeer.h */
+/* #define VK_DECIMAL 110 */
+#define VK_DIVIDE 111
+#define VK_DELETE 127
+#define VK_NUM_LOCK 144
+#define VK_SCROLL_LOCK 145
+#define VK_F1 112
+#define VK_F2 113
+#define VK_F3 114
+#define VK_F4 115
+#define VK_F5 116
+#define VK_F6 117
+#define VK_F7 118
+#define VK_F8 119
+#define VK_F9 120
+#define VK_F10 121
+#define VK_F11 122
+#define VK_F12 123
+#define VK_F13 61440
+#define VK_F14 61441
+#define VK_F15 61442
+#define VK_F16 61443
+#define VK_F17 61444
+#define VK_F18 61445
+#define VK_F19 61446
+#define VK_F20 61447
+#define VK_F21 61448
+#define VK_F22 61449
+#define VK_F23 61450
+#define VK_F24 61451
+#define VK_PRINTSCREEN 154
+#define VK_INSERT 155
+#define VK_HELP 156
+#define VK_META 157
+#define VK_BACK_QUOTE 192
+#define VK_QUOTE 222
+#define VK_KP_UP 224
+#define VK_KP_DOWN 225
+#define VK_KP_LEFT 226
+#define VK_KP_RIGHT 227
+#define VK_DEAD_GRAVE 128
+#define VK_DEAD_ACUTE 129
+#define VK_DEAD_CIRCUMFLEX 130
+#define VK_DEAD_TILDE 131
+#define VK_DEAD_MACRON 132
+#define VK_DEAD_BREVE 133
+#define VK_DEAD_ABOVEDOT 134
+#define VK_DEAD_DIAERESIS 135
+#define VK_DEAD_ABOVERING 136
+#define VK_DEAD_DOUBLEACUTE 137
+#define VK_DEAD_CARON 138
+#define VK_DEAD_CEDILLA 139
+#define VK_DEAD_OGONEK 140
+#define VK_DEAD_IOTA 141
+#define VK_DEAD_VOICED_SOUND 142
+#define VK_DEAD_SEMIVOICED_SOUND 143
+#define VK_AMPERSAND 150
+#define VK_ASTERISK 151
+#define VK_QUOTEDBL 152
+#define VK_LESS 153
+#define VK_GREATER 160
+#define VK_BRACELEFT 161
+#define VK_BRACERIGHT 162
+#define VK_AT 512
+#define VK_COLON 513
+#define VK_CIRCUMFLEX 514
+#define VK_DOLLAR 515
+#define VK_EURO_SIGN 516
+#define VK_EXCLAMATION_MARK 517
+#define VK_INVERTED_EXCLAMATION_MARK 518
+#define VK_LEFT_PARENTHESIS 519
+#define VK_NUMBER_SIGN 520
+#define VK_PLUS 521
+#define VK_RIGHT_PARENTHESIS 522
+#define VK_UNDERSCORE 523
+#define VK_FINAL 24
+#define VK_CONVERT 28
+#define VK_NONCONVERT 29
+#define VK_ACCEPT 30
+#define VK_MODECHANGE 31
+#define VK_KANA 21
+#define VK_KANJI 25
+#define VK_ALPHANUMERIC 240
+#define VK_KATAKANA 241
+#define VK_HIRAGANA 242
+#define VK_FULL_WIDTH 243
+#define VK_HALF_WIDTH 244
+#define VK_ROMAN_CHARACTERS 245
+#define VK_ALL_CANDIDATES 256
+#define VK_PREVIOUS_CANDIDATE 257
+#define VK_CODE_INPUT 258
+#define VK_JAPANESE_KATAKANA 259
+#define VK_JAPANESE_HIRAGANA 260
+#define VK_JAPANESE_ROMAN 261
+#define VK_KANA_LOCK 262
+#define VK_INPUT_METHOD_ON_OFF 263
+#define VK_CUT 65489
+#define VK_COPY 65485
+#define VK_PASTE 65487
+#define VK_UNDO 65483
+#define VK_AGAIN 65481
+#define VK_FIND 65488
+#define VK_PROPS 65482
+#define VK_STOP 65480
+#define VK_COMPOSE 65312
+#define VK_ALT_GRAPH 65406
+#define VK_UNDEFINED 0
+
+#define AWT_KEY_CHAR_UNDEFINED 0
+
+#define AWT_FRAME_STATE_NORMAL 0
+#define AWT_FRAME_STATE_ICONIFIED 1
+#define AWT_FRAME_STATE_MAXIMIZED_HORIZ 2
+#define AWT_FRAME_STATE_MAXIMIZED_VERT 4
+#define AWT_FRAME_STATE_MAXIMIZED_BOTH 6
+
+static jmethodID postKeyEventID;
+static jmethodID postWindowEventID;
+static jmethodID postConfigureEventID;
+static jmethodID postInsetsChangedEventID;
+static jmethodID windowGetWidthID;
+static jmethodID windowGetHeightID;
+static jmethodID setBoundsCallbackID;
+
+void
+cp_gtk_window_init_jni (void)
+{
+ jclass window;
+ jclass gtkwindowpeer;
+
+ window = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(), "java/awt/Window");
+
+ setBoundsCallbackID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), window,
+ "setBoundsCallback",
+ "(IIII)V");
+
+ gtkwindowpeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkWindowPeer");
+
+ postKeyEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkwindowpeer,
+ "postKeyEvent", "(IJIICI)V");
+
+ postWindowEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkwindowpeer,
+ "postWindowEvent",
+ "(ILjava/awt/Window;I)V");
+
+ postConfigureEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkwindowpeer,
+ "postConfigureEvent", "(IIII)V");
+
+ postInsetsChangedEventID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkwindowpeer,
+ "postInsetsChangedEvent",
+ "(IIII)V");
+
+ windowGetWidthID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkwindowpeer,
+ "getWidth", "()I");
+
+ windowGetHeightID = (*cp_gtk_gdk_env())->GetMethodID (cp_gtk_gdk_env(), gtkwindowpeer,
+ "getHeight", "()I");
+
+ gtkwindowpeer = (*cp_gtk_gdk_env())->FindClass (cp_gtk_gdk_env(),
+ "gnu/java/awt/peer/gtk/GtkWindowPeer");
+}
+
+/* Get the first keyval in the keymap for this event's keycode. The
+ first keyval corresponds roughly to Java's notion of a virtual
+ key. Returns the uppercase version of the first keyval. */
+static guint
+get_first_keyval_from_keymap (GdkEventKey *event)
+{
+ guint keyval;
+ guint *keyvals;
+ gint n_entries;
+
+ if (!gdk_keymap_get_entries_for_keycode (NULL,
+ event->hardware_keycode,
+ NULL,
+ &keyvals,
+ &n_entries))
+ {
+ g_warning ("No keyval found for hardware keycode %d\n",
+ event->hardware_keycode);
+ /* Try to recover by using the keyval in the event structure. */
+ keyvals = &(event->keyval);
+ }
+ keyval = keyvals[0];
+ g_free (keyvals);
+
+ return gdk_keyval_to_upper (keyval);
+}
+
+#ifdef __GNUC__
+__inline
+#endif
+static jint
+keysym_to_awt_keycode (GdkEventKey *event)
+{
+ guint ukeyval;
+ guint state;
+
+ ukeyval = get_first_keyval_from_keymap (event);
+ state = event->state;
+
+ /* VK_A through VK_Z */
+ if (ukeyval >= GDK_A && ukeyval <= GDK_Z)
+ return ukeyval;
+
+ /* VK_0 through VK_9 */
+ if (ukeyval >= GDK_0 && ukeyval <= GDK_9)
+ return ukeyval;
+
+ switch (ukeyval)
+ {
+ case GDK_Return:
+ case GDK_KP_Enter:
+ return VK_ENTER;
+ case GDK_BackSpace:
+ return VK_BACK_SPACE;
+ case GDK_Tab:
+ return VK_TAB;
+ case GDK_Cancel:
+ return VK_CANCEL;
+ case GDK_Clear:
+ return VK_CLEAR;
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ return VK_SHIFT;
+ case GDK_Control_L:
+ case GDK_Control_R:
+ return VK_CONTROL;
+ case GDK_Alt_L:
+ case GDK_Alt_R:
+ return VK_ALT;
+ case GDK_Pause:
+ return VK_PAUSE;
+ case GDK_Caps_Lock:
+ return VK_CAPS_LOCK;
+ case GDK_Escape:
+ return VK_ESCAPE;
+ case GDK_space:
+ return VK_SPACE;
+ case GDK_KP_Page_Up:
+ /* For keys on the numeric keypad, the JVM produces one of two
+ virtual keys, depending on the num lock state. */
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD9;
+ else
+ return VK_PAGE_UP;
+ case GDK_Page_Up:
+ return VK_PAGE_UP;
+ case GDK_KP_Page_Down:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD3;
+ else
+ return VK_PAGE_DOWN;
+ case GDK_Page_Down:
+ return VK_PAGE_DOWN;
+ case GDK_KP_End:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD1;
+ else
+ return VK_END;
+ case GDK_End:
+ return VK_END;
+ case GDK_KP_Home:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD7;
+ else
+ return VK_HOME;
+ case GDK_Home:
+ return VK_HOME;
+ case GDK_KP_Begin:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD5;
+ else
+ return VK_UNDEFINED;
+ case GDK_Left:
+ return VK_LEFT;
+ case GDK_Up:
+ return VK_UP;
+ case GDK_Right:
+ return VK_RIGHT;
+ case GDK_Down:
+ return VK_DOWN;
+ case GDK_comma:
+ return VK_COMMA;
+ case GDK_minus:
+ return VK_MINUS;
+ case GDK_period:
+ return VK_PERIOD;
+ case GDK_slash:
+ return VK_SLASH;
+ /*
+ return VK_0;
+ return VK_1;
+ return VK_2;
+ return VK_3;
+ return VK_4;
+ return VK_5;
+ return VK_6;
+ return VK_7;
+ return VK_8;
+ return VK_9;
+ */
+ case GDK_semicolon:
+ return VK_SEMICOLON;
+ case GDK_equal:
+ return VK_EQUALS;
+ /*
+ return VK_A;
+ return VK_B;
+ return VK_C;
+ return VK_D;
+ return VK_E;
+ return VK_F;
+ return VK_G;
+ return VK_H;
+ return VK_I;
+ return VK_J;
+ return VK_K;
+ return VK_L;
+ return VK_M;
+ return VK_N;
+ return VK_O;
+ return VK_P;
+ return VK_Q;
+ return VK_R;
+ return VK_S;
+ return VK_T;
+ return VK_U;
+ return VK_V;
+ return VK_W;
+ return VK_X;
+ return VK_Y;
+ return VK_Z;
+ */
+ case GDK_bracketleft:
+ return VK_OPEN_BRACKET;
+ case GDK_backslash:
+ return VK_BACK_SLASH;
+ case GDK_bracketright:
+ return VK_CLOSE_BRACKET;
+ case GDK_KP_0:
+ return VK_NUMPAD0;
+ case GDK_KP_1:
+ return VK_NUMPAD1;
+ case GDK_KP_2:
+ return VK_NUMPAD2;
+ case GDK_KP_3:
+ return VK_NUMPAD3;
+ case GDK_KP_4:
+ return VK_NUMPAD4;
+ case GDK_KP_5:
+ return VK_NUMPAD5;
+ case GDK_KP_6:
+ return VK_NUMPAD6;
+ case GDK_KP_7:
+ return VK_NUMPAD7;
+ case GDK_KP_8:
+ return VK_NUMPAD8;
+ case GDK_KP_9:
+ return VK_NUMPAD9;
+ case GDK_KP_Multiply:
+ return VK_MULTIPLY;
+ case GDK_KP_Add:
+ return VK_ADD;
+ /*
+ return VK_SEPARATER;
+ */
+ case GDK_KP_Separator:
+ return VK_SEPARATOR;
+ case GDK_KP_Subtract:
+ return VK_SUBTRACT;
+ case GDK_KP_Decimal:
+ return VK_DECIMAL;
+ case GDK_KP_Divide:
+ return VK_DIVIDE;
+ case GDK_KP_Delete:
+ if (state & GDK_MOD2_MASK)
+ return VK_DECIMAL;
+ else
+ return VK_DELETE;
+ case GDK_Delete:
+ return VK_DELETE;
+ case GDK_Num_Lock:
+ return VK_NUM_LOCK;
+ case GDK_Scroll_Lock:
+ return VK_SCROLL_LOCK;
+ case GDK_F1:
+ return VK_F1;
+ case GDK_F2:
+ return VK_F2;
+ case GDK_F3:
+ return VK_F3;
+ case GDK_F4:
+ return VK_F4;
+ case GDK_F5:
+ return VK_F5;
+ case GDK_F6:
+ return VK_F6;
+ case GDK_F7:
+ return VK_F7;
+ case GDK_F8:
+ return VK_F8;
+ case GDK_F9:
+ return VK_F9;
+ case GDK_F10:
+ return VK_F10;
+ case GDK_F11:
+ return VK_F11;
+ case GDK_F12:
+ return VK_F12;
+ case GDK_F13:
+ return VK_F13;
+ case GDK_F14:
+ return VK_F14;
+ case GDK_F15:
+ return VK_F15;
+ case GDK_F16:
+ return VK_F16;
+ case GDK_F17:
+ return VK_F17;
+ case GDK_F18:
+ return VK_F18;
+ case GDK_F19:
+ return VK_F19;
+ case GDK_F20:
+ return VK_F20;
+ case GDK_F21:
+ return VK_F21;
+ case GDK_F22:
+ return VK_F22;
+ case GDK_F23:
+ return VK_F23;
+ case GDK_F24:
+ return VK_F24;
+ case GDK_Print:
+ return VK_PRINTSCREEN;
+ case GDK_KP_Insert:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD0;
+ else
+ return VK_INSERT;
+ case GDK_Insert:
+ return VK_INSERT;
+ case GDK_Help:
+ return VK_HELP;
+ case GDK_Meta_L:
+ case GDK_Meta_R:
+ return VK_META;
+ case GDK_grave:
+ return VK_BACK_QUOTE;
+ case GDK_apostrophe:
+ return VK_QUOTE;
+ case GDK_KP_Up:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD8;
+ else
+ return VK_KP_UP;
+ case GDK_KP_Down:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD2;
+ else
+ return VK_KP_DOWN;
+ case GDK_KP_Left:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD4;
+ else
+ return VK_KP_LEFT;
+ case GDK_KP_Right:
+ if (state & GDK_MOD2_MASK)
+ return VK_NUMPAD6;
+ else
+ return VK_KP_RIGHT;
+ case GDK_dead_grave:
+ return VK_DEAD_GRAVE;
+ case GDK_dead_acute:
+ return VK_DEAD_ACUTE;
+ case GDK_dead_circumflex:
+ return VK_DEAD_CIRCUMFLEX;
+ case GDK_dead_tilde:
+ return VK_DEAD_TILDE;
+ case GDK_dead_macron:
+ return VK_DEAD_MACRON;
+ case GDK_dead_breve:
+ return VK_DEAD_BREVE;
+ case GDK_dead_abovedot:
+ return VK_DEAD_ABOVEDOT;
+ case GDK_dead_diaeresis:
+ return VK_DEAD_DIAERESIS;
+ case GDK_dead_abovering:
+ return VK_DEAD_ABOVERING;
+ case GDK_dead_doubleacute:
+ return VK_DEAD_DOUBLEACUTE;
+ case GDK_dead_caron:
+ return VK_DEAD_CARON;
+ case GDK_dead_cedilla:
+ return VK_DEAD_CEDILLA;
+ case GDK_dead_ogonek:
+ return VK_DEAD_OGONEK;
+ case GDK_dead_iota:
+ return VK_DEAD_IOTA;
+ case GDK_dead_voiced_sound:
+ return VK_DEAD_VOICED_SOUND;
+ case GDK_dead_semivoiced_sound:
+ return VK_DEAD_SEMIVOICED_SOUND;
+ case GDK_ampersand:
+ return VK_AMPERSAND;
+ case GDK_asterisk:
+ return VK_ASTERISK;
+ case GDK_quotedbl:
+ return VK_QUOTEDBL;
+ case GDK_less:
+ return VK_LESS;
+ case GDK_greater:
+ return VK_GREATER;
+ case GDK_braceleft:
+ return VK_BRACELEFT;
+ case GDK_braceright:
+ return VK_BRACERIGHT;
+ case GDK_at:
+ return VK_AT;
+ case GDK_colon:
+ return VK_COLON;
+ case GDK_asciicircum:
+ return VK_CIRCUMFLEX;
+ case GDK_dollar:
+ return VK_DOLLAR;
+ case GDK_EuroSign:
+ return VK_EURO_SIGN;
+ case GDK_exclam:
+ return VK_EXCLAMATION_MARK;
+ case GDK_exclamdown:
+ return VK_INVERTED_EXCLAMATION_MARK;
+ case GDK_parenleft:
+ return VK_LEFT_PARENTHESIS;
+ case GDK_numbersign:
+ return VK_NUMBER_SIGN;
+ case GDK_plus:
+ return VK_PLUS;
+ case GDK_parenright:
+ return VK_RIGHT_PARENTHESIS;
+ case GDK_underscore:
+ return VK_UNDERSCORE;
+ /*
+ return VK_FINAL;
+ return VK_CONVERT;
+ return VK_NONCONVERT;
+ return VK_ACCEPT;
+ */
+ case GDK_Mode_switch:
+ return VK_MODECHANGE;
+ /*
+ return VK_KANA;
+ */
+ case GDK_Kanji:
+ return VK_KANJI;
+ /*
+ return VK_ALPHANUMERIC;
+ */
+ case GDK_Katakana:
+ return VK_KATAKANA;
+ case GDK_Hiragana:
+ return VK_HIRAGANA;
+ /*
+ return VK_FULL_WIDTH;
+ return VK_HALF_WIDTH;
+ return VK_ROMAN_CHARACTERS;
+ return VK_ALL_CANDIDATES;
+ */
+ case GDK_PreviousCandidate:
+ return VK_PREVIOUS_CANDIDATE;
+ case GDK_Codeinput:
+ return VK_CODE_INPUT;
+ /*
+ return VK_JAPANESE_KATAKANA;
+ return VK_JAPANESE_HIRAGANA;
+ return VK_JAPANESE_ROMAN;
+ */
+ case GDK_Kana_Lock:
+ return VK_KANA_LOCK;
+ /*
+ return VK_INPUT_METHOD_ON_OFF;
+ return VK_CUT;
+ return VK_COPY;
+ return VK_PASTE;
+ return VK_UNDO;
+ return VK_AGAIN;
+ return VK_FIND;
+ return VK_PROPS;
+ return VK_STOP;
+ return VK_COMPOSE;
+ return VK_ALT_GRAPH;
+ */
+ default:
+ return VK_UNDEFINED;
+ }
+}
+
+static jint
+keysym_to_awt_keylocation (GdkEventKey *event)
+{
+ guint ukeyval;
+
+ ukeyval = get_first_keyval_from_keymap (event);
+
+ /* VK_A through VK_Z */
+ if (ukeyval >= GDK_A && ukeyval <= GDK_Z)
+ return AWT_KEY_LOCATION_STANDARD;
+
+ /* VK_0 through VK_9 */
+ if (ukeyval >= GDK_0 && ukeyval <= GDK_9)
+ return AWT_KEY_LOCATION_STANDARD;
+
+ switch (ukeyval)
+ {
+ case GDK_Shift_L:
+ case GDK_Control_L:
+ case GDK_Alt_L:
+ case GDK_Meta_L:
+ return AWT_KEY_LOCATION_LEFT;
+
+ case GDK_Shift_R:
+ case GDK_Control_R:
+ case GDK_Alt_R:
+ case GDK_Meta_R:
+ return AWT_KEY_LOCATION_RIGHT;
+
+ case GDK_Return:
+ case GDK_BackSpace:
+ case GDK_Tab:
+ case GDK_Cancel:
+ case GDK_Clear:
+ case GDK_Pause:
+ case GDK_Caps_Lock:
+ case GDK_Escape:
+ case GDK_space:
+ case GDK_Page_Up:
+ case GDK_Page_Down:
+ case GDK_End:
+ case GDK_Home:
+ case GDK_Left:
+ case GDK_Up:
+ case GDK_Right:
+ case GDK_Down:
+ case GDK_comma:
+ case GDK_minus:
+ case GDK_period:
+ case GDK_slash:
+ case GDK_semicolon:
+ case GDK_equal:
+ case GDK_bracketleft:
+ case GDK_backslash:
+ case GDK_bracketright:
+ case GDK_Delete:
+ case GDK_Scroll_Lock:
+ case GDK_F1:
+ case GDK_F2:
+ case GDK_F3:
+ case GDK_F4:
+ case GDK_F5:
+ case GDK_F6:
+ case GDK_F7:
+ case GDK_F8:
+ case GDK_F9:
+ case GDK_F10:
+ case GDK_F11:
+ case GDK_F12:
+ case GDK_F13:
+ case GDK_F14:
+ case GDK_F15:
+ case GDK_F16:
+ case GDK_F17:
+ case GDK_F18:
+ case GDK_F19:
+ case GDK_F20:
+ case GDK_F21:
+ case GDK_F22:
+ case GDK_F23:
+ case GDK_F24:
+ case GDK_Print:
+ case GDK_Insert:
+ case GDK_Help:
+ case GDK_grave:
+ case GDK_apostrophe:
+ case GDK_dead_grave:
+ case GDK_dead_acute:
+ case GDK_dead_circumflex:
+ case GDK_dead_tilde:
+ case GDK_dead_macron:
+ case GDK_dead_breve:
+ case GDK_dead_abovedot:
+ case GDK_dead_diaeresis:
+ case GDK_dead_abovering:
+ case GDK_dead_doubleacute:
+ case GDK_dead_caron:
+ case GDK_dead_cedilla:
+ case GDK_dead_ogonek:
+ case GDK_dead_iota:
+ case GDK_dead_voiced_sound:
+ case GDK_dead_semivoiced_sound:
+ case GDK_ampersand:
+ case GDK_asterisk:
+ case GDK_quotedbl:
+ case GDK_less:
+ case GDK_greater:
+ case GDK_braceleft:
+ case GDK_braceright:
+ case GDK_at:
+ case GDK_colon:
+ case GDK_asciicircum:
+ case GDK_dollar:
+ case GDK_EuroSign:
+ case GDK_exclam:
+ case GDK_exclamdown:
+ case GDK_parenleft:
+ case GDK_numbersign:
+ case GDK_plus:
+ case GDK_parenright:
+ case GDK_underscore:
+ case GDK_Mode_switch:
+ case GDK_Kanji:
+ case GDK_Katakana:
+ case GDK_Hiragana:
+ case GDK_PreviousCandidate:
+ case GDK_Codeinput:
+ case GDK_Kana_Lock:
+ return AWT_KEY_LOCATION_STANDARD;
+
+ case GDK_KP_Enter:
+ case GDK_KP_Page_Up:
+ case GDK_KP_Page_Down:
+ case GDK_KP_End:
+ case GDK_KP_Home:
+ case GDK_KP_Begin:
+ case GDK_KP_0:
+ case GDK_KP_1:
+ case GDK_KP_2:
+ case GDK_KP_3:
+ case GDK_KP_4:
+ case GDK_KP_5:
+ case GDK_KP_6:
+ case GDK_KP_7:
+ case GDK_KP_8:
+ case GDK_KP_9:
+ case GDK_KP_Multiply:
+ case GDK_KP_Add:
+ case GDK_KP_Separator:
+ case GDK_KP_Subtract:
+ case GDK_KP_Decimal:
+ case GDK_KP_Divide:
+ case GDK_KP_Delete:
+ case GDK_Num_Lock:
+ case GDK_KP_Insert:
+ case GDK_KP_Up:
+ case GDK_KP_Down:
+ case GDK_KP_Left:
+ case GDK_KP_Right:
+ return AWT_KEY_LOCATION_NUMPAD;
+
+ default:
+ return AWT_KEY_LOCATION_UNKNOWN;
+ }
+}
+
+static jchar
+keyevent_to_awt_keychar (GdkEventKey *event)
+{
+ if (event->length > 0)
+ {
+ /* Translate GDK carriage return to Java linefeed. */
+ if (event->string[0] == 13)
+ return VK_ENTER;
+ else
+ return event->string[0];
+ }
+ else
+ {
+ switch (event->keyval)
+ {
+ case GDK_BackSpace:
+ return VK_BACK_SPACE;
+ case GDK_Tab:
+ return VK_TAB;
+ case GDK_Delete:
+ case GDK_KP_Delete:
+ return VK_DELETE;
+ default:
+ return AWT_KEY_CHAR_UNDEFINED;
+ }
+ }
+}
+
+/* Modifier key events need special treatment. In Sun's peer
+ implementation, when a modifier key is pressed, the KEY_PRESSED
+ event has that modifier in its modifiers list. The corresponding
+ KEY_RELEASED event's modifier list does not contain the modifier.
+ For example, pressing and releasing the shift key will produce a
+ key press event with modifiers=Shift, and a key release event with
+ no modifiers. GDK's key events behave in the exact opposite way,
+ so this translation code is needed. */
+static jint
+keyevent_state_to_awt_mods (GdkEventKey *event)
+{
+ jint result = 0;
+ guint state;
+
+ if (event->type == GDK_KEY_PRESS)
+ {
+ state = event->state;
+
+ if (event->keyval == GDK_Shift_L
+ || event->keyval == GDK_Shift_R)
+ result |= AWT_SHIFT_DOWN_MASK;
+ else
+ {
+ if (state & GDK_SHIFT_MASK)
+ result |= AWT_SHIFT_DOWN_MASK;
+ }
+
+ if (event->keyval == GDK_Control_L
+ || event->keyval == GDK_Control_R)
+ result |= AWT_CTRL_DOWN_MASK;
+ else
+ {
+ if (state & GDK_CONTROL_MASK)
+ result |= AWT_CTRL_DOWN_MASK;
+ }
+
+ if (event->keyval == GDK_Alt_L
+ || event->keyval == GDK_Alt_R)
+ result |= AWT_ALT_DOWN_MASK;
+ else
+ {
+ if (state & GDK_MOD1_MASK)
+ result |= AWT_ALT_DOWN_MASK;
+ }
+ }
+ else if (event->type == GDK_KEY_RELEASE)
+ {
+ state = event->state;
+
+ if (event->keyval != GDK_Shift_L
+ && event->keyval != GDK_Shift_R)
+ {
+ if (state & GDK_SHIFT_MASK)
+ result |= AWT_SHIFT_DOWN_MASK;
+ }
+ if (event->keyval != GDK_Control_L
+ && event->keyval != GDK_Control_R)
+ {
+ if (state & GDK_CONTROL_MASK)
+ result |= AWT_CTRL_DOWN_MASK;
+ }
+
+ if (event->keyval != GDK_Alt_L
+ && event->keyval != GDK_Alt_R)
+ {
+ if (state & GDK_MOD1_MASK)
+ result |= AWT_ALT_DOWN_MASK;
+ }
+ }
+
+ return result;
+}
+
+static gboolean window_configure_cb (GtkWidget *widget,
+ GdkEventConfigure *event,
+ jobject peer);
/* FIXME: we're currently seeing the double-activation that occurs
with metacity and GTK. See
@@ -82,6 +1047,73 @@ static gboolean window_property_changed_cb (GtkWidget *widget,
jobject peer);
static void realize_cb (GtkWidget *widget, jobject peer);
+static gboolean
+window_configure_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventConfigure *event,
+ jobject peer)
+{
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postConfigureEventID,
+ (jint) event->x,
+ (jint) event->y,
+ (jint) event->width,
+ (jint) event->height);
+
+ gdk_threads_enter ();
+
+ return FALSE;
+}
+
+static gboolean
+key_press_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventKey *event,
+ jobject peer)
+{
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postKeyEventID,
+ (jint) AWT_KEY_PRESSED,
+ (jlong) event->time,
+ keyevent_state_to_awt_mods (event),
+ keysym_to_awt_keycode (event),
+ keyevent_to_awt_keychar (event),
+ keysym_to_awt_keylocation (event));
+
+ gdk_threads_enter ();
+
+ /* FIXME: generation of key typed events needs to be moved
+ to GtkComponentPeer.postKeyEvent. If the key in a key
+ press event is not an "action" key
+ (KeyEvent.isActionKey) and is not a modifier key, then
+ it should generate a key typed event. */
+ return TRUE;
+}
+
+
+static gboolean
+key_release_cb (GtkWidget *widget __attribute__((unused)),
+ GdkEventKey *event,
+ jobject peer)
+{
+ gdk_threads_leave ();
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
+ postKeyEventID,
+ (jint) AWT_KEY_RELEASED,
+ (jlong) event->time,
+ keyevent_state_to_awt_mods (event),
+ keysym_to_awt_keycode (event),
+ keyevent_to_awt_keychar (event),
+ keysym_to_awt_keylocation (event));
+
+ gdk_threads_enter ();
+
+ return TRUE;
+}
+
/* Union used for type punning. */
union extents_union
{
@@ -104,10 +1136,10 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_create
void *window_parent;
GtkWidget *fixed;
- NSA_SET_GLOBAL_REF (env, obj);
-
gdk_threads_enter ();
+ NSA_SET_GLOBAL_REF (env, obj);
+
window_widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
window = GTK_WINDOW (window_widget);
@@ -122,16 +1154,17 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_create
gtk_window_set_type_hint (window, type);
- gtk_window_group_add_window (global_gtk_window_group, window);
+ gtk_window_group_add_window (cp_gtk_global_window_group, window);
fixed = gtk_fixed_new ();
+
gtk_container_add (GTK_CONTAINER (window_widget), fixed);
gtk_widget_show (fixed);
- gdk_threads_leave ();
-
NSA_SET_PTR (env, obj, window_widget);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -141,17 +1174,17 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_gtkWindowSetTitle
const char *c_title;
void *ptr;
+ gdk_threads_enter ();
+
ptr = NSA_GET_PTR (env, obj);
c_title = (*env)->GetStringUTFChars (env, title, NULL);
- gdk_threads_enter ();
-
gtk_window_set_title (GTK_WINDOW (ptr), c_title);
- gdk_threads_leave ();
-
(*env)->ReleaseStringUTFChars (env, title, c_title);
+
+ gdk_threads_leave ();
}
JNIEXPORT void JNICALL
@@ -160,10 +1193,10 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_gtkWindowSetResizable
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
gtk_window_set_policy (GTK_WINDOW (ptr), resizable, resizable, FALSE);
gdk_threads_leave ();
@@ -175,10 +1208,10 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_gtkWindowSetModal
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
gtk_window_set_modal (GTK_WINDOW (ptr), modal);
gdk_threads_leave ();
@@ -190,10 +1223,10 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_nativeSetVisible
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
if (visible)
gtk_widget_show (GTK_WIDGET (ptr));
else
@@ -211,13 +1244,10 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals
void *ptr;
jobject *gref;
- ptr = NSA_GET_PTR (env, obj);
- gref = NSA_GET_GLOBAL_REF (env, obj);
-
gdk_threads_enter ();
- g_signal_connect (G_OBJECT (ptr), "event",
- G_CALLBACK (pre_event_handler), *gref);
+ ptr = NSA_GET_PTR (env, obj);
+ gref = NSA_GET_GLOBAL_REF (env, obj);
g_signal_connect (G_OBJECT (ptr), "delete-event",
G_CALLBACK (window_delete_cb), *gref);
@@ -249,14 +1279,38 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals
g_signal_connect_after (G_OBJECT (ptr), "realize",
G_CALLBACK (realize_cb), *gref);
- g_signal_connect_after (G_OBJECT (ptr), "realize",
- G_CALLBACK (connect_awt_hook_cb), *gref);
+ g_signal_connect (G_OBJECT (ptr), "key-press-event",
+ G_CALLBACK (key_press_cb), *gref);
+
+ g_signal_connect (G_OBJECT (ptr), "key-release-event",
+ G_CALLBACK (key_release_cb), *gref);
+ g_signal_connect_after (G_OBJECT (ptr), "window-state-event",
+ G_CALLBACK (window_window_state_cb), *gref);
+
+ g_signal_connect (G_OBJECT (ptr), "configure-event",
+ G_CALLBACK (window_configure_cb), *gref);
+
+ cp_gtk_component_connect_expose_signals (ptr, gref);
+ cp_gtk_component_connect_mouse_signals (ptr, gref);
+
+ /* FIXME: override focus signals here to prevent child fixed repaint? */
+
+ gdk_threads_leave ();
+}
+
+/* Realize the window here so that its frame extents are known now.
+ That way Window.pack can operate with the accurate insets returned
+ by the window manager rather than the default estimates. */
+JNIEXPORT void JNICALL
+Java_gnu_java_awt_peer_gtk_GtkWindowPeer_realize (JNIEnv *env, jobject obj)
+{
+ void *ptr;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
- /* Realize the window here so that its frame extents are known now.
- That way Window.pack can operate with the accurate insets
- returned by the window manager rather than the default
- estimates. */
gtk_widget_realize (GTK_WIDGET (ptr));
gdk_threads_leave ();
@@ -267,10 +1321,11 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_toBack (JNIEnv *env,
jobject obj)
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
+
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
gdk_window_lower (GTK_WIDGET (ptr)->window);
gdk_flush ();
@@ -282,10 +1337,11 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_toFront (JNIEnv *env,
jobject obj)
{
void *ptr;
- ptr = NSA_GET_PTR (env, obj);
-
+
gdk_threads_enter ();
+ ptr = NSA_GET_PTR (env, obj);
+
gdk_window_raise (GTK_WIDGET (ptr)->window);
gdk_flush ();
@@ -299,7 +1355,7 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_setBoundsCallback
{
/* Circumvent package-private access to call Window's
setBoundsCallback method. */
- (*gdk_env())->CallVoidMethod (gdk_env(), window, setBoundsCallbackID,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), window, setBoundsCallbackID,
x, y, width, height);
}
@@ -307,14 +1363,16 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkWindowPeer_setSize
(JNIEnv *env, jobject obj, jint width, jint height)
{
- void *ptr = NSA_GET_PTR (env, obj);
+ void *ptr;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
/* Avoid GTK runtime assertion failures. */
width = (width < 1) ? 1 : width;
height = (height < 1) ? 1 : height;
- gdk_threads_enter ();
-
gtk_widget_set_size_request (GTK_WIDGET(ptr), width, height);
gdk_threads_leave ();
@@ -324,14 +1382,16 @@ JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkWindowPeer_nativeSetBounds
(JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
{
- void *ptr = NSA_GET_PTR (env, obj);
+ void *ptr;
+
+ gdk_threads_enter ();
+
+ ptr = NSA_GET_PTR (env, obj);
/* Avoid GTK runtime assertion failures. */
width = (width < 1) ? 1 : width;
height = (height < 1) ? 1 : height;
- gdk_threads_enter ();
-
gtk_window_move (GTK_WINDOW(ptr), x, y);
/* The call to gdk_window_move is needed in addition to the call to
gtk_window_move. If gdk_window_move isn't called, then the
@@ -354,6 +1414,7 @@ Java_gnu_java_awt_peer_gtk_GtkWindowPeer_nativeSetBounds
by the program and the window's "resizable" property is true then
the size request will not be honoured. */
gtk_window_resize (GTK_WINDOW (ptr), width, height);
+
gdk_threads_leave ();
}
@@ -471,10 +1532,12 @@ window_delete_cb (GtkWidget *widget __attribute__((unused)),
jobject peer)
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_CLOSING,
(jobject) NULL, (jint) 0);
+
gdk_threads_enter ();
/* Prevents that the Window dissappears ("destroy"
@@ -490,10 +1553,12 @@ window_destroy_cb (GtkWidget *widget __attribute__((unused)),
jobject peer)
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_CLOSED,
(jobject) NULL, (jint) 0);
+
gdk_threads_enter ();
}
@@ -502,10 +1567,12 @@ window_show_cb (GtkWidget *widget __attribute__((unused)),
jobject peer)
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_OPENED,
(jobject) NULL, (jint) 0);
+
gdk_threads_enter ();
}
@@ -518,16 +1585,18 @@ window_active_state_change_cb (GtkWidget *widget __attribute__((unused)),
/* Remove the unused attributes if you fix the below. */
#if 0
gdk_threads_leave ();
+
if (GTK_WINDOW (widget)->is_active)
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_GAINED_FOCUS,
(jobject) NULL, (jint) 0);
else
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_DEACTIVATED,
(jobject) NULL, (jint) 0);
+
gdk_threads_enter ();
#endif
}
@@ -538,16 +1607,18 @@ window_focus_state_change_cb (GtkWidget *widget,
jobject peer)
{
gdk_threads_leave ();
+
if (GTK_WINDOW (widget)->has_toplevel_focus)
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_ACTIVATED,
(jobject) NULL, (jint) 0);
else
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_DEACTIVATED,
(jobject) NULL, (jint) 0);
+
gdk_threads_enter ();
}
@@ -557,13 +1628,14 @@ window_focus_in_cb (GtkWidget * widget __attribute__((unused)),
jobject peer)
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_GAINED_FOCUS,
(jobject) NULL, (jint) 0);
- /* FIXME: somewhere after this is handled, the child window is
- getting an expose event. */
+
gdk_threads_enter ();
+
return FALSE;
}
@@ -573,13 +1645,14 @@ window_focus_out_cb (GtkWidget * widget __attribute__((unused)),
jobject peer)
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_LOST_FOCUS,
(jobject) NULL, (jint) 0);
- /* FIXME: somewhere after this is handled, the child window is
- getting an expose event. */
+
gdk_threads_enter ();
+
return FALSE;
}
@@ -598,20 +1671,24 @@ window_window_state_cb (GtkWidget *widget,
{
/* We've been iconified. */
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_ICONIFIED,
(jobject) NULL, (jint) 0);
+
gdk_threads_enter ();
}
else
{
/* We've been deiconified. */
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_DEICONIFIED,
(jobject) NULL, (jint) 0);
+
gdk_threads_enter ();
}
}
@@ -626,11 +1703,14 @@ window_window_state_cb (GtkWidget *widget,
new_state |= window_get_new_state (widget);
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postWindowEventID,
(jint) AWT_WINDOW_STATE_CHANGED,
(jobject) NULL, new_state);
+
gdk_threads_enter ();
+
return TRUE;
}
@@ -697,12 +1777,14 @@ window_property_changed_cb (GtkWidget *widget __attribute__((unused)),
gu_ex.gu_extents))
{
gdk_threads_leave ();
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postInsetsChangedEventID,
(jint) extents[2], /* top */
(jint) extents[0], /* left */
(jint) extents[3], /* bottom */
(jint) extents[1]); /* right */
+
gdk_threads_enter ();
}
@@ -720,12 +1802,12 @@ realize_cb (GtkWidget *widget, jobject peer)
jint width = 0;
jint height = 0;
- width = (*gdk_env())->CallIntMethod (gdk_env(), peer, windowGetWidthID);
- height = (*gdk_env())->CallIntMethod (gdk_env(), peer, windowGetHeightID);
+ width = (*cp_gtk_gdk_env())->CallIntMethod (cp_gtk_gdk_env(), peer, windowGetWidthID);
+ height = (*cp_gtk_gdk_env())->CallIntMethod (cp_gtk_gdk_env(), peer, windowGetHeightID);
window_get_frame_extents (widget, &top, &left, &bottom, &right);
- (*gdk_env())->CallVoidMethod (gdk_env(), peer,
+ (*cp_gtk_gdk_env())->CallVoidMethod (cp_gtk_gdk_env(), peer,
postInsetsChangedEventID,
top, left, bottom, right);
@@ -742,3 +1824,358 @@ realize_cb (GtkWidget *widget, jobject peer)
MAX (1, width - left - right),
MAX (1, height - top - bottom));
}
+
+/*
+ * This method returns a GDK keyval that corresponds to one of the
+ * keysyms in the X keymap table. The return value is only used to
+ * determine the keyval's corresponding hardware keycode, and doesn't
+ * reflect an accurate translation of a Java virtual key value to a
+ * GDK keyval.
+ */
+#ifdef __GNUC__
+__inline
+#endif
+guint
+cp_gtk_awt_keycode_to_keysym (jint keyCode, jint keyLocation)
+{
+ /* GDK_A through GDK_Z */
+ if (keyCode >= VK_A && keyCode <= VK_Z)
+ return gdk_keyval_to_lower (keyCode);
+
+ /* GDK_0 through GDK_9 */
+ if (keyCode >= VK_0 && keyCode <= VK_9)
+ return keyCode;
+
+ switch (keyCode)
+ {
+ case VK_ENTER:
+ return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Enter : GDK_Return;
+ case VK_BACK_SPACE:
+ return GDK_BackSpace;
+ case VK_TAB:
+ return GDK_Tab;
+ case VK_CANCEL:
+ return GDK_Cancel;
+ case VK_CLEAR:
+ return GDK_Clear;
+ case VK_SHIFT:
+ return keyLocation == AWT_KEY_LOCATION_LEFT ? GDK_Shift_L : GDK_Shift_R;
+ case VK_CONTROL:
+ return keyLocation == AWT_KEY_LOCATION_LEFT ? GDK_Control_L : GDK_Control_R;
+ case VK_ALT:
+ return keyLocation == AWT_KEY_LOCATION_LEFT ? GDK_Alt_L : GDK_Alt_R;
+ case VK_PAUSE:
+ return GDK_Pause;
+ case VK_CAPS_LOCK:
+ return GDK_Caps_Lock;
+ case VK_ESCAPE:
+ return GDK_Escape;
+ case VK_SPACE:
+ return GDK_space;
+ case VK_PAGE_UP:
+ return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Page_Up : GDK_Page_Up;
+ case VK_PAGE_DOWN:
+ return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Page_Down : GDK_Page_Down;
+ case VK_END:
+ return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_End : GDK_End;
+ case VK_HOME:
+ return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Home : GDK_Home;
+ case VK_LEFT:
+ return GDK_Left;
+ case VK_UP:
+ return GDK_Up;
+ case VK_RIGHT:
+ return GDK_Right;
+ case VK_DOWN:
+ return GDK_Down;
+ case VK_COMMA:
+ return GDK_comma;
+ case VK_MINUS:
+ return GDK_minus;
+ case VK_PERIOD:
+ return GDK_period;
+ case VK_SLASH:
+ return GDK_slash;
+ /*
+ case VK_0:
+ case VK_1:
+ case VK_2:
+ case VK_3:
+ case VK_4:
+ case VK_5:
+ case VK_6:
+ case VK_7:
+ case VK_8:
+ case VK_9:
+ */
+ case VK_SEMICOLON:
+ return GDK_semicolon;
+ case VK_EQUALS:
+ return GDK_equal;
+ /*
+ case VK_A:
+ case VK_B:
+ case VK_C:
+ case VK_D:
+ case VK_E:
+ case VK_F:
+ case VK_G:
+ case VK_H:
+ case VK_I:
+ case VK_J:
+ case VK_K:
+ case VK_L:
+ case VK_M:
+ case VK_N:
+ case VK_O:
+ case VK_P:
+ case VK_Q:
+ case VK_R:
+ case VK_S:
+ case VK_T:
+ case VK_U:
+ case VK_V:
+ case VK_W:
+ case VK_X:
+ case VK_Y:
+ case VK_Z:
+ */
+ case VK_OPEN_BRACKET:
+ return GDK_bracketleft;
+ case VK_BACK_SLASH:
+ return GDK_backslash;
+ case VK_CLOSE_BRACKET:
+ return GDK_bracketright;
+ case VK_NUMPAD0:
+ return GDK_KP_0;
+ case VK_NUMPAD1:
+ return GDK_KP_1;
+ case VK_NUMPAD2:
+ return GDK_KP_2;
+ case VK_NUMPAD3:
+ return GDK_KP_3;
+ case VK_NUMPAD4:
+ return GDK_KP_4;
+ case VK_NUMPAD5:
+ return GDK_KP_5;
+ case VK_NUMPAD6:
+ return GDK_KP_6;
+ case VK_NUMPAD7:
+ return GDK_KP_7;
+ case VK_NUMPAD8:
+ return GDK_KP_8;
+ case VK_NUMPAD9:
+ return GDK_KP_9;
+ case VK_MULTIPLY:
+ return GDK_KP_Multiply;
+ case VK_ADD:
+ return GDK_KP_Add;
+ /*
+ case VK_SEPARATER:
+ */
+ case VK_SEPARATOR:
+ return GDK_KP_Separator;
+ case VK_SUBTRACT:
+ return GDK_KP_Subtract;
+ case VK_DECIMAL:
+ return GDK_KP_Decimal;
+ case VK_DIVIDE:
+ return GDK_KP_Divide;
+ case VK_DELETE:
+ return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Delete : GDK_Delete;
+ case VK_NUM_LOCK:
+ return GDK_Num_Lock;
+ case VK_SCROLL_LOCK:
+ return GDK_Scroll_Lock;
+ case VK_F1:
+ return GDK_F1;
+ case VK_F2:
+ return GDK_F2;
+ case VK_F3:
+ return GDK_F3;
+ case VK_F4:
+ return GDK_F4;
+ case VK_F5:
+ return GDK_F5;
+ case VK_F6:
+ return GDK_F6;
+ case VK_F7:
+ return GDK_F7;
+ case VK_F8:
+ return GDK_F8;
+ case VK_F9:
+ return GDK_F9;
+ case VK_F10:
+ return GDK_F10;
+ case VK_F11:
+ return GDK_F11;
+ case VK_F12:
+ return GDK_F12;
+ case VK_F13:
+ return GDK_F13;
+ case VK_F14:
+ return GDK_F14;
+ case VK_F15:
+ return GDK_F15;
+ case VK_F16:
+ return GDK_F16;
+ case VK_F17:
+ return GDK_F17;
+ case VK_F18:
+ return GDK_F18;
+ case VK_F19:
+ return GDK_F19;
+ case VK_F20:
+ return GDK_F20;
+ case VK_F21:
+ return GDK_F21;
+ case VK_F22:
+ return GDK_F22;
+ case VK_F23:
+ return GDK_F23;
+ case VK_F24:
+ return GDK_F24;
+ case VK_PRINTSCREEN:
+ return GDK_Print;
+ case VK_INSERT:
+ return keyLocation == AWT_KEY_LOCATION_NUMPAD ? GDK_KP_Insert : GDK_Insert;
+ case VK_HELP:
+ return GDK_Help;
+ case VK_META:
+ return keyLocation == AWT_KEY_LOCATION_LEFT ? GDK_Meta_L : GDK_Meta_R;
+ case VK_BACK_QUOTE:
+ return GDK_grave;
+ case VK_QUOTE:
+ return GDK_apostrophe;
+ case VK_KP_UP:
+ return GDK_KP_Up;
+ case VK_KP_DOWN:
+ return GDK_KP_Down;
+ case VK_KP_LEFT:
+ return GDK_KP_Left;
+ case VK_KP_RIGHT:
+ return GDK_KP_Right;
+ case VK_DEAD_GRAVE:
+ return GDK_dead_grave;
+ case VK_DEAD_ACUTE:
+ return GDK_dead_acute;
+ case VK_DEAD_CIRCUMFLEX:
+ return GDK_dead_circumflex;
+ case VK_DEAD_TILDE:
+ return GDK_dead_tilde;
+ case VK_DEAD_MACRON:
+ return GDK_dead_macron;
+ case VK_DEAD_BREVE:
+ return GDK_dead_breve;
+ case VK_DEAD_ABOVEDOT:
+ return GDK_dead_abovedot;
+ case VK_DEAD_DIAERESIS:
+ return GDK_dead_diaeresis;
+ case VK_DEAD_ABOVERING:
+ return GDK_dead_abovering;
+ case VK_DEAD_DOUBLEACUTE:
+ return GDK_dead_doubleacute;
+ case VK_DEAD_CARON:
+ return GDK_dead_caron;
+ case VK_DEAD_CEDILLA:
+ return GDK_dead_cedilla;
+ case VK_DEAD_OGONEK:
+ return GDK_dead_ogonek;
+ case VK_DEAD_IOTA:
+ return GDK_dead_iota;
+ case VK_DEAD_VOICED_SOUND:
+ return GDK_dead_voiced_sound;
+ case VK_DEAD_SEMIVOICED_SOUND:
+ return GDK_dead_semivoiced_sound;
+ case VK_AMPERSAND:
+ return GDK_ampersand;
+ case VK_ASTERISK:
+ return GDK_asterisk;
+ case VK_QUOTEDBL:
+ return GDK_quotedbl;
+ case VK_LESS:
+ return GDK_less;
+ case VK_GREATER:
+ return GDK_greater;
+ case VK_BRACELEFT:
+ return GDK_braceleft;
+ case VK_BRACERIGHT:
+ return GDK_braceright;
+ case VK_AT:
+ return GDK_at;
+ case VK_COLON:
+ return GDK_colon;
+ case VK_CIRCUMFLEX:
+ return GDK_asciicircum;
+ case VK_DOLLAR:
+ return GDK_dollar;
+ case VK_EURO_SIGN:
+ return GDK_EuroSign;
+ case VK_EXCLAMATION_MARK:
+ return GDK_exclam;
+ case VK_INVERTED_EXCLAMATION_MARK:
+ return GDK_exclamdown;
+ case VK_LEFT_PARENTHESIS:
+ return GDK_parenleft;
+ case VK_NUMBER_SIGN:
+ return GDK_numbersign;
+ case VK_PLUS:
+ return GDK_plus;
+ case VK_RIGHT_PARENTHESIS:
+ return GDK_parenright;
+ case VK_UNDERSCORE:
+ return GDK_underscore;
+ /*
+ case VK_FINAL:
+ case VK_CONVERT:
+ case VK_NONCONVERT:
+ case VK_ACCEPT:
+ */
+ case VK_MODECHANGE:
+ return GDK_Mode_switch;
+ /*
+ case VK_KANA:
+ */
+ case VK_KANJI:
+ return GDK_Kanji;
+ /*
+ case VK_ALPHANUMERIC:
+ */
+ case VK_KATAKANA:
+ return GDK_Katakana;
+ case VK_HIRAGANA:
+ return GDK_Hiragana;
+ /*
+ case VK_FULL_WIDTH:
+ case VK_HALF_WIDTH:
+ case VK_ROMAN_CHARACTERS:
+ case VK_ALL_CANDIDATES:
+ */
+ case VK_PREVIOUS_CANDIDATE:
+ return GDK_PreviousCandidate;
+ case VK_CODE_INPUT:
+ return GDK_Codeinput;
+ /*
+ case VK_JAPANESE_KATAKANA:
+ case VK_JAPANESE_HIRAGANA:
+ case VK_JAPANESE_ROMAN:
+ */
+ case VK_KANA_LOCK:
+ return GDK_Kana_Lock;
+ /*
+ case VK_INPUT_METHOD_ON_OFF:
+ case VK_CUT:
+ case VK_COPY:
+ case VK_PASTE:
+ case VK_UNDO:
+ case VK_AGAIN:
+ case VK_FIND:
+ case VK_PROPS:
+ case VK_STOP:
+ case VK_COMPOSE:
+ case VK_ALT_GRAPH:
+ */
+ default:
+ return GDK_VoidSymbol;
+ }
+}
diff --git a/native/jni/gtk-peer/gthread-jni.c b/native/jni/gtk-peer/gthread-jni.c
index d66c5a080..e673de07d 100644
--- a/native/jni/gtk-peer/gthread-jni.c
+++ b/native/jni/gtk-peer/gthread-jni.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -245,7 +245,7 @@ exception statement from your version. */
/* The VM handle. This is set in
Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit */
-JavaVM *the_vm;
+JavaVM *cp_gtk_the_vm;
/* Unions used for type punning. */
union env_union
@@ -403,8 +403,8 @@ tracing (const char fmt[], ...)
/* Cached info for Exception-wrapping */
-jclass runtimeException_class; /* java.lang.RuntimeException */
-jmethodID runtimeException_ctor; /* constructor for it */
+static jclass runtimeException_class; /* java.lang.RuntimeException */
+static jmethodID runtimeException_ctor; /* constructor for it */
/* Throw a new RuntimeException. It may wrap around an existing exception.
@@ -1456,7 +1456,7 @@ mutex_new_jni_impl (void)
tracing ("mutex_new_jni_impl()");
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
{
@@ -1488,7 +1488,7 @@ mutex_lock_jni_impl (GMutex * mutex)
assert (mutexObj);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
@@ -1526,7 +1526,7 @@ mutex_trylock_jni_impl (GMutex * gmutex)
assert (mutexObj);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -1597,7 +1597,7 @@ mutex_unlock_jni_impl (GMutex * gmutex)
tracing ("mutex_unlock_jni_impl(mutexObj=%p)", mutexObj);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -1629,7 +1629,7 @@ mutex_free_jni_impl (GMutex * mutex)
union env_union e;
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (TRACE_API_CALLS)
tracing ("mutex_free_jni_impl(%p)", mutexObj);
@@ -1659,7 +1659,7 @@ cond_new_jni_impl (void)
tracing ("mutex_free_jni_impl()");
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
condObj = allocatePlainObject (env);
@@ -1683,7 +1683,7 @@ cond_signal_jni_impl (GCond * gcond)
tracing ("cond_signal_jni_impl(condObj = %p)", condObj);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -1725,7 +1725,7 @@ cond_broadcast_jni_impl (GCond * gcond)
tracing ("cond_broadcast_jni_impl(condObj=%p)", condObj);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -1772,7 +1772,7 @@ cond_wait_jni_impl (GCond * gcond, GMutex * gmutex)
condObj, mutexObj);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -1851,7 +1851,7 @@ cond_timed_wait_jni_impl (GCond * gcond, GMutex * gmutex, GTimeVal * end_time)
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -1942,7 +1942,7 @@ cond_free_jni_impl (GCond * cond)
if (TRACE_API_CALLS)
tracing ("cond_free_jni_impl(condObj = %p)", condObj);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
freeObject (env, condObj);
@@ -1974,7 +1974,7 @@ private_new_jni_impl (GDestroyNotify notify __attribute__ ((unused)))
tracing ("private_new_jni_impl()");
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -2023,7 +2023,7 @@ private_get_jni_impl (GPrivate * gkey)
tracing ("private_get_jni_impl(keyObj=%p)", keyObj);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -2079,7 +2079,7 @@ private_set_jni_impl (GPrivate * gkey, gpointer thread_specific_data)
keyObj, thread_specific_data);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -2173,7 +2173,7 @@ thread_create_jni_impl (GThreadFunc func,
}
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
{
/* The failed call to setup the cache is certainly not recoverable;
@@ -2247,7 +2247,7 @@ thread_yield_jni_impl (void)
tracing ("thread_yield_jni_impl()");
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -2275,7 +2275,7 @@ thread_join_jni_impl (gpointer threadID)
tracing ("thread_join_jni_impl(threadID=%p) ", threadID);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
HIDE_OLD_TROUBLE (env);
@@ -2323,7 +2323,7 @@ thread_exit_jni_impl (void)
tracing ("thread_exit_jni_impl() ");
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
@@ -2412,7 +2412,7 @@ thread_set_priority_jni_impl (gpointer gThreadID, GThreadPriority gpriority)
gThreadID, gpriority);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
goto done;
@@ -2469,7 +2469,7 @@ thread_self_jni_impl (/* Another confusing glib prototype. This is
tracing ("thread_self_jni_impl(my_thread_IDp=%p)", my_thread_IDp);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
return;
@@ -2514,7 +2514,7 @@ thread_equal_jni_impl (gpointer thread1, gpointer thread2)
threadID1, threadID2);
e.jni_env = &env;
- (*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1);
+ (*cp_gtk_the_vm)->GetEnv (cp_gtk_the_vm, e.void_env, JNI_VERSION_1_1);
if (setup_cache (env) < 0)
{
ret = FALSE; /* what is safer? We really don't ever want
@@ -2556,7 +2556,7 @@ done:
/************************************************************************/
/* set of function pointers to give to glib. */
-GThreadFunctions portable_native_sync_jni_functions = {
+GThreadFunctions cp_gtk_portable_native_sync_jni_functions = {
mutex_new_jni_impl, /* mutex_new */
mutex_lock_jni_impl, /* mutex_lock */
mutex_trylock_jni_impl, /* mutex_trylock */
diff --git a/native/jni/gtk-peer/gthread-jni.h b/native/jni/gtk-peer/gthread-jni.h
index 90a252fa5..3d052dc10 100644
--- a/native/jni/gtk-peer/gthread-jni.h
+++ b/native/jni/gtk-peer/gthread-jni.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,7 +42,7 @@ exception statement from your version. */
#include <glib.h>
#include "gtkpeer.h"
-extern GThreadFunctions portable_native_sync_jni_functions;
-extern JavaVM *the_vm;
+extern GThreadFunctions cp_gtk_portable_native_sync_jni_functions;
+extern JavaVM *cp_gtk_the_vm;
#endif /* __GTHREADJNI_H__ */
diff --git a/native/jni/gtk-peer/gtkcairopeer.h b/native/jni/gtk-peer/gtkcairopeer.h
index 85834cadb..dee843c8a 100644
--- a/native/jni/gtk-peer/gtkcairopeer.h
+++ b/native/jni/gtk-peer/gtkcairopeer.h
@@ -18,8 +18,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,6 +86,7 @@ struct graphics2d
jintArray jarray;
jint width, height;
jint *javabuf;
+ jint *javabuf_copy;
jboolean isCopy;
};
diff --git a/native/jni/gtk-peer/gtkpeer.h b/native/jni/gtk-peer/gtkpeer.h
index 02613c4e3..dba79673c 100644
--- a/native/jni/gtk-peer/gtkpeer.h
+++ b/native/jni/gtk-peer/gtkpeer.h
@@ -1,5 +1,5 @@
/* gtkpeer.h -- Some global variables and #defines
- Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,12 +45,6 @@ exception statement from your version. */
#include <jni.h>
-#define RC_FILE ".classpath-gtkrc"
-#define JVM_SUN
-/*
- #define JVM_JAPHAR
-*/
-
#ifndef __GTKPEER_H__
#define __GTKPEER_H__
@@ -58,54 +52,50 @@ exception statement from your version. */
#define __attribute__(x) /* nothing */
#endif
-#ifdef JVM_SUN
-
-extern struct state_table *native_state_table;
-extern struct state_table *native_global_ref_table;
+extern struct state_table *cp_gtk_native_state_table;
+extern struct state_table *cp_gtk_native_global_ref_table;
#define NSA_INIT(env, clazz) \
- do {native_state_table = init_state_table (env, clazz); \
- native_global_ref_table = init_state_table (env, clazz);} while (0)
+ do {cp_gtk_native_state_table = cp_gtk_init_state_table (env, clazz); \
+ cp_gtk_native_global_ref_table = cp_gtk_init_state_table (env, clazz);} while (0)
#define NSA_GET_PTR(env, obj) \
- get_state (env, obj, native_state_table)
+ cp_gtk_get_state (env, obj, cp_gtk_native_state_table)
#define NSA_SET_PTR(env, obj, ptr) \
- set_state (env, obj, native_state_table, (void *)ptr)
+ cp_gtk_set_state (env, obj, cp_gtk_native_state_table, (void *)ptr)
#define NSA_DEL_PTR(env, obj) \
- remove_state_slot (env, obj, native_state_table)
+ cp_gtk_remove_state_slot (env, obj, cp_gtk_native_state_table)
#define NSA_GET_GLOBAL_REF(env, obj) \
- get_state (env, obj, native_global_ref_table)
+ cp_gtk_get_state (env, obj, cp_gtk_native_global_ref_table)
#define NSA_SET_GLOBAL_REF(env, obj) \
do {jobject *globRefPtr; \
globRefPtr = (jobject *) malloc (sizeof (jobject)); \
*globRefPtr = (*env)->NewGlobalRef (env, obj); \
- set_state (env, obj, native_global_ref_table, (void *)globRefPtr);} while (0)
+ cp_gtk_set_state (env, obj, cp_gtk_native_global_ref_table, (void *)globRefPtr);} while (0)
#define NSA_DEL_GLOBAL_REF(env, obj) \
- do {jobject *globRefPtr = get_state (env, obj, native_global_ref_table); \
- remove_state_slot (env, obj, native_global_ref_table); \
+ do {jobject *globRefPtr = cp_gtk_get_state (env, obj, cp_gtk_native_global_ref_table); \
+ cp_gtk_remove_state_slot (env, obj, cp_gtk_native_global_ref_table); \
(*env)->DeleteGlobalRef (env, *globRefPtr); \
free (globRefPtr);} while (0)
-extern struct state_table *native_pixbufdecoder_state_table;
+extern struct state_table *cp_gtk_native_graphics_state_table;
-#define NSA_PB_INIT(env, clazz) \
- native_pixbufdecoder_state_table = init_state_table (env, clazz)
+#define NSA_G_INIT(env, clazz) \
+ cp_gtk_native_graphics_state_table = cp_gtk_init_state_table (env, clazz)
-#define NSA_GET_PB_PTR(env, obj) \
- get_state (env, obj, native_pixbufdecoder_state_table)
+#define NSA_GET_G_PTR(env, obj) \
+ cp_gtk_get_state (env, obj, cp_gtk_native_graphics_state_table)
-#define NSA_SET_PB_PTR(env, obj, ptr) \
- set_state (env, obj, native_pixbufdecoder_state_table, (void *)ptr)
+#define NSA_SET_G_PTR(env, obj, ptr) \
+ cp_gtk_set_state (env, obj, cp_gtk_native_graphics_state_table, (void *)ptr)
-#define NSA_DEL_PB_PTR(env, obj) \
- remove_state_slot (env, obj, native_pixbufdecoder_state_table)
-
-#endif /* JVM_SUN */
+#define NSA_DEL_G_PTR(env, obj) \
+ cp_gtk_remove_state_slot (env, obj, cp_gtk_native_graphics_state_table)
#define SWAPU32(w) \
(((w) << 24) | (((w) & 0xff00) << 8) | (((w) >> 8) & 0xff00) | ((w) >> 24))
@@ -121,65 +111,15 @@ struct graphics
jint x_offset, y_offset;
};
-#define AWT_DEFAULT_CURSOR 0
-#define AWT_CROSSHAIR_CURSOR 1
-#define AWT_TEXT_CURSOR 2
-#define AWT_WAIT_CURSOR 3
-#define AWT_SW_RESIZE_CURSOR 4
-#define AWT_SE_RESIZE_CURSOR 5
-#define AWT_NW_RESIZE_CURSOR 6
-#define AWT_NE_RESIZE_CURSOR 7
-#define AWT_N_RESIZE_CURSOR 8
-#define AWT_S_RESIZE_CURSOR 9
-#define AWT_W_RESIZE_CURSOR 10
-#define AWT_E_RESIZE_CURSOR 11
-#define AWT_HAND_CURSOR 12
-#define AWT_MOVE_CURSOR 13
-
-#define SYNTHETIC_EVENT_MASK (1 << 10)
-
#define AWT_SHIFT_DOWN_MASK (1 << 6)
#define AWT_CTRL_DOWN_MASK (1 << 7)
#define AWT_META_DOWN_MASK (1 << 8)
#define AWT_ALT_DOWN_MASK (1 << 9)
-#define AWT_BUTTON1_DOWN_MASK (1 << 10)
-#define AWT_BUTTON2_DOWN_MASK (1 << 11)
-#define AWT_BUTTON3_DOWN_MASK (1 << 12)
-
#define AWT_BUTTON1_MASK (1 << 4)
#define AWT_BUTTON2_MASK (1 << 3)
#define AWT_BUTTON3_MASK (1 << 2)
-#define MULTI_CLICK_TIME 250
-/* as opposed to a MULTI_PASS_TIME :) */
-
-#define AWT_MOUSE_CLICKED 500
-#define AWT_MOUSE_PRESSED 501
-#define AWT_MOUSE_RELEASED 502
-#define AWT_MOUSE_MOVED 503
-#define AWT_MOUSE_ENTERED 504
-#define AWT_MOUSE_EXITED 505
-#define AWT_MOUSE_DRAGGED 506
-
-#define AWT_ADJUSTMENT_UNIT_INCREMENT 1
-#define AWT_ADJUSTMENT_UNIT_DECREMENT 2
-#define AWT_ADJUSTMENT_BLOCK_DECREMENT 3
-#define AWT_ADJUSTMENT_BLOCK_INCREMENT 4
-#define AWT_ADJUSTMENT_TRACK 5
-
-#define AWT_SCROLLPANE_SCROLLBARS_AS_NEEDED 0
-#define AWT_SCROLLPANE_SCROLLBARS_ALWAYS 1
-#define AWT_SCROLLPANE_SCROLLBARS_NEVER 2
-
-#define AWT_LABEL_LEFT 0
-#define AWT_LABEL_CENTER 1
-#define AWT_LABEL_RIGHT 2
-
-#define AWT_TEXTAREA_SCROLLBARS_BOTH 0
-#define AWT_TEXTAREA_SCROLLBARS_VERTICAL_ONLY 1
-#define AWT_TEXTAREA_SCROLLBARS_HORIZONTAL_ONLY 2
-
#define AWT_ITEM_SELECTED 1
#define AWT_ITEM_DESELECTED 2
@@ -187,82 +127,17 @@ struct graphics
#define AWT_KEY_PRESSED 401
#define AWT_KEY_RELEASED 402
-#define AWT_KEY_CHAR_UNDEFINED 0
-
#define AWT_KEY_LOCATION_UNKNOWN 0
#define AWT_KEY_LOCATION_STANDARD 1
#define AWT_KEY_LOCATION_LEFT 2
#define AWT_KEY_LOCATION_RIGHT 3
#define AWT_KEY_LOCATION_NUMPAD 4
-/* Virtual Keys */
-/* This list should be kept in the same order as the VK_ field
- declarations in KeyEvent.java. */
-#define VK_ENTER '\n'
-#define VK_BACK_SPACE '\b'
-#define VK_TAB '\t'
-#define VK_CANCEL 3
-#define VK_CLEAR 12
-#define VK_SHIFT 16
-#define VK_CONTROL 17
-#define VK_ALT 18
-#define VK_PAUSE 19
-#define VK_CAPS_LOCK 20
-#define VK_ESCAPE 27
-#define VK_SPACE ' '
-#define VK_PAGE_UP 33
-#define VK_PAGE_DOWN 34
-#define VK_END 35
-#define VK_HOME 36
-#define VK_LEFT 37
-#define VK_UP 38
-#define VK_RIGHT 39
-#define VK_DOWN 40
-#define VK_COMMA ','
-#define VK_MINUS '-'
-#define VK_PERIOD '.'
-#define VK_SLASH '/'
-#define VK_0 '0'
-#define VK_1 '1'
-#define VK_2 '2'
-#define VK_3 '3'
-#define VK_4 '4'
-#define VK_5 '5'
-#define VK_6 '6'
-#define VK_7 '7'
-#define VK_8 '8'
-#define VK_9 '9'
-#define VK_SEMICOLON ';'
-#define VK_EQUALS '='
-#define VK_A 'A'
-#define VK_B 'B'
-#define VK_C 'C'
-#define VK_D 'D'
-#define VK_E 'E'
-#define VK_F 'F'
-#define VK_G 'G'
-#define VK_H 'H'
-#define VK_I 'I'
-#define VK_J 'J'
-#define VK_K 'K'
-#define VK_L 'L'
-#define VK_M 'M'
-#define VK_N 'N'
-#define VK_O 'O'
-#define VK_P 'P'
-#define VK_Q 'Q'
-#define VK_R 'R'
-#define VK_S 'S'
-#define VK_T 'T'
-#define VK_U 'U'
-#define VK_V 'V'
-#define VK_W 'W'
-#define VK_X 'X'
-#define VK_Y 'Y'
-#define VK_Z 'Z'
-#define VK_OPEN_BRACKET '['
-#define VK_BACK_SLASH '\\'
-#define VK_CLOSE_BRACKET ']'
+#define AWT_STYLE_PLAIN 0
+#define AWT_STYLE_BOLD 1
+#define AWT_STYLE_ITALIC 2
+
+/* Used in GtkComponentPeer and GtkWindowPeer */
#define VK_NUMPAD0 96
#define VK_NUMPAD1 97
#define VK_NUMPAD2 98
@@ -273,229 +148,13 @@ struct graphics
#define VK_NUMPAD7 103
#define VK_NUMPAD8 104
#define VK_NUMPAD9 105
-#define VK_MULTIPLY 106
-#define VK_ADD 107
-#define VK_SEPARATER 108
-#define VK_SEPARATOR 108
-#define VK_SUBTRACT 109
#define VK_DECIMAL 110
-#define VK_DIVIDE 111
-#define VK_DELETE 127
-#define VK_NUM_LOCK 144
-#define VK_SCROLL_LOCK 145
-#define VK_F1 112
-#define VK_F2 113
-#define VK_F3 114
-#define VK_F4 115
-#define VK_F5 116
-#define VK_F6 117
-#define VK_F7 118
-#define VK_F8 119
-#define VK_F9 120
-#define VK_F10 121
-#define VK_F11 122
-#define VK_F12 123
-#define VK_F13 61440
-#define VK_F14 61441
-#define VK_F15 61442
-#define VK_F16 61443
-#define VK_F17 61444
-#define VK_F18 61445
-#define VK_F19 61446
-#define VK_F20 61447
-#define VK_F21 61448
-#define VK_F22 61449
-#define VK_F23 61450
-#define VK_F24 61451
-#define VK_PRINTSCREEN 154
-#define VK_INSERT 155
-#define VK_HELP 156
-#define VK_META 157
-#define VK_BACK_QUOTE 192
-#define VK_QUOTE 222
-#define VK_KP_UP 224
-#define VK_KP_DOWN 225
-#define VK_KP_LEFT 226
-#define VK_KP_RIGHT 227
-#define VK_DEAD_GRAVE 128
-#define VK_DEAD_ACUTE 129
-#define VK_DEAD_CIRCUMFLEX 130
-#define VK_DEAD_TILDE 131
-#define VK_DEAD_MACRON 132
-#define VK_DEAD_BREVE 133
-#define VK_DEAD_ABOVEDOT 134
-#define VK_DEAD_DIAERESIS 135
-#define VK_DEAD_ABOVERING 136
-#define VK_DEAD_DOUBLEACUTE 137
-#define VK_DEAD_CARON 138
-#define VK_DEAD_CEDILLA 139
-#define VK_DEAD_OGONEK 140
-#define VK_DEAD_IOTA 141
-#define VK_DEAD_VOICED_SOUND 142
-#define VK_DEAD_SEMIVOICED_SOUND 143
-#define VK_AMPERSAND 150
-#define VK_ASTERISK 151
-#define VK_QUOTEDBL 152
-#define VK_LESS 153
-#define VK_GREATER 160
-#define VK_BRACELEFT 161
-#define VK_BRACERIGHT 162
-#define VK_AT 512
-#define VK_COLON 513
-#define VK_CIRCUMFLEX 514
-#define VK_DOLLAR 515
-#define VK_EURO_SIGN 516
-#define VK_EXCLAMATION_MARK 517
-#define VK_INVERTED_EXCLAMATION_MARK 518
-#define VK_LEFT_PARENTHESIS 519
-#define VK_NUMBER_SIGN 520
-#define VK_PLUS 521
-#define VK_RIGHT_PARENTHESIS 522
-#define VK_UNDERSCORE 523
-#define VK_FINAL 24
-#define VK_CONVERT 28
-#define VK_NONCONVERT 29
-#define VK_ACCEPT 30
-#define VK_MODECHANGE 31
-#define VK_KANA 21
-#define VK_KANJI 25
-#define VK_ALPHANUMERIC 240
-#define VK_KATAKANA 241
-#define VK_HIRAGANA 242
-#define VK_FULL_WIDTH 243
-#define VK_HALF_WIDTH 244
-#define VK_ROMAN_CHARACTERS 245
-#define VK_ALL_CANDIDATES 256
-#define VK_PREVIOUS_CANDIDATE 257
-#define VK_CODE_INPUT 258
-#define VK_JAPANESE_KATAKANA 259
-#define VK_JAPANESE_HIRAGANA 260
-#define VK_JAPANESE_ROMAN 261
-#define VK_KANA_LOCK 262
-#define VK_INPUT_METHOD_ON_OFF 263
-#define VK_CUT 65489
-#define VK_COPY 65485
-#define VK_PASTE 65487
-#define VK_UNDO 65483
-#define VK_AGAIN 65481
-#define VK_FIND 65488
-#define VK_PROPS 65482
-#define VK_STOP 65480
-#define VK_COMPOSE 65312
-#define VK_ALT_GRAPH 65406
-#define VK_UNDEFINED 0
-
-#define AWT_FOCUS_GAINED 1004
-#define AWT_FOCUS_LOST 1005
-
-#define AWT_WINDOW_OPENED 200
-#define AWT_WINDOW_CLOSING 201
-#define AWT_WINDOW_CLOSED 202
-#define AWT_WINDOW_ICONIFIED 203
-#define AWT_WINDOW_DEICONIFIED 204
-#define AWT_WINDOW_ACTIVATED 205
-#define AWT_WINDOW_DEACTIVATED 206
-#define AWT_WINDOW_GAINED_FOCUS 207
-#define AWT_WINDOW_LOST_FOCUS 208
-#define AWT_WINDOW_STATE_CHANGED 209
-
-#define AWT_FRAME_STATE_NORMAL 0
-#define AWT_FRAME_STATE_ICONIFIED 1
-#define AWT_FRAME_STATE_MAXIMIZED_HORIZ 2
-#define AWT_FRAME_STATE_MAXIMIZED_VERT 4
-#define AWT_FRAME_STATE_MAXIMIZED_BOTH 6
-#define AWT_STYLE_PLAIN 0
-#define AWT_STYLE_BOLD 1
-#define AWT_STYLE_ITALIC 2
+JNIEnv *cp_gtk_gdk_env(void);
-/* From java.awt.SystemColor */
-#define AWT_DESKTOP 0
-#define AWT_ACTIVE_CAPTION 1
-#define AWT_ACTIVE_CAPTION_TEXT 2
-#define AWT_ACTIVE_CAPTION_BORDER 3
-#define AWT_INACTIVE_CAPTION 4
-#define AWT_INACTIVE_CAPTION_TEXT 5
-#define AWT_INACTIVE_CAPTION_BORDER 6
-#define AWT_WINDOW 7
-#define AWT_WINDOW_BORDER 8
-#define AWT_WINDOW_TEXT 9
-#define AWT_MENU 10
-#define AWT_MENU_TEXT 11
-#define AWT_TEXT 12
-#define AWT_TEXT_TEXT 13
-#define AWT_TEXT_HIGHLIGHT 14
-#define AWT_TEXT_HIGHLIGHT_TEXT 15
-#define AWT_TEXT_INACTIVE_TEXT 16
-#define AWT_CONTROL 17
-#define AWT_CONTROL_TEXT 18
-#define AWT_CONTROL_HIGHLIGHT 19
-#define AWT_CONTROL_LT_HIGHLIGHT 20
-#define AWT_CONTROL_SHADOW 21
-#define AWT_CONTROL_DK_SHADOW 22
-#define AWT_SCROLLBAR 23
-#define AWT_INFO 24
-#define AWT_INFO_TEXT 25
-#define AWT_NUM_COLORS 26
-
-extern jmethodID setBoundsCallbackID;
-
-extern jmethodID postActionEventID;
-extern jmethodID postMenuActionEventID;
-extern jmethodID postMouseEventID;
-extern jmethodID postConfigureEventID;
-extern jmethodID postExposeEventID;
-extern jmethodID postKeyEventID;
-extern jmethodID postFocusEventID;
-extern jmethodID postAdjustmentEventID;
-extern jmethodID choicePostItemEventID;
-extern jmethodID postItemEventID;
-extern jmethodID postListItemEventID;
-extern jmethodID postTextEventID;
-extern jmethodID postWindowEventID;
-
-extern jmethodID beginNativeRepaintID;
-extern jmethodID endNativeRepaintID;
-
-extern jmethodID initComponentGraphicsID;
-extern jmethodID initComponentGraphics2DID;
-extern jmethodID setCursorID;
-
-extern jmethodID syncAttrsID;
-extern jclass gdkColor;
-extern jmethodID gdkColorID;
-
-extern jmethodID postInsetsChangedEventID;
-extern jmethodID windowGetWidthID;
-extern jmethodID windowGetHeightID;
-
-JNIEnv *gdk_env(void);
-
-extern double dpi_conversion_factor;
-
-extern GtkWindowGroup *global_gtk_window_group;
-
-void awt_event_handler (GdkEvent *event);
-
-gboolean pre_event_handler (GtkWidget *widget,
- GdkEvent *event,
- jobject peer);
-
-void connect_awt_hook (JNIEnv *env, jobject peer_obj, int nwindows, ...);
-void connect_awt_hook_cb (GtkWidget *widget, jobject peer);
-
-void set_visible (GtkWidget *widget, jboolean visible);
-void set_parent (GtkWidget *widget, GtkContainer *parent);
-
-jint keyevent_state_to_awt_mods (GdkEvent *event);
-
-guint awt_keycode_to_keysym (jint keyCode, jint keyLocation);
-
-struct item_event_hook_info
-{
- jobject peer_obj;
- const char *label;
-};
+/* Global variables */
+extern double cp_gtk_dpi_conversion_factor;
+extern GtkWindowGroup *cp_gtk_global_window_group;
/* Union used for type punning. */
union widget_union
@@ -504,18 +163,57 @@ union widget_union
GtkWidget **widget;
};
+/* Keycode helpers */
+guint cp_gtk_awt_keycode_to_keysym (jint keyCode, jint keyLocation);
+
+/* Image helpers */
+GdkPixbuf *cp_gtk_image_get_pixbuf (JNIEnv *env, jobject obj);
+GdkPixmap *cp_gtk_image_get_pixmap (JNIEnv *env, jobject obj);
+jboolean cp_gtk_image_is_offscreen (JNIEnv *env, jobject obj);
+
+/* JNI initialization functions */
+#if GTK_CAIRO
+void cp_gtk_graphics2d_init_jni (void);
+#endif
+void cp_gtk_graphics_init_jni (void);
+void cp_gtk_button_init_jni (void);
+void cp_gtk_checkbox_init_jni (void);
+void cp_gtk_choice_init_jni (void);
+void cp_gtk_component_init_jni (void);
+void cp_gtk_list_init_jni (void);
+void cp_gtk_menuitem_init_jni (void);
+void cp_gtk_scrollbar_init_jni (void);
+void cp_gtk_textcomponent_init_jni (void);
+void cp_gtk_window_init_jni (void);
+
+/* Signal connection convience functions */
+void cp_gtk_component_connect_expose_signals (GObject *ptr, jobject *gref);
+void cp_gtk_component_connect_focus_signals (GObject *ptr, jobject *gref);
+void cp_gtk_component_connect_mouse_signals (GObject *ptr, jobject *gref);
+void cp_gtk_component_connect_signals (GObject *ptr, jobject *gref);
+void cp_gtk_textcomponent_connect_signals (GObject *ptr, jobject *gref);
+
+/* Debugging */
+void cp_gtk_print_current_thread (void);
+
#define DEBUG_LOCKING 0
#if DEBUG_LOCKING
-#define gdk_threads_enter() \
-{ \
- g_print ("lock: %s, %d\n", __FILE__, __LINE__); \
- gdk_threads_enter (); \
+#define gdk_threads_enter() \
+{ \
+ g_print ("locking: %s, %d\n", __FILE__, __LINE__); \
+ cp_gtk_print_current_thread (); \
+ gdk_threads_enter (); \
+ g_print ("locked: %s, %d\n", __FILE__, __LINE__); \
+ cp_gtk_print_current_thread (); \
}
-#define gdk_threads_leave() \
-{ \
- g_print ("unlock: %s, %d\n", __FILE__, __LINE__); \
- gdk_threads_leave (); \
+#define gdk_threads_leave() \
+{ \
+ g_print ("unlocking: %s, %d\n", __FILE__, __LINE__); \
+ cp_gtk_print_current_thread (); \
+ gdk_threads_leave (); \
+ g_print ("unlocked: %s, %d\n", __FILE__, __LINE__); \
+ cp_gtk_print_current_thread (); \
}
#endif
diff --git a/native/jni/java-io/java_io_VMFile.c b/native/jni/java-io/java_io_VMFile.c
index d02fbbf01..b32c29477 100644
--- a/native/jni/java-io/java_io_VMFile.c
+++ b/native/jni/java-io/java_io_VMFile.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-io/java_io_VMObjectInputStream.c b/native/jni/java-io/java_io_VMObjectInputStream.c
index 71fa71499..d8d807149 100644
--- a/native/jni/java-io/java_io_VMObjectInputStream.c
+++ b/native/jni/java-io/java_io_VMObjectInputStream.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-io/java_io_VMObjectStreamClass.c b/native/jni/java-io/java_io_VMObjectStreamClass.c
index fee104b50..8c2556bcf 100644
--- a/native/jni/java-io/java_io_VMObjectStreamClass.c
+++ b/native/jni/java-io/java_io_VMObjectStreamClass.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-io/javaio.c b/native/jni/java-io/javaio.c
index b753d07d2..6dc3de8f0 100644
--- a/native/jni/java-io/javaio.c
+++ b/native/jni/java-io/javaio.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-io/javaio.h b/native/jni/java-io/javaio.h
index 0228993ef..2e4a8d103 100644
--- a/native/jni/java-io/javaio.h
+++ b/native/jni/java-io/javaio.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-lang/java_lang_Math.c b/native/jni/java-lang/java_lang_Math.c
index 179d8fda7..b4b88a775 100644
--- a/native/jni/java-lang/java_lang_Math.c
+++ b/native/jni/java-lang/java_lang_Math.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-lang/java_lang_VMDouble.c b/native/jni/java-lang/java_lang_VMDouble.c
index 33246489c..6b4aed42d 100644
--- a/native/jni/java-lang/java_lang_VMDouble.c
+++ b/native/jni/java-lang/java_lang_VMDouble.c
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-lang/java_lang_VMFloat.c b/native/jni/java-lang/java_lang_VMFloat.c
index 0d9c19152..7bff629fc 100644
--- a/native/jni/java-lang/java_lang_VMFloat.c
+++ b/native/jni/java-lang/java_lang_VMFloat.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-lang/java_lang_VMProcess.c b/native/jni/java-lang/java_lang_VMProcess.c
index 7cd41b440..1c5a11ff9 100644
--- a/native/jni/java-lang/java_lang_VMProcess.c
+++ b/native/jni/java-lang/java_lang_VMProcess.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-lang/java_lang_VMSystem.c b/native/jni/java-lang/java_lang_VMSystem.c
index fd27a06f8..620ae60cb 100644
--- a/native/jni/java-lang/java_lang_VMSystem.c
+++ b/native/jni/java-lang/java_lang_VMSystem.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-lang/java_lang_reflect_Array.c b/native/jni/java-lang/java_lang_reflect_Array.c
index d1dfa5e67..0bd23c16f 100644
--- a/native/jni/java-lang/java_lang_reflect_Array.c
+++ b/native/jni/java-lang/java_lang_reflect_Array.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c b/native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c
index a02cdeb1c..5bc284f64 100644
--- a/native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c
+++ b/native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -207,7 +207,9 @@ Java_gnu_java_net_PlainDatagramSocketImpl_receive0 (JNIEnv * env, jobject obj,
}
arr = (*env)->CallObjectMethod (env, packet, mid);
- if ((arr == NULL) || (*env)->ExceptionOccurred (env))
+ if ((*env)->ExceptionOccurred (env))
+ return;
+ if (arr == NULL)
{
JCL_ThrowException (env, IO_EXCEPTION, "Internal error: call getData");
return;
@@ -223,11 +225,7 @@ Java_gnu_java_net_PlainDatagramSocketImpl_receive0 (JNIEnv * env, jobject obj,
offset = (*env)->CallIntMethod (env, packet, mid);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION,
- "Internal error: call getOffset");
- return;
- }
+ return;
DBG ("PlainDatagramSocketImpl.receive(): Got the offset\n");
@@ -241,16 +239,15 @@ Java_gnu_java_net_PlainDatagramSocketImpl_receive0 (JNIEnv * env, jobject obj,
maxlen = (*env)->GetIntField (env, packet, fid);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION, "Internal error: call length");
- return;
- }
+ return;
/* Receive the packet */
/* should we try some sort of validation on the length? */
bytes_read =
_javanet_recvfrom (env, obj, arr, offset, maxlen, &addr, &port);
- if ((bytes_read == -1) || (*env)->ExceptionOccurred (env))
+ if ((*env)->ExceptionOccurred (env))
+ return;
+ if (bytes_read == -1)
{
JCL_ThrowException (env, IO_EXCEPTION, "Internal error: receive");
return;
@@ -292,11 +289,7 @@ Java_gnu_java_net_PlainDatagramSocketImpl_receive0 (JNIEnv * env, jobject obj,
addr_obj = (*env)->CallStaticObjectMethod (env, addr_cls, mid, ip_str_obj);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION,
- "Internal error: call getByName");
- return;
- }
+ return;
mid = (*env)->GetMethodID (env, cls, "setAddress",
"(Ljava/net/InetAddress;)V");
@@ -308,11 +301,7 @@ Java_gnu_java_net_PlainDatagramSocketImpl_receive0 (JNIEnv * env, jobject obj,
(*env)->CallVoidMethod (env, packet, mid, addr_obj);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION,
- "Internal error: call setAddress");
- return;
- }
+ return;
DBG ("PlainDatagramSocketImpl.receive(): Stored the address\n");
@@ -326,10 +315,7 @@ Java_gnu_java_net_PlainDatagramSocketImpl_receive0 (JNIEnv * env, jobject obj,
(*env)->CallVoidMethod (env, packet, mid, port);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION, "Internal error: call setPort");
- return;
- }
+ return;
DBG ("PlainDatagramSocketImpl.receive(): Stored the port\n");
@@ -343,10 +329,7 @@ Java_gnu_java_net_PlainDatagramSocketImpl_receive0 (JNIEnv * env, jobject obj,
(*env)->SetIntField (env, packet, fid, bytes_read);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION, "Internal error: call length");
- return;
- }
+ return;
DBG ("PlainDatagramSocketImpl.receive(): Stored the length\n");
#else /* not WITHOUT_NETWORK */
@@ -372,20 +355,13 @@ Java_gnu_java_net_PlainDatagramSocketImpl_sendto (JNIEnv * env, jobject obj,
netAddress = _javanet_get_netaddr (env, addr);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION,
- "Internal error: get network address");
- return;
- }
+ return;
DBG ("PlainDatagramSocketImpl.sendto(): have addr\n");
_javanet_sendto (env, obj, buf, offset, len, netAddress, port);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION, "Internal error: send data");
- return;
- }
+ return;
DBG ("PlainDatagramSocketImpl.sendto(): finished\n");
#else /* not WITHOUT_NETWORK */
@@ -411,17 +387,11 @@ Java_gnu_java_net_PlainDatagramSocketImpl_join (JNIEnv * env, jobject obj,
netAddress = _javanet_get_netaddr (env, addr);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION, "Internal error");
- return;
- }
+ return;
fd = _javanet_get_int_field (env, obj, "native_fd");
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION, "Internal error");
- return;
- }
+ return;
DBG ("PlainDatagramSocketImpl.join(): have native fd\n");
@@ -459,17 +429,11 @@ Java_gnu_java_net_PlainDatagramSocketImpl_leave (JNIEnv * env, jobject obj,
netAddress = _javanet_get_netaddr (env, addr);
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION, "Internal error");
- return;
- }
+ return;
fd = _javanet_get_int_field (env, obj, "native_fd");
if ((*env)->ExceptionOccurred (env))
- {
- JCL_ThrowException (env, IO_EXCEPTION, "Internal error");
- return;
- }
+ return;
DBG ("PlainDatagramSocketImpl.leave(): have native fd\n");
diff --git a/native/jni/java-net/gnu_java_net_PlainSocketImpl.c b/native/jni/java-net/gnu_java_net_PlainSocketImpl.c
index 086aeded3..a5261514d 100644
--- a/native/jni/java-net/gnu_java_net_PlainSocketImpl.c
+++ b/native/jni/java-net/gnu_java_net_PlainSocketImpl.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-net/java_net_VMInetAddress.c b/native/jni/java-net/java_net_VMInetAddress.c
index 6247a70ba..d33265cff 100644
--- a/native/jni/java-net/java_net_VMInetAddress.c
+++ b/native/jni/java-net/java_net_VMInetAddress.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-net/java_net_VMNetworkInterface.c b/native/jni/java-net/java_net_VMNetworkInterface.c
index 47ea150b2..71f5e8927 100644
--- a/native/jni/java-net/java_net_VMNetworkInterface.c
+++ b/native/jni/java-net/java_net_VMNetworkInterface.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-net/javanet.c b/native/jni/java-net/javanet.c
index f778af66f..fdc1c22ec 100644
--- a/native/jni/java-net/javanet.c
+++ b/native/jni/java-net/javanet.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -377,6 +377,13 @@ _javanet_get_netaddr (JNIEnv * env, jobject addr)
DBG ("_javanet_get_netaddr(): Entered _javanet_get_netaddr\n");
+ if (addr == NULL)
+ {
+ JCL_ThrowException (env, "java/lang/NullPointerException",
+ "Null address");
+ return 0;
+ }
+
/* Call the getAddress method on the object to retrieve the IP address */
cls = (*env)->GetObjectClass (env, addr);
if (cls == NULL)
@@ -473,6 +480,22 @@ _javanet_create (JNIEnv * env, jobject this, jboolean stream)
else
_javanet_set_int_field (env, this, "gnu/java/net/PlainDatagramSocketImpl",
"native_fd", fd);
+
+ if ((*env)->ExceptionOccurred (env))
+ {
+ /* Try to make sure we close the socket since close() won't work. */
+ do
+ {
+ TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
+ if (result != TARGET_NATIVE_OK
+ && (TARGET_NATIVE_LAST_ERROR ()
+ != TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL))
+ return;
+ }
+ while (result != TARGET_NATIVE_OK);
+ return;
+ }
+
#else /* not WITHOUT_NETWORK */
#endif /* not WITHOUT_NETWORK */
}
@@ -489,6 +512,7 @@ _javanet_close (JNIEnv * env, jobject this, int stream)
#ifndef WITHOUT_NETWORK
int fd;
int result;
+ int error = 0;
assert (env != NULL);
assert ((*env) != NULL);
@@ -497,14 +521,27 @@ _javanet_close (JNIEnv * env, jobject this, int stream)
if (fd == -1)
return;
- TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
-
if (stream)
_javanet_set_int_field (env, this, "gnu/java/net/PlainSocketImpl",
"native_fd", -1);
else
_javanet_set_int_field (env, this, "gnu/java/net/PlainDatagramSocketImpl",
"native_fd", -1);
+ do
+ {
+ TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
+ if (result != TARGET_NATIVE_OK)
+ {
+ /* Only throw an error when a "real" error occurs. */
+ error = TARGET_NATIVE_LAST_ERROR ();
+ if (error != TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL
+ && error != ENOTCONN && error != ECONNRESET && error != EBADF)
+ JCL_ThrowException (env, IO_EXCEPTION,
+ TARGET_NATIVE_LAST_ERROR_STRING ());
+ }
+ }
+ while (error == TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL);
+
#else /* not WITHOUT_NETWORK */
#endif /* not WITHOUT_NETWORK */
}
@@ -548,13 +585,20 @@ _javanet_connect (JNIEnv * env, jobject this, jobject addr, jint port)
DBG ("_javanet_connect(): Got native fd\n");
/* Connect up */
- TARGET_NATIVE_NETWORK_SOCKET_CONNECT (fd, netaddr, port, result);
- if (result != TARGET_NATIVE_OK)
+ do
{
- JCL_ThrowException (env, IO_EXCEPTION,
- TARGET_NATIVE_LAST_ERROR_STRING ());
- return;
+ TARGET_NATIVE_NETWORK_SOCKET_CONNECT (fd, netaddr, port, result);
+ if (result != TARGET_NATIVE_OK
+ && (TARGET_NATIVE_LAST_ERROR ()
+ != TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL))
+ {
+ JCL_ThrowException (env, IO_EXCEPTION,
+ TARGET_NATIVE_LAST_ERROR_STRING ());
+ return;
+ }
}
+ while (result != TARGET_NATIVE_OK);
+
DBG ("_javanet_connect(): Connected successfully\n");
/* Populate instance variables */
@@ -562,15 +606,17 @@ _javanet_connect (JNIEnv * env, jobject this, jobject addr, jint port)
result);
if (result != TARGET_NATIVE_OK)
{
- TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
JCL_ThrowException (env, IO_EXCEPTION,
TARGET_NATIVE_LAST_ERROR_STRING ());
+ /* We don't care whether this succeeds. close() will cleanup later. */
+ TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
return;
}
_javanet_create_localfd (env, this);
if ((*env)->ExceptionOccurred (env))
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
return;
}
@@ -580,6 +626,7 @@ _javanet_connect (JNIEnv * env, jobject this, jobject addr, jint port)
local_port);
if ((*env)->ExceptionOccurred (env))
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
return;
}
@@ -589,9 +636,10 @@ _javanet_connect (JNIEnv * env, jobject this, jobject addr, jint port)
remote_port, result);
if (result != TARGET_NATIVE_OK)
{
- TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
JCL_ThrowException (env, IO_EXCEPTION,
TARGET_NATIVE_LAST_ERROR_STRING ());
+ /* We don't care whether this succeeds. close() will cleanup later. */
+ TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
return;
}
@@ -605,6 +653,7 @@ _javanet_connect (JNIEnv * env, jobject this, jobject addr, jint port)
}
if ((*env)->ExceptionOccurred (env))
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
return;
}
@@ -614,6 +663,7 @@ _javanet_connect (JNIEnv * env, jobject this, jobject addr, jint port)
remote_port);
if ((*env)->ExceptionOccurred (env))
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (fd, result);
return;
}
@@ -698,16 +748,19 @@ _javanet_bind (JNIEnv * env, jobject this, jobject addr, jint port,
octets[3], tmpaddr);
TARGET_NATIVE_NETWORK_SOCKET_BIND (fd, tmpaddr, port, result);
- (*env)->ReleaseByteArrayElements (env, arr, octets, 0);
-
if (result != TARGET_NATIVE_OK)
{
+ char *errorstr = TARGET_NATIVE_LAST_ERROR_STRING ();
+ (*env)->ReleaseByteArrayElements (env, arr, octets, 0);
+
JCL_ThrowException (env, BIND_EXCEPTION,
- TARGET_NATIVE_LAST_ERROR_STRING ());
+ errorstr);
return;
}
DBG ("_javanet_bind(): Past bind\n");
+ (*env)->ReleaseByteArrayElements (env, arr, octets, 0);
+
/* Update instance variables, specifically the local port number */
TARGET_NATIVE_NETWORK_SOCKET_GET_LOCAL_INFO (fd, local_address, local_port,
result);
@@ -816,7 +869,16 @@ _javanet_accept (JNIEnv * env, jobject this, jobject impl)
if ((*env)->ExceptionOccurred (env))
{
- TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
+ /* Try to make sure we close the socket since close() won't work. */
+ do
+ {
+ TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
+ if (result != TARGET_NATIVE_OK
+ && (TARGET_NATIVE_LAST_ERROR ()
+ != TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL))
+ return;
+ }
+ while (result != TARGET_NATIVE_OK);
return;
}
@@ -824,6 +886,7 @@ _javanet_accept (JNIEnv * env, jobject this, jobject impl)
local_port, result);
if (result != TARGET_NATIVE_OK)
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
JCL_ThrowException (env, IO_EXCEPTION,
TARGET_NATIVE_LAST_ERROR_STRING ());
@@ -833,6 +896,7 @@ _javanet_accept (JNIEnv * env, jobject this, jobject impl)
_javanet_create_localfd (env, impl);
if ((*env)->ExceptionOccurred (env))
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
return;
}
@@ -841,6 +905,7 @@ _javanet_accept (JNIEnv * env, jobject this, jobject impl)
local_port);
if ((*env)->ExceptionOccurred (env))
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
return;
}
@@ -849,15 +914,17 @@ _javanet_accept (JNIEnv * env, jobject this, jobject impl)
remote_port, result);
if (result != TARGET_NATIVE_OK)
{
- TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
JCL_ThrowException (env, IO_EXCEPTION,
TARGET_NATIVE_LAST_ERROR_STRING ());
+ /* We don't care whether this succeeds. close() will cleanup later. */
+ TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
return;
}
_javanet_set_remhost (env, impl, remote_address);
if ((*env)->ExceptionOccurred (env))
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
return;
}
@@ -866,6 +933,7 @@ _javanet_accept (JNIEnv * env, jobject this, jobject impl)
remote_port);
if ((*env)->ExceptionOccurred (env))
{
+ /* We don't care whether this succeeds. close() will cleanup later. */
TARGET_NATIVE_NETWORK_SOCKET_CLOSE (newfd, result);
return;
}
@@ -945,15 +1013,21 @@ _javanet_recvfrom (JNIEnv * env, jobject this, jarray buf, int offset,
(TARGET_NATIVE_LAST_ERROR () ==
TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL));
- (*env)->ReleaseByteArrayElements (env, buf, p, 0);
-
if (received_bytes == -1)
{
- JCL_ThrowException (env, IO_EXCEPTION,
- TARGET_NATIVE_LAST_ERROR_STRING ());
+ if (TARGET_NATIVE_LAST_ERROR () == EAGAIN)
+ JCL_ThrowException (env, "java/net/SocketTimeoutException", "Timeout");
+ else
+ JCL_ThrowException (env, IO_EXCEPTION,
+ TARGET_NATIVE_LAST_ERROR_STRING ());
+
+ /* Cleanup and return. */
+ (*env)->ReleaseByteArrayElements (env, buf, p, 0);
return 0;
}
+ (*env)->ReleaseByteArrayElements (env, buf, p, 0);
+
/* Handle return addr case */
if (addr != NULL)
{
@@ -1004,29 +1078,42 @@ _javanet_sendto (JNIEnv * env, jobject this, jarray buf, int offset, int len,
if (p == NULL)
return;
- /* Send the data */
- if (addr == 0)
+ /* We must send all the data, so repeat till done. */
+ while (len > 0)
{
- DBG ("_javanet_sendto(): Sending....\n");
- TARGET_NATIVE_NETWORK_SOCKET_SEND (fd, p + offset, len, bytes_sent);
- }
- else
- {
- DBG ("_javanet_sendto(): Sending....\n");
- TARGET_NATIVE_NETWORK_SOCKET_SEND_WITH_ADDRESS_PORT (fd, p + offset,
- len, addr, port,
- bytes_sent);
+ /* Send the data */
+ if (addr == 0)
+ {
+ DBG ("_javanet_sendto(): Sending....\n");
+ TARGET_NATIVE_NETWORK_SOCKET_SEND (fd, p + offset, len, bytes_sent);
+ }
+ else
+ {
+ DBG ("_javanet_sendto(): Sending....\n");
+ TARGET_NATIVE_NETWORK_SOCKET_SEND_WITH_ADDRESS_PORT (fd, p + offset,
+ len, addr, port,
+ bytes_sent);
+ }
+
+ if (bytes_sent < 0)
+ {
+ if (TARGET_NATIVE_LAST_ERROR ()
+ != TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL)
+ {
+ JCL_ThrowException (env, IO_EXCEPTION,
+ TARGET_NATIVE_LAST_ERROR_STRING ());
+ break;
+ }
+ }
+ else
+ {
+ len -= bytes_sent;
+ addr += bytes_sent;
+ }
}
(*env)->ReleaseByteArrayElements (env, buf, p, 0);
- /***** Do we need to check EINTR? */
- if (bytes_sent < 0)
- {
- JCL_ThrowException (env, IO_EXCEPTION,
- TARGET_NATIVE_LAST_ERROR_STRING ());
- return;
- }
#else /* not WITHOUT_NETWORK */
#endif /* not WITHOUT_NETWORK */
}
@@ -1139,9 +1226,9 @@ _javanet_set_option (JNIEnv * env, jobject this, jint option_id, jobject val)
return;
TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT (fd, optval, result);
-#endif
- /* ignore errors and do not throw an exception. */
+#else
result = TARGET_NATIVE_OK;
+#endif
break;
case SOCKOPT_SO_SNDBUF:
@@ -1326,7 +1413,6 @@ _javanet_get_option (JNIEnv * env, jobject this, jint option_id)
TARGET_NATIVE_LAST_ERROR_STRING ());
return (0);
}
-
return (_javanet_create_integer (env, optval));
#else
JCL_ThrowException (env, SOCKET_EXCEPTION,
diff --git a/native/jni/java-net/javanet.h b/native/jni/java-net/javanet.h
index dc28bbf60..7c77ea77f 100644
--- a/native/jni/java-net/javanet.h
+++ b/native/jni/java-net/javanet.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-nio/gnu_java_nio_VMPipe.c b/native/jni/java-nio/gnu_java_nio_VMPipe.c
index ded68907a..369c5a3d6 100644
--- a/native/jni/java-nio/gnu_java_nio_VMPipe.c
+++ b/native/jni/java-nio/gnu_java_nio_VMPipe.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-nio/gnu_java_nio_VMSelector.c b/native/jni/java-nio/gnu_java_nio_VMSelector.c
index 912523bf1..f8a40aa7a 100644
--- a/native/jni/java-nio/gnu_java_nio_VMSelector.c
+++ b/native/jni/java-nio/gnu_java_nio_VMSelector.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c b/native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
index c43e8df17..9232ea49c 100644
--- a/native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
+++ b/native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
@@ -1,5 +1,5 @@
/* gnu_java_nio_channels_FileChannelImpl.c -
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -52,6 +52,14 @@ exception statement from your version. */
#include "gnu_java_nio_channels_FileChannelImpl.h"
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
+
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif /* HAVE_SYS_MMAN_H */
+
/* These values must be kept in sync with FileChannelImpl.java. */
#define FILECHANNELIMPL_READ 1
#define FILECHANNELIMPL_WRITE 2
@@ -87,6 +95,10 @@ exception statement from your version. */
#define CONVERT_SSIZE_T_TO_JINT(x) ((jint)(x & 0xFFFFFFFF))
#define CONVERT_JINT_TO_SSIZE_T(x) (x)
+/* Align a value up or down to a multiple of the pagesize. */
+#define ALIGN_DOWN(p,s) ((p) - ((p) % (s)))
+#define ALIGN_UP(p,s) ((p) + ((s) - ((p) % (s))))
+
/* cached fieldID of gnu.java.nio.channels.FileChannelImpl.fd */
static jfieldID native_fd_fieldID;
@@ -101,12 +113,12 @@ get_native_fd (JNIEnv * env, jobject obj)
* static initialization.
*/
JNIEXPORT void JNICALL
-Java_gnu_java_nio_channels_FileChannelImpl_init (JNIEnv * env, jclass clazz)
+Java_gnu_java_nio_channels_FileChannelImpl_init (JNIEnv * env,
+ jclass clazz
+ __attribute__ ((__unused__)))
{
jclass clazz_fc;
jfieldID field;
- jmethodID constructor;
- jobject obj;
/* Initialize native_fd_fieldID so we only compute it once! */
clazz_fc = (*env)->FindClass (env, "gnu/java/nio/channels/FileChannelImpl");
@@ -124,28 +136,6 @@ Java_gnu_java_nio_channels_FileChannelImpl_init (JNIEnv * env, jclass clazz)
}
native_fd_fieldID = field;
-
- constructor = (*env)->GetMethodID (env, clazz, "<init>", "(II)V");
- if (!constructor)
- return;
-
-#define INIT_FIELD(FIELDNAME, FDVALUE, MODE) \
- field = (*env)->GetStaticFieldID (env, clazz, FIELDNAME, \
- "Lgnu/java/nio/channels/FileChannelImpl;"); \
- if (! field) \
- return; \
- obj = (*env)->NewObject (env, clazz, constructor, FDVALUE, MODE); \
- if (! obj) \
- return; \
- (*env)->SetStaticObjectField (env, clazz, field, obj); \
- if ((*env)->ExceptionOccurred (env)) \
- return;
-
- INIT_FIELD ("in", 0, FILECHANNELIMPL_READ);
- INIT_FIELD ("out", 1, FILECHANNELIMPL_WRITE);
- INIT_FIELD ("err", 2, FILECHANNELIMPL_WRITE);
-
-#undef INIT_FIELD
}
/*
@@ -214,17 +204,22 @@ Java_gnu_java_nio_channels_FileChannelImpl_open (JNIEnv * env,
#endif
TARGET_NATIVE_FILE_OPEN (filename, native_fd, flags, permissions, result);
- JCL_free_cstring (env, name, filename);
if (result != TARGET_NATIVE_OK)
{
- /* We can only throw FileNotFoundException. */
+ char message[256]; /* Fixed size we don't need to malloc. */
+ char *error_string = TARGET_NATIVE_LAST_ERROR_STRING ();
+
+ snprintf(message, 256, "%s: %s", error_string, filename);
+ /* We are only allowed to throw FileNotFoundException. */
JCL_ThrowException (env,
"java/io/FileNotFoundException",
- TARGET_NATIVE_LAST_ERROR_STRING ());
+ message);
+ JCL_free_cstring (env, name, filename);
return TARGET_NATIVE_MATH_INT_INT64_CONST_MINUS_1;
}
+ JCL_free_cstring (env, name, filename);
return native_fd;
}
@@ -241,12 +236,19 @@ Java_gnu_java_nio_channels_FileChannelImpl_implCloseChannel (JNIEnv * env,
native_fd = get_native_fd (env, obj);
- TARGET_NATIVE_FILE_CLOSE (native_fd, result);
- if (result != TARGET_NATIVE_OK)
+ do
{
- JCL_ThrowException (env, IO_EXCEPTION,
- TARGET_NATIVE_LAST_ERROR_STRING ());
+ TARGET_NATIVE_FILE_CLOSE (native_fd, result);
+ if (result != TARGET_NATIVE_OK
+ && (TARGET_NATIVE_LAST_ERROR ()
+ != TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL))
+ {
+ JCL_ThrowException (env, IO_EXCEPTION,
+ TARGET_NATIVE_LAST_ERROR_STRING ());
+ return;
+ }
}
+ while (result != TARGET_NATIVE_OK);
}
/*
@@ -263,13 +265,19 @@ Java_gnu_java_nio_channels_FileChannelImpl_available (JNIEnv * env,
native_fd = get_native_fd (env, obj);
- TARGET_NATIVE_FILE_AVAILABLE (native_fd, bytes_available, result);
- if (result != TARGET_NATIVE_OK)
+ do
{
- JCL_ThrowException (env, IO_EXCEPTION,
- TARGET_NATIVE_LAST_ERROR_STRING ());
- return 0;
+ TARGET_NATIVE_FILE_AVAILABLE (native_fd, bytes_available, result);
+ if (result != TARGET_NATIVE_OK
+ && (TARGET_NATIVE_LAST_ERROR ()
+ != TARGET_NATIVE_ERROR_INTERRUPT_FUNCTION_CALL))
+ {
+ JCL_ThrowException (env, IO_EXCEPTION,
+ TARGET_NATIVE_LAST_ERROR_STRING ());
+ return 0;
+ }
}
+ while (result != TARGET_NATIVE_OK);
/* FIXME NYI ??? why only jint and not jlong? */
return TARGET_NATIVE_MATH_INT_INT64_TO_INT32 (bytes_available);
@@ -499,13 +507,125 @@ Java_gnu_java_nio_channels_FileChannelImpl_implTruncate (JNIEnv * env,
}
JNIEXPORT jobject JNICALL
-Java_gnu_java_nio_channels_FileChannelImpl_mapImpl (JNIEnv * env,
- jobject obj
- __attribute__ ((__unused__)), jchar mode __attribute__ ((__unused__)), jlong position __attribute__ ((__unused__)), jint size __attribute__ ((__unused__)))
+Java_gnu_java_nio_channels_FileChannelImpl_mapImpl (JNIEnv *env, jobject obj,
+ jchar mode, jlong position, jint size)
{
+#ifdef HAVE_MMAP
+ jclass MappedByteBufferImpl_class;
+ jclass RawData_class;
+ jmethodID MappedByteBufferImpl_init = NULL;
+ jmethodID RawData_init = NULL;
+ jobject RawData_instance;
+ volatile jobject buffer;
+ long pagesize;
+ int prot, flags;
+ int fd;
+ void *p;
+ void *address;
+
+ /* FIXME: should we just assume we're on an OS modern enough to
+ have 'sysconf'? And not check for 'getpagesize'? */
+#if defined(HAVE_GETPAGESIZE)
+ pagesize = getpagesize ();
+#elif defined(HAVE_SYSCONF)
+ pagesize = sysconf (_SC_PAGESIZE);
+#else
+ JCL_ThrowException (env, IO_EXCEPTION,
+ "can't determine memory page size");
+ return NULL;
+#endif /* HAVE_GETPAGESIZE/HAVE_SYSCONF */
+
+#if (SIZEOF_VOID_P == 4)
+ RawData_class = (*env)->FindClass (env, "gnu/classpath/RawData32");
+ if (RawData_class != NULL)
+ {
+ RawData_init = (*env)->GetMethodID (env, RawData_class,
+ "<init>", "(I)V");
+ }
+#elif (SIZEOF_VOID_P == 8)
+ RawData_class = (*env)->FindClass (env, "gnu/classpath/RawData64");
+ if (RawData_class != NULL)
+ {
+ RawData_init = (*env)->GetMethodID (env, RawData_class,
+ "<init>", "(J)V");
+ }
+#else
JCL_ThrowException (env, IO_EXCEPTION,
- "java.nio.FileChannelImpl.nio_mmap_file(): not implemented");
+ "pointer size not supported");
+ return NULL;
+#endif /* SIZEOF_VOID_P */
+
+ if ((*env)->ExceptionOccurred (env))
+ {
+ return NULL;
+ }
+ if (RawData_init == NULL)
+ {
+ JCL_ThrowException (env, "java/lang/InternalError",
+ "could not get RawData constructor");
+ return NULL;
+ }
+
+ prot = PROT_READ;
+ if (mode == '+')
+ prot |= PROT_WRITE;
+ flags = (mode == 'c' ? MAP_PRIVATE : MAP_SHARED);
+ fd = get_native_fd (env, obj);
+ p = mmap (NULL, (size_t) ALIGN_UP (size, pagesize), prot, flags,
+ fd, ALIGN_DOWN (position, pagesize));
+ if (p == MAP_FAILED)
+ {
+ JCL_ThrowException (env, IO_EXCEPTION, strerror (errno));
+ return NULL;
+ }
+
+ /* Unalign the mapped value back up, since we aligned offset
+ down to a multiple of the page size. */
+ address = (void *) ((char *) p + (position % pagesize));
+
+#if (SIZEOF_VOID_P == 4)
+ RawData_instance = (*env)->NewObject (env, RawData_class,
+ RawData_init, (jint) address);
+#elif (SIZEOF_VOID_P == 8)
+ RawData_instance = (*env)->NewObject (env, RawData_class,
+ RawData_init, (jlong) address);
+#endif /* SIZEOF_VOID_P */
+
+ MappedByteBufferImpl_class = (*env)->FindClass (env,
+ "java/nio/MappedByteBufferImpl");
+ if (MappedByteBufferImpl_class != NULL)
+ {
+ MappedByteBufferImpl_init =
+ (*env)->GetMethodID (env, MappedByteBufferImpl_class,
+ "<init>", "(Lgnu/classpath/RawData;IZ)V");
+ }
+
+ if ((*env)->ExceptionOccurred (env))
+ {
+ munmap (p, ALIGN_UP (size, pagesize));
+ return NULL;
+ }
+ if (MappedByteBufferImpl_init == NULL)
+ {
+ JCL_ThrowException (env, "java/lang/InternalError",
+ "could not get MappedByteBufferImpl constructor");
+ munmap (p, ALIGN_UP (size, pagesize));
+ return NULL;
+ }
+
+ buffer = (*env)->NewObject (env, MappedByteBufferImpl_class,
+ MappedByteBufferImpl_init, RawData_instance,
+ (jint) size, mode == 'r');
+ return buffer;
+#else
+ (void) obj;
+ (void) mode;
+ (void) position;
+ (void) size;
+ JCL_ThrowException (env, IO_EXCEPTION,
+ "memory-mapped files not implemented");
return 0;
+#endif /* HAVE_MMAP */
}
/*
@@ -539,7 +659,7 @@ Java_gnu_java_nio_channels_FileChannelImpl_read__ (JNIEnv * env, jobject obj)
return (-1);
}
}
- while (bytes_read != 1);
+ while (result != TARGET_NATIVE_OK);
return ((jint) (data & 0xFF));
}
@@ -567,6 +687,12 @@ Java_gnu_java_nio_channels_FileChannelImpl_read___3BII (JNIEnv * env,
if (length == 0)
return 0;
+ if (offset < 0)
+ {
+ JCL_ThrowException (env, IO_EXCEPTION, "negative offset");
+ return -1;
+ }
+
bufptr = (*env)->GetByteArrayElements (env, buffer, 0);
if (!bufptr)
{
@@ -574,6 +700,13 @@ Java_gnu_java_nio_channels_FileChannelImpl_read___3BII (JNIEnv * env,
return (-1);
}
+ if (length + offset > (*env)->GetArrayLength (env, buffer))
+ {
+ JCL_ThrowException (env, IO_EXCEPTION,
+ "length + offset > buffer.length");
+ return -1;
+ }
+
bytes_read = 0;
do
{
@@ -596,7 +729,8 @@ Java_gnu_java_nio_channels_FileChannelImpl_read___3BII (JNIEnv * env,
(*env)->ReleaseByteArrayElements (env, buffer, bufptr, 0);
return -1;
}
- bytes_read += n;
+ if (result == TARGET_NATIVE_OK)
+ bytes_read += n;
}
while (bytes_read < 1);
@@ -630,12 +764,29 @@ Java_gnu_java_nio_channels_FileChannelImpl_write__I (JNIEnv * env,
{
JCL_ThrowException (env, IO_EXCEPTION,
TARGET_NATIVE_LAST_ERROR_STRING ());
+ return;
}
}
while (result != TARGET_NATIVE_OK);
}
/*
+ * Copies all parts of a file to disk.
+ */
+JNIEXPORT void JNICALL
+Java_gnu_java_nio_channels_FileChannelImpl_force (JNIEnv * env,
+ jobject obj)
+{
+ int native_fd;
+ int result;
+ native_fd = get_native_fd (env, obj);
+ TARGET_NATIVE_FILE_FSYNC (native_fd, result);
+ if (result != TARGET_NATIVE_OK)
+ JCL_ThrowException (env, IO_EXCEPTION,
+ TARGET_NATIVE_LAST_ERROR_STRING ());
+}
+
+/*
* Writes a byte buffer to the specified file descriptor
* Return status code, exception on error
*/
@@ -679,35 +830,80 @@ Java_gnu_java_nio_channels_FileChannelImpl_write___3BII (JNIEnv * env,
(*env)->ReleaseByteArrayElements (env, buffer, bufptr, 0);
return;
}
- bytes_written += n;
+ if (result == TARGET_NATIVE_OK)
+ bytes_written += n;
}
(*env)->ReleaseByteArrayElements (env, buffer, bufptr, 0);
}
JNIEXPORT jboolean JNICALL
-Java_gnu_java_nio_channels_FileChannelImpl_lock (JNIEnv * env,
- jobject obj
- __attribute__ ((__unused__)),
- jlong position
- __attribute__ ((__unused__)),
- jlong size
- __attribute__ ((__unused__)),
- jboolean shared
- __attribute__ ((__unused__)),
- jboolean wait
- __attribute__ ((__unused__)))
+Java_gnu_java_nio_channels_FileChannelImpl_lock (JNIEnv *env, jobject obj,
+ jlong position, jlong size,
+ jboolean shared, jboolean wait)
{
- JCL_ThrowException (env, IO_EXCEPTION,
- "java.nio.FileChannelImpl.lock(): not implemented");
- return 0;
+#ifdef HAVE_FCNTL
+ int fd = get_native_fd (env, obj);
+ int cmd = wait ? F_SETLKW : F_SETLK;
+ struct flock flock;
+ int ret;
+
+ flock.l_type = shared ? F_RDLCK : F_WRLCK;
+ flock.l_whence = SEEK_SET;
+ flock.l_start = (off_t) position;
+ flock.l_len = (off_t) size;
+
+ ret = fcntl (fd, cmd, &flock);
+ if (ret)
+ {
+ /* Linux man pages for fcntl state that errno might be either
+ EACCES or EAGAIN if we try F_SETLK, and another process has
+ an overlapping lock. */
+ if (errno != EACCES && errno != EAGAIN)
+ {
+ JCL_ThrowException (env, IO_EXCEPTION, strerror (errno));
+ }
+ return JNI_FALSE;
+ }
+ return JNI_TRUE;
+#else
+ (void) obj;
+ (void) position;
+ (void) size;
+ (void) shared;
+ (void) wait;
+ JCL_ThrowException (env, "java/lang/UnsupportedOperationException",
+ "file locks not implemented on this platform");
+ return JNI_FALSE;
+#endif /* HAVE_FCNTL */
}
JNIEXPORT void JNICALL
-Java_gnu_java_nio_channels_FileChannelImpl_unlock (JNIEnv * env,
- jobject obj
- __attribute__ ((__unused__)), jlong position __attribute__ ((__unused__)), jlong length __attribute__ ((__unused__)))
+Java_gnu_java_nio_channels_FileChannelImpl_unlock (JNIEnv *env,
+ jobject obj,
+ jlong position,
+ jlong length)
{
- JCL_ThrowException (env, IO_EXCEPTION,
- "java.nio.FileChannelImpl.unlock(): not implemented");
+#ifdef HAVE_FCNTL
+ int fd = get_native_fd (env, obj);
+ struct flock flock;
+ int ret;
+
+ flock.l_type = F_UNLCK;
+ flock.l_whence = SEEK_SET;
+ flock.l_start = (off_t) position;
+ flock.l_len = (off_t) length;
+
+ ret = fcntl (fd, F_SETLK, &flock);
+ if (ret)
+ {
+ JCL_ThrowException (env, IO_EXCEPTION, strerror (errno));
+ }
+#else
+ (void) obj;
+ (void) position;
+ (void) length;
+ JCL_ThrowException (env, "java/lang/UnsupportedOperationException",
+ "file locks not implemented on this platform");
+#endif /* HAVE_FCNTL */
}
diff --git a/native/jni/java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c b/native/jni/java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c
index 54138f92f..8c3f83acc 100644
--- a/native/jni/java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c
+++ b/native/jni/java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c b/native/jni/java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c
index f3980af72..cd5d48656 100644
--- a/native/jni/java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c
+++ b/native/jni/java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-nio/java_nio.c b/native/jni/java-nio/java_nio.c
index 33b7de43d..a25f38a6d 100644
--- a/native/jni/java-nio/java_nio.c
+++ b/native/jni/java-nio/java_nio.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/java-nio/java_nio_MappedByteBufferImpl.c b/native/jni/java-nio/java_nio_MappedByteBufferImpl.c
index a12592e42..9e23bb2ee 100644
--- a/native/jni/java-nio/java_nio_MappedByteBufferImpl.c
+++ b/native/jni/java-nio/java_nio_MappedByteBufferImpl.c
@@ -1,5 +1,5 @@
/* java_nio_MappedByteBufferImpl.c - Native methods for MappedByteBufferImpl
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004,2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,41 +43,215 @@ exception statement from your version. */
#include "java_nio_MappedByteBufferImpl.h"
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif /* HAVE_SYS_MMAN_H */
+
#define IO_EXCEPTION "java/io/IOException"
+/* FIXME these are defined in gnu_java_nio_channels_FileChannelImpl
+ too; should be someplace common. */
+#define ALIGN_DOWN(p,s) ((p) - ((p) % (s)))
+#define ALIGN_UP(p,s) ((p) + ((s) - ((p) % (s))))
+
+/**
+ * Returns the memory page size of this platform.
+ *
+ * \return The page size.
+ */
+static long
+get_pagesize (void)
+{
+ /* FIXME can we just try HAVE_SYSCONF? */
+#if defined(HAVE_GETPAGESIZE)
+ return getpagesize ();
+#elif defined (HAVE_SYSCONF)
+ return sysconf (_SC_PAGESIZE);
+#endif /* HAVE_GETPAGESIZE / HAVE_SYSCONF */
+}
+
+/**
+ * Retrieve the 'address' and 'cap' (the mapped size) fields of this
+ * buffer.
+ *
+ * This function will align the address down to the nearest page
+ * boundary, and the size up to the nearest page boundary. Thus, it is
+ * safe to use these values in 'mman' functions.
+ *
+ * \param env The JNI environment pointer.
+ * \param this The MappedByteBufferImpl instance.
+ * \param address A pointer to where the actual pointer should be
+ * stored.
+ * \param size A pointer to where the mapped region's size should be
+ * stored
+ */
+static void
+get_raw_values (JNIEnv *env, jobject this, void **address, size_t *size)
+{
+ const long pagesize = get_pagesize ();
+ jfieldID MappedByteBufferImpl_address;
+ jfieldID MappedByteBufferImpl_size;
+ jfieldID RawData_data;
+ jobject MappedByteBufferImpl_address_value = NULL;
+
+ *address = NULL;
+ /* 'address' is declared in java.nio.Buffer */
+ MappedByteBufferImpl_address
+ = (*env)->GetFieldID (env, (*env)->GetObjectClass (env, this),
+ "address", "Lgnu/classpath/RawData;");
+ /* 'cap' -- likewise, the capacity */
+ MappedByteBufferImpl_size
+ = (*env)->GetFieldID (env, (*env)->GetObjectClass (env, this),
+ "cap", "I");
+ if (MappedByteBufferImpl_address != NULL)
+ {
+ MappedByteBufferImpl_address_value =
+ (*env)->GetObjectField (env, this, MappedByteBufferImpl_address);
+ }
+ if ((*env)->ExceptionOccurred (env))
+ return;
+ if (MappedByteBufferImpl_address_value == NULL)
+ {
+ JCL_ThrowException (env, "java/lang/NullPointerException",
+ "mapped address is NULL");
+ return;
+ }
+
+#if (SIZEOF_VOID_P == 4)
+ RawData_data =
+ (*env)->GetFieldID (env, (*env)->GetObjectClass (env, MappedByteBufferImpl_address_value),
+ "data", "I");
+ *address = (void *)
+ ALIGN_DOWN ((*env)->GetIntField (env, MappedByteBufferImpl_address_value,
+ RawData_data), pagesize);
+#elif (SIZEOF_VOID_P == 8)
+ RawData_data =
+ (*env)->GetFieldID (env, (*env)->GetObjectClass (env, MappedByteBufferImpl_address_value),
+ "data", "J");
+ *address = (void *)
+ ALIGN_DOWN ((*env)->GetLongField (env, MappedByteBufferImpl_address_value,
+ RawData_data), pagesize);
+#endif /* SIZEOF_VOID_P */
+
+ *size = (size_t)
+ ALIGN_UP ((*env)->GetIntField (env, this, MappedByteBufferImpl_size),
+ pagesize);
+}
+
JNIEXPORT void JNICALL
-Java_java_nio_MappedByteBufferImpl_unmapImpl (JNIEnv * env,
- jclass class
- __attribute__ ((__unused__)))
+Java_java_nio_MappedByteBufferImpl_unmapImpl (JNIEnv *env, jobject this)
{
+#ifdef HAVE_MUNMAP
+ void *address;
+ size_t size;
+
+ get_raw_values (env, this, &address, &size);
+
+ if (address == NULL)
+ return;
+
+ if (munmap (address, size) != 0)
+ {
+ JCL_ThrowException (env, IO_EXCEPTION, strerror (errno));
+ return;
+ }
+#else
JCL_ThrowException (env, IO_EXCEPTION,
- "java.nio.MappedByteBufferImpl.unmapImpl(): not implemented");
+ "unmapping files not implemented");
+#endif /* HAVE_MUNMAP */
}
JNIEXPORT jboolean JNICALL
-Java_java_nio_MappedByteBufferImpl_isLoadedImpl (JNIEnv * env,
- jclass class
- __attribute__ ((__unused__)))
+Java_java_nio_MappedByteBufferImpl_isLoadedImpl (JNIEnv * env, jobject this)
{
- JCL_ThrowException (env, IO_EXCEPTION,
- "java.nio.MappedByteBufferImpl.isLoadedImpl(): not implemented");
- return 0;
+#ifdef HAVE_MINCORE
+ void *address;
+ size_t size;
+ char *vec;
+ size_t count, i;
+ const long pagesize = get_pagesize ();
+
+ /*
+ * FIXME on Darwin this does not work if the mapped region is
+ * exactly one page long; i.e., 'mincore' tells us it isn't loaded.
+ */
+ get_raw_values (env, this, &address, &size);
+ if (address == NULL)
+ return JNI_FALSE;
+ count = (size_t) ((size + pagesize - 1) / pagesize);
+ vec = (char *) malloc (count * sizeof (unsigned char));
+
+ /*
+ * Darwin (and BSD?) define argument 3 of 'mincore' to be 'char *',
+ * while GNU libc defines it to be 'unsigned char *'. Casting the
+ * argument to 'void *' fixes this, but not with C++. So you might
+ * be SOL if you compile this with g++ (!) on GNU with -Werror.
+ */
+#ifdef __cplusplus
+ if (mincore (address, size, vec) != 0)
+#else
+ if (mincore (address, size, (void *) vec) != 0)
+#endif /* __cplusplus */
+ {
+ free (vec);
+ JCL_ThrowException (env, IO_EXCEPTION, strerror (errno));
+ return JNI_FALSE;
+ }
+
+ for (i = 0; i < count; i++)
+ {
+ if ((vec[i] & 1) == 0)
+ return JNI_FALSE;
+ }
+ return JNI_TRUE;
+#else
+ return JNI_FALSE;
+#endif
}
JNIEXPORT void JNICALL
-Java_java_nio_MappedByteBufferImpl_loadImpl (JNIEnv * env,
- jclass clazz
- __attribute__ ((__unused__)))
+Java_java_nio_MappedByteBufferImpl_loadImpl (JNIEnv *env, jobject this)
{
+#ifdef HAVE_MADVISE
+ void *address;
+ size_t size;
+
+ get_raw_values (env, this, &address, &size);
+ if (address == NULL)
+ return;
+
+ madvise (address, size, MADV_WILLNEED);
+#else
JCL_ThrowException (env, IO_EXCEPTION,
- "java.nio.MappedByteBufferImpl.loadImpl(): not implemented");
+ "forcing mapped files into core not implemented");
+#endif /* HAVE_MADVISE */
}
JNIEXPORT void JNICALL
-Java_java_nio_MappedByteBufferImpl_forceImpl (JNIEnv * env,
- jclass class
- __attribute__ ((__unused__)))
+Java_java_nio_MappedByteBufferImpl_forceImpl (JNIEnv *env, jobject this)
{
+#ifdef HAVE_MSYNC
+ void *address;
+ size_t size;
+
+ get_raw_values (env, this, &address, &size);
+
+ if (address == NULL)
+ return;
+
+ /* FIXME: is using MS_SYNC ok? Should we use MS_INVALIDATE? */
+ if (msync (address, size, MS_SYNC) != 0)
+ {
+ JCL_ThrowException (env, IO_EXCEPTION, strerror (errno));
+ }
+#else
JCL_ThrowException (env, IO_EXCEPTION,
- "java.nio.MappedByteBufferImpl.forceImpl(): not implemented");
+ "forcing mapped files to disk not implemented");
+#endif /* HAVE_MSYNC */
}
diff --git a/native/jni/java-nio/java_nio_VMDirectByteBuffer.c b/native/jni/java-nio/java_nio_VMDirectByteBuffer.c
index 08b05660f..fec431cdc 100644
--- a/native/jni/java-nio/java_nio_VMDirectByteBuffer.c
+++ b/native/jni/java-nio/java_nio_VMDirectByteBuffer.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -179,7 +179,7 @@ Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_RawData_2I
}
JNIEXPORT void JNICALL
-Java_java_nio_VMDirectByteBuffer_put
+Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2IB
(JNIEnv * env, jclass clazz __attribute__ ((__unused__)),
jobject address, jint index, jbyte value)
{
@@ -193,8 +193,20 @@ Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_RawData_2I_3BII
jobject address, jint index, jbyteArray dst, jint dst_offset, jint dst_len)
{
jbyte *src = (jbyte *) NIOGetPointer (env, address) + index;
- memcpy ((*env)->GetByteArrayElements (env, dst, NULL) + dst_offset, src,
- dst_len);
+ jbyte *_dst = (*env)->GetByteArrayElements (env, dst, NULL) + dst_offset;
+ memcpy (_dst, src, dst_len);
+ (*env)->ReleaseByteArrayElements (env, dst, _dst, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_RawData_2I_3BII
+ (JNIEnv *env, jclass clazz __attribute__ ((__unused__)),
+ jobject address, jint index, jbyteArray src, jint src_offset, jint src_len)
+{
+ jbyte *_src = (*env)->GetByteArrayElements (env, src, NULL) + src_offset;
+ jbyte *dst = (jbyte *) NIOGetPointer (env, address) + index;
+ (*env)->ReleaseByteArrayElements (env, src, _src, 0);
+ memcpy (dst, _src, src_len);
}
JNIEXPORT void JNICALL
diff --git a/native/jni/java-util/java_util_VMTimeZone.c b/native/jni/java-util/java_util_VMTimeZone.c
index fc0f534e0..a3a986d36 100644
--- a/native/jni/java-util/java_util_VMTimeZone.c
+++ b/native/jni/java-util/java_util_VMTimeZone.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_dom.c b/native/jni/xmlj/xmlj_dom.c
index 86c7d4c50..b9bd372b1 100644
--- a/native/jni/xmlj/xmlj_dom.c
+++ b/native/jni/xmlj/xmlj_dom.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_dom.h b/native/jni/xmlj/xmlj_dom.h
index e8e2e73a5..d4a1dff42 100644
--- a/native/jni/xmlj/xmlj_dom.h
+++ b/native/jni/xmlj/xmlj_dom.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_error.c b/native/jni/xmlj/xmlj_error.c
index 5a75c48e9..5dd90552c 100644
--- a/native/jni/xmlj/xmlj_error.c
+++ b/native/jni/xmlj/xmlj_error.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_error.h b/native/jni/xmlj/xmlj_error.h
index f31ffc45f..a0c9fcc80 100644
--- a/native/jni/xmlj/xmlj_error.h
+++ b/native/jni/xmlj/xmlj_error.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_io.c b/native/jni/xmlj/xmlj_io.c
index 1cb6c7e19..aa2964dc3 100644
--- a/native/jni/xmlj/xmlj_io.c
+++ b/native/jni/xmlj/xmlj_io.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_io.h b/native/jni/xmlj/xmlj_io.h
index 878fa92dc..871859aca 100644
--- a/native/jni/xmlj/xmlj_io.h
+++ b/native/jni/xmlj/xmlj_io.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_node.c b/native/jni/xmlj/xmlj_node.c
index a5f6af201..20832678a 100644
--- a/native/jni/xmlj/xmlj_node.c
+++ b/native/jni/xmlj/xmlj_node.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_node.h b/native/jni/xmlj/xmlj_node.h
index bd5afbbb9..11f5e308b 100644
--- a/native/jni/xmlj/xmlj_node.h
+++ b/native/jni/xmlj/xmlj_node.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_sax.c b/native/jni/xmlj/xmlj_sax.c
index d6beb1fda..78991bdad 100644
--- a/native/jni/xmlj/xmlj_sax.c
+++ b/native/jni/xmlj/xmlj_sax.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_sax.h b/native/jni/xmlj/xmlj_sax.h
index f63606c97..249929ce0 100644
--- a/native/jni/xmlj/xmlj_sax.h
+++ b/native/jni/xmlj/xmlj_sax.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_transform.c b/native/jni/xmlj/xmlj_transform.c
index af8acd8dd..075409ad1 100644
--- a/native/jni/xmlj/xmlj_transform.c
+++ b/native/jni/xmlj/xmlj_transform.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_util.c b/native/jni/xmlj/xmlj_util.c
index 2c9f05d08..498cb7092 100644
--- a/native/jni/xmlj/xmlj_util.c
+++ b/native/jni/xmlj/xmlj_util.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_util.h b/native/jni/xmlj/xmlj_util.h
index ad3dd1f99..7bbe78b8e 100644
--- a/native/jni/xmlj/xmlj_util.h
+++ b/native/jni/xmlj/xmlj_util.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/jni/xmlj/xmlj_xpath.c b/native/jni/xmlj/xmlj_xpath.c
index ca31b8cd4..6d014cefc 100644
--- a/native/jni/xmlj/xmlj_xpath.c
+++ b/native/jni/xmlj/xmlj_xpath.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/Linux/target_native.h b/native/target/Linux/target_native.h
index 3192b016e..4e1d5136d 100644
--- a/native/target/Linux/target_native.h
+++ b/native/target/Linux/target_native.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/Linux/target_native_file.h b/native/target/Linux/target_native_file.h
index f066c5a67..0c40b4471 100644
--- a/native/target/Linux/target_native_file.h
+++ b/native/target/Linux/target_native_file.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/Linux/target_native_io.h b/native/target/Linux/target_native_io.h
index dec0c803d..03f43adf5 100644
--- a/native/target/Linux/target_native_io.h
+++ b/native/target/Linux/target_native_io.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/Linux/target_native_math_float.h b/native/target/Linux/target_native_math_float.h
index 6b9e18ea6..0f3455d2a 100644
--- a/native/target/Linux/target_native_math_float.h
+++ b/native/target/Linux/target_native_math_float.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/Linux/target_native_math_int.h b/native/target/Linux/target_native_math_int.h
index e21c5aa64..4c5fc671d 100644
--- a/native/target/Linux/target_native_math_int.h
+++ b/native/target/Linux/target_native_math_int.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/Linux/target_native_misc.h b/native/target/Linux/target_native_misc.h
index a6ff2a705..00bc7ac8d 100644
--- a/native/target/Linux/target_native_misc.h
+++ b/native/target/Linux/target_native_misc.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/Linux/target_native_network.h b/native/target/Linux/target_native_network.h
index 9698b5f47..23f9d0a62 100644
--- a/native/target/Linux/target_native_network.h
+++ b/native/target/Linux/target_native_network.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/generic/target_generic.h b/native/target/generic/target_generic.h
index d767985c4..e4ddf5c3b 100644
--- a/native/target/generic/target_generic.h
+++ b/native/target/generic/target_generic.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/generic/target_generic_file.h b/native/target/generic/target_generic_file.h
index 811548455..cd90e733c 100644
--- a/native/target/generic/target_generic_file.h
+++ b/native/target/generic/target_generic_file.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/generic/target_generic_io.h b/native/target/generic/target_generic_io.h
index 46450604f..cc24915ab 100644
--- a/native/target/generic/target_generic_io.h
+++ b/native/target/generic/target_generic_io.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/generic/target_generic_math_float.h b/native/target/generic/target_generic_math_float.h
index 23316a068..e2085e080 100644
--- a/native/target/generic/target_generic_math_float.h
+++ b/native/target/generic/target_generic_math_float.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/generic/target_generic_math_int.h b/native/target/generic/target_generic_math_int.h
index f88de7579..c6861487e 100644
--- a/native/target/generic/target_generic_math_int.h
+++ b/native/target/generic/target_generic_math_int.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/generic/target_generic_misc.h b/native/target/generic/target_generic_misc.h
index e3a4de6e5..1174aa83c 100644
--- a/native/target/generic/target_generic_misc.h
+++ b/native/target/generic/target_generic_misc.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/target/generic/target_generic_network.h b/native/target/generic/target_generic_network.h
index 57fcc2520..4488ea876 100644
--- a/native/target/generic/target_generic_network.h
+++ b/native/target/generic/target_generic_network.h
@@ -1,5 +1,5 @@
/* target_generic_network.h - Native methods for network operations.
- Copyright (C) 1998, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -666,11 +666,22 @@ Systems : all
#ifndef TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT
#include <sys/types.h>
#include <sys/socket.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
#define TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT(socketDescriptor,flag,result) \
do { \
- int __value; \
+ struct timeval __value; \
\
- __value=flag; \
+ __value.tv_sec = flag / 1000; \
+ __value.tv_usec = (flag % 1000) * 1000; \
result=(setsockopt(socketDescriptor,SOL_SOCKET,SO_TIMEOUT,&__value,sizeof(__value))==0)?TARGET_NATIVE_OK:TARGET_NATIVE_ERROR; \
} while (0)
#endif
@@ -682,7 +693,7 @@ Systems : all
* size - size of send buffer
* Output : result - TARGET_NATIVE_OK if no error occurred,
* TARGET_NATIVE_ERROR otherwise
-* Return : -
+* Return : -
* Side-effect: unknown
* Notes : -
\***********************************************************************/
@@ -989,7 +1000,7 @@ Systems : all
#include <sys/socket.h>
#define TARGET_NATIVE_NETWORK_SOCKET_GET_OPTION_SO_TIMEOUT(socketDescriptor,flag,result) \
do { \
- int __value; \
+ struct timeval __value; \
socklen_t __len; \
\
flag=0; \
@@ -998,7 +1009,7 @@ Systems : all
result=(getsockopt(socketDescriptor,SOL_SOCKET,SO_TIMEOUT,&__value,&__len)==0)?TARGET_NATIVE_OK:TARGET_NATIVE_ERROR; \
if (result==TARGET_NATIVE_OK) \
{ \
- flag=__value; \
+ flag = (__value.tv_sec * 1000LL) + (__value.tv_usec / 1000LL); \
} \
} while (0)
#endif
diff --git a/native/testsuite/guile-jvm.c b/native/testsuite/guile-jvm.c
index c5beb688a..c372f75f2 100644
--- a/native/testsuite/guile-jvm.c
+++ b/native/testsuite/guile-jvm.c
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*/
diff --git a/native/vmi/vmi.c b/native/vmi/vmi.c
index 07eef82f9..6022bedfd 100755
--- a/native/vmi/vmi.c
+++ b/native/vmi/vmi.c
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/native/vmi/vmi.h b/native/vmi/vmi.h
index ea4f51783..1a8e26a81 100755
--- a/native/vmi/vmi.h
+++ b/native/vmi/vmi.h
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/ietf/jgss/ChannelBinding.java b/org/ietf/jgss/ChannelBinding.java
index 18046415f..9ea266de5 100644
--- a/org/ietf/jgss/ChannelBinding.java
+++ b/org/ietf/jgss/ChannelBinding.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/ietf/jgss/GSSContext.java b/org/ietf/jgss/GSSContext.java
index ab09c31c5..6f469e235 100644
--- a/org/ietf/jgss/GSSContext.java
+++ b/org/ietf/jgss/GSSContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/ietf/jgss/GSSCredential.java b/org/ietf/jgss/GSSCredential.java
index 3040df73e..724825d5e 100644
--- a/org/ietf/jgss/GSSCredential.java
+++ b/org/ietf/jgss/GSSCredential.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/ietf/jgss/GSSException.java b/org/ietf/jgss/GSSException.java
index 9385f8ea3..5443f766c 100644
--- a/org/ietf/jgss/GSSException.java
+++ b/org/ietf/jgss/GSSException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/ietf/jgss/GSSManager.java b/org/ietf/jgss/GSSManager.java
index 87bb96e75..3c735a2fd 100644
--- a/org/ietf/jgss/GSSManager.java
+++ b/org/ietf/jgss/GSSManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/ietf/jgss/GSSName.java b/org/ietf/jgss/GSSName.java
index e2abf6acb..5550697b5 100644
--- a/org/ietf/jgss/GSSName.java
+++ b/org/ietf/jgss/GSSName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/ietf/jgss/MessageProp.java b/org/ietf/jgss/MessageProp.java
index 6276e6fe2..5c79455ac 100644
--- a/org/ietf/jgss/MessageProp.java
+++ b/org/ietf/jgss/MessageProp.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/ietf/jgss/Oid.java b/org/ietf/jgss/Oid.java
index 75e4b25d9..769745611 100644
--- a/org/ietf/jgss/Oid.java
+++ b/org/ietf/jgss/Oid.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ARG_IN.java b/org/omg/CORBA/ARG_IN.java
index d0ca77e6e..582a3cf4c 100644
--- a/org/omg/CORBA/ARG_IN.java
+++ b/org/omg/CORBA/ARG_IN.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ARG_INOUT.java b/org/omg/CORBA/ARG_INOUT.java
index 2103e4fb8..bcdc17a69 100644
--- a/org/omg/CORBA/ARG_INOUT.java
+++ b/org/omg/CORBA/ARG_INOUT.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ARG_OUT.java b/org/omg/CORBA/ARG_OUT.java
index 3518dadc4..1ccf243c2 100644
--- a/org/omg/CORBA/ARG_OUT.java
+++ b/org/omg/CORBA/ARG_OUT.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/Any.java b/org/omg/CORBA/Any.java
index 107da0407..d8c892d21 100644
--- a/org/omg/CORBA/Any.java
+++ b/org/omg/CORBA/Any.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/AnyHolder.java b/org/omg/CORBA/AnyHolder.java
index a8c02b63d..0055fdd74 100644
--- a/org/omg/CORBA/AnyHolder.java
+++ b/org/omg/CORBA/AnyHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/AnySeqHelper.java b/org/omg/CORBA/AnySeqHelper.java
index 2165b7ab3..5c45bb3d8 100644
--- a/org/omg/CORBA/AnySeqHelper.java
+++ b/org/omg/CORBA/AnySeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/AnySeqHolder.java b/org/omg/CORBA/AnySeqHolder.java
index 2bc9a3e9b..905e05c8b 100644
--- a/org/omg/CORBA/AnySeqHolder.java
+++ b/org/omg/CORBA/AnySeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BAD_CONTEXT.java b/org/omg/CORBA/BAD_CONTEXT.java
index 1a1683235..139262d64 100644
--- a/org/omg/CORBA/BAD_CONTEXT.java
+++ b/org/omg/CORBA/BAD_CONTEXT.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BAD_INV_ORDER.java b/org/omg/CORBA/BAD_INV_ORDER.java
index 392ecc466..0f585cd91 100644
--- a/org/omg/CORBA/BAD_INV_ORDER.java
+++ b/org/omg/CORBA/BAD_INV_ORDER.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BAD_OPERATION.java b/org/omg/CORBA/BAD_OPERATION.java
index 41f49ea8c..26b340665 100755
--- a/org/omg/CORBA/BAD_OPERATION.java
+++ b/org/omg/CORBA/BAD_OPERATION.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BAD_PARAM.java b/org/omg/CORBA/BAD_PARAM.java
index ae9bdd01a..848f43b43 100644
--- a/org/omg/CORBA/BAD_PARAM.java
+++ b/org/omg/CORBA/BAD_PARAM.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BAD_POLICY.java b/org/omg/CORBA/BAD_POLICY.java
index b808eb1a5..98998587c 100644
--- a/org/omg/CORBA/BAD_POLICY.java
+++ b/org/omg/CORBA/BAD_POLICY.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BAD_POLICY_TYPE.java b/org/omg/CORBA/BAD_POLICY_TYPE.java
index 75ac3dd4a..fa3f01ee1 100644
--- a/org/omg/CORBA/BAD_POLICY_TYPE.java
+++ b/org/omg/CORBA/BAD_POLICY_TYPE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BAD_POLICY_VALUE.java b/org/omg/CORBA/BAD_POLICY_VALUE.java
index 04fb08285..b0153a8a7 100644
--- a/org/omg/CORBA/BAD_POLICY_VALUE.java
+++ b/org/omg/CORBA/BAD_POLICY_VALUE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BAD_TYPECODE.java b/org/omg/CORBA/BAD_TYPECODE.java
index a89d5ec23..96ad21ef9 100644
--- a/org/omg/CORBA/BAD_TYPECODE.java
+++ b/org/omg/CORBA/BAD_TYPECODE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BooleanHolder.java b/org/omg/CORBA/BooleanHolder.java
index d71e221de..eddc62933 100644
--- a/org/omg/CORBA/BooleanHolder.java
+++ b/org/omg/CORBA/BooleanHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BooleanSeqHelper.java b/org/omg/CORBA/BooleanSeqHelper.java
index 0df1fbcb0..d1fde8b77 100644
--- a/org/omg/CORBA/BooleanSeqHelper.java
+++ b/org/omg/CORBA/BooleanSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/BooleanSeqHolder.java b/org/omg/CORBA/BooleanSeqHolder.java
index f753941bf..ac8224f92 100644
--- a/org/omg/CORBA/BooleanSeqHolder.java
+++ b/org/omg/CORBA/BooleanSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/Bounds.java b/org/omg/CORBA/Bounds.java
index 2478f80c4..f5a546480 100644
--- a/org/omg/CORBA/Bounds.java
+++ b/org/omg/CORBA/Bounds.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ByteHolder.java b/org/omg/CORBA/ByteHolder.java
index dce5149f1..0cfd8f03c 100644
--- a/org/omg/CORBA/ByteHolder.java
+++ b/org/omg/CORBA/ByteHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/COMM_FAILURE.java b/org/omg/CORBA/COMM_FAILURE.java
index b89d8d0f8..3c5044132 100644
--- a/org/omg/CORBA/COMM_FAILURE.java
+++ b/org/omg/CORBA/COMM_FAILURE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/CTX_RESTRICT_SCOPE.java b/org/omg/CORBA/CTX_RESTRICT_SCOPE.java
index 7a770ee08..12b9747fc 100644
--- a/org/omg/CORBA/CTX_RESTRICT_SCOPE.java
+++ b/org/omg/CORBA/CTX_RESTRICT_SCOPE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/CharHolder.java b/org/omg/CORBA/CharHolder.java
index 797364117..67eb2ee87 100644
--- a/org/omg/CORBA/CharHolder.java
+++ b/org/omg/CORBA/CharHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/CharSeqHelper.java b/org/omg/CORBA/CharSeqHelper.java
index c1af52a28..b91306c2c 100644
--- a/org/omg/CORBA/CharSeqHelper.java
+++ b/org/omg/CORBA/CharSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/CharSeqHolder.java b/org/omg/CORBA/CharSeqHolder.java
index e85e27f69..dc7d0a840 100644
--- a/org/omg/CORBA/CharSeqHolder.java
+++ b/org/omg/CORBA/CharSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/CompletionStatus.java b/org/omg/CORBA/CompletionStatus.java
index b4797343a..f9f370443 100644
--- a/org/omg/CORBA/CompletionStatus.java
+++ b/org/omg/CORBA/CompletionStatus.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/CompletionStatusHelper.java b/org/omg/CORBA/CompletionStatusHelper.java
index 599f0a6b1..f62857448 100644
--- a/org/omg/CORBA/CompletionStatusHelper.java
+++ b/org/omg/CORBA/CompletionStatusHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,9 +38,8 @@ exception statement from your version. */
package org.omg.CORBA;
-import gnu.CORBA.primitiveArrayTypeCode;
+import gnu.CORBA.Restricted_ORB;
-import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
@@ -53,6 +52,11 @@ import org.omg.CORBA.portable.OutputStream;
public abstract class CompletionStatusHelper
{
/**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
* Extract the {@link CompletionStatus} from the
* given {@link Any}. This implementation expects
* the integer (Corba long) value, stating the completion
@@ -68,7 +72,7 @@ public abstract class CompletionStatusHelper
}
/**
- * Returns the agreed Id.
+ * Returns the agreed Id.
* @return <code>IDL:omg.org/CORBA/CompletionStatus:1.0</code>, always.
*/
public static String id()
@@ -113,4 +117,24 @@ public abstract class CompletionStatusHelper
{
output.write_long(status.value());
}
-}
+
+ /**
+ * Get the parameter mode typecode (enumeration, named "CompletionStatus").
+ * The typecode states that the enumeration can obtain one of
+ * the following values: COMPLETED_YES ,COMPLETED_NO or COMPLETED_MAYBE .
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ String[] members =
+ new String[] { "COMPLETED_YES", "COMPLETED_NO", "COMPLETED_MAYBE" };
+
+ typeCode =
+ Restricted_ORB.Singleton.create_enum_tc(id(), "CompletionStatus",
+ members
+ );
+ }
+ return typeCode;
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/Context.java b/org/omg/CORBA/Context.java
index e4dd1adce..e3f7363f4 100644
--- a/org/omg/CORBA/Context.java
+++ b/org/omg/CORBA/Context.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ContextList.java b/org/omg/CORBA/ContextList.java
index a2e57d5b2..d6b8800c9 100644
--- a/org/omg/CORBA/ContextList.java
+++ b/org/omg/CORBA/ContextList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/Current.java b/org/omg/CORBA/Current.java
index f457b122a..f6f89a16f 100644
--- a/org/omg/CORBA/Current.java
+++ b/org/omg/CORBA/Current.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,16 +38,22 @@ exception statement from your version. */
package org.omg.CORBA;
+import org.omg.CORBA.portable.IDLEntity;
/**
+ * <p>
* The interfaces, derived from this class, define the objects, providing
* information, associated with a particular thread of execution. The examples
* of such data could be the security information, transaction identifiers
* and so on.
- *
+ * </p><p>
+ * The various aspects of this information are provided by subinterfaces,
+ * derived from the Current. There are no operations defined for
+ * the "general" Current itself.
+ * </p>
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface Current
extends org.omg.CORBA.Object, IDLEntity, CurrentOperations
{
-}
+} \ No newline at end of file
diff --git a/org/omg/CORBA/CurrentHelper.java b/org/omg/CORBA/CurrentHelper.java
new file mode 100644
index 000000000..51bd65fc1
--- /dev/null
+++ b/org/omg/CORBA/CurrentHelper.java
@@ -0,0 +1,180 @@
+/* CurrentHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the CORBA object {@link Current}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class CurrentHelper
+{
+ /**
+ * The Current stub (proxy), used on the client side.
+ * The {@link Current} methods should contain the code for remote
+ * invocaton. As there are no methods defined, this class is only
+ * used for the formal support of the
+ * {@link #narrow(org.omg.CORBA.Object)}.
+ */
+ private static class _CurrentStub
+ extends ObjectImpl
+ implements Current
+ {
+ /**
+ * Create the naming context stub with the given delegate.
+ */
+ public _CurrentStub(Delegate delegate)
+ {
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ */
+ public String[] _ids()
+ {
+ return new String[] { id() };
+ }
+ }
+
+ /**
+ * The cached {@link Current} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link Current}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "Current");
+ return typeCode;
+ }
+
+ /**
+ * Insert the Current into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the Current to insert.
+ */
+ public static void insert(Any any, Current that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the Current from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain Current.
+ */
+ public static Current extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the Current repository id.
+ *
+ * @return "IDL:omg.org/CORBA/Current:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/Current:1.0";
+ }
+
+ /**
+ * Cast the passed object into the Current. If the
+ * object has a different java type, create an instance
+ * of the _CurrentStub, using the same delegate, as for
+ * the passed parameter. Hence, unlike java type cast,
+ * this method may return a different object, than has been passed.
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ *
+ * @throws BAD_PARAM if the passed object is not a Current.
+ */
+ public static Current narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof Current)
+ return (Current) obj;
+ else if (!obj._is_a(id()))
+ throw new BAD_PARAM("Not a Current");
+ else
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _CurrentStub(delegate);
+ }
+ }
+
+ /**
+ * Read the Current from the CDR intput stream (IOR profile expected).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static Current read(InputStream input)
+ {
+ return narrow(input.read_Object());
+ }
+
+ /**
+ * Write the Current to the CDR output stream (as IOR profile).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, Current value)
+ {
+ output.write_Object(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/CurrentHolder.java b/org/omg/CORBA/CurrentHolder.java
new file mode 100644
index 000000000..83e5365d6
--- /dev/null
+++ b/org/omg/CORBA/CurrentHolder.java
@@ -0,0 +1,103 @@
+/* CurrentHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the object {@link Current}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class CurrentHolder
+ implements Streamable
+{
+ /**
+ * The stored Current value.
+ */
+ public Current value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public CurrentHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public CurrentHolder(Current initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = CurrentHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ CurrentHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the Current.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return CurrentHelper.type();
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/CurrentOperations.java b/org/omg/CORBA/CurrentOperations.java
index f0a8b9f46..a40db85c4 100644
--- a/org/omg/CORBA/CurrentOperations.java
+++ b/org/omg/CORBA/CurrentOperations.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,9 +40,14 @@ package org.omg.CORBA;
/**
+ * <p>
* The interfaces, derived from this class, define operations that provide
* information, associated with a particular thread of execution.
- *
+ * </p><p>
+ * There are no operations for the general "Current". Instead, the operations
+ * are defined for various subinterfaces that were derived from the
+ * Current.
+ * </p>
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*
* @see Current
diff --git a/org/omg/CORBA/CustomMarshal.java b/org/omg/CORBA/CustomMarshal.java
new file mode 100644
index 000000000..d0e47a9fc
--- /dev/null
+++ b/org/omg/CORBA/CustomMarshal.java
@@ -0,0 +1,68 @@
+/* CustomMarshal.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+
+/**
+ * This interface indicates that the object can provide its own methods
+ * for reading and writing its content. This interface is typically used
+ * by the CORBA implementation only. The user application should use the
+ * {@link CustomValue} that is a descendant of this interface.
+ *
+ * @see DataInputStream
+ * @see DataOutputStream
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CustomMarshal
+{
+ /**
+ * Read (unmarshal) the content of this object from the given input stream.
+ *
+ * @param into_stream a stream to read from.
+ */
+ public void marshal(DataOutputStream into_stream);
+
+ /**
+ * Write (marshal) the content of this object to the given input stream.
+ *
+ * @param from_stream a stream to write into.
+ */
+ public void unmarshal(DataInputStream from_stream);
+} \ No newline at end of file
diff --git a/org/omg/CORBA/CustomValue.java b/org/omg/CORBA/CustomValue.java
new file mode 100644
index 000000000..0e5809fd6
--- /dev/null
+++ b/org/omg/CORBA/CustomValue.java
@@ -0,0 +1,60 @@
+/* CustomValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.portable.ValueBase;
+
+/**
+ * A Custom Value is a {@link ValueBase} implementing its own methods for
+ * reading and writing (unmarshaling and marshaling) the content. These methods
+ * are defined in superinterface {@link CustomMarshal}.
+ *
+ * Custom value types can never be safely truncated to the more general
+ * base type. They and always require an exact match for their RepositoryId
+ * in the receiving context.
+ *
+ * If the value base does not implement this interface, it normally implements
+ * {@link org.omg.CORBA.portable.StremableValue} instead.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CustomValue
+ extends ValueBase, CustomMarshal
+{
+} \ No newline at end of file
diff --git a/org/omg/CORBA/DATA_CONVERSION.java b/org/omg/CORBA/DATA_CONVERSION.java
index 0d9f85d47..3faacdcb2 100644
--- a/org/omg/CORBA/DATA_CONVERSION.java
+++ b/org/omg/CORBA/DATA_CONVERSION.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DataInputStream.java b/org/omg/CORBA/DataInputStream.java
new file mode 100644
index 000000000..bb9fa3df8
--- /dev/null
+++ b/org/omg/CORBA/DataInputStream.java
@@ -0,0 +1,276 @@
+/* DataInputStream.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.portable.ValueBase;
+
+/**
+ * An interface for reading the custom value types. A value type, providing
+ * its own mechanism for reading the content, must implement
+ * the {@link CustomValue} that uses this interface.
+ *
+ * @see CustomValue
+ * @see CustomMarshal
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DataInputStream
+ extends ValueBase
+{
+ /**
+ * Read {@link Any}.
+ * @return a value, extracted from the stream.
+ */
+ Any read_any();
+
+ /**
+ * Read boolean.
+ * @return a value, extracted from the stream.
+ */
+ boolean read_boolean();
+
+ /**
+ * Read narrow (usually 8 bit) char.
+ * @return a value, extracted from the stream.
+ */
+ char read_char();
+
+ /**
+ * Read wide (usually 16 bit) char.
+ * @return a value, extracted from the stream.
+ */
+ char read_wchar();
+
+ /**
+ * Read octet (byte).
+ * @return a value, extracted from the stream.
+ */
+ byte read_octet();
+
+ /**
+ * Read short (16 bit int).
+ * @return a value, extracted from the stream.
+ */
+ short read_short();
+
+ /**
+ * Read unsigned short.
+ * @return a value, extracted from the stream.
+ */
+ short read_ushort();
+
+ /**
+ * Read CORBA long (java int, 32 bits).
+ * @return a value, extracted from the stream.
+ */
+ int read_long();
+
+ /**
+ * Read CORBA unsigned long (java int).
+ * @return a value, extracted from the stream.
+ */
+ int read_ulong();
+
+ /**
+ * Read CORBA long long (java long, 64 bits).
+ * @return a value, extracted from the stream.
+ */
+ long read_longlong();
+
+ /**
+ * Read unsigned CORBA long long (java long, 64 bits).
+ * @return a value, extracted from the stream.
+ */
+ long read_ulonglong();
+
+ /**
+ * Read float.
+ * @return a value, extracted from the stream.
+ */
+ float read_float();
+
+ /**
+ * Read dobule.
+ * @return a value, extracted from the stream.
+ */
+ double read_double();
+
+ /**
+ * Read narrow string (usually 8 bits per character).
+ * @return a value, extracted from the stream.
+ */
+ String read_string();
+
+ /**
+ * Read wide string (usually 16 bits per character).
+ * @return a value, extracted from the stream.
+ */
+ String read_wstring();
+
+ /**
+ * Read CORBA object.
+ *
+ * @return a value, extracted from the stream. May be null
+ * if the null was previously written by {@link DataOutputStream#write_Object}.
+ */
+ org.omg.CORBA.Object read_Object();
+
+ /**
+ * Read abstract interface.
+ *
+ * @return a value, extracted from the stream. May be either CORBA Object or
+ * CORBA value type.
+ */
+ java.lang.Object read_Abstract();
+
+ /**
+ * Read the CORBA value type.
+ * @return a value, extracted from the stream.
+ */
+ java.io.Serializable read_Value();
+
+ /**
+ * Read typecode.
+ * @return a value, extracted from the stream.
+ */
+ TypeCode read_TypeCode();
+
+ /**
+ * Read array of Any's.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_any_array(AnySeqHolder seq, int offset, int length);
+
+ /**
+ * Read boolean array.
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_boolean_array(BooleanSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of narrow (usually 8 bit) chars.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_char_array(CharSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of wide (usually 16 bit) chars.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_wchar_array(WCharSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of bytes.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_octet_array(OctetSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of shorts (16 bit ints).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_short_array(ShortSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of unsigned shorts (16 bit ints).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_ushort_array(UShortSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of CORBA longs (java ints).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_long_array(LongSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of CORBA unsigned longs (java ints).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_ulong_array(ULongSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of CORBA unsigned long longs (java longs).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_ulonglong_array(ULongLongSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of CORBA long longs (java longs).
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_longlong_array(LongLongSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of floats.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_float_array(FloatSeqHolder seq, int offset, int length);
+
+ /**
+ * Read array of doubles.
+ *
+ * The value, extracted from the stream, is returned in the
+ * .value field of the passed holder.
+ */
+ void read_double_array(DoubleSeqHolder seq, int offset, int length);
+} \ No newline at end of file
diff --git a/org/omg/CORBA/DataOutputStream.java b/org/omg/CORBA/DataOutputStream.java
new file mode 100644
index 000000000..5e0f021fe
--- /dev/null
+++ b/org/omg/CORBA/DataOutputStream.java
@@ -0,0 +1,281 @@
+/* DataOutputStream.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.portable.ValueBase;
+
+/**
+ * An interface for writing the custom value types. A value type, providing
+ * its own mechanism for writing the content, must implement
+ * the {@link CustomValue} that uses this interface.
+ *
+ * @see CustomValue
+ * @see CustomMarshal
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DataOutputStream
+ extends ValueBase
+{
+ /**
+ * Write {@link Any} to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_any(Any value);
+
+ /**
+ * Write boolean to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_boolean(boolean value);
+
+ /**
+ * Write narrow (usually 8 bit) char to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_char(char value);
+
+ /**
+ * Write wide (usually 16 bit) char to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_wchar(char value);
+
+ /**
+ * Write octet (byte) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_octet(byte value);
+
+ /**
+ * Write short (16 bit signed integer) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_short(short value);
+
+ /**
+ * Write unsigned short to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ushort(short value);
+
+ /**
+ * Write CORBA long (32 bits, java int) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_long(int value);
+
+ /**
+ * Write unsigned CORBA long (32 bits, java int) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ulong(int value);
+
+ /**
+ * Write CORBA long long (64 bits, java long) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_longlong(long value);
+
+ /**
+ * Write unsigned CORBA long long (64 bits, java long) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ulonglong(long value);
+
+ /**
+ * Write float to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_float(float value);
+
+ /**
+ * Write double to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_double(double value);
+
+ /**
+ * Write narrow (usually 8 bits per character) string to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_string(String value);
+
+ /**
+ * Write wide (usually 16 bits per character) string to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_wstring(String value);
+
+ /**
+ * Write CORBA object reference to the output stream.
+ *
+ * @param value a value to write, null should be supported.
+ */
+ void write_Object(org.omg.CORBA.Object value);
+
+ /**
+ * Write abstract interface to the output stream.
+ *
+ * @param value a value to write, can be either CORBA object or
+ * CORBA value type.
+ */
+ void write_Abstract(java.lang.Object value);
+
+ /**
+ * Write value type to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_Value(java.io.Serializable value);
+
+ /**
+ * Write typecode to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_TypeCode(TypeCode value);
+
+ /**
+ * Write array of Any's to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_any_array(Any[] seq, int offset, int length);
+
+ /**
+ * Write array of boolean's to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_boolean_array(boolean[] seq, int offset, int length);
+
+ /**
+ * Write array of narrow chars to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_char_array(char[] seq, int offset, int length);
+
+ /**
+ * Write array of wide chars to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_wchar_array(char[] seq, int offset, int length);
+
+ /**
+ * Write array of octets (bytes) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_octet_array(byte[] seq, int offset, int length);
+
+ /**
+ * Write array of shorts (16 bit integers) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_short_array(short[] seq, int offset, int length);
+
+ /**
+ * Write array of unsigned shorts (16 bit integers) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ushort_array(short[] seq, int offset, int length);
+
+ /**
+ * Write array of CORBA longs (java ints) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_long_array(int[] seq, int offset, int length);
+
+ /**
+ * Write array of unsigned CORBA longs (java ints) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ulong_array(int[] seq, int offset, int length);
+
+ /**
+ * Write array of unsigned CORBA long longs (java longs)
+ * to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_ulonglong_array(long[] seq, int offset, int length);
+
+ /**
+ * Write arrayo fo CORBA long longs (java ints) to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_longlong_array(long[] seq, int offset, int length);
+
+ /**
+ * Write array of floats to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_float_array(float[] seq, int offset, int length);
+
+ /**
+ * Write array of doubles to the output stream.
+ *
+ * @param value a value to write.
+ */
+ void write_double_array(double[] seq, int offset, int length);
+} \ No newline at end of file
diff --git a/org/omg/CORBA/DefinitionKind.java b/org/omg/CORBA/DefinitionKind.java
index 63879d574..ac185bdac 100644
--- a/org/omg/CORBA/DefinitionKind.java
+++ b/org/omg/CORBA/DefinitionKind.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DefinitionKindHelper.java b/org/omg/CORBA/DefinitionKindHelper.java
index 6851402dc..d9c7cc15a 100644
--- a/org/omg/CORBA/DefinitionKindHelper.java
+++ b/org/omg/CORBA/DefinitionKindHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DomainManager.java b/org/omg/CORBA/DomainManager.java
index c677dd4d0..a7a89fd1a 100644
--- a/org/omg/CORBA/DomainManager.java
+++ b/org/omg/CORBA/DomainManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DomainManagerOperations.java b/org/omg/CORBA/DomainManagerOperations.java
index dc1cb7163..7dc0526a4 100644
--- a/org/omg/CORBA/DomainManagerOperations.java
+++ b/org/omg/CORBA/DomainManagerOperations.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DoubleHolder.java b/org/omg/CORBA/DoubleHolder.java
index 5709b7bcd..efee74b0f 100644
--- a/org/omg/CORBA/DoubleHolder.java
+++ b/org/omg/CORBA/DoubleHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DoubleSeqHelper.java b/org/omg/CORBA/DoubleSeqHelper.java
index 160c40fd3..d8dffbf4c 100644
--- a/org/omg/CORBA/DoubleSeqHelper.java
+++ b/org/omg/CORBA/DoubleSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DoubleSeqHolder.java b/org/omg/CORBA/DoubleSeqHolder.java
index 701c61263..a6828e1c1 100644
--- a/org/omg/CORBA/DoubleSeqHolder.java
+++ b/org/omg/CORBA/DoubleSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynAny.java b/org/omg/CORBA/DynAny.java
index 71d200ce3..42b933419 100644
--- a/org/omg/CORBA/DynAny.java
+++ b/org/omg/CORBA/DynAny.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynAnyPackage/Invalid.java b/org/omg/CORBA/DynAnyPackage/Invalid.java
index a5c09c10f..68c718638 100644
--- a/org/omg/CORBA/DynAnyPackage/Invalid.java
+++ b/org/omg/CORBA/DynAnyPackage/Invalid.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynAnyPackage/InvalidSeq.java b/org/omg/CORBA/DynAnyPackage/InvalidSeq.java
index be16dd59f..ca1332939 100644
--- a/org/omg/CORBA/DynAnyPackage/InvalidSeq.java
+++ b/org/omg/CORBA/DynAnyPackage/InvalidSeq.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynAnyPackage/InvalidValue.java b/org/omg/CORBA/DynAnyPackage/InvalidValue.java
index 97923cf46..bca6808c8 100644
--- a/org/omg/CORBA/DynAnyPackage/InvalidValue.java
+++ b/org/omg/CORBA/DynAnyPackage/InvalidValue.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynAnyPackage/TypeMismatch.java b/org/omg/CORBA/DynAnyPackage/TypeMismatch.java
index c2384767a..0de38edeb 100644
--- a/org/omg/CORBA/DynAnyPackage/TypeMismatch.java
+++ b/org/omg/CORBA/DynAnyPackage/TypeMismatch.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynAnyPackage/package.html b/org/omg/CORBA/DynAnyPackage/package.html
index e718ef8c2..f8c476e6f 100644
--- a/org/omg/CORBA/DynAnyPackage/package.html
+++ b/org/omg/CORBA/DynAnyPackage/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynArray.java b/org/omg/CORBA/DynArray.java
index 96690568f..4e831adb3 100644
--- a/org/omg/CORBA/DynArray.java
+++ b/org/omg/CORBA/DynArray.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynEnum.java b/org/omg/CORBA/DynEnum.java
index c98c394c9..e17534d81 100644
--- a/org/omg/CORBA/DynEnum.java
+++ b/org/omg/CORBA/DynEnum.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynFixed.java b/org/omg/CORBA/DynFixed.java
index b8f236603..e7daa9ab5 100644
--- a/org/omg/CORBA/DynFixed.java
+++ b/org/omg/CORBA/DynFixed.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynSequence.java b/org/omg/CORBA/DynSequence.java
index bd41ee84e..be7556705 100644
--- a/org/omg/CORBA/DynSequence.java
+++ b/org/omg/CORBA/DynSequence.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynStruct.java b/org/omg/CORBA/DynStruct.java
index 574979934..d1194428d 100644
--- a/org/omg/CORBA/DynStruct.java
+++ b/org/omg/CORBA/DynStruct.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynUnion.java b/org/omg/CORBA/DynUnion.java
index a5d49add8..115ac17dc 100644
--- a/org/omg/CORBA/DynUnion.java
+++ b/org/omg/CORBA/DynUnion.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynValue.java b/org/omg/CORBA/DynValue.java
index 5ef65659a..24d281246 100644
--- a/org/omg/CORBA/DynValue.java
+++ b/org/omg/CORBA/DynValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/DynamicImplementation.java b/org/omg/CORBA/DynamicImplementation.java
index b526ea325..3bcf93d42 100644
--- a/org/omg/CORBA/DynamicImplementation.java
+++ b/org/omg/CORBA/DynamicImplementation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/Environment.java b/org/omg/CORBA/Environment.java
index e2cfd651b..fab77c7ec 100644
--- a/org/omg/CORBA/Environment.java
+++ b/org/omg/CORBA/Environment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ExceptionList.java b/org/omg/CORBA/ExceptionList.java
index 5e5b87fae..0a834344d 100644
--- a/org/omg/CORBA/ExceptionList.java
+++ b/org/omg/CORBA/ExceptionList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/FREE_MEM.java b/org/omg/CORBA/FREE_MEM.java
index 2514f6961..5de665cb8 100644
--- a/org/omg/CORBA/FREE_MEM.java
+++ b/org/omg/CORBA/FREE_MEM.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/FieldNameHelper.java b/org/omg/CORBA/FieldNameHelper.java
index 4be2e737f..a35df4f35 100644
--- a/org/omg/CORBA/FieldNameHelper.java
+++ b/org/omg/CORBA/FieldNameHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/FixedHolder.java b/org/omg/CORBA/FixedHolder.java
index 6c26c4b2d..c3918a08d 100644
--- a/org/omg/CORBA/FixedHolder.java
+++ b/org/omg/CORBA/FixedHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/FloatHolder.java b/org/omg/CORBA/FloatHolder.java
index 5681f3b44..059953faf 100644
--- a/org/omg/CORBA/FloatHolder.java
+++ b/org/omg/CORBA/FloatHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/FloatSeqHelper.java b/org/omg/CORBA/FloatSeqHelper.java
index 98721dc13..9f7630c3f 100644
--- a/org/omg/CORBA/FloatSeqHelper.java
+++ b/org/omg/CORBA/FloatSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/FloatSeqHolder.java b/org/omg/CORBA/FloatSeqHolder.java
index e7998a3c8..24c760333 100644
--- a/org/omg/CORBA/FloatSeqHolder.java
+++ b/org/omg/CORBA/FloatSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/IDLEntity.java b/org/omg/CORBA/IDLEntity.java
index c72e8844e..6515d8330 100644
--- a/org/omg/CORBA/IDLEntity.java
+++ b/org/omg/CORBA/IDLEntity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/IDLType.java b/org/omg/CORBA/IDLType.java
index f70a488db..74c10549f 100644
--- a/org/omg/CORBA/IDLType.java
+++ b/org/omg/CORBA/IDLType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/IDLTypeHelper.java b/org/omg/CORBA/IDLTypeHelper.java
new file mode 100644
index 000000000..d9ca36496
--- /dev/null
+++ b/org/omg/CORBA/IDLTypeHelper.java
@@ -0,0 +1,139 @@
+/* IDLTypeHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for the IDL type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class IDLTypeHelper
+{
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Insert the IDL type into the given Any.
+ */
+ public static void insert(Any a, IDLType that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Extract the IDL type from the given Any.
+ */
+ public static IDLType extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Get the typecode of the IDL type (the interface typecode, name "IDLType").
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ typeCode =
+ Restricted_ORB.Singleton.create_interface_tc(IDLTypeHelper.id(),
+ "IDLType"
+ );
+ }
+ return typeCode;
+ }
+
+ /**
+ * Return the IDLType repository id.
+ *
+ * @return "IDL:omg.org/CORBA/IDLType:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/IDLType:1.0";
+ }
+
+ /**
+ * Read the IDL type from the given input stream.
+ * The method reads an object and narrows into IDL type using this
+ * helper.
+ */
+ public static IDLType read(InputStream istream)
+ {
+ return narrow(istream.read_Object());
+ }
+
+ /**
+ * Write the IDL type to the output stream (as CORBA object).
+ */
+ public static void write(OutputStream ostream, IDLType value)
+ {
+ ostream.write_Object((org.omg.CORBA.Object) value);
+ }
+
+ /**
+ * Narrows the CORBA object into the IDL type.
+ */
+ public static IDLType narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof IDLType)
+ return (IDLType) obj;
+ else if (!obj._is_a(id()))
+ throw new org.omg.CORBA.BAD_PARAM();
+ else
+ {
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _IDLTypeStub(delegate);
+ }
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/IDLTypeOperations.java b/org/omg/CORBA/IDLTypeOperations.java
index acd078548..1389167ed 100644
--- a/org/omg/CORBA/IDLTypeOperations.java
+++ b/org/omg/CORBA/IDLTypeOperations.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/IMP_LIMIT.java b/org/omg/CORBA/IMP_LIMIT.java
index 5513458e9..e61681c32 100644
--- a/org/omg/CORBA/IMP_LIMIT.java
+++ b/org/omg/CORBA/IMP_LIMIT.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/INITIALIZE.java b/org/omg/CORBA/INITIALIZE.java
index 93fd621d7..f697e5833 100644
--- a/org/omg/CORBA/INITIALIZE.java
+++ b/org/omg/CORBA/INITIALIZE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/INTERNAL.java b/org/omg/CORBA/INTERNAL.java
index 4dd7a4827..a49041e57 100644
--- a/org/omg/CORBA/INTERNAL.java
+++ b/org/omg/CORBA/INTERNAL.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/INTF_REPOS.java b/org/omg/CORBA/INTF_REPOS.java
index 6715099b8..e879c0b1e 100644
--- a/org/omg/CORBA/INTF_REPOS.java
+++ b/org/omg/CORBA/INTF_REPOS.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/INVALID_TRANSACTION.java b/org/omg/CORBA/INVALID_TRANSACTION.java
index fad8e3600..98cef8304 100644
--- a/org/omg/CORBA/INVALID_TRANSACTION.java
+++ b/org/omg/CORBA/INVALID_TRANSACTION.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/INV_FLAG.java b/org/omg/CORBA/INV_FLAG.java
index 32510a80d..7766a3cd0 100644
--- a/org/omg/CORBA/INV_FLAG.java
+++ b/org/omg/CORBA/INV_FLAG.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/INV_IDENT.java b/org/omg/CORBA/INV_IDENT.java
index 733a1c543..ca61a0a24 100644
--- a/org/omg/CORBA/INV_IDENT.java
+++ b/org/omg/CORBA/INV_IDENT.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/INV_OBJREF.java b/org/omg/CORBA/INV_OBJREF.java
index d43ff4be3..ca8e059d4 100644
--- a/org/omg/CORBA/INV_OBJREF.java
+++ b/org/omg/CORBA/INV_OBJREF.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/INV_POLICY.java b/org/omg/CORBA/INV_POLICY.java
index 1e0ccca11..f4ff245cf 100644
--- a/org/omg/CORBA/INV_POLICY.java
+++ b/org/omg/CORBA/INV_POLICY.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/IRObject.java b/org/omg/CORBA/IRObject.java
index b68bc7c0b..8c9cde19d 100644
--- a/org/omg/CORBA/IRObject.java
+++ b/org/omg/CORBA/IRObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/IRObjectOperations.java b/org/omg/CORBA/IRObjectOperations.java
index 2c657082a..c7c89ae55 100644
--- a/org/omg/CORBA/IRObjectOperations.java
+++ b/org/omg/CORBA/IRObjectOperations.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/IdentifierHelper.java b/org/omg/CORBA/IdentifierHelper.java
index 8cd612fcf..fa2044841 100644
--- a/org/omg/CORBA/IdentifierHelper.java
+++ b/org/omg/CORBA/IdentifierHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/IntHolder.java b/org/omg/CORBA/IntHolder.java
index 3b7077475..19822ef76 100644
--- a/org/omg/CORBA/IntHolder.java
+++ b/org/omg/CORBA/IntHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/LocalObject.java b/org/omg/CORBA/LocalObject.java
new file mode 100644
index 000000000..4b6ae68af
--- /dev/null
+++ b/org/omg/CORBA/LocalObject.java
@@ -0,0 +1,235 @@
+/* LocalObject.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.DomainManager;
+import org.omg.CORBA.ExceptionList;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.Request;
+import org.omg.CORBA.SetOverrideType;
+
+/**
+ * An object, formally implementing the CORBA {@link Object}, but actually
+ * handling all invocations locally.
+ * Various calls to the remote object specific methods throw the
+ * {@link NO_IMPLEMENT}. The explaining message for this exception is
+ * specified in java API as <code>"This is a locally constrained object."</code>.
+ * It is not possible to get a stringified reference of the local object, or
+ * invoke a method using DII (by name via {@link Request} class).
+ *
+ * However narrowing and widening methods will work with local objects.
+ *
+ * @since 1.4
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class LocalObject
+ implements org.omg.CORBA.Object
+{
+ /**
+ * The explaining message for the exception, thrown in response to call
+ * the method, not appropriate for the local object.
+ */
+ private static final String INAPPROPRIATE =
+ "This is a locally constrained object.";
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Request _create_request(Context context, String operation,
+ NVList parameters, NamedValue returns
+ )
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Request _create_request(Context context, String operation,
+ NVList parameters, NamedValue returns,
+ ExceptionList exceptions, ContextList ctx_list
+ )
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public org.omg.CORBA.Object _duplicate()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public DomainManager[] _get_domain_managers()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public org.omg.CORBA.Object _get_interface_def()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Policy _get_policy(int a_policy_type)
+ throws BAD_PARAM
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int _hash(int maximum)
+ {
+ return Math.abs(hashCode()) % maximum;
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public boolean _is_a(String repositoryIdentifer)
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * Determines if the object is equal to another object, so far as it is
+ * possible to determine easily.
+ *
+ * @param other the other object.
+ *
+ * @return true if the pased object is not null and
+ * java.lang.Object.equals(other) returns true. False otherwise.
+ */
+ public boolean _is_equivalent(org.omg.CORBA.Object other)
+ {
+ if (other != null)
+ if (other.equals(this))
+ return true;
+
+ return false;
+ }
+
+ /**
+ * Always returs false.
+ *
+ * @return false, always.
+ */
+ public boolean _non_existent()
+ {
+ return false;
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public void _release()
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @specnote it is possible to implement a local handling of the _request(),
+ * but the API clearly states that NO_IMPLEMENT
+ * must be thrown instead.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public Request _request(String operation)
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+
+ /**
+ * This method is not appropriate for the local objects and just
+ * throws an exception.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ public org.omg.CORBA.Object _set_policy_override(Policy[] policies,
+ SetOverrideType how
+ )
+ {
+ throw new NO_IMPLEMENT(INAPPROPRIATE);
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/LongHolder.java b/org/omg/CORBA/LongHolder.java
index 42e927692..c0b14d33b 100644
--- a/org/omg/CORBA/LongHolder.java
+++ b/org/omg/CORBA/LongHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/LongLongSeqHelper.java b/org/omg/CORBA/LongLongSeqHelper.java
index 31cad8d80..1d7cde01c 100644
--- a/org/omg/CORBA/LongLongSeqHelper.java
+++ b/org/omg/CORBA/LongLongSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/LongLongSeqHolder.java b/org/omg/CORBA/LongLongSeqHolder.java
index cbe25091c..955790296 100644
--- a/org/omg/CORBA/LongLongSeqHolder.java
+++ b/org/omg/CORBA/LongLongSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/LongSeqHelper.java b/org/omg/CORBA/LongSeqHelper.java
index ff33e56a7..e98c77920 100644
--- a/org/omg/CORBA/LongSeqHelper.java
+++ b/org/omg/CORBA/LongSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/LongSeqHolder.java b/org/omg/CORBA/LongSeqHolder.java
index 6e5a3ce6b..ac571decd 100644
--- a/org/omg/CORBA/LongSeqHolder.java
+++ b/org/omg/CORBA/LongSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/MARSHAL.java b/org/omg/CORBA/MARSHAL.java
index cadb1d07e..34cfa78f6 100644
--- a/org/omg/CORBA/MARSHAL.java
+++ b/org/omg/CORBA/MARSHAL.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NO_IMPLEMENT.java b/org/omg/CORBA/NO_IMPLEMENT.java
index bb426b958..7ffbca49d 100644
--- a/org/omg/CORBA/NO_IMPLEMENT.java
+++ b/org/omg/CORBA/NO_IMPLEMENT.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NO_MEMORY.java b/org/omg/CORBA/NO_MEMORY.java
index 4ae0ace86..e09b4f1af 100644
--- a/org/omg/CORBA/NO_MEMORY.java
+++ b/org/omg/CORBA/NO_MEMORY.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NO_PERMISSION.java b/org/omg/CORBA/NO_PERMISSION.java
index c8b8d19db..dbeaa33eb 100644
--- a/org/omg/CORBA/NO_PERMISSION.java
+++ b/org/omg/CORBA/NO_PERMISSION.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NO_RESOURCES.java b/org/omg/CORBA/NO_RESOURCES.java
index b0a1d36d5..262b8ce1a 100644
--- a/org/omg/CORBA/NO_RESOURCES.java
+++ b/org/omg/CORBA/NO_RESOURCES.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NO_RESPONSE.java b/org/omg/CORBA/NO_RESPONSE.java
index 5a8613f4e..0c31cfbee 100644
--- a/org/omg/CORBA/NO_RESPONSE.java
+++ b/org/omg/CORBA/NO_RESPONSE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NVList.java b/org/omg/CORBA/NVList.java
index 98af47e56..af1241ada 100644
--- a/org/omg/CORBA/NVList.java
+++ b/org/omg/CORBA/NVList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NameValuePair.java b/org/omg/CORBA/NameValuePair.java
index de61096bd..a447c6f7b 100644
--- a/org/omg/CORBA/NameValuePair.java
+++ b/org/omg/CORBA/NameValuePair.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NameValuePairHelper.java b/org/omg/CORBA/NameValuePairHelper.java
index 5240546c1..f40e570a7 100644
--- a/org/omg/CORBA/NameValuePairHelper.java
+++ b/org/omg/CORBA/NameValuePairHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/NamedValue.java b/org/omg/CORBA/NamedValue.java
index c7492c747..492c854b7 100644
--- a/org/omg/CORBA/NamedValue.java
+++ b/org/omg/CORBA/NamedValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/OBJECT_NOT_EXIST.java b/org/omg/CORBA/OBJECT_NOT_EXIST.java
index 18c3932bf..aa8571dcb 100644
--- a/org/omg/CORBA/OBJECT_NOT_EXIST.java
+++ b/org/omg/CORBA/OBJECT_NOT_EXIST.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/OBJ_ADAPTER.java b/org/omg/CORBA/OBJ_ADAPTER.java
index 26acb9026..36c54b286 100644
--- a/org/omg/CORBA/OBJ_ADAPTER.java
+++ b/org/omg/CORBA/OBJ_ADAPTER.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/OMGVMCID.java b/org/omg/CORBA/OMGVMCID.java
index a4b801b44..6c7b30810 100644
--- a/org/omg/CORBA/OMGVMCID.java
+++ b/org/omg/CORBA/OMGVMCID.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ORB.java b/org/omg/CORBA/ORB.java
index 8625cf8e9..0cfbc2956 100644
--- a/org/omg/CORBA/ORB.java
+++ b/org/omg/CORBA/ORB.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,10 +39,10 @@ exception statement from your version. */
package org.omg.CORBA;
import gnu.CORBA.Restricted_ORB;
-import gnu.CORBA.primitiveTypeCode;
import gnu.CORBA.fixedTypeCode;
import gnu.CORBA.generalTypeCode;
import gnu.CORBA.gnuContext;
+import gnu.CORBA.primitiveTypeCode;
import gnu.CORBA.recordTypeCode;
import gnu.CORBA.recursiveTypeCode;
@@ -58,7 +58,16 @@ import java.io.IOException;
import java.util.Properties;
/**
- * When creating an ORB instance is being created, the class name
+ * A central class in CORBA implementation, responsible for sending and
+ * handling remote invocations. ORB also works as a factory for
+ * creating instances of certain CORBA classes.
+ *
+ * Despite the core library contains the fully working CORBA implementation,
+ * it also provides a simple way to plug-in the alternative CORBA support.
+ * This is done by replacing the ORB. The alternative ORB can be specified
+ * via properties, passed to ORB.Init(...).
+ *
+ * When creating an ORB instance, the class name
* is searched in the following locations:
* <p>
* 1. Applet parameter or application string array, if any.<br>
@@ -109,13 +118,14 @@ public abstract class ORB
/**
* The class, implementing the default fully functional ORB.
*/
- private static final String DEFAULT_FUNCTIONAL_ORB = "gnu.CORBA.Functional_ORB";
+ private static final String DEFAULT_FUNCTIONAL_ORB =
+ gnu.CORBA.Poa.ORB_1_4.class.getName();
/**
* The class, implementing the default restricted ORB.
*/
- private static final String DEFAULT_RESTRICTED_ORB = "gnu.CORBA.Restricted_ORB";
-
+ private static final String DEFAULT_RESTRICTED_ORB =
+ gnu.CORBA.Restricted_ORB.class.getName();
/**
* Connect the given CORBA object to this ORB. After the object is
@@ -232,10 +242,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode t)
- throws InconsistentTypeCode
+ throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
- };
+ }
+ ;
/**
* The support for {@link DynAny} and derived interfaces
@@ -250,7 +261,8 @@ public abstract class ORB
public DynAny create_dyn_any(org.omg.CORBA.Any a)
{
throw new NO_IMPLEMENT();
- };
+ }
+ ;
/**
* The support for {@link DynArray}
@@ -263,10 +275,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynArray create_dyn_array(org.omg.CORBA.TypeCode t)
- throws InconsistentTypeCode
- {
- throw new NO_IMPLEMENT();
- };
+ throws InconsistentTypeCode
+ {
+ throw new NO_IMPLEMENT();
+ }
+ ;
/**
* The support for {@link DynEnum}
@@ -279,10 +292,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynEnum create_dyn_enum(org.omg.CORBA.TypeCode t)
- throws InconsistentTypeCode
+ throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
- };
+ }
+ ;
/**
* The support for {@link DynSequence}
@@ -295,10 +309,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode t)
- throws InconsistentTypeCode
+ throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
- };
+ }
+ ;
/**
* The support for {@link DynStruct} and derived interfaces
@@ -311,10 +326,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynStruct create_dyn_struct(org.omg.CORBA.TypeCode t)
- throws InconsistentTypeCode
+ throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
- };
+ }
+ ;
/**
* The support for {@link DynUnion} and derived interfaces
@@ -327,10 +343,11 @@ public abstract class ORB
* @throws NO_IMPLEMENT, always.
*/
public DynUnion create_dyn_union(org.omg.CORBA.TypeCode t)
- throws InconsistentTypeCode
+ throws InconsistentTypeCode
{
throw new NO_IMPLEMENT();
- };
+ }
+ ;
/**
* Create a typecode, defining the given enumeration.
@@ -470,9 +487,8 @@ public abstract class ORB
* particular transaction.
*/
public abstract Request get_next_response()
- throws WrongTransaction;
-
-
+ throws WrongTransaction;
+
/**
* Create a new CDR output stream, where the parameter values can be written
* during the method invocation.
@@ -518,8 +534,6 @@ public abstract class ORB
throw new NO_IMPLEMENT();
}
-
-
/**
* Create typecode, defining the sequence of the elements, having
* the given type.
@@ -582,7 +596,6 @@ public abstract class ORB
*/
public abstract TypeCode create_wstring_tc(int bound);
-
/**
* Create a typecode for an abstract interface. The abstract interface
* can be either CORBA object or CORBA value type.
@@ -666,15 +679,19 @@ public abstract class ORB
/**
* This should return the information, related to the current thread.
+ * The information is needed, for instance, to get the current object
+ * from the code that serves several objects in parallel threads.
* The {@link Current} is very general interface, with no fields and
* operations defined. This method is not implemented in Suns
- * releases at least till v1.4 inclusive.
+ * releases at least till v1.5 inclusive. To obtain the
+ * {@link org.omg.PortableServer.Current}, use
+ * {@link #resolve_initial_references}, passing "POACurrent".
*
- * @deprecated since 1.2
+ * @deprecated since 1.2, use {@link #resolve_initial_references}.
*
* @return never
*
- * @throws NO_IMPLEMENT, always.
+ * @throws NO_IMPLEMENT always.
*/
public Current get_current()
{
@@ -684,7 +701,7 @@ public abstract class ORB
/**
* This should return the information about the CORBA facilities and
* services, available from this ORB. However this method is oficially
- * documented as not implemented at least till v1.4 inclusive.
+ * documented as not implemented at least till v1.5 inclusive.
*
* @param service_type a type of the service being requested. The OMG
* specification currently defines only one value, 1, for security
@@ -696,10 +713,11 @@ public abstract class ORB
* @return should return true if the service information is available
* from the ORB, but this method never returns.
*
- * @throws NO_IMPLEMENT, always.
+ * @throws NO_IMPLEMENT always.
*/
public boolean get_service_information(short service_type,
- ServiceInformationHolder service_info)
+ ServiceInformationHolder service_info
+ )
{
throw new NO_IMPLEMENT();
}
@@ -837,7 +855,34 @@ public abstract class ORB
* Find and return the easily accessible CORBA object, addressed
* by name. The returned object is typically casted to the more
* specific reference using the <code>narrow(Object)</code> method
- * of its helper.
+ * of its helper. The method resolves the following string values,
+ * returning the working objects:
+ * <table border="1"><tr><th>String</th><th>Object class</th>
+ * <th>Object use</th></tr>
+ *
+ * <tr><td>NameService</td><td>{@link org.omg.CosNaming.NamingContextExt}</td>
+ * <td>Finds (usually remote) object by its name.</td></tr>
+ *
+ * <tr><td>RootPOA</td><td>{@link org.omg.PortableServer.POA}</td>
+ * <td>Holds the POA tree for this ORB, where since 1.4 all servants
+ * should be connected.</td></tr>
+ *
+ * <tr><td>RootPOAManager</td><td>{@link org.omg.PortableServer.POAManager}
+ * </td><td>Regulates (suspends/resumes) the root POA
+ * activity</td></tr>
+ *
+ * <tr><td>POACurrent</td><td>{@link org.omg.PortableServer.Current}
+ * </td><td>Informs the current thread about the Id and POA of the
+ * object being currently served (the methods of
+ * <code>Current</code> return different values for
+ * different threads).
+ * </td></tr>
+ *
+ * <tr><td>CodecFactory</td><td>{@link org.omg.IOP.Codec}</td>
+ * <td>Encodes/decodes IDL data types into/from byte arrays.</td>
+ * </tr>
+ *
+ * </table>
*
* @param name the object name.
* @return the object
@@ -878,20 +923,20 @@ public abstract class ORB
{
}
- /**
- * Checks if the ORB needs the main thread to perform some work.
- * The method should return true if the ORB needs the main thread,
- * and false if it does not.
- *
- * This method is part of the support for the distribute use of the
- * single execution thread.
- *
- * Same as in Suns releases at least till 1.4 inclusive,
- * the distributed use of the single thread is not implemented.
- * Use multiple threads, provided by jre.
- *
- * @return false, always.
- */
+ /**
+ * Checks if the ORB needs the main thread to perform some work.
+ * The method should return true if the ORB needs the main thread,
+ * and false if it does not.
+ *
+ * This method is part of the support for the distribute use of the
+ * single execution thread.
+ *
+ * Same as in Suns releases at least till 1.4 inclusive,
+ * the distributed use of the single thread is not implemented.
+ * Use multiple threads, provided by jre.
+ *
+ * @return false, always.
+ */
public boolean work_pending()
{
return false;
diff --git a/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java b/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java
index 03f5e9771..e021a8a9f 100644
--- a/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java
+++ b/org/omg/CORBA/ORBPackage/InconsistentTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ORBPackage/InvalidName.java b/org/omg/CORBA/ORBPackage/InvalidName.java
index f3b907298..f2b78f47c 100644
--- a/org/omg/CORBA/ORBPackage/InvalidName.java
+++ b/org/omg/CORBA/ORBPackage/InvalidName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ORBPackage/package.html b/org/omg/CORBA/ORBPackage/package.html
index f7e806d00..b0711261d 100644
--- a/org/omg/CORBA/ORBPackage/package.html
+++ b/org/omg/CORBA/ORBPackage/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/Object.java b/org/omg/CORBA/Object.java
index 2e73a9373..997fab9e8 100644
--- a/org/omg/CORBA/Object.java
+++ b/org/omg/CORBA/Object.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ObjectHelper.java b/org/omg/CORBA/ObjectHelper.java
index 96545c483..0e0efa51e 100644
--- a/org/omg/CORBA/ObjectHelper.java
+++ b/org/omg/CORBA/ObjectHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ObjectHolder.java b/org/omg/CORBA/ObjectHolder.java
index 050da870c..02526bee1 100644
--- a/org/omg/CORBA/ObjectHolder.java
+++ b/org/omg/CORBA/ObjectHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/OctetSeqHelper.java b/org/omg/CORBA/OctetSeqHelper.java
index 220899153..0612ae4e2 100644
--- a/org/omg/CORBA/OctetSeqHelper.java
+++ b/org/omg/CORBA/OctetSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/OctetSeqHolder.java b/org/omg/CORBA/OctetSeqHolder.java
index 891f986f9..5092d707e 100644
--- a/org/omg/CORBA/OctetSeqHolder.java
+++ b/org/omg/CORBA/OctetSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/PERSIST_STORE.java b/org/omg/CORBA/PERSIST_STORE.java
index c9b60561c..8aae9b3bc 100644
--- a/org/omg/CORBA/PERSIST_STORE.java
+++ b/org/omg/CORBA/PERSIST_STORE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/PRIVATE_MEMBER.java b/org/omg/CORBA/PRIVATE_MEMBER.java
index ec187b812..0c055dc46 100644
--- a/org/omg/CORBA/PRIVATE_MEMBER.java
+++ b/org/omg/CORBA/PRIVATE_MEMBER.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/PUBLIC_MEMBER.java b/org/omg/CORBA/PUBLIC_MEMBER.java
index 900a57641..9008f7f7a 100644
--- a/org/omg/CORBA/PUBLIC_MEMBER.java
+++ b/org/omg/CORBA/PUBLIC_MEMBER.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ParameterMode.java b/org/omg/CORBA/ParameterMode.java
index 592369895..73c6f574f 100644
--- a/org/omg/CORBA/ParameterMode.java
+++ b/org/omg/CORBA/ParameterMode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -34,46 +34,12 @@ or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-/* ParameterMode.java --
- Copyright (C) 2005 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
package org.omg.CORBA;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
/**
* Defines the parameter modes (the ways in that a method parameter
@@ -87,21 +53,27 @@ package org.omg.CORBA;
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class ParameterMode
+ implements Serializable, IDLEntity
{
/**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 1521598391932998229L;
+
+ /**
* This value means that the parameter is an IN parameter.
*/
- public static int _PARAM_IN = 0;
+ public static final int _PARAM_IN = 0;
/**
* This value means that the parameter is an OUT parameter.
*/
- public static int _PARAM_OUT = 1;
+ public static final int _PARAM_OUT = 1;
/**
* This value means that the parameter is an INOUT parameter.
*/
- public static int _PARAM_INOUT = 2;
+ public static final int _PARAM_INOUT = 2;
/**
* This value means that the parameter is an IN parameter.
diff --git a/org/omg/CORBA/ParameterModeHelper.java b/org/omg/CORBA/ParameterModeHelper.java
index 067607c83..ec75b2bcf 100644
--- a/org/omg/CORBA/ParameterModeHelper.java
+++ b/org/omg/CORBA/ParameterModeHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ParameterModeHolder.java b/org/omg/CORBA/ParameterModeHolder.java
index 6f9d0b74e..5c932b7d0 100644
--- a/org/omg/CORBA/ParameterModeHolder.java
+++ b/org/omg/CORBA/ParameterModeHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -52,6 +52,13 @@ public class ParameterModeHolder
public ParameterMode value;
/**
+ * Create the unitialised instance.
+ */
+ public ParameterModeHolder()
+ {
+ }
+
+ /**
* Create the initialised instance.
* @param initialValue
*/
diff --git a/org/omg/CORBA/Policy.java b/org/omg/CORBA/Policy.java
index 035c78fca..b1fae60bf 100644
--- a/org/omg/CORBA/Policy.java
+++ b/org/omg/CORBA/Policy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/PolicyError.java b/org/omg/CORBA/PolicyError.java
index f2af5e84f..82ae4e45d 100644
--- a/org/omg/CORBA/PolicyError.java
+++ b/org/omg/CORBA/PolicyError.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/PolicyHelper.java b/org/omg/CORBA/PolicyHelper.java
new file mode 100644
index 000000000..16b9d94c7
--- /dev/null
+++ b/org/omg/CORBA/PolicyHelper.java
@@ -0,0 +1,164 @@
+/* PolicyHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link Policy}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class PolicyHelper
+{
+ /**
+ * The cached {@link Policy} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link Policy}.
+ *
+ * @return interface typecode, named "Policy".
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "Policy");
+ return typeCode;
+ }
+
+ /**
+ * Insert the Policy into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the Policy to insert.
+ */
+ public static void insert(Any any, Policy that)
+ {
+ any.insert_Streamable(new PolicyHolder(that));
+ }
+
+ /**
+ * Extract the Policy from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain Policy.
+ */
+ public static Policy extract(Any any)
+ {
+ try
+ {
+ PolicyHolder h = (PolicyHolder) any.extract_Streamable();
+ return h.value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("Policy expected");
+ }
+ }
+
+ /**
+ * Get the Policy repository id.
+ *
+ * @return "IDL:omg.org/CORBA/Policy:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/Policy:1.0";
+ }
+
+ /**
+ * Cast the passed object into the Policy. If the
+ * object has a different java type, create an instance
+ * of the _PolicyStub, using the same delegate, as for
+ * the passed parameter. Hence, unlike java type cast,
+ * this method may return a different object, than has been passed.
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ * @throws BAD_PARAM if the passed object is not a Policy.
+ */
+ public static Policy narrow(org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof Policy)
+ return (Policy) obj;
+ else
+ {
+ // Check for the policy id cannot be performed because
+ // this helper must read various subclasses of the Policy,
+ // and the IOR profile currently supports only one id.
+
+ Delegate delegate = ((ObjectImpl) obj)._get_delegate();
+ return new _PolicyStub(delegate);
+ }
+ }
+
+ /**
+ * Read the object from the CDR intput stream (IOR profile expected).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static Policy read(InputStream input)
+ {
+ return narrow(input.read_Object());
+ }
+
+ /**
+ * Write the object to the CDR output stream (as IOR profile).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, Policy value)
+ {
+ output.write_Object(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/PolicyHolder.java b/org/omg/CORBA/PolicyHolder.java
new file mode 100644
index 000000000..e398cc14d
--- /dev/null
+++ b/org/omg/CORBA/PolicyHolder.java
@@ -0,0 +1,106 @@
+/* PolicyHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the object {@link Policy}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class PolicyHolder
+ implements Streamable
+{
+ /**
+ * The stored Policy value.
+ */
+ public Policy value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public PolicyHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public PolicyHolder(Policy initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ * Delegates work to {@link PolicyHelper}.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = PolicyHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ * Delegates work to {@link PolicyHelper}.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ PolicyHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the Policy.
+ * Delegates work to {@link PolicyHelper}.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return PolicyHelper.type();
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/PolicyListHelper.java b/org/omg/CORBA/PolicyListHelper.java
new file mode 100644
index 000000000..f03836a4f
--- /dev/null
+++ b/org/omg/CORBA/PolicyListHelper.java
@@ -0,0 +1,149 @@
+/* PolicyListHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link Policy[]}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class PolicyListHelper
+{
+ /**
+ * The cached {@link Policy[]} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link Policy[]}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "Policy[]");
+ return typeCode;
+ }
+
+ /**
+ * Insert the Policy[] into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the Policy[] to insert.
+ */
+ public static void insert(Any any, Policy[] that)
+ {
+ any.insert_Streamable(new PolicyListHolder(that));
+ }
+
+ /**
+ * Extract the Policy[] from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain Policy[].
+ */
+ public static Policy[] extract(Any any)
+ {
+ try
+ {
+ PolicyListHolder holds = (PolicyListHolder) any.extract_Streamable();
+ return holds.value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("Policy[] expected");
+ }
+ }
+
+ /**
+ * Get the Policy[] repository id.
+ *
+ * @return "IDL:omg.org/CORBA/PolicyList:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/PolicyList:1.0";
+ }
+
+ /**
+ * Read the sequence of policies from the CDR intput stream.
+ * The method follows usual CDR standards (an array length as
+ * CORBA long, followed by the array members, if any).
+ * The array members are read using {@link PolicyHelper}.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static Policy[] read(InputStream input)
+ {
+ Policy[] p = new Policy[ input.read_long() ];
+ for (int i = 0; i < p.length; i++)
+ {
+ p [ i ] = PolicyHelper.read(input);
+ }
+ return p;
+ }
+
+ /**
+ * Write the sequence of policies from the CDR intput stream.
+ * The method follows usual CDR standards (an array length as
+ * CORBA long, followed by the array members, if any).
+ * The array members are written using {@link PolicyHelper}.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a policy array to write.
+ */
+ public static void write(OutputStream output, Policy[] value)
+ {
+ output.write_long(value.length);
+ for (int i = 0; i < value.length; i++)
+ {
+ PolicyHelper.write(output, value [ i ]);
+ }
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/PolicyListHolder.java b/org/omg/CORBA/PolicyListHolder.java
new file mode 100644
index 000000000..6c1b1cc97
--- /dev/null
+++ b/org/omg/CORBA/PolicyListHolder.java
@@ -0,0 +1,106 @@
+/* PolicyListHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the object {@link Policy[]}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class PolicyListHolder
+ implements Streamable
+{
+ /**
+ * The stored Policy[] value.
+ */
+ public Policy[] value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public PolicyListHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public PolicyListHolder(Policy[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ * Uses {@link PolicyListHelper}.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = PolicyListHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ * Uses {@link PolicyListHelper}.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ PolicyListHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the Policy[].
+ * Uses {@link PolicyListHelper}.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return PolicyListHelper.type();
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/PolicyOperations.java b/org/omg/CORBA/PolicyOperations.java
index 8a4595d47..06ca2734d 100644
--- a/org/omg/CORBA/PolicyOperations.java
+++ b/org/omg/CORBA/PolicyOperations.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/PolicyTypeHelper.java b/org/omg/CORBA/PolicyTypeHelper.java
new file mode 100644
index 000000000..dadd3a9e6
--- /dev/null
+++ b/org/omg/CORBA/PolicyTypeHelper.java
@@ -0,0 +1,122 @@
+/* PolicyTypeHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the policy type. A policy type is an integer
+* constant and needs no helper, but the one is included to
+* to facilitate the automated code handling.
+*
+* @specnote In this implementation, this class is not in use. Its "logical"
+* place would be {@link ORB}, having the PolicyType type. These parameters
+* are declarded as <coe>int</code> in the ORB interface.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class PolicyTypeHelper
+{
+ /**
+ * Create the PolicyType typecode (alias of CORBA ulong, named "PolicyType".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc(id(), "PolicyType",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_ulong(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_ulong();
+ }
+
+ /**
+ * Get the int repository id.
+ *
+ * @return "IDL:omg.org/CORBA/PolicyType:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/PolicyType:1.0";
+ }
+
+ /**
+ * Read the int (policy type) from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_ulong();
+ }
+
+ /**
+ * Write the int (policy type) to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_ulong(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/Principal.java b/org/omg/CORBA/Principal.java
index b5fed2653..9832f228d 100644
--- a/org/omg/CORBA/Principal.java
+++ b/org/omg/CORBA/Principal.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/PrincipalHolder.java b/org/omg/CORBA/PrincipalHolder.java
index 3b6a9b6df..22501a0f7 100644
--- a/org/omg/CORBA/PrincipalHolder.java
+++ b/org/omg/CORBA/PrincipalHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/RepositoryIdHelper.java b/org/omg/CORBA/RepositoryIdHelper.java
index 59f2d2b22..42fb00852 100644
--- a/org/omg/CORBA/RepositoryIdHelper.java
+++ b/org/omg/CORBA/RepositoryIdHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/Request.java b/org/omg/CORBA/Request.java
index 58d5dd845..f299d426b 100644
--- a/org/omg/CORBA/Request.java
+++ b/org/omg/CORBA/Request.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ServerRequest.java b/org/omg/CORBA/ServerRequest.java
index 99653e520..38bb9fe90 100644
--- a/org/omg/CORBA/ServerRequest.java
+++ b/org/omg/CORBA/ServerRequest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ServiceDetail.java b/org/omg/CORBA/ServiceDetail.java
index dec102611..a709f7cf0 100644
--- a/org/omg/CORBA/ServiceDetail.java
+++ b/org/omg/CORBA/ServiceDetail.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ServiceDetailHelper.java b/org/omg/CORBA/ServiceDetailHelper.java
index 40289edb7..37b4f8351 100644
--- a/org/omg/CORBA/ServiceDetailHelper.java
+++ b/org/omg/CORBA/ServiceDetailHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ServiceInformation.java b/org/omg/CORBA/ServiceInformation.java
index ae32b4ec3..c4ec7f1da 100644
--- a/org/omg/CORBA/ServiceInformation.java
+++ b/org/omg/CORBA/ServiceInformation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ServiceInformationHelper.java b/org/omg/CORBA/ServiceInformationHelper.java
index a0a96b9f4..78a21d182 100644
--- a/org/omg/CORBA/ServiceInformationHelper.java
+++ b/org/omg/CORBA/ServiceInformationHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ServiceInformationHolder.java b/org/omg/CORBA/ServiceInformationHolder.java
index a229c2e3c..7b15d6f1f 100644
--- a/org/omg/CORBA/ServiceInformationHolder.java
+++ b/org/omg/CORBA/ServiceInformationHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/SetOverrideType.java b/org/omg/CORBA/SetOverrideType.java
index 02bb6e546..ebf906cbc 100644
--- a/org/omg/CORBA/SetOverrideType.java
+++ b/org/omg/CORBA/SetOverrideType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/SetOverrideTypeHelper.java b/org/omg/CORBA/SetOverrideTypeHelper.java
index b3b3218d3..bfdad683e 100644
--- a/org/omg/CORBA/SetOverrideTypeHelper.java
+++ b/org/omg/CORBA/SetOverrideTypeHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ShortHolder.java b/org/omg/CORBA/ShortHolder.java
index ff67aeb4a..c2e18cb2a 100644
--- a/org/omg/CORBA/ShortHolder.java
+++ b/org/omg/CORBA/ShortHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ShortSeqHelper.java b/org/omg/CORBA/ShortSeqHelper.java
index de42b6926..21eda87d1 100644
--- a/org/omg/CORBA/ShortSeqHelper.java
+++ b/org/omg/CORBA/ShortSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ShortSeqHolder.java b/org/omg/CORBA/ShortSeqHolder.java
index 528b43458..183db3a57 100644
--- a/org/omg/CORBA/ShortSeqHolder.java
+++ b/org/omg/CORBA/ShortSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/StringHolder.java b/org/omg/CORBA/StringHolder.java
index 9a428101a..8a637c8e5 100644
--- a/org/omg/CORBA/StringHolder.java
+++ b/org/omg/CORBA/StringHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/StringSeqHelper.java b/org/omg/CORBA/StringSeqHelper.java
index dc4122d5b..0ae264679 100644
--- a/org/omg/CORBA/StringSeqHelper.java
+++ b/org/omg/CORBA/StringSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/StringSeqHolder.java b/org/omg/CORBA/StringSeqHolder.java
index a697e2493..8e419d233 100755
--- a/org/omg/CORBA/StringSeqHolder.java
+++ b/org/omg/CORBA/StringSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/StringValueHelper.java b/org/omg/CORBA/StringValueHelper.java
new file mode 100644
index 000000000..97d0e7a5d
--- /dev/null
+++ b/org/omg/CORBA/StringValueHelper.java
@@ -0,0 +1,198 @@
+/* StringValueHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.gnuAny;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+import java.io.Serializable;
+
+/**
+ * Provides helper operations for the String value type, treating a
+ * String as a CORBA value type rather than as a primitive type. The OMG
+ * specification states this may be convenient in some specific
+ * cases. The typecode is different, but the reading/writing format in
+ * this implementation is the same as for the ordinary string. This is
+ * that Sun's IDL compiler (v1.4) would generate.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class StringValueHelper
+ implements BoxedValueHelper
+{
+ /**
+ * The String value helper repository Id.
+ */
+ private static final String id = "IDL:omg.org/CORBA/StringValue:1.0";
+
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typecode;
+
+ /**
+ * The String typecode.
+ */
+ private static final TypeCode tString =
+ Restricted_ORB.Singleton.create_string_tc(0);
+
+ /**
+ * Returns the String Value repository Id.
+ * @return "IDL:omg.org/CORBA/StringValue:1.0", always.
+ */
+ public String get_id()
+ {
+ return id;
+ }
+
+ /**
+ * Returns the String Value repository Id.
+ * @return "IDL:omg.org/CORBA/StringValue:1.0", always.
+ */
+ public static String id()
+ {
+ return id;
+ }
+
+ /**
+ * Read the string value from the input stream.
+ *
+ * @param istream a stream to read from.
+ *
+ * @return a string (delegates to read_string()).
+ */
+ public Serializable read_value(InputStream istream)
+ {
+ return istream.read_string();
+ }
+
+ /**
+ * Write the given string value into the output stream.
+ *
+ * @param ostream a stream to write into.
+ * @param a_string a string to write.
+ */
+ public void write_value(OutputStream ostream, Serializable a_string)
+ {
+ try
+ {
+ ostream.write_string((String) a_string);
+ }
+ catch (ClassCastException ex)
+ {
+ throw new MARSHAL("String expected");
+ }
+ }
+
+ /**
+ * Extract the string from the given Any. The operation
+ * requires Any to hold a String value and not a String.
+ *
+ * @param an_any an Any to extract from.
+ *
+ * @return the extracted string.
+ */
+ public static String extract(Any an_any)
+ {
+ if (an_any.type().equal(type()))
+ {
+ an_any.type(tString);
+ return an_any.extract_string();
+ }
+ else
+ throw new BAD_OPERATION("Contains not a string value type");
+ }
+
+ /**
+ * Insert the string into the given Any. After the operation,
+ * the Any will have a String Value typecode and not a
+ * String typecode.
+ *
+ * @param an_any an Any to insert into.
+ *
+ * @param that a string to insert.
+ */
+ public static void insert(Any an_any, String that)
+ {
+ an_any.insert_string(that);
+ an_any.type(type());
+ }
+
+ /**
+ * Reads a string as a value type.
+ *
+ * @param in a stream to read value from.
+ */
+ public static String read(InputStream in)
+ {
+ return in.read_string();
+ }
+
+ /**
+ * Create and return the value box typecode, named "StringValue",
+ * with the content typecode being unbounded string.
+ */
+ public static TypeCode type()
+ {
+ if (typecode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ typecode =
+ orb.create_value_box_tc(id(), "StringValue", tString);
+ }
+ return typecode;
+ }
+
+ /**
+ * Writes a string as a value type.
+ *
+ * @param out a stream to write value into.
+ *
+ * @param a_string a string to write.
+ */
+ public static void write(OutputStream out, String a_string)
+ {
+ out.write_string(a_string);
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/StructMember.java b/org/omg/CORBA/StructMember.java
index 79421b964..9e05a2260 100644
--- a/org/omg/CORBA/StructMember.java
+++ b/org/omg/CORBA/StructMember.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/StructMemberHelper.java b/org/omg/CORBA/StructMemberHelper.java
new file mode 100644
index 000000000..72d66fa91
--- /dev/null
+++ b/org/omg/CORBA/StructMemberHelper.java
@@ -0,0 +1,177 @@
+/* StructMemberHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.TypeCodeHelper;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * Defines a helper operations for StructMember.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class StructMemberHelper
+{
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * This flag is used when creating typecodes for the recursive structures.
+ */
+ private static boolean active;
+
+ /**
+ * Insert the structure member into the given Any.
+ */
+ public static void insert(Any a, StructMember that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Extract the structure member from the given Any.
+ */
+ public static StructMember extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Get a typecode for the StructMember.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+
+ synchronized (TypeCode.class)
+ {
+ if (typeCode == null)
+ {
+ if (active)
+ {
+ return orb.create_recursive_tc(id());
+ }
+ active = true;
+
+ StructMember[] members = new StructMember[ 3 ];
+ TypeCode member = null;
+
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(IdentifierHelper.id(), "Identifier",
+ member
+ );
+ members [ 0 ] = new StructMember("name", member, null);
+
+ member = orb.get_primitive_tc(TCKind.tk_TypeCode);
+
+ members [ 1 ] = new StructMember("type", member, null);
+ members [ 2 ] =
+ new StructMember("type_def", IDLTypeHelper.type(), null);
+ typeCode =
+ orb.create_struct_tc(StructMemberHelper.id(), "StructMember",
+ members
+ );
+ active = false;
+ }
+ }
+ }
+ return typeCode;
+ }
+
+ /**
+ * Return the StructMember repository id.
+ *
+ * @return "IDL:omg.org/CORBA/StructMember:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/StructMember:1.0";
+ }
+
+ /**
+ * Read the StructMember from the input stream.
+ */
+ public static StructMember read(InputStream istream)
+ {
+ try
+ {
+ StructMember value = new StructMember();
+ value.name = istream.read_string();
+ value.type = TypeCodeHelper.read(istream);
+ value.type_def = IDLTypeHelper.read(istream);
+ return value;
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+
+ /**
+ * Write the StructMember to the input stream.
+ */
+ public static void write(OutputStream ostream, StructMember value)
+ {
+ try
+ {
+ ostream.write_string(value.name);
+ TypeCodeHelper.write(ostream, value.type);
+ IDLTypeHelper.write(ostream, value.type_def);
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/SystemException.java b/org/omg/CORBA/SystemException.java
index a76a169ef..85396ee53 100644
--- a/org/omg/CORBA/SystemException.java
+++ b/org/omg/CORBA/SystemException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TCKind.java b/org/omg/CORBA/TCKind.java
index e45fee42d..0ad2d5284 100644
--- a/org/omg/CORBA/TCKind.java
+++ b/org/omg/CORBA/TCKind.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TRANSACTION_REQUIRED.java b/org/omg/CORBA/TRANSACTION_REQUIRED.java
index 1f6b23c85..66eedf4b9 100644
--- a/org/omg/CORBA/TRANSACTION_REQUIRED.java
+++ b/org/omg/CORBA/TRANSACTION_REQUIRED.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java b/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java
index a9398eba1..ce115c8ac 100644
--- a/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java
+++ b/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TRANSIENT.java b/org/omg/CORBA/TRANSIENT.java
index d24ef6c5c..c2aa5cb31 100644
--- a/org/omg/CORBA/TRANSIENT.java
+++ b/org/omg/CORBA/TRANSIENT.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TypeCode.java b/org/omg/CORBA/TypeCode.java
index 59b49f17a..38fb0564f 100644
--- a/org/omg/CORBA/TypeCode.java
+++ b/org/omg/CORBA/TypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TypeCodeHolder.java b/org/omg/CORBA/TypeCodeHolder.java
index 9b63545de..276e8bf16 100644
--- a/org/omg/CORBA/TypeCodeHolder.java
+++ b/org/omg/CORBA/TypeCodeHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TypeCodePackage/BadKind.java b/org/omg/CORBA/TypeCodePackage/BadKind.java
index 079114a4c..88192f6ad 100644
--- a/org/omg/CORBA/TypeCodePackage/BadKind.java
+++ b/org/omg/CORBA/TypeCodePackage/BadKind.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TypeCodePackage/Bounds.java b/org/omg/CORBA/TypeCodePackage/Bounds.java
index ef536c4f7..cd48706bc 100644
--- a/org/omg/CORBA/TypeCodePackage/Bounds.java
+++ b/org/omg/CORBA/TypeCodePackage/Bounds.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/TypeCodePackage/package.html b/org/omg/CORBA/TypeCodePackage/package.html
index e718ef8c2..f8c476e6f 100644
--- a/org/omg/CORBA/TypeCodePackage/package.html
+++ b/org/omg/CORBA/TypeCodePackage/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ULongLongSeqHelper.java b/org/omg/CORBA/ULongLongSeqHelper.java
index 04a9b015f..e92409bb0 100644
--- a/org/omg/CORBA/ULongLongSeqHelper.java
+++ b/org/omg/CORBA/ULongLongSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ULongLongSeqHolder.java b/org/omg/CORBA/ULongLongSeqHolder.java
index dfaee4cec..2d0fcf0b3 100644
--- a/org/omg/CORBA/ULongLongSeqHolder.java
+++ b/org/omg/CORBA/ULongLongSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ULongSeqHelper.java b/org/omg/CORBA/ULongSeqHelper.java
index 7b94e80b3..846833c2a 100644
--- a/org/omg/CORBA/ULongSeqHelper.java
+++ b/org/omg/CORBA/ULongSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ULongSeqHolder.java b/org/omg/CORBA/ULongSeqHolder.java
index 94da7446e..8810e2159 100644
--- a/org/omg/CORBA/ULongSeqHolder.java
+++ b/org/omg/CORBA/ULongSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/UNKNOWN.java b/org/omg/CORBA/UNKNOWN.java
index e1456b70b..60d3fc0b5 100644
--- a/org/omg/CORBA/UNKNOWN.java
+++ b/org/omg/CORBA/UNKNOWN.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/UNSUPPORTED_POLICY.java b/org/omg/CORBA/UNSUPPORTED_POLICY.java
index d3b96d593..007df5c8c 100644
--- a/org/omg/CORBA/UNSUPPORTED_POLICY.java
+++ b/org/omg/CORBA/UNSUPPORTED_POLICY.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java b/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java
index 02f672176..a05dd9d34 100644
--- a/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java
+++ b/org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/UShortSeqHelper.java b/org/omg/CORBA/UShortSeqHelper.java
index 292c25457..76371bc30 100644
--- a/org/omg/CORBA/UShortSeqHelper.java
+++ b/org/omg/CORBA/UShortSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/UShortSeqHolder.java b/org/omg/CORBA/UShortSeqHolder.java
index 86f6eae66..8c6f7d190 100644
--- a/org/omg/CORBA/UShortSeqHolder.java
+++ b/org/omg/CORBA/UShortSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/UnionMember.java b/org/omg/CORBA/UnionMember.java
index db8af7c26..41afeb7da 100644
--- a/org/omg/CORBA/UnionMember.java
+++ b/org/omg/CORBA/UnionMember.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/UnionMemberHelper.java b/org/omg/CORBA/UnionMemberHelper.java
new file mode 100644
index 000000000..a49435644
--- /dev/null
+++ b/org/omg/CORBA/UnionMemberHelper.java
@@ -0,0 +1,179 @@
+/* UnionMemberHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.TypeCodeHelper;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for the union member.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class UnionMemberHelper
+{
+ /**
+ * The cached typecode value (computed once).
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Used in creating recursive unions.
+ */
+ private static boolean active;
+
+ /**
+ * Inset the union member into the given Any.
+ */
+ public static void insert(Any a, UnionMember that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Extract the union member from the given Any.
+ */
+ public static UnionMember extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Create and return the typecode for this union member.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ synchronized (TypeCode.class)
+ {
+ if (typeCode == null)
+ {
+ if (active)
+ {
+ return ORB.init().create_recursive_tc(id());
+ }
+ active = true;
+
+ ORB orb = Restricted_ORB.Singleton;
+
+ StructMember[] members = new StructMember[ 4 ];
+ TypeCode member;
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(IdentifierHelper.id(), "Identifier",
+ member
+ );
+ members [ 0 ] = new StructMember("name", member, null);
+ member = orb.get_primitive_tc(TCKind.tk_any);
+ members [ 1 ] = new StructMember("label", member, null);
+ member = orb.create_string_tc(0);
+ member = orb.get_primitive_tc(TCKind.tk_TypeCode);
+ members [ 2 ] = new StructMember("type", member, null);
+ member = IDLTypeHelper.type();
+ members [ 3 ] = new StructMember("type_def", member, null);
+ typeCode =
+ orb.create_struct_tc(UnionMemberHelper.id(), "UnionMember",
+ members
+ );
+ active = false;
+ }
+ }
+ }
+ return typeCode;
+ }
+
+ /**
+ * Return the UnionMember repository id.
+ *
+ * @return "IDL:omg.org/CORBA/UnionMember:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/UnionMember:1.0";
+ }
+
+ /**
+ * Read the union member from the given stream.
+ */
+ public static UnionMember read(InputStream istream)
+ {
+ try
+ {
+ UnionMember value = new UnionMember();
+ value.name = istream.read_string();
+ value.label = istream.read_any();
+ value.type = TypeCodeHelper.read(istream);
+ value.type_def = IDLTypeHelper.read(istream);
+ return value;
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+
+ /**
+ * Write the union member to the given stream.
+ */
+ public static void write(OutputStream ostream, UnionMember value)
+ {
+ try
+ {
+ ostream.write_string(value.name);
+ ostream.write_any(value.label);
+ TypeCodeHelper.write(ostream, value.type);
+ IDLTypeHelper.write(ostream, value.type_def);
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/UnknownUserException.java b/org/omg/CORBA/UnknownUserException.java
index c1c4b76e3..19efc0e3f 100644
--- a/org/omg/CORBA/UnknownUserException.java
+++ b/org/omg/CORBA/UnknownUserException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/UserException.java b/org/omg/CORBA/UserException.java
index e305fdea7..ac9b9fb3d 100644
--- a/org/omg/CORBA/UserException.java
+++ b/org/omg/CORBA/UserException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/VM_ABSTRACT.java b/org/omg/CORBA/VM_ABSTRACT.java
index 3750404d7..ffaeed879 100644
--- a/org/omg/CORBA/VM_ABSTRACT.java
+++ b/org/omg/CORBA/VM_ABSTRACT.java
@@ -1,4 +1,4 @@
-/* VM_ABSTRACT.java --
+/* VM_ABSTRACT.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,9 +38,9 @@ exception statement from your version. */
package org.omg.CORBA;
/**
- * Holds a single constant, specifying, the
- * abstract interface in a typecode.
- *
+ * Specifies that the object is an abstract interface. One of the possible
+ * values, returned by {@link TypeCode#type_modifier()}.
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface VM_ABSTRACT
diff --git a/org/omg/CORBA/VM_CUSTOM.java b/org/omg/CORBA/VM_CUSTOM.java
index 950225582..40c64feaf 100644
--- a/org/omg/CORBA/VM_CUSTOM.java
+++ b/org/omg/CORBA/VM_CUSTOM.java
@@ -1,4 +1,4 @@
-/* VM_CUSTOM.java --
+/* VM_CUSTOM.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,15 +38,15 @@ exception statement from your version. */
package org.omg.CORBA;
/**
- * Holds a single constant, specifying, that
- * the code used to represent a custom marshalled value type in a typecode.
- *
+ * Indicates a custom marshalled value type. One of the possible
+ * values, returned by {@link TypeCode#type_modifier()}.
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface VM_CUSTOM
{
/**
- * States that the code used to represent a custom
+ * States that the code used to represent a custom
* marshalled value type in a typecode.
*/
short value = 1;
diff --git a/org/omg/CORBA/VM_NONE.java b/org/omg/CORBA/VM_NONE.java
index 4790cac69..f8ef8b51c 100644
--- a/org/omg/CORBA/VM_NONE.java
+++ b/org/omg/CORBA/VM_NONE.java
@@ -1,4 +1,4 @@
-/* VM_NONE.java --
+/* VM_NONE.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,10 +38,8 @@ exception statement from your version. */
package org.omg.CORBA;
/**
- * Holds a single constant, specifying, that
- * the code used to represent the one of the values
- * of a value type in a typecode.
- *
+ * One of the possible values, returned by {@link TypeCode#type_modifier()}.
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface VM_NONE
diff --git a/org/omg/CORBA/VM_TRUNCATABLE.java b/org/omg/CORBA/VM_TRUNCATABLE.java
index 8bb7d56ba..6b70770be 100644
--- a/org/omg/CORBA/VM_TRUNCATABLE.java
+++ b/org/omg/CORBA/VM_TRUNCATABLE.java
@@ -1,4 +1,4 @@
-/* VM_TRUNCATABLE.java --
+/* VM_TRUNCATABLE.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,15 +38,15 @@ exception statement from your version. */
package org.omg.CORBA;
/**
- * Holds a single constant, specifying, that
- * the code used to represent a truncatable value type in a typecode.
- *
+ * Indicates a truncatable value type. One of the possible
+ * values, returned by {@link TypeCode#type_modifier()}.
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface VM_TRUNCATABLE
{
/**
- * States that the code used to represent a truncatable
+ * States that the code used to represent a truncatable
* value type in a typecode.
*/
short value = 3;
diff --git a/org/omg/CORBA/ValueBaseHelper.java b/org/omg/CORBA/ValueBaseHelper.java
index 31e5686a4..941e9d740 100644
--- a/org/omg/CORBA/ValueBaseHelper.java
+++ b/org/omg/CORBA/ValueBaseHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,16 +38,12 @@ exception statement from your version. */
package org.omg.CORBA;
-import gnu.CORBA.CDR.uncObjectInputStream;
-import gnu.CORBA.CDR.uncObjectOutputStream;
+import gnu.CORBA.CDR.Vio;
import gnu.CORBA.recordTypeCode;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.io.Serializable;
/**
@@ -95,29 +91,16 @@ public abstract class ValueBaseHelper
/**
* Read the value base from the given input stream.
- * This implementation initialises the {@link ObjectInputStream}
- * and reads from it.
*
- * @param istream a stream to read from.
+ * @param input a stream to read from.
*
* @return the loaded value.
*
* @throws MARSHAL if the reading has failed due any reason.
*/
- public static Serializable read(InputStream output)
+ public static Serializable read(InputStream input)
{
- // Explicitly prevent the stream from closing as we may need
- // to read the subsequent bytes as well. Stream may be auto-closed
- // in its finalizer.
- try
- {
- ObjectInputStream oin = new uncObjectInputStream(output);
- return (Serializable) oin.readObject();
- }
- catch (Exception ex)
- {
- throw new MARSHAL(ex + ":" + ex.getMessage());
- }
+ return Vio.read(input);
}
/**
@@ -131,29 +114,22 @@ public abstract class ValueBaseHelper
}
/**
- * Write the value base into the given stream. This implementation
- * initialises the {@link ObjectOutputStream} and writes through it.
+ * Write the value base into the given stream.
*
- * @param ostream a stream to write to.
+ * If the passed value implements the {@link CustomMarshal},
+ * the helper uses {@link CustomMarshal#marshal}
+ * to write the content in a user defined way. Otherwise,
+ * this implementation initialises the {@link ObjectOutputStream}
+ * and writes through it.
+ *
+ * @param output a stream to write to.
*
* @param value a value to write.
*
* @throws MARSHAL if the writing failed due any reason.
*/
- public static void write(OutputStream input, Serializable value)
+ public static void write(OutputStream output, Serializable value)
{
- // Explicitly prevent the stream from closing as we may need
- // to read the subsequent bytes as well. Stream may be auto-closed
- // in its finalizer.
- try
- {
- ObjectOutputStream oout = new uncObjectOutputStream(input);
- oout.writeObject(value);
- oout.flush();
- }
- catch (IOException ex)
- {
- throw new MARSHAL(ex + ":" + ex.getMessage());
- }
+ Vio.write(output, value);
}
} \ No newline at end of file
diff --git a/org/omg/CORBA/ValueBaseHolder.java b/org/omg/CORBA/ValueBaseHolder.java
index 432f7e176..c6efed5eb 100644
--- a/org/omg/CORBA/ValueBaseHolder.java
+++ b/org/omg/CORBA/ValueBaseHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ValueMember.java b/org/omg/CORBA/ValueMember.java
index 5d77a1b2a..f6bb70d3c 100644
--- a/org/omg/CORBA/ValueMember.java
+++ b/org/omg/CORBA/ValueMember.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/ValueMemberHelper.java b/org/omg/CORBA/ValueMemberHelper.java
new file mode 100644
index 000000000..208623c2e
--- /dev/null
+++ b/org/omg/CORBA/ValueMemberHelper.java
@@ -0,0 +1,207 @@
+/* ValueMemberHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.TypeCodeHelper;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the value member.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ValueMemberHelper
+{
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typeCode = null;
+
+ /**
+ * Used when creating typecodes with recursive value members.
+ */
+ private static boolean active = false;
+
+ /**
+ * Insert the value member into the given Any.
+ */
+ public static void insert(Any a, ValueMember that)
+ {
+ OutputStream out = a.create_output_stream();
+ a.type(type());
+ write(out, that);
+ a.read_value(out.create_input_stream(), type());
+ }
+
+ /**
+ * Extract the value member from the given Any.
+ */
+ public static ValueMember extract(Any a)
+ {
+ return read(a.create_input_stream());
+ }
+
+ /**
+ * Create a typecode for this value member.
+ */
+ public static synchronized TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ synchronized (TypeCode.class)
+ {
+ if (typeCode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+
+ if (active)
+ {
+ return orb.create_recursive_tc(id());
+ }
+ active = true;
+
+ StructMember[] members = new StructMember[ 7 ];
+ TypeCode member;
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(IdentifierHelper.id(), "Identifier",
+ member
+ );
+ members [ 0 ] = new StructMember("name", member, null);
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(RepositoryIdHelper.id(), "RepositoryId",
+ member
+ );
+ members [ 1 ] = new StructMember("id", member, null);
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(RepositoryIdHelper.id(), "RepositoryId",
+ member
+ );
+ members [ 2 ] = new StructMember("defined_in", member, null);
+ member = orb.create_string_tc(0);
+ member =
+ orb.create_alias_tc(VersionSpecHelper.id(), "VersionSpec",
+ member
+ );
+ members [ 3 ] = new StructMember("version", member, null);
+ member = orb.create_string_tc(0);
+ member = orb.get_primitive_tc(TCKind.tk_TypeCode);
+ members [ 4 ] = new StructMember("type", member, null);
+ member = IDLTypeHelper.type();
+ members [ 5 ] = new StructMember("type_def", member, null);
+ member = orb.get_primitive_tc(TCKind.tk_short);
+ member =
+ orb.create_alias_tc(VisibilityHelper.id(), "Visibility",
+ member
+ );
+ members [ 6 ] = new StructMember("access", member, null);
+ typeCode =
+ orb.create_struct_tc(ValueMemberHelper.id(), "ValueMember",
+ members
+ );
+ active = false;
+ }
+ }
+ }
+ return typeCode;
+ }
+
+ /**
+ * Return the ValueMember repository id.
+ *
+ * @return "IDL:omg.org/CORBA/ValueMember:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/ValueMember:1.0";
+ }
+
+ /**
+ * Reads the value member from the given stream.
+ */
+ public static ValueMember read(InputStream istream)
+ {
+ try
+ {
+ ValueMember value = new ValueMember();
+ value.name = istream.read_string();
+ value.id = istream.read_string();
+ value.defined_in = istream.read_string();
+ value.version = istream.read_string();
+ value.type = TypeCodeHelper.read(istream);
+ value.type_def = IDLTypeHelper.read(istream);
+ value.access = istream.read_short();
+ return value;
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+
+ /**
+ * Writes the value member to the given stream.
+ */
+ public static void write(OutputStream ostream, ValueMember value)
+ {
+ try
+ {
+ ostream.write_string(value.name);
+ ostream.write_string(value.id);
+ ostream.write_string(value.defined_in);
+ ostream.write_string(value.version);
+ TypeCodeHelper.write(ostream, value.type);
+ IDLTypeHelper.write(ostream, value.type_def);
+ ostream.write_short(value.access);
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/VersionSpecHelper.java b/org/omg/CORBA/VersionSpecHelper.java
index d0d590054..dcdad34e4 100644
--- a/org/omg/CORBA/VersionSpecHelper.java
+++ b/org/omg/CORBA/VersionSpecHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/VisibilityHelper.java b/org/omg/CORBA/VisibilityHelper.java
new file mode 100644
index 000000000..f2ed32f63
--- /dev/null
+++ b/org/omg/CORBA/VisibilityHelper.java
@@ -0,0 +1,127 @@
+/* VisibilityHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import gnu.CORBA.Restricted_ORB;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * A helper operations for a Visibility that is mapped into java and CORBA
+ * <code>short</code>. The Visibility normally takes one of the two values,
+ * {@link PUBLIC_MEMBER#value} or {@link PRIVATE_MEMBER#value}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class VisibilityHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Insert the Visibility into the given Any.
+ * Uses {@link Any.insert_short}.
+ */
+ public static void insert(Any any, short that)
+ {
+ any.insert_short(that);
+ }
+
+ /**
+ * Extract the Visibility from the given Any.
+ * Uses {@link Any.extract_short}.
+ */
+ public static short extract(Any any)
+ {
+ return any.extract_short();
+ }
+
+ /**
+ * Return an alias of short, named "Visibility".
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ TypeCode tshort =
+ Restricted_ORB.Singleton.get_primitive_tc(TCKind.tk_short);
+ typeCode =
+ Restricted_ORB.Singleton.create_alias_tc(id(), "Visibility", tshort);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Get the Visibility repository id.
+ *
+ * @return "IDL:omg.org/CORBA/Visibility:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/CORBA/Visibility:1.0";
+ }
+
+ /**
+ * Read the visibility value (as short) from the CDR intput stream.
+ *
+ * Uses {@link InputStream.read_short()}.
+ *
+ * @param istream a stream to read from.
+ */
+ public static short read(InputStream istream)
+ {
+ return istream.read_short();
+ }
+
+ /**
+ * Write the visibility value (as short) to the CDR output stream.
+ *
+ * USes {@link OutputStream.write_short(short)}.
+ *
+ * @param ostream a stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream ostream, short value)
+ {
+ ostream.write_short(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/WCharSeqHelper.java b/org/omg/CORBA/WCharSeqHelper.java
index 3b824459b..c12c3de1c 100644
--- a/org/omg/CORBA/WCharSeqHelper.java
+++ b/org/omg/CORBA/WCharSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/WCharSeqHolder.java b/org/omg/CORBA/WCharSeqHolder.java
index 674cd4149..1b11506a2 100644
--- a/org/omg/CORBA/WCharSeqHolder.java
+++ b/org/omg/CORBA/WCharSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/WStringSeqHelper.java b/org/omg/CORBA/WStringSeqHelper.java
index 425a7397f..916c6a250 100644
--- a/org/omg/CORBA/WStringSeqHelper.java
+++ b/org/omg/CORBA/WStringSeqHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/WStringSeqHolder.java b/org/omg/CORBA/WStringSeqHolder.java
index e83318440..474d69a47 100755
--- a/org/omg/CORBA/WStringSeqHolder.java
+++ b/org/omg/CORBA/WStringSeqHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/WStringValueHelper.java b/org/omg/CORBA/WStringValueHelper.java
new file mode 100644
index 000000000..7748a6c78
--- /dev/null
+++ b/org/omg/CORBA/WStringValueHelper.java
@@ -0,0 +1,198 @@
+/* WStringValueHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import gnu.CORBA.Restricted_ORB;
+import gnu.CORBA.gnuAny;
+
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.portable.BoxedValueHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+import java.io.Serializable;
+
+/**
+ * Provides helper operations for the Wide String value type, treating a
+ * Wide String as a CORBA value type rather than as a primitive type. The OMG
+ * specification states this may be convenient in some specific
+ * cases. The typecode is different, but the reading/writing format in
+ * this implementation is the same as for the ordinary wide string. This is
+ * that Sun's IDL compiler (v1.4) would generate.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class WStringValueHelper
+ implements BoxedValueHelper
+{
+ /**
+ * The Wide String value helper repository Id.
+ */
+ private static final String id = "IDL:omg.org/CORBA/WStringValue:1.0";
+
+ /**
+ * The cached typecode value, computed once.
+ */
+ private static TypeCode typecode;
+
+ /**
+ * The Wide String typecode.
+ */
+ private static final TypeCode twString =
+ Restricted_ORB.Singleton.create_wstring_tc(0);
+
+ /**
+ * Returns the String Value repository Id.
+ * @return "IDL:omg.org/CORBA/WStringValue:1.0", always.
+ */
+ public String get_id()
+ {
+ return id;
+ }
+
+ /**
+ * Returns the String Value repository Id.
+ * @return "IDL:omg.org/CORBA/WStringValue:1.0", always.
+ */
+ public static String id()
+ {
+ return id;
+ }
+
+ /**
+ * Read the wide string value from the input stream.
+ *
+ * @param istream a stream to read from.
+ *
+ * @return a string (delegates to read_wstring()).
+ */
+ public Serializable read_value(InputStream istream)
+ {
+ return istream.read_wstring();
+ }
+
+ /**
+ * Write the given wide string value into the output stream.
+ *
+ * @param ostream a stream to write into.
+ * @param a_string a string to write.
+ */
+ public void write_value(OutputStream ostream, Serializable a_string)
+ {
+ try
+ {
+ ostream.write_wstring((String) a_string);
+ }
+ catch (ClassCastException ex)
+ {
+ throw new MARSHAL("String expected");
+ }
+ }
+
+ /**
+ * Extract the wide string from the given Any. The operation
+ * requires Any to hold a String value and not a String.
+ *
+ * @param an_any an Any to extract from.
+ *
+ * @return the extracted string.
+ */
+ public static String extract(Any an_any)
+ {
+ if (an_any.type().equal(type()))
+ {
+ an_any.type(twString);
+ return an_any.extract_wstring();
+ }
+ else
+ throw new BAD_OPERATION("Contains not a wide string value type");
+ }
+
+ /**
+ * Insert the wide string into the given Any. After the operation,
+ * the Any will have a Wide String Value typecode and not a
+ * String or WString typecode.
+ *
+ * @param an_any an Any to insert into.
+ *
+ * @param that a string to insert.
+ */
+ public static void insert(Any an_any, String that)
+ {
+ an_any.insert_wstring(that);
+ an_any.type(type());
+ }
+
+ /**
+ * Reads a wide string as a value type.
+ *
+ * @param in a stream to read value from.
+ */
+ public static String read(InputStream in)
+ {
+ return in.read_wstring();
+ }
+
+ /**
+ * Create and return the value box typecode, named "WStringValue",
+ * with the content typecode being unbounded string.
+ */
+ public static TypeCode type()
+ {
+ if (typecode == null)
+ {
+ ORB orb = Restricted_ORB.Singleton;
+ typecode =
+ orb.create_value_box_tc(id(), "WStringValue", twString);
+ }
+ return typecode;
+ }
+
+ /**
+ * Writes a wide string as a value type.
+ *
+ * @param out a stream to write value into.
+ *
+ * @param a_string a string to write.
+ */
+ public static void write(OutputStream out, String a_string)
+ {
+ out.write_wstring(a_string);
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/WrongTransaction.java b/org/omg/CORBA/WrongTransaction.java
index 45ab719e5..fc869a267 100644
--- a/org/omg/CORBA/WrongTransaction.java
+++ b/org/omg/CORBA/WrongTransaction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/_IDLTypeStub.java b/org/omg/CORBA/_IDLTypeStub.java
new file mode 100644
index 000000000..db36fa780
--- /dev/null
+++ b/org/omg/CORBA/_IDLTypeStub.java
@@ -0,0 +1,197 @@
+/* _IDLTypeStub.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import gnu.CORBA.TypeCodeHelper;
+
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+
+import java.io.Serializable;
+
+/**
+ * The stub for the IDL type. This stub can be used to access the
+ * remote IDL type object, if its IOR is known. To create the
+ * working instance with the known IOR, pass {@link gnu.CORBA.IOR_Delegate}
+ * to the constructor.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _IDLTypeStub
+ extends ObjectImpl
+ implements IDLType, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 9150293942452453626L;
+
+ /**
+ * Create the instance of the IDL type stub without
+ * the set delegate. The delegate must be set anyway before calling
+ * any remote method.
+ */
+ public _IDLTypeStub()
+ {
+ }
+
+ /**
+ * Create an instance with the given delegate.
+ *
+ * @see gnu.CORBA.IOR_Delegate
+ */
+ public _IDLTypeStub(Delegate delegate)
+ {
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Get the typecode of the remote IDL type object. The method is
+ * written following OMG specification, treating the typecode
+ * as a read only attribute rather than a method. This means,
+ * the operation name is "_get_type".
+ *
+ * @return a typecode, returned by the remote IDL type object.
+ */
+ public TypeCode type()
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("_get_type", true);
+ in = _invoke(out);
+ return TypeCodeHelper.read(in);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+ throw new org.omg.CORBA.MARSHAL(ex.getId());
+ }
+ catch (RemarshalException rex)
+ {
+ return type();
+ }
+ catch (UserException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /**
+ * Get the definition kind of the remote IDL type object. The method is
+ * written following OMG specification, treating the typecode
+ * as a read only attribute rather than a method. This means,
+ * the operation name is "_get_def_kind".
+ *
+ * @return a definition kind, returned by remote IDL type object.
+ */
+ public DefinitionKind def_kind()
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("_get_def_kind", true);
+ in = _invoke(out);
+ return DefinitionKindHelper.read(in);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+ throw new org.omg.CORBA.MARSHAL(ex.getId());
+ }
+ catch (RemarshalException rex)
+ {
+ return def_kind();
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /**
+ * Destroy the remote IDL type object.
+ */
+ public void destroy()
+ {
+ InputStream in = null;
+ try
+ {
+ OutputStream out = _request("destroy", true);
+ in = _invoke(out);
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+ throw new org.omg.CORBA.MARSHAL(ex.getId());
+ }
+ catch (RemarshalException rex)
+ {
+ destroy();
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+
+ /**
+ * Return the array of repository ids of the IDL type.
+ *
+ * @return "IDL:omg.org/CORBA/IDLType:1.0" and
+ * "IDL:omg.org/CORBA/IRObject:1.0", always.
+ */
+ public String[] _ids()
+ {
+ return new String[]
+ {
+ "IDL:omg.org/CORBA/IDLType:1.0", "IDL:omg.org/CORBA/IRObject:1.0"
+ };
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/_PolicyStub.java b/org/omg/CORBA/_PolicyStub.java
new file mode 100644
index 000000000..50481fe17
--- /dev/null
+++ b/org/omg/CORBA/_PolicyStub.java
@@ -0,0 +1,176 @@
+/* _PolicyStub.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+
+import java.io.Serializable;
+
+/**
+ * The Policy stub (proxy), used on the client side.
+ * The {@link Policy} methods contain the code for remote
+ * invocaton.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _PolicyStub
+ extends ObjectImpl
+ implements Policy, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2453656196708903849L;
+
+ /**
+ * Create the Policy stub. To get the stub working,
+ * you must later set the delegate with
+ * {@link ObjectImpl#_set_delegate(Delegate)}.
+ */
+ public _PolicyStub()
+ {
+ }
+
+ /**
+ * Create the naming context stub with the given delegate.
+ */
+ public _PolicyStub(Delegate delegate)
+ {
+ _set_delegate(delegate);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ */
+ public String[] _ids()
+ {
+ return new String[] { PolicyHelper.id() };
+ }
+
+ /** {@inheritDoc} */
+ public void destroy()
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("destroy", true);
+ input = _invoke(output);
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ destroy();
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public Policy copy()
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("copy", true);
+ input = _invoke(output);
+ return PolicyHelper.read(input);
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ return copy();
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+
+ /** {@inheritDoc} */
+ public int policy_type()
+ {
+ InputStream input = null;
+ try
+ {
+ OutputStream output = _request("policy_type", true);
+ input = _invoke(output);
+
+ int returns = input.read_long();
+
+ return returns;
+ }
+ catch (ApplicationException ex)
+ {
+ input = ex.getInputStream();
+
+ String id = ex.getId();
+ throw new MARSHAL(id);
+ }
+ catch (RemarshalException remarsh)
+ {
+ return policy_type();
+ }
+ finally
+ {
+ _releaseReply(input);
+ }
+ }
+} \ No newline at end of file
diff --git a/org/omg/CORBA/package.html b/org/omg/CORBA/package.html
index 87ab8ba28..8fe9acf5d 100644
--- a/org/omg/CORBA/package.html
+++ b/org/omg/CORBA/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -61,6 +61,12 @@ including the fully functional Object Request Broker ({@link org.omg.CORBA.ORB})
stringified IOR reference of that object or Big Endian, if no such data
available.
</p>
+ <p>
+ The current release supports the Value types that appeared since v 1.3 and are
+ something between CORBA structures (no methods, data local) and CORBA objects
+ (both methods and data remote). Value type has local data, can have
+ local methods and is transferred by value, not by IOR reference.
+ </p>
<p>
You can use both request-oriented (based on {@link org.omg.CORBA.Request})
and stream-oriented (based on {@link org.omg.CORBA.portable.ObjectImpl})
diff --git a/org/omg/CORBA/portable/ApplicationException.java b/org/omg/CORBA/portable/ApplicationException.java
index 00d366b13..83a8aa8d1 100644
--- a/org/omg/CORBA/portable/ApplicationException.java
+++ b/org/omg/CORBA/portable/ApplicationException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/BoxedValueHelper.java b/org/omg/CORBA/portable/BoxedValueHelper.java
index 58c95e84c..cc2afe2df 100644
--- a/org/omg/CORBA/portable/BoxedValueHelper.java
+++ b/org/omg/CORBA/portable/BoxedValueHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,14 +41,18 @@ package org.omg.CORBA.portable;
import java.io.Serializable;
/**
- * Provides a helper operations for the value type.
+ * Provides a helper operations for the boxed value type.
+ * A boxed value type is a value type with no inheritance, no methods
+ * and with a single state member. No additional properties can
+ * be defined. It is an error to box value types.
+ *
* The value type may have its own helper, implementing
* this interface.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public interface BoxedValueHelper {
-
+public interface BoxedValueHelper
+{
/**
* Get the repository id of this value type.
*
@@ -72,5 +76,4 @@ public interface BoxedValueHelper {
* @param value a value to write.
*/
void write_value(OutputStream ostream, Serializable value);
-
-} \ No newline at end of file
+}
diff --git a/org/omg/CORBA/portable/CustomValue.java b/org/omg/CORBA/portable/CustomValue.java
new file mode 100644
index 000000000..89701c73a
--- /dev/null
+++ b/org/omg/CORBA/portable/CustomValue.java
@@ -0,0 +1,57 @@
+/* CustomValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA.portable;
+
+import org.omg.CORBA.CustomMarshal;
+
+/**
+ * If the value type provides the user defined methods for reading
+ * and writing its content, it must implement this interface for reading
+ * and writing the content in a user-defined default way. This is done by
+ * implementing the {@link CustomMarshal#marshal} and
+ * {@link CustomMarshal#unmarshal}. The user must provide the supporting code.
+ *
+ * @see StreamableValue for specifying the IDL compiler generated IO methods.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CustomValue
+ extends ValueBase, CustomMarshal
+{
+} \ No newline at end of file
diff --git a/org/omg/CORBA/portable/Delegate.java b/org/omg/CORBA/portable/Delegate.java
index 79898f2b0..fce04887e 100644
--- a/org/omg/CORBA/portable/Delegate.java
+++ b/org/omg/CORBA/portable/Delegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/IDLEntity.java b/org/omg/CORBA/portable/IDLEntity.java
index ce1c2beb7..1e67a8835 100644
--- a/org/omg/CORBA/portable/IDLEntity.java
+++ b/org/omg/CORBA/portable/IDLEntity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/IndirectionException.java b/org/omg/CORBA/portable/IndirectionException.java
index 9bcaa6c52..7fa46a1f6 100644
--- a/org/omg/CORBA/portable/IndirectionException.java
+++ b/org/omg/CORBA/portable/IndirectionException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/InputStream.java b/org/omg/CORBA/portable/InputStream.java
index 2481ee0e0..2f6a487b8 100644
--- a/org/omg/CORBA/portable/InputStream.java
+++ b/org/omg/CORBA/portable/InputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/InvokeHandler.java b/org/omg/CORBA/portable/InvokeHandler.java
index e63354fb7..d4381204a 100644
--- a/org/omg/CORBA/portable/InvokeHandler.java
+++ b/org/omg/CORBA/portable/InvokeHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/ObjectImpl.java b/org/omg/CORBA/portable/ObjectImpl.java
index 6cfad5550..3cf1f4977 100644
--- a/org/omg/CORBA/portable/ObjectImpl.java
+++ b/org/omg/CORBA/portable/ObjectImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -185,7 +185,6 @@ public abstract class ObjectImpl
/**
* Invoke the operation.
*
- * @param target the invocation target.
* @param output the stream, containing the written arguments.
*
* @return the stream, from where the input parameters could be read.
@@ -286,7 +285,8 @@ public abstract class ObjectImpl
*/
public void _releaseReply(InputStream stream)
{
- delegate.releaseReply(this, stream);
+ if (delegate != null)
+ delegate.releaseReply(this, stream);
}
/**
@@ -387,7 +387,10 @@ public abstract class ObjectImpl
*/
public boolean equals(java.lang.Object other)
{
- return delegate.equals(this, other);
+ if (delegate == null)
+ return this == other;
+ else
+ return delegate.equals(this, other);
}
/**
@@ -399,4 +402,4 @@ public abstract class ObjectImpl
{
return delegate.toString(this);
}
-}
+} \ No newline at end of file
diff --git a/org/omg/CORBA/portable/OutputStream.java b/org/omg/CORBA/portable/OutputStream.java
index 070a40bc7..f40be2365 100644
--- a/org/omg/CORBA/portable/OutputStream.java
+++ b/org/omg/CORBA/portable/OutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/RemarshalException.java b/org/omg/CORBA/portable/RemarshalException.java
index f13ac4639..7e6dbfee9 100644
--- a/org/omg/CORBA/portable/RemarshalException.java
+++ b/org/omg/CORBA/portable/RemarshalException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/ResponseHandler.java b/org/omg/CORBA/portable/ResponseHandler.java
index 9c2bca745..1715b01b3 100644
--- a/org/omg/CORBA/portable/ResponseHandler.java
+++ b/org/omg/CORBA/portable/ResponseHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/ServantObject.java b/org/omg/CORBA/portable/ServantObject.java
index 7a2085da1..b35dedc35 100644
--- a/org/omg/CORBA/portable/ServantObject.java
+++ b/org/omg/CORBA/portable/ServantObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/Streamable.java b/org/omg/CORBA/portable/Streamable.java
index 86436e585..c59ee2a02 100644
--- a/org/omg/CORBA/portable/Streamable.java
+++ b/org/omg/CORBA/portable/Streamable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/StreamableValue.java b/org/omg/CORBA/portable/StreamableValue.java
new file mode 100644
index 000000000..ce9b2ca28
--- /dev/null
+++ b/org/omg/CORBA/portable/StreamableValue.java
@@ -0,0 +1,57 @@
+/* StreamableValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CORBA.portable;
+
+import java.io.Serializable;
+
+/**
+ * If the value type does not provide the user defined methods for reading
+ * and writing its content, it must implement this interface for reading
+ * and writing the content in a default way. This is done by implementing
+ * the {@link Streamable#read} and {@link Streamable#write}. IDL compiler
+ * should generate the implementation of this interface automatically.
+ *
+ * @see CustomValue for specifying the user-defined io methods.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface StreamableValue
+ extends Streamable, Serializable, ValueBase, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/CORBA/portable/UnknownException.java b/org/omg/CORBA/portable/UnknownException.java
index 717ee2d48..a9b754b21 100644
--- a/org/omg/CORBA/portable/UnknownException.java
+++ b/org/omg/CORBA/portable/UnknownException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA/portable/ValueBase.java b/org/omg/CORBA/portable/ValueBase.java
index 195661366..b89d5c544 100644
--- a/org/omg/CORBA/portable/ValueBase.java
+++ b/org/omg/CORBA/portable/ValueBase.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,9 +43,8 @@ package org.omg.CORBA.portable;
* ValueBase is the basic interface for all CORBA value data types. A value
* type is something between CORBA structure and CORBA object. Like CORBA
* object, it can have methods, supporting some IDL-defined interface.
- * However, like structures, they are always local and passed by value,
- * not by IOR reference. The Sun's implementation transfers the value types
- * using java serialization mechanism.
+ * However, like structures, they are local and passed by value,
+ * not by IOR reference.
*
* Unlike CORBA objects, values are not connected to any ORB by
* default; they hanlde the implemented functionality locally. The classes,
@@ -55,6 +54,9 @@ package org.omg.CORBA.portable;
* The value types can have both public and private members. They support
* inheritance. Value types can also be abstract.
*
+ * For transferring the value type data via stream, it must implement either
+ * {@link CustomValue} or {@link StreamableValue}.
+ *
* @since 1.3
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
diff --git a/org/omg/CORBA/portable/ValueFactory.java b/org/omg/CORBA/portable/ValueFactory.java
index b2532e5c5..aaffe8684 100644
--- a/org/omg/CORBA/portable/ValueFactory.java
+++ b/org/omg/CORBA/portable/ValueFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -58,5 +58,5 @@ public interface ValueFactory
* @return a created value type, intialised with the data from
* the stream.
*/
- Serializable read_value(InputStream from_stream);
-} \ No newline at end of file
+ Serializable read_value(org.omg.CORBA_2_3.portable.InputStream from_stream);
+}
diff --git a/org/omg/CORBA/portable/package.html b/org/omg/CORBA/portable/package.html
index ee1b792a1..8104136e0 100644
--- a/org/omg/CORBA/portable/package.html
+++ b/org/omg/CORBA/portable/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA_2_3/ORB.java b/org/omg/CORBA_2_3/ORB.java
index a8a42250f..7a9dc6a1a 100644
--- a/org/omg/CORBA_2_3/ORB.java
+++ b/org/omg/CORBA_2_3/ORB.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA_2_3/package.html b/org/omg/CORBA_2_3/package.html
new file mode 100644
index 000000000..254e6409a
--- /dev/null
+++ b/org/omg/CORBA_2_3/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html -
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - org.omg.CORBA_2_3</title></head>
+
+<body>
+<p>This package supports the ORB extendsions that appeared since CORBA 2_3.</p>
+
+</body>
+</html>
diff --git a/org/omg/CORBA_2_3/portable/Delegate.java b/org/omg/CORBA_2_3/portable/Delegate.java
index cfb8b8997..d20a88544 100644
--- a/org/omg/CORBA_2_3/portable/Delegate.java
+++ b/org/omg/CORBA_2_3/portable/Delegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA_2_3/portable/InputStream.java b/org/omg/CORBA_2_3/portable/InputStream.java
index 48953dfa4..3ab264f60 100644
--- a/org/omg/CORBA_2_3/portable/InputStream.java
+++ b/org/omg/CORBA_2_3/portable/InputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,8 +38,9 @@ exception statement from your version. */
package org.omg.CORBA_2_3.portable;
-import org.omg.CORBA.MARSHAL;
-import org.omg.CORBA.ValueBaseHelper;
+import gnu.CORBA.CDR.Vio;
+
+import org.omg.CORBA.portable.BoxedValueHelper;
import java.io.Serializable;
@@ -57,11 +58,7 @@ import java.io.Serializable;
* derived class and the new methods are accessible after the casting
* operation.
*
- * OMG specification states the writing format of the value types
- * is outside the scope of GIOP definition. This implementation uses
- * java serialization mechanism, calling {@link ObjectInputStream#readObject}.
- *
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class InputStream
extends org.omg.CORBA.portable.InputStream
@@ -75,7 +72,7 @@ public abstract class InputStream
* boolean and then delegates either to {@link #read_Object()} (for false)
* or to {@link #read_Value()} (for true).
*
- * @return an abstract interface, unmarshaled from the stream
+ * @return an abstract interface, unmarshaled from the stream.
*/
public Object read_abstract_interface()
{
@@ -111,64 +108,69 @@ public abstract class InputStream
}
/**
- * Read a value type structure from the stream.
+ * Read a value type structure, extracting the repository id
+ * from the input stream itself. The repository id is optional
+ * in the value type record, but it must be present for this
+ * method to succeed. The {@link OutputStream} of this
+ * implementation always stores the repository id.
*
- * OMG specification states the writing format is outside the scope
- * of GIOP definition. This implementation uses java serialization
- * mechanism, calling {@link ObjectInputStream#readObject}
+ * The casts the streams ORB into a CORBA 2.3 ORB and then
+ * searched for a suitable value factory, where it delegates
+ * the functionality.
+ *
+ * If you know the exact class or can create an unitialised instance
+ * of the value type, it is recommended (faster) to use
+ * {@link #read_value(Class)} or {@link #read_value(Serializable)}
+ * instead.
+ *
+ * @param repository_id a repository id of the value type.
*
* @return an value type structure, unmarshaled from the stream
*/
public Serializable read_value()
{
- return read_value((Class) null);
+ return Vio.read(this);
}
/**
* Read a value type structure, corresponing to the passed type.
+ * As the type is known, the repository Id in the input stream is
+ * optional an not required. The codebase, if present, is also ignored.
*
- * OMG specification states the writing format is outside the scope
- * of GIOP definition. This implementation uses java serialization
- * mechanism, calling {@link ObjectInputStream#readObject}
+ * The passed class must implement either {@link CustomMarshal}
+ * for the user-defined reading operations or {@link StreamableValue}
+ * for the standard (generated by IDL compiler) reading operations.
+ * Also, it must have the parameterless constructor to create a new
+ * instance.
*
- * @param clz a base class for a value type. The class information
- * is currently used for security check only.
+ * @param clz a base class for a value type.
*
* @return an value type structure, unmarshaled from the stream
*/
public Serializable read_value(Class clz)
{
- Serializable rt = (Serializable) ValueBaseHelper.read(this);
-
- if (rt != null && clz != null)
- {
- if (!(clz.isAssignableFrom(rt.getClass())))
- {
- throw new MARSHAL(rt.getClass().getName() +
- " is not an instance of " + clz.getName()
- );
- }
- }
- return rt;
+ return Vio.read(this, clz);
}
/**
* Read a value type structure content, when the unitialised
- * instance is passed as a parameter.
+ * instance is passed as a parameter. It is a fastest method to read
+ * a value type.
*
- * OMG specification states the writing format is outside the scope
- * of GIOP definition. This implementation uses java serialization
- * mechanism, calling {@link ObjectInputStream#readObject}
- * and then compares the loaded instance with the given class
- * of the passed instance for equality.
+ * As the type is known, the repository Id in the input stream is
+ * optional an not required. The codebase, if present, is also ignored.
*
- * @param unitialised_value, used for class check only.
+ * The passed instance must implement either {@link CustomMarshal}
+ * for the user-defined reading operations or {@link StreamableValue}
+ * for the standard (generated by IDL compiler) reading operations.
+ *
+ * @param unitialised_value the unitialised value.
*
* @return same value, filled in by the stream content.
*/
public Serializable read_value(Serializable unitialised_value)
{
- return read_value(unitialised_value.getClass());
+ return Vio.read(this, unitialised_value);
}
/**
@@ -177,6 +179,11 @@ public abstract class InputStream
* searched for a suitable value factory, where it delegates
* the functionality.
*
+ * If you know the exact class or can create an unitialised instance
+ * of the value type, it is recommended (faster) to use
+ * {@link #read_value(Class)} or {@link #read_value(Serializable)}
+ * instead.
+ *
* @param repository_id a repository id of the value type.
*
* @return an value type structure, unmarshaled from the stream
@@ -186,4 +193,16 @@ public abstract class InputStream
return ((org.omg.CORBA_2_3.ORB) orb()).lookup_value_factory(repository_id)
.read_value(this);
}
+
+ /**
+ * Use the provided boxed value helper to read the value.
+ *
+ * @param helper a helper for reading the value from the stream.
+ *
+ * @return an value type structure, unmarshaled from the stream.
+ */
+ public Serializable read_value(BoxedValueHelper helper)
+ {
+ return helper.read_value(this);
+ }
} \ No newline at end of file
diff --git a/org/omg/CORBA_2_3/portable/ObjectImpl.java b/org/omg/CORBA_2_3/portable/ObjectImpl.java
index 198500d30..49d92df3b 100644
--- a/org/omg/CORBA_2_3/portable/ObjectImpl.java
+++ b/org/omg/CORBA_2_3/portable/ObjectImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CORBA_2_3/portable/OutputStream.java b/org/omg/CORBA_2_3/portable/OutputStream.java
index bc317a662..2f83a939f 100644
--- a/org/omg/CORBA_2_3/portable/OutputStream.java
+++ b/org/omg/CORBA_2_3/portable/OutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,8 +38,8 @@ exception statement from your version. */
package org.omg.CORBA_2_3.portable;
-import org.omg.CORBA.MARSHAL;
-import org.omg.CORBA.ValueBaseHelper;
+import gnu.CORBA.CDR.Vio;
+
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.ValueBase;
@@ -58,10 +58,6 @@ import java.io.Serializable;
* derived class and the new methods are accessible after the casting
* operation.
*
- * OMG specification states the writing format of the value types
- * is outside the scope of GIOP definition. This implementation uses
- * java serialization mechanism, calling {@link ObjectInputStream#readObject}.
- *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class OutputStream
@@ -73,37 +69,49 @@ public abstract class OutputStream
* the boolean discriminator (false for objects, true for value types).
*
* The object from value is separated by fact that all values implement
- * the {@link ValueBase} interface.
+ * the {@link ValueBase} interface. Also, the passed parameter is treated
+ * as value it it does not implement CORBA Object.
*
* @param an_interface an abstract interface to write.
*/
- public void write_abstract_interface(org.omg.CORBA.Object an_interface)
+ public void write_abstract_interface(java.lang.Object an_interface)
{
- boolean isValue = an_interface instanceof ValueBase;
+ boolean isValue =
+ an_interface instanceof ValueBase ||
+ (!(an_interface instanceof org.omg.CORBA.Object));
write_boolean(isValue);
if (isValue)
write_value((ValueBase) an_interface);
else
- write_Object(an_interface);
+ write_Object((org.omg.CORBA.Object) an_interface);
}
/**
- * Writes a value type into the output stream as java Serializable.
+ * Writes a value type into the output stream.
*
- * The functionality is delegated to the {@link ValueBaseHelper}.
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StramableValue}
+ * (for standard writing using code, generated by IDL compiler).
+ *
+ * The written record will have a repository id, matching the
+ * class of the passed object. The codebase will not be written.
*
* @param value a value type object to write.
*/
public void write_value(Serializable value)
{
- ValueBaseHelper.write(this, value);
+ Vio.write(this, value);
}
/**
* Write value to the stream using the boxed value helper.
*
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StramableValue}
+ * (for standard writing using code, generated by IDL compiler).
+ *
* @param value a value to write.
* @param helper a helper, responsible for the writing operation.
*/
@@ -113,26 +121,29 @@ public abstract class OutputStream
}
/**
- * Writes a value type into the output stream as java Serializable,
- * stating it is an instance of the given class.
+ * Writes a value type into the output stream, stating it is an
+ * instance of the given class. The written record
+ * will have a repository id, matching the passed class.
+ * The codebase will not be written.
*
- * The functionality is delegated to the {@link ValueBaseHelper}.
- * The passed class is used for the check only.
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StramableValue}
+ * (for standard writing using code, generated by IDL compiler).
*
* @param value a value type object to write.
*/
public void write_value(Serializable value, Class clz)
{
- if (!clz.isAssignableFrom(value.getClass()))
- throw new MARSHAL("The class is not the same");
- ValueBaseHelper.write(this, value);
+ Vio.write(this, value, clz);
}
/**
- * Writes a value type into the output stream as java Serializable,
+ * Writes a value type into the output stream,
* stating it has the given repository id.
*
- * The functionality is delegated to the {@link ValueBaseHelper}.
+ * The value type must implement either {@link CustomValue}
+ * (for user-defined writing method) or {@link StramableValue}
+ * (for standard writing using code, generated by IDL compiler).
*
* @param repository_id a repository id of the value type.
*
@@ -140,6 +151,6 @@ public abstract class OutputStream
*/
public void write_value(Serializable value, String repository_id)
{
- ValueBaseHelper.write(this, value);
+ Vio.write(this, value, repository_id);
}
} \ No newline at end of file
diff --git a/org/omg/CORBA_2_3/portable/package.html b/org/omg/CORBA_2_3/portable/package.html
index 9be95fcb4..edf9eb731 100644
--- a/org/omg/CORBA_2_3/portable/package.html
+++ b/org/omg/CORBA_2_3/portable/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,8 @@ exception statement from your version. -->
<head><title>GNU Classpath - org.omg.CORBA_2_3.portable</title></head>
<body>
-<p>This package mainly provides methods for the input and output of value types. It also contains other extensions, required for CORBA 2_3.</p>
+<p>This package supports the communication extensions that appeared since CORBA 2_3.
+It mainly provides methods for input and output of value types. </p>
</body>
</html>
diff --git a/org/omg/CosNaming/Binding.java b/org/omg/CosNaming/Binding.java
index 4d08a5967..8f6e9973b 100644
--- a/org/omg/CosNaming/Binding.java
+++ b/org/omg/CosNaming/Binding.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingHelper.java b/org/omg/CosNaming/BindingHelper.java
index e8da9740b..1665464ec 100644
--- a/org/omg/CosNaming/BindingHelper.java
+++ b/org/omg/CosNaming/BindingHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingHolder.java b/org/omg/CosNaming/BindingHolder.java
index 3ec683f6d..d57d9030f 100644
--- a/org/omg/CosNaming/BindingHolder.java
+++ b/org/omg/CosNaming/BindingHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingIterator.java b/org/omg/CosNaming/BindingIterator.java
index a47e295aa..6627a8f82 100644
--- a/org/omg/CosNaming/BindingIterator.java
+++ b/org/omg/CosNaming/BindingIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,12 +48,15 @@ import java.io.Serializable;
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface BindingIterator
- extends org.omg.CORBA.Object, Serializable, IDLEntity
+ extends BindingIteratorOperations, org.omg.CORBA.Object, Serializable,
+ IDLEntity
{
/**
* Destroy the iterator on the server side. This must always be
* called, as otherwise the iterator will remain on the server even
* after the client application terminates.
+ *
+ * @specnote since 1.3 this method has moved into BindingIteratorOperations.
*/
void destroy();
@@ -65,6 +68,8 @@ public interface BindingIterator
*
* @return false if there are no more bindings available,
* true otherwise.
+ *
+ * @specnote since 1.3 this method has moved into BindingIteratorOperations.
*/
boolean next_n(int amount, BindingListHolder a_list);
@@ -75,6 +80,8 @@ public interface BindingIterator
*
* @return false if there are no more bindings available, true
* otherwise.
+ *
+ * @specnote since 1.3 this method has moved into BindingIteratorOperations.
*/
boolean next_one(BindingHolder a_binding);
-}
+} \ No newline at end of file
diff --git a/org/omg/CosNaming/BindingIteratorHelper.java b/org/omg/CosNaming/BindingIteratorHelper.java
index c284d40df..204d9f058 100644
--- a/org/omg/CosNaming/BindingIteratorHelper.java
+++ b/org/omg/CosNaming/BindingIteratorHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingIteratorHolder.java b/org/omg/CosNaming/BindingIteratorHolder.java
index d6b53c2fd..195e97e3f 100644
--- a/org/omg/CosNaming/BindingIteratorHolder.java
+++ b/org/omg/CosNaming/BindingIteratorHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingIteratorOperations.java b/org/omg/CosNaming/BindingIteratorOperations.java
new file mode 100644
index 000000000..c775b11ec
--- /dev/null
+++ b/org/omg/CosNaming/BindingIteratorOperations.java
@@ -0,0 +1,78 @@
+/* BindingIterator.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.CosNaming;
+
+/**
+ * The operations, applicable for an iterator for seing the available
+ * bindings.
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface BindingIteratorOperations
+{
+ /**
+ * Destroy the iterator on the server side. This must always be
+ * called, as otherwise the iterator will remain on the server even
+ * after the client application terminates.
+ */
+ void destroy();
+
+ /**
+ * Return the desired amount of bindings.
+ *
+ * @param amount the maximal number of bindings to return.
+ * @param a_list a holder to store the returned bindings.
+ *
+ * @return false if there are no more bindings available,
+ * true otherwise.
+ */
+ boolean next_n(int amount, BindingListHolder a_list);
+
+ /**
+ * Return the next binding.
+ *
+ * @param a_binding a holder, where the next binding will be stored.
+ *
+ * @return false if there are no more bindings available, true
+ * otherwise.
+ */
+ boolean next_one(BindingHolder a_binding);
+} \ No newline at end of file
diff --git a/org/omg/CosNaming/BindingListHelper.java b/org/omg/CosNaming/BindingListHelper.java
index fffcb97d5..44fe39dca 100644
--- a/org/omg/CosNaming/BindingListHelper.java
+++ b/org/omg/CosNaming/BindingListHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingListHolder.java b/org/omg/CosNaming/BindingListHolder.java
index 5e58584dc..eb0e8b333 100644
--- a/org/omg/CosNaming/BindingListHolder.java
+++ b/org/omg/CosNaming/BindingListHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingType.java b/org/omg/CosNaming/BindingType.java
index 207a4d328..d78990349 100644
--- a/org/omg/CosNaming/BindingType.java
+++ b/org/omg/CosNaming/BindingType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingTypeHelper.java b/org/omg/CosNaming/BindingTypeHelper.java
index 1b8dcb8b9..ede00008e 100644
--- a/org/omg/CosNaming/BindingTypeHelper.java
+++ b/org/omg/CosNaming/BindingTypeHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/BindingTypeHolder.java b/org/omg/CosNaming/BindingTypeHolder.java
index 80931e57e..72fde5a48 100644
--- a/org/omg/CosNaming/BindingTypeHolder.java
+++ b/org/omg/CosNaming/BindingTypeHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/IstringHelper.java b/org/omg/CosNaming/IstringHelper.java
index ea1e30c85..83bbecee5 100644
--- a/org/omg/CosNaming/IstringHelper.java
+++ b/org/omg/CosNaming/IstringHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NameComponent.java b/org/omg/CosNaming/NameComponent.java
index 08ba94aed..a2db313e6 100644
--- a/org/omg/CosNaming/NameComponent.java
+++ b/org/omg/CosNaming/NameComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NameComponentHelper.java b/org/omg/CosNaming/NameComponentHelper.java
index 1cfa46345..9f0e1287e 100644
--- a/org/omg/CosNaming/NameComponentHelper.java
+++ b/org/omg/CosNaming/NameComponentHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NameComponentHolder.java b/org/omg/CosNaming/NameComponentHolder.java
index 4d49c4d02..817a43e4c 100644
--- a/org/omg/CosNaming/NameComponentHolder.java
+++ b/org/omg/CosNaming/NameComponentHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NameHelper.java b/org/omg/CosNaming/NameHelper.java
index 499f6c4ab..047ad918f 100644
--- a/org/omg/CosNaming/NameHelper.java
+++ b/org/omg/CosNaming/NameHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NameHolder.java b/org/omg/CosNaming/NameHolder.java
index fb067c029..a4d33e991 100644
--- a/org/omg/CosNaming/NameHolder.java
+++ b/org/omg/CosNaming/NameHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContext.java b/org/omg/CosNaming/NamingContext.java
index c921cdef1..dc4b00200 100644
--- a/org/omg/CosNaming/NamingContext.java
+++ b/org/omg/CosNaming/NamingContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,7 +56,7 @@ import org.omg.CosNaming.NamingContextPackage.NotFound;
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface NamingContext
- extends org.omg.CORBA.Object, IDLEntity
+ extends NamingContextOperations, org.omg.CORBA.Object, IDLEntity
{
/**
* Gives the object a name, valid in this context.
@@ -66,6 +66,8 @@ public interface NamingContext
*
* @throws AlreadyBound if the object is already named in this context.
* @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
void bind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
throws NotFound, CannotProceed, InvalidName, AlreadyBound;
@@ -78,6 +80,8 @@ public interface NamingContext
*
* @throws AlreadyBound if the child context is already named in
* the current context.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
void bind_context(NameComponent[] a_name, NamingContext a_context)
throws NotFound, CannotProceed, InvalidName, AlreadyBound;
@@ -92,6 +96,8 @@ public interface NamingContext
*
* @throws AlreadyBound if the name is already in use.
* @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
NamingContext bind_new_context(NameComponent[] a_name)
throws NotFound, AlreadyBound, CannotProceed,
@@ -100,6 +106,8 @@ public interface NamingContext
/**
* Destroy this context (must be empty).
* @throws NotEmpty if the context being destroyed is not empty.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
void destroy()
throws NotEmpty;
@@ -115,11 +123,15 @@ public interface NamingContext
* @param a_list the holder, where the returned bindigs are stored.
* @param an_iter the iterator that can be used to access the remaining
* bindings.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
void list(int amount, BindingListHolder a_list, BindingIteratorHolder an_iter);
/**
* Creates a new naming context, not bound to any name.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
NamingContext new_context();
@@ -132,6 +144,8 @@ public interface NamingContext
* @param an_object the object, being named.
*
* @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
void rebind(NameComponent[] a_name, org.omg.CORBA.Object an_object)
throws NotFound, CannotProceed, InvalidName;
@@ -145,6 +159,8 @@ public interface NamingContext
* @param a_context the child context being named.
*
* @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
void rebind_context(NameComponent[] a_name, NamingContext a_context)
throws NotFound, CannotProceed, InvalidName;
@@ -161,6 +177,8 @@ public interface NamingContext
*
* @throws NotFound
* @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
org.omg.CORBA.Object resolve(NameComponent[] a_name)
throws NotFound, CannotProceed, InvalidName;
@@ -171,7 +189,9 @@ public interface NamingContext
* @param a_name a name to remove.
*
* @throws InvalidName if the name has zero length or otherwise invalid.
+ *
+ * @specnote since 1.3 this method has moved into NamingContextOperations.
*/
void unbind(NameComponent[] a_name)
throws NotFound, CannotProceed, InvalidName;
-}
+} \ No newline at end of file
diff --git a/org/omg/CosNaming/NamingContextExt.java b/org/omg/CosNaming/NamingContextExt.java
index 77bd896c2..ac77ae90d 100644
--- a/org/omg/CosNaming/NamingContextExt.java
+++ b/org/omg/CosNaming/NamingContextExt.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtHelper.java b/org/omg/CosNaming/NamingContextExtHelper.java
index 2d60ac89d..6e2ef060b 100644
--- a/org/omg/CosNaming/NamingContextExtHelper.java
+++ b/org/omg/CosNaming/NamingContextExtHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtHolder.java b/org/omg/CosNaming/NamingContextExtHolder.java
index a2527c316..923edcd7b 100644
--- a/org/omg/CosNaming/NamingContextExtHolder.java
+++ b/org/omg/CosNaming/NamingContextExtHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtOperations.java b/org/omg/CosNaming/NamingContextExtOperations.java
index 6e6474ec0..ec0af0fcd 100644
--- a/org/omg/CosNaming/NamingContextExtOperations.java
+++ b/org/omg/CosNaming/NamingContextExtOperations.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java b/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java
index 3aa42d1d3..cf4029ccf 100644
--- a/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java
+++ b/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java b/org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java
index 0431daf65..7b2866d06 100644
--- a/org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java
+++ b/org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,8 @@ package org.omg.CosNaming.NamingContextExtPackage;
import org.omg.CORBA.UserException;
import org.omg.CORBA.portable.IDLEntity;
+import java.io.Serializable;
+
/**
* The exception is thrown if the passed address is empty or otherwise invalid.
*
@@ -48,6 +50,27 @@ import org.omg.CORBA.portable.IDLEntity;
*/
public final class InvalidAddress
extends UserException
- implements IDLEntity
+ implements IDLEntity, Serializable
{
-}
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -3775583235364760385L;
+
+ /**
+ * Create an exception with no message.
+ */
+ public InvalidAddress()
+ {
+ }
+
+ /**
+ * Create an exception with explaining message.
+ *
+ * @since 1.4
+ */
+ public InvalidAddress(String why)
+ {
+ super(why);
+ }
+} \ No newline at end of file
diff --git a/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java b/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java
index 25f8e2cac..02f8fccb6 100644
--- a/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java
+++ b/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java b/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java
index 08bfbb388..114919462 100644
--- a/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java
+++ b/org/omg/CosNaming/NamingContextExtPackage/InvalidAddressHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java b/org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java
index 12903d963..24c69fcb9 100644
--- a/org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java
+++ b/org/omg/CosNaming/NamingContextExtPackage/StringNameHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java b/org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java
index 2c67a3894..503fe22d6 100644
--- a/org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java
+++ b/org/omg/CosNaming/NamingContextExtPackage/URLStringHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextExtPackage/package.html b/org/omg/CosNaming/NamingContextExtPackage/package.html
index fb8aea5f5..a082f1c6d 100644
--- a/org/omg/CosNaming/NamingContextExtPackage/package.html
+++ b/org/omg/CosNaming/NamingContextExtPackage/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextHelper.java b/org/omg/CosNaming/NamingContextHelper.java
index 93a2ff67b..3a60d9cb4 100644
--- a/org/omg/CosNaming/NamingContextHelper.java
+++ b/org/omg/CosNaming/NamingContextHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextHolder.java b/org/omg/CosNaming/NamingContextHolder.java
index a212baa37..099697aa4 100644
--- a/org/omg/CosNaming/NamingContextHolder.java
+++ b/org/omg/CosNaming/NamingContextHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextOperations.java b/org/omg/CosNaming/NamingContextOperations.java
index d58f153b1..40ac419c4 100644
--- a/org/omg/CosNaming/NamingContextOperations.java
+++ b/org/omg/CosNaming/NamingContextOperations.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java b/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java
index 9cae87aa8..2013f10f8 100644
--- a/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java
+++ b/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java b/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java
index d4e99f996..948789521 100644
--- a/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java
+++ b/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java b/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java
index f46e8a1fd..853700fed 100644
--- a/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java
+++ b/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/CannotProceed.java b/org/omg/CosNaming/NamingContextPackage/CannotProceed.java
index 4ee0df89b..678551134 100644
--- a/org/omg/CosNaming/NamingContextPackage/CannotProceed.java
+++ b/org/omg/CosNaming/NamingContextPackage/CannotProceed.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -84,4 +84,19 @@ public final class CannotProceed
cxt = _cxt;
rest_of_name = _rest_of_name;
}
+
+ /**
+ * Create an exception with the initialised fields and explaining
+ * message.
+ *
+ * @since 1.4
+ */
+ public CannotProceed(String why, NamingContext _cxt,
+ NameComponent[] _rest_of_name
+ )
+ {
+ super(why);
+ cxt = _cxt;
+ rest_of_name = _rest_of_name;
+ }
} \ No newline at end of file
diff --git a/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java b/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java
index 5297628e9..d1a1da51e 100644
--- a/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java
+++ b/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java b/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java
index bb5615a0e..48a4fad06 100644
--- a/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java
+++ b/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/InvalidName.java b/org/omg/CosNaming/NamingContextPackage/InvalidName.java
index 830bdf448..90ca3a5c5 100644
--- a/org/omg/CosNaming/NamingContextPackage/InvalidName.java
+++ b/org/omg/CosNaming/NamingContextPackage/InvalidName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java b/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java
index fd3d094f9..434713b2d 100644
--- a/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java
+++ b/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java b/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java
index 8ae721b75..180a09363 100644
--- a/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java
+++ b/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/NotEmpty.java b/org/omg/CosNaming/NamingContextPackage/NotEmpty.java
index f2d6004b5..c80cfcc7a 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotEmpty.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotEmpty.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,4 +54,21 @@ public final class NotEmpty
* Use serialVersionUID (v1.4) for interoperability.
*/
private static final long serialVersionUID = 7120362687417045881L;
-} \ No newline at end of file
+
+ /**
+ * Create an exception with no message.
+ */
+ public NotEmpty()
+ {
+ }
+
+ /**
+ * Create an exception with explaining message.
+ *
+ * @since 1.4
+ */
+ public NotEmpty(String why)
+ {
+ super(why);
+ }
+}
diff --git a/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java b/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java
index fa0e165b3..e1f82994f 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java b/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java
index bace2c29c..63a7f1bba 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/NotFound.java b/org/omg/CosNaming/NamingContextPackage/NotFound.java
index 6bfff3a71..a8c9472d6 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotFound.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotFound.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -83,4 +83,19 @@ public final class NotFound
why = _why;
rest_of_name = _rest_of_name;
}
+
+ /**
+ * Creates the exception, intialising the fields to the given values and
+ * also providing the explaining string.
+ *
+ * @since 1.4
+ */
+ public NotFound(String explanation, NotFoundReason _why,
+ NameComponent[] _rest_of_name
+ )
+ {
+ super(explanation);
+ why = _why;
+ rest_of_name = _rest_of_name;
+ }
} \ No newline at end of file
diff --git a/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java b/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java
index a4d69a243..544ab6377 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java b/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java
index 2b86c91bd..c9ec7b02f 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java b/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java
index 5c6d47e73..5f6af26da 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java b/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java
index 60065fa71..b6eacf85f 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java b/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java
index 954a3fc62..fc41b1833 100644
--- a/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java
+++ b/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/NamingContextPackage/package.html b/org/omg/CosNaming/NamingContextPackage/package.html
index f30394adb..37c56e255 100644
--- a/org/omg/CosNaming/NamingContextPackage/package.html
+++ b/org/omg/CosNaming/NamingContextPackage/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/_BindingIteratorImplBase.java b/org/omg/CosNaming/_BindingIteratorImplBase.java
index ea7e1521e..53c0dd3a6 100644
--- a/org/omg/CosNaming/_BindingIteratorImplBase.java
+++ b/org/omg/CosNaming/_BindingIteratorImplBase.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/_BindingIteratorStub.java b/org/omg/CosNaming/_BindingIteratorStub.java
index aca7fda38..487b2efe3 100644
--- a/org/omg/CosNaming/_BindingIteratorStub.java
+++ b/org/omg/CosNaming/_BindingIteratorStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -59,7 +59,7 @@ public class _BindingIteratorStub
/**
* Use serialVersionUID (v1.4) for interoperability.
*/
- private static final long serialVersionUID = 359397876031922059L;
+ private static final long serialVersionUID = 8969257760771186704L;
/**
* The object can be destroyed only once.
diff --git a/org/omg/CosNaming/_NamingContextExtImplBase.java b/org/omg/CosNaming/_NamingContextExtImplBase.java
index 64af05fb0..ae818ddf5 100644
--- a/org/omg/CosNaming/_NamingContextExtImplBase.java
+++ b/org/omg/CosNaming/_NamingContextExtImplBase.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/_NamingContextExtStub.java b/org/omg/CosNaming/_NamingContextExtStub.java
index 78c33eba9..3ad772030 100644
--- a/org/omg/CosNaming/_NamingContextExtStub.java
+++ b/org/omg/CosNaming/_NamingContextExtStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/_NamingContextImplBase.java b/org/omg/CosNaming/_NamingContextImplBase.java
index 549b5336c..16b17fc5e 100644
--- a/org/omg/CosNaming/_NamingContextImplBase.java
+++ b/org/omg/CosNaming/_NamingContextImplBase.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/CosNaming/_NamingContextStub.java b/org/omg/CosNaming/_NamingContextStub.java
index 6e3e934bc..d561aeb48 100644
--- a/org/omg/CosNaming/_NamingContextStub.java
+++ b/org/omg/CosNaming/_NamingContextStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -72,7 +72,7 @@ public class _NamingContextStub
/**
* Use serialVersionUID (v1.4) for interoperability.
*/
- private static final long serialVersionUID = -389233044945385889L;
+ private static final long serialVersionUID = 6835430958405349379L;
/**
* Create the naming context stub.
diff --git a/org/omg/CosNaming/package.html b/org/omg/CosNaming/package.html
index 25f427f2d..69dc0bf8e 100644
--- a/org/omg/CosNaming/package.html
+++ b/org/omg/CosNaming/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/Dynamic/Parameter.java b/org/omg/Dynamic/Parameter.java
new file mode 100644
index 000000000..dd42c2e0a
--- /dev/null
+++ b/org/omg/Dynamic/Parameter.java
@@ -0,0 +1,90 @@
+/* Parameter.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.Dynamic;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ParameterMode;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * When representing the information about a request,
+ * defines a one of the arguments for the operation being invoked.
+ *
+ * @see org.omg.PortableInterceptor.RequestInfoOperation#arguments()
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Parameter
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 892191606993734699L;
+
+ /**
+ * The {@link Any}, holding the value of the parameter.
+ */
+ public Any argument;
+
+ /**
+ * The mode of the parameter. Specifies if the parameter is used
+ * to pass the value to the method, to return the value from the
+ * method or for both of these purposes.
+ */
+ public ParameterMode mode;
+
+ /**
+ * Create the unitialised instance.
+ */
+ public Parameter()
+ {
+ }
+
+ /**
+ * Create an instance, initialising field to the passed values.
+ */
+ public Parameter(Any an_argument, ParameterMode a_mode)
+ {
+ argument = an_argument;
+ mode = a_mode;
+ }
+} \ No newline at end of file
diff --git a/org/omg/DynamicAny/DynAny.java b/org/omg/DynamicAny/DynAny.java
new file mode 100644
index 000000000..7e26ce505
--- /dev/null
+++ b/org/omg/DynamicAny/DynAny.java
@@ -0,0 +1,72 @@
+/* DynAny.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>
+ * The DynAny interface provides possibility to access the components of the
+ * CORBA object, stored inside the {@link Any}. The DynAny and derived classes
+ * additionally allows to access the members of the sequence, structure, union
+ * and get the data about enumeration, value type and CORBA <code>fixed</code>
+ * without knowing the exact type at the run time. The returned members are also
+ * wrapped into DynAny objects, allowing them to be the nested structures.
+ * </p>
+ * <p>
+ * The DynAny's are usually produced by {@link DynAnyFactory}. This factory is
+ * obtained from the ORB: <br>
+ * <code>
+ * DynAnyFactory f = DynAnyFactoryHelper.narrow
+ * (orb.resolve_initial_references("DynAnyFactory"));
+ * </code>
+ * </p>
+ * <p>
+ * DynAny can also be returned by a method, invoked on another DynAny.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynAny extends DynAnyOperations, IDLEntity,
+ org.omg.CORBA.Object, Serializable
+{
+} \ No newline at end of file
diff --git a/org/omg/DynamicAny/DynAnyOperations.java b/org/omg/DynamicAny/DynAnyOperations.java
new file mode 100644
index 000000000..1e9aac5cc
--- /dev/null
+++ b/org/omg/DynamicAny/DynAnyOperations.java
@@ -0,0 +1,538 @@
+/* DynAnyOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.TypeCode;
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
+
+import java.io.Serializable;
+
+/**
+ * Defines the operations, applicable to {@link DynAny}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynAnyOperations
+{
+ /**
+ * Initialises the value of this DynAny with the value, stored inside the
+ * passed DynAny, making a shallow copy.
+ *
+ * @param from the DynAny to copy from.
+ * @throws TypeMismatch if the source DynAny is invalid.
+ */
+ void assign(DynAny from)
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Fully clones the content of this Any, returning a deep copy.
+ */
+ DynAny copy();
+
+ /**
+ * Returns the focused component of this DynAny. The DynAny has the internal
+ * pointer (reference) that can point to one of its components. The returned
+ * DynAny can be used to get or set the value of the focused component. If the
+ * DynAny holds a primitive type with no components, this implementation
+ * returns <code>null</code>.
+ */
+ DynAny current_component();
+
+ /**
+ * Destroys this DynAny, freeing the used resources. In java, resources are
+ * freed by the garbage collectors, so this method typically returns without
+ * action.
+ */
+ void destroy();
+
+ /**
+ * Makes a DynAny from the {@link Any}. The passed {@link Any} becomes the
+ * enclosed instance of this DynAny, allowing to change/traverse the
+ * {@link Any} fields by the {@link DynAny} methods.
+ *
+ * @throws TypeMismatch if the type of this DynAny differs from the type of
+ * the passed Any. The DynAny cannot be reused with the enclosed type
+ * different from that it was initially created.
+ * @throws InvalidValue if the value, stored in the passed parameter, is
+ * otherwise invalid.
+ */
+ void from_any(Any an_any)
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * This method is used when the wrapped Any contains an instance of another
+ * Any itself. The method returns this second enclosed Any.
+ *
+ * @throws TypeMismatch if the typecode of the accessed Any is not the same as
+ * the typecode of this DynAny.
+ */
+ Any get_any()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the boolean value that is expected to be stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ boolean get_boolean()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the char value that is expected to be stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ char get_char()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the <code>double</code> value that is expected to be stored in
+ * this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ double get_double()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the <code>float</code> value that is expected to be stored in
+ * this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ float get_float()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the int (CORBA long) value that is expected to be stored in this
+ * DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ int get_long()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the long (CORBA long long) value that is expected to be stored in
+ * this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ long get_longlong()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the byte (CORBA octet) value that is expected to be stored in this
+ * DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ byte get_octet()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the CORBA object reference that is expected to be stored in this
+ * DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ org.omg.CORBA.Object get_reference()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the <code>short</code> value that is expected to be stored in
+ * this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ short get_short()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the string value that is expected to be stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ String get_string()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the {@link TypeCode} value that is expected to be stored in this
+ * DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ TypeCode get_typecode()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the unsigned int (CORBA ulong) value that is expected to be stored
+ * in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ int get_ulong()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the unsingel long (CORBA unsigned long long )value that is expected
+ * to be stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ long get_ulonglong()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the unsigned short value that is expected to be stored in this
+ * DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ short get_ushort()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the value that is expected to be stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ Serializable get_val()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the wide (usually UTF-16) character value that is expected to be
+ * stored in this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ char get_wchar()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Extract the wide (usually UFT-16) string that is expected to be stored in
+ * this DynAny.
+ *
+ * @throws TypeMismatch if this DynAny holds the value of the different type.
+ */
+ String get_wstring()
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Insert the {@link Any} value into the enclosed {@link Any} inside this
+ * DynAny.
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_any(Any an_any)
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Insert the boolean value into the enclosed {@link Any} inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_boolean(boolean a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the char value into the enclosed {@link Any} inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_char(char a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the double value into the enclosed {@link Any} inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_double(double a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the float value into the enclosed {@link Any} inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_float(float a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the int (CORBA long) value into the enclosed {@link Any} inside this
+ * DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_long(int a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the long (CORBA long long) value into the enclosed {@link Any}
+ * inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_longlong(long a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the byte (CORBA octet) value into the enclosed {@link Any} inside
+ * this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_octet(byte a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the object reference into the enclosed {@link Any} inside this
+ * DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_reference(org.omg.CORBA.Object a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the <code>short</code> value into the enclosed {@link Any} inside
+ * this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_short(short a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the string value into the enclosed {@link Any} inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_string(String a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the {@link TypeCode} value into the enclosed {@link Any} inside this
+ * DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_typecode(TypeCode a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the int (CORBA unsinged long) value into the enclosed {@link Any}
+ * inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_ulong(int a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the long (CORBA unsigned long long) value into the enclosed
+ * {@link Any} inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_ulonglong(long a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the short (CORBA unsigned short) value into the enclosed {@link Any}
+ * inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_ushort(short a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the value into the enclosed {@link Any} inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_val(Serializable a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the wide char (usually UTF-16) value into the enclosed {@link Any}
+ * inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_wchar(char a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Insert the wide string (usually UTF-16) into the enclosed {@link Any}
+ * inside this DynAny
+ *
+ * @param a_x the value being inserted.
+ * @throws InvalidValue if the value type does not match the typecode of the
+ * enclosed {@link Any}.
+ */
+ void insert_wstring(String a_x)
+ throws InvalidValue, TypeMismatch;
+
+ /**
+ * Advances the internal pointer, described in the {@link current_component},
+ * one position forward.
+ *
+ * @return true if the pointer now points to the new component, false if there
+ * are no more components of this DynAny holds a basic type that is not
+ * divided into components.
+ */
+ boolean next();
+
+ /**
+ * Moves the internal pointer, described in the {@link current_component}, to
+ * the first component.
+ */
+ void rewind();
+
+ /**
+ * Moves the internal pointer, described in the {@link current_component}, to
+ * the given position.
+ *
+ * @param p the number of the internal component on that the internal pointer
+ * must be focused.
+ * @return true on success or false if there is no component with the given
+ * number. If the DynAny holds the basic type, this method returs false p
+ * values other than 0.
+ */
+ boolean seek(int p);
+
+ /**
+ * Returns a shallow copy of the enclosed {@link Any},
+ *
+ * @return shallow copy of the enclosed {@link Any}.
+ */
+ Any to_any()
+ throws TypeMismatch;
+
+ /**
+ * Returns the typecode of the object, inserted into this DynAny.
+ *
+ * @return the typecode of the inserted {@link Any} or null typecode if no
+ * {@link Any has been yet inserted}.
+ */
+ TypeCode type();
+
+ /**
+ * Insert a value at the current position.
+ *
+ * @param insert_it a value to insert.
+ * @throws TypeMismatch if the component at the current position has a
+ * different type.
+ * @throws InvalidValue if the current position points nowhere.
+ */
+ void insert_dyn_any(DynAny insert_it)
+ throws TypeMismatch, InvalidValue;
+
+ /**
+ * Checks for equality with another Dynamic Any.
+ *
+ *
+ * @specnote This method is currently only implemented only for case when
+ * another DynAny was created by the factory of this implementation and
+ * is not an independent class, just implementing interface. Otherwise,
+ * a NO_IMPLEMENT minor 8148 will be thrown. General implementation is
+ * highly ineffective, but we will do if somebody would ever need it.
+ */
+ boolean equal(DynAny other);
+
+ /**
+ * Get the number number of fields in the enclosed structure or number of
+ * memebers in the enclosed array, sequence, enumeration, etc. This method
+ * only counts elements at the top level. For instance, if invoked on a
+ * DynStruct with a single member, it returns 1, irrespective of the type of
+ * the member.
+ *
+ * @return number of components or 0 if the enclosed Any is not divideable.
+ */
+ int component_count();
+
+ /**
+ * Return DynAny, wrapping the second (enclosed any) that is stored in the
+ * wrapped Any.
+ *
+ * @throws TypeMismatch if the wrapped Any does not store another Any.
+ * @throws InvalidValue if the current position points nowhere.
+ */
+ DynAny get_dyn_any()
+ throws TypeMismatch, InvalidValue;
+} \ No newline at end of file
diff --git a/org/omg/DynamicAny/DynArray.java b/org/omg/DynamicAny/DynArray.java
new file mode 100644
index 000000000..f2285970a
--- /dev/null
+++ b/org/omg/DynamicAny/DynArray.java
@@ -0,0 +1,53 @@
+/* DynArray.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Represents a fixed size array. All components in the array have the same type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynArray extends DynArrayOperations, DynAny, IDLEntity,
+ org.omg.CORBA.Object, Serializable
+{
+}
diff --git a/org/omg/DynamicAny/DynArrayOperations.java b/org/omg/DynamicAny/DynArrayOperations.java
new file mode 100644
index 000000000..c1cf2e428
--- /dev/null
+++ b/org/omg/DynamicAny/DynArrayOperations.java
@@ -0,0 +1,92 @@
+/* DynArrayOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.CORBA.Any;
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
+
+/**
+ * Defines operations, applicable for {@link DynArray}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynArrayOperations extends DynAnyOperations
+{
+ /**
+ * Returns the array.
+ *
+ * @return the array of elements as an array of DynAny's.
+ */
+ DynAny[] get_elements_as_dyn_any();
+
+ /**
+ * Returns the array.
+ *
+ * @return the array of elements as an array of Any's.
+ */
+ Any[] get_elements();
+
+ /**
+ * Sets the array.
+ *
+ * @param value the array of elements an DynAny's.
+ *
+ * @throws TypeMismatch if the members of the passed array does not
+ * match array component type.
+ *
+ * @throws InvalidValue if the number of elements in the passed array
+ * is not the same as the size of this DynArray.
+ */
+ void set_elements_as_dyn_any(DynAny[] value) throws TypeMismatch,
+ InvalidValue;
+
+ /**
+ * Sets the array.
+ *
+ * @param value the array of elements as Any's.
+ *
+ * @throws TypeMismatch if the members of the passed array does not
+ * match array component type.
+ *
+ * @throws InvalidValue if the number of elements in the passed array
+ * is not the same as the size of this DynArray.
+ */
+ void set_elements(Any[] value) throws TypeMismatch, InvalidValue;
+}
diff --git a/org/omg/DynamicAny/DynEnum.java b/org/omg/DynamicAny/DynEnum.java
new file mode 100644
index 000000000..b37931fa2
--- /dev/null
+++ b/org/omg/DynamicAny/DynEnum.java
@@ -0,0 +1,56 @@
+/* DynEnum.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines the dynamic enumeration. The value of the dynamic enumeration can be
+ * set by name or by integer code. The valid string values and integer codes are
+ * taken from the typecode, from which the enumeration was constructed. The
+ * enumeration is an undividable type without traversable components.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynEnum extends DynEnumOperations, DynAny, IDLEntity,
+ org.omg.CORBA.Object, Serializable
+{
+}
diff --git a/org/omg/DynamicAny/DynEnumOperations.java b/org/omg/DynamicAny/DynEnumOperations.java
new file mode 100644
index 000000000..0ac4d78cd
--- /dev/null
+++ b/org/omg/DynamicAny/DynEnumOperations.java
@@ -0,0 +1,80 @@
+/* DynEnumOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+
+/**
+ * Defines operations, applicable to the dynamic enumeration. The value of the
+ * dynamic enumeration can be set by name or by integer code. The valid string
+ * values and integer codes are taken from the typecode, from which the
+ * enumeration was constructed. The enumeration is an undividable type without
+ * traversable components.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynEnumOperations
+{
+ /**
+ * Get the current enumeration value, as string.
+ */
+ String get_as_string();
+
+ /**
+ * Get the current enumeration value, as int.
+ */
+ int get_as_ulong();
+
+ /**
+ * Set the current enumeration value, as string.
+ *
+ * @throws InvalidValue if the passed string is not one of the allowed values
+ * for this enumeration.
+ */
+ void set_as_string(String value) throws InvalidValue;
+
+ /**
+ * Set the current enumeration value, as int.
+ *
+ * @throws InvalidValue if the passed string is not one of the allowed values
+ * for this enumeration.
+ */
+ void set_as_ulong(int value) throws InvalidValue;
+
+}
diff --git a/org/omg/DynamicAny/DynFixed.java b/org/omg/DynamicAny/DynFixed.java
new file mode 100644
index 000000000..3561b01df
--- /dev/null
+++ b/org/omg/DynamicAny/DynFixed.java
@@ -0,0 +1,55 @@
+/* DynFixed.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines dynamic any, holding CORBA <code>fixed</code>. The operations on
+ * <code>fixed</code> (defined in {@link DynFixedOperations}) take and return
+ * this data type in its string representation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynFixed extends DynFixedOperations, DynAny, IDLEntity,
+ org.omg.CORBA.Object, Serializable
+{
+}
diff --git a/org/omg/DynamicAny/DynFixedOperations.java b/org/omg/DynamicAny/DynFixedOperations.java
new file mode 100644
index 000000000..1178e7c92
--- /dev/null
+++ b/org/omg/DynamicAny/DynFixedOperations.java
@@ -0,0 +1,70 @@
+/* DynFixedOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
+
+/**
+ * Defines operations, applicable for DynAny, holding CORBA <code>fixed</code>.
+ * These operations take and return this data type in its string representation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynFixedOperations
+{
+ /**
+ * Get the value of the enclosed DynFixed, as string.
+ */
+ String get_value();
+
+ /**
+ * Set the value of the enclosed DynFixed, from string.
+ *
+ * @param fixed_value the value to set.
+ *
+ * @throws TypeMismatch if the passed string cannot be parsed into CORBA
+ * <code>fixed</code>. The valid string can only contain digits, decimal
+ * point and optional leading and trailing whitespace.
+ *
+ * @return true if the passed value can be represented without the loss of
+ * precision, false if some fractional digits were truncated.
+ */
+ boolean set_value(String fixed_value) throws TypeMismatch, InvalidValue;
+}
diff --git a/org/omg/DynamicAny/DynSequence.java b/org/omg/DynamicAny/DynSequence.java
new file mode 100644
index 000000000..bde3a418e
--- /dev/null
+++ b/org/omg/DynamicAny/DynSequence.java
@@ -0,0 +1,54 @@
+/* DynSequence.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines a dynamic resizeable array with the optional upper size bound. All
+ * elements in this structure have the same type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynSequence extends DynSequenceOperations, DynAny, IDLEntity,
+ org.omg.CORBA.Object, Serializable
+{
+}
diff --git a/org/omg/DynamicAny/DynSequenceOperations.java b/org/omg/DynamicAny/DynSequenceOperations.java
new file mode 100644
index 000000000..8c295dbbb
--- /dev/null
+++ b/org/omg/DynamicAny/DynSequenceOperations.java
@@ -0,0 +1,122 @@
+/* DynSequenceOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.CORBA.Any;
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
+
+/**
+ * Defines operations, applicable to DynSequence. These are basically the same
+ * operations as for {@link DynArrayOperations} with additional possibility to
+ * change the length of the sequence. If the
+ * {@link org.omg.CORBA.TypeCode#length()} method of the sequence typecode
+ * returns positive value, it is treated as a sequence bound. An attempt to
+ * extend the sequence above its bound raises {@link InvalidValue}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynSequenceOperations
+{
+ /**
+ * Get the length of the sequence.
+ *
+ * @return the current sequence length that was taken from typecode or changed
+ * with set_length.
+ */
+ int get_length();
+
+ /**
+ * Set the length of the sequence. If the sequence is shortened, the tailing
+ * members are discarded, but the remaining content is not affected. If the
+ * new length is larger than the previous one, the new members are added to
+ * the end of the sequence. These new members are initialised to they default
+ * values.
+ *
+ * @param length the new length of the sequence.
+ *
+ * @throws InvalidValue if this is a bounded sequence, and the size being set
+ * exceeds the sequence bound.
+ */
+ public void set_length(int length) throws InvalidValue;
+
+ /**
+ * Returns the array, containing the sequence elements.
+ *
+ * @return the array of elements as an array of DynAny's.
+ */
+ DynAny[] get_elements_as_dyn_any();
+
+ /**
+ * Returns the array, containing the sequence elements.
+ *
+ * @return the array of elements as an array of Any's.
+ */
+ Any[] get_elements();
+
+ /**
+ * Sets the sequence elements from the array. The length of the sequence is
+ * set to the length of the passed array.
+ *
+ * @param value the array of elements an DynAny's.
+ *
+ * @throws TypeMismatch if the members of the passed array does not match
+ * sequence component type.
+ *
+ * @throws InvalidValue if this is a bounded sequence and the number of
+ * elements in the passed array exceeds the sequence bound.
+ */
+ void set_elements_as_dyn_any(DynAny[] value) throws TypeMismatch,
+ InvalidValue;
+
+ /**
+ * Sets the sequence elements from the array. The length of the sequence is
+ * set to the length of the passed array.
+ *
+ * @param value the array of elements as Any's.
+ *
+ *
+ * @throws TypeMismatch if the members of the passed array does not match
+ * sequence component type.
+ *
+ * @throws InvalidValue if this is a bounded sequence and the number of
+ * elements in the passed array exceeds the sequence bound.
+ */
+ void set_elements(Any[] value) throws TypeMismatch, InvalidValue;
+}
diff --git a/org/omg/DynamicAny/DynStruct.java b/org/omg/DynamicAny/DynStruct.java
new file mode 100644
index 000000000..b7b900a0d
--- /dev/null
+++ b/org/omg/DynamicAny/DynStruct.java
@@ -0,0 +1,54 @@
+/* DynStruct.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines a fixed size structure with the named fields that may have
+ * different types.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynStruct extends DynStructOperations, DynAny, IDLEntity,
+ org.omg.CORBA.Object, Serializable
+{
+}
diff --git a/org/omg/DynamicAny/DynStructOperations.java b/org/omg/DynamicAny/DynStructOperations.java
new file mode 100644
index 000000000..303adae3d
--- /dev/null
+++ b/org/omg/DynamicAny/DynStructOperations.java
@@ -0,0 +1,137 @@
+/* DynStructOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.CORBA.TCKind;
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
+
+/**
+ * Defines the operations, applicable to the DynStructure.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynStructOperations extends DynAnyOperations
+{
+ /**
+ * Get the kind of the structure field at the current position.
+ *
+ * @return the kind of field.
+ *
+ * @throws TypeMismatch for an empty structure (normally exception).
+ * @throws InvalidValue if the current position does not indicate a memeber.
+ */
+ TCKind current_member_kind() throws TypeMismatch, InvalidValue;
+
+ /**
+ * Get the name of the structure field at the current position.
+ *
+ * @return the name of the field.
+ *
+ * @throws TypeMismatch for an empty structure (normally exception).
+ * @throws InvalidValue if the current position does not indicate a memeber.
+ */
+ String current_member_name() throws TypeMismatch, InvalidValue;
+
+ /**
+ * Return array, describing describing the name and the value of each member
+ * in the structure.
+ *
+ * @return an array of NameDynAnyPair's, each defining a single field in this
+ * structure.
+ */
+ NameDynAnyPair[] get_members_as_dyn_any();
+
+ /**
+ * Return array, describing describing the name and the value of each member
+ * in the structure.
+ *
+ * @return an array of NameValuePair's, each defining a single field in this
+ * structure.
+ */
+ NameValuePair[] get_members();
+
+ /**
+ * Set the structure contend from the array, where each member defines the
+ * name and value of the structure field. If the passed array is not empty,
+ * the current position is set to the first member.
+ *
+ * The members of array must follow in the same order as the structure fields,
+ * how they are defined in the typecode. The name-based value assignment is
+ * not supported.
+ *
+ * @specnote The name-based value assignment is not supported by Sun's jdk
+ * 1.4.
+ *
+ * @param an array of NameDynValuePair's, each defining a single field in the
+ * structure.
+ *
+ * @throws TypeMismatch if the member of the passed array has a different
+ * type than the corresponding structure field.
+ *
+ * @throws InvalidValue if the size of the passed array is not the same as the
+ * number of fields in this structure.
+ */
+ void set_members_as_dyn_any(NameDynAnyPair[] value) throws TypeMismatch,
+ InvalidValue;
+
+ /**
+ * Set the structure contend from the array, where each member defines the
+ * name and value of the structure field. If the passed array is not empty,
+ * the current position is set to the first member.
+ *
+ * The members of array must follow in the same order as the structure fields,
+ * how they are defined in the typecode. The name-based value assignment is
+ * not supported.
+ *
+ * @specnote The name-based value assignment is not supported by Sun's jdk
+ * 1.4.
+ *
+ * @param an array of NameValuePair's, each defining a single field in the
+ * structure.
+ *
+ * @throws TypeMismatch if the member of the passed array has a different
+ * type than the corresponding structure field.
+ *
+ * @throws InvalidValue if the size of the passed array is not the same as the
+ * number of fields in this structure.
+ */
+ void set_members(NameValuePair[] value) throws TypeMismatch, InvalidValue;
+
+}
diff --git a/org/omg/DynamicAny/DynUnion.java b/org/omg/DynamicAny/DynUnion.java
new file mode 100644
index 000000000..b75ff613b
--- /dev/null
+++ b/org/omg/DynamicAny/DynUnion.java
@@ -0,0 +1,54 @@
+/* DynUnion.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import java.io.Serializable;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines a fixed size structure with the named fields that may have different
+ * types.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynUnion extends DynUnionOperations, DynAny, IDLEntity,
+ org.omg.CORBA.Object, Serializable
+{
+}
diff --git a/org/omg/DynamicAny/DynUnionOperations.java b/org/omg/DynamicAny/DynUnionOperations.java
new file mode 100644
index 000000000..0a35bc9c7
--- /dev/null
+++ b/org/omg/DynamicAny/DynUnionOperations.java
@@ -0,0 +1,139 @@
+/* DynUnionOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.CORBA.TCKind;
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
+
+/**
+ * Defines the operations, applicable to the DynUnion. The DynUnion has only two
+ * valid positions:
+ * <ul>
+ * <li>0 - contains the discriminator of the union. The discriminator defines,
+ * which of the union variants is currently active.</li>
+ * <li>1 - contains the currently active variant of the union content (a union
+ * member). </li>
+ * </ul>
+ * The size of the union is normally 2. If the discriminator value defines no
+ * valid variant, the union consists of discriminator only, having the size 1.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface DynUnionOperations
+{
+ /**
+ * Get the value of discriminator, defining which content variant (member) is
+ * active.
+ */
+ DynAny get_discriminator();
+
+ /**
+ * Set the value of discriminator, activating the member variant that is
+ * consistent with the discriminator value. If the current member variant
+ * matches the discriminator being set, it is unchanged. Otherwise, it is
+ * replaced by the matching member variant with fields, initialised to default
+ * values. The current position is set to 0 if the discriminator value does
+ * not match any member variant. Otherwise, the current position is set to 1,
+ * index of the member variant.
+ *
+ * @throws TypeMismatch if the discriminator has a wrong type of this union.
+ */
+ void set_discriminator(DynAny aDiscriminator) throws TypeMismatch;
+
+ /**
+ * Get the kind of the union descriminator.
+ *
+ * @return the TCKind value of the discriminator typecode.
+ */
+ TCKind discriminator_kind();
+
+ /**
+ * Get the current variant of the union content.
+ *
+ * @return the current member of the union. This reference is only valid as
+ * long as the current member does not change.
+ *
+ * @throws InvalidValue if the union has no active member.
+ */
+ DynAny member() throws InvalidValue;
+
+ /**
+ * Returns the kind of the currently active union member.
+ *
+ * @return the TCKind value of the union member.
+ *
+ * @throws InvalidValue if the union has no active member.
+ */
+ TCKind member_kind() throws InvalidValue;
+
+ /**
+ * Returns the name of the currently active union member.
+ *
+ * @return the TCKind value of the union member.
+ *
+ * @throws InvalidValue if the union has no active member.
+ */
+ String member_name() throws InvalidValue;
+
+ /**
+ * Returns true if the union has no active member. This happens if If the
+ * discriminator value defines no valid variant. Such union consists of
+ * discriminator only, having the size 1.
+ */
+ boolean has_no_active_member();
+
+ /**
+ * Set the discriminator to default value. The current position is set to 0.
+ * This also sets the content variant to the default variant, and the size of
+ * the union becomes 2.
+ *
+ * @throws TypeMismatch if the default case is not defined for this union.
+ */
+ void set_to_default_member() throws TypeMismatch;
+
+ /**
+ * Set the discriminator to value that does not correspond any content variant
+ * (any union <code>case</code> label). The current position is set to 0.
+ * The size of the union becomes 0.
+ *
+ * @throws TypeMismatch if the union has explicit default case.
+ */
+ void set_to_no_active_member() throws TypeMismatch;
+} \ No newline at end of file
diff --git a/org/omg/DynamicAny/NameDynAnyPair.java b/org/omg/DynamicAny/NameDynAnyPair.java
new file mode 100644
index 000000000..34b27b69c
--- /dev/null
+++ b/org/omg/DynamicAny/NameDynAnyPair.java
@@ -0,0 +1,87 @@
+/* NameDynAnyPair.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Stores the named value, representing the name by string and the value by
+ * {@link DynAny}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NameDynAnyPair implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1992533286932908564L;
+
+ /**
+ * The name of the named value.
+ */
+ public String id;
+
+ /**
+ * The value of the named value.
+ */
+ public DynAny value;
+
+ /**
+ * Create unitialised instance with both fields left with default
+ * <code>null</code> value.
+ */
+ public NameDynAnyPair()
+ {
+ }
+
+ /**
+ * Create an instance with the given initial values.
+ *
+ * @param aName the name of the named value.
+ * @param aValue the value of the named value.
+ */
+ public NameDynAnyPair(String aName, DynAny aValue)
+ {
+ id = aName;
+ value = aValue;
+ }
+}
diff --git a/org/omg/DynamicAny/NameValuePair.java b/org/omg/DynamicAny/NameValuePair.java
new file mode 100644
index 000000000..eb82cfa26
--- /dev/null
+++ b/org/omg/DynamicAny/NameValuePair.java
@@ -0,0 +1,90 @@
+/* NameValuePair.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Classpath.
+
+ GNU Classpath is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU Classpath is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU Classpath; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from
+ or based on this library. If you modify this library, you may extend
+ this exception to your version of the library, but you are not
+ obligated to do so. If you do not wish to do so, delete this
+ exception statement from your version. */
+
+
+package org.omg.DynamicAny;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.DynStruct;
+import org.omg.CORBA.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Holds the value, having the given name(id). This class is used by with
+ * {@link DynStruct} to name the fields of the record (structure).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public final class NameValuePair implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1289460542874201736L;
+
+ /**
+ * The value of the structure record.
+ */
+ public Any value;
+
+ /**
+ * The name of the structure record.
+ */
+ public String id;
+
+ /**
+ * Cretes an unitialised instance of the name-value pair.
+ */
+ public NameValuePair()
+ {
+ }
+
+ /**
+ * Creates the name-value pair, initialising the fields to the passed values.
+ *
+ * @param aName the name (also called id) of the name-value pair, normally the
+ * name of the structure field.
+ *
+ * @param aValue the value of the name-value pair.
+ */
+ public NameValuePair(String aName, Any aValue)
+ {
+ id = aName;
+ value = aValue;
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/CodeSets.java b/org/omg/IOP/CodeSets.java
new file mode 100644
index 000000000..8ba228f69
--- /dev/null
+++ b/org/omg/IOP/CodeSets.java
@@ -0,0 +1,62 @@
+/* CodeSets.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+ /**
+ * Holds the integer identifier of the CodeSets context. This context
+ * consist of this identifier, followed by two standard codes, first for
+ * narrow and second for wide character sets. The charset codes are
+ * integer (CORBA long) constants. Usually "narrow" means 8 bit and
+ * "wide" means 16 bit, but under specific circumstances these two
+ * charsets may be identical. The context is optional for "narrow"
+ * characters (assuming the charset code 0x00010001 = ISO 8859-1).
+ * It is required if the "wide" characters are transferred.
+ *
+ * They standard charset values are managed in
+ * {@link gnu.CORBA.GIOP.CharSets_OSF}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CodeSets
+{
+ /**
+ * Specifies the CodeSets value, 1.
+ */
+ int value = 1;
+}
diff --git a/org/omg/IOP/Codec.java b/org/omg/IOP/Codec.java
new file mode 100644
index 000000000..575cc05d2
--- /dev/null
+++ b/org/omg/IOP/Codec.java
@@ -0,0 +1,71 @@
+/* Codec.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>
+ * Codec provides means to encode IDL data types into the byte arrays.
+ * Some parts of the CORBA message may contain such abstracted (encapsulated)
+ * byte arrays, holding arbitrary information. The encoding and decoding
+ * operations are defined separately in {@link CodecOperations}.
+ * The Codec for {@link ENCODING_CDR_ENCAPS} v 1.0 - 1.2 is required by OMG.
+ * Vendors can implement additional Codec's, driven by alternative algorithms.
+ * </p>
+ * <p>
+ * The {@link ENCODING_CDR_ENCAPS} Codec, returned by the {@link CodecFactory},
+ * is a local object. It is not possible to get its stringified reference,
+ * to send it over CDR streams or invoke the methods remotely.
+ * </p>
+ * <p>
+ * Codec is obtained from {@link CodecFactory}. CodecFactory is returned by
+ * <code>ORB.resolve_initial_references("CodecFactory")</code>.
+ * </p>
+ * @specnote The ENCODING_CDR_ENCAPS Codec is local in both Suns
+ * (at least till 1.4 inclusive) an this implementation.
+ *
+ *
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface Codec
+ extends CodecOperations, IDLEntity, org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/org/omg/IOP/CodecFactory.java b/org/omg/IOP/CodecFactory.java
new file mode 100644
index 000000000..da62b4880
--- /dev/null
+++ b/org/omg/IOP/CodecFactory.java
@@ -0,0 +1,67 @@
+/* CodecFactory.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>
+ * The CodecFactory is used to obtaind {@link Codec} for the given encoding.
+ * The obtaining operations are defined separately in
+ * {@link CodecFactoryOperations}.
+ * </p>
+ * <p>
+ * The CodecFactory is a local object. It is not possible to get its
+ * stringified reference, to send it over CDR streams or invoke the
+ * methods remotely.
+ * </p>
+ * <p>
+ * CodecFactory is returned by
+ * <code>ORB.resolve_initial_references("CodecFactory")</code>.
+ * </p>
+ *
+ * @specnote The CodecFactory is local in both Suns (up till 1.4 inclusive)
+ * an this implementation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CodecFactory
+ extends CodecFactoryOperations, IDLEntity, org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/org/omg/IOP/CodecFactoryHelper.java b/org/omg/IOP/CodecFactoryHelper.java
new file mode 100644
index 000000000..d5c55a264
--- /dev/null
+++ b/org/omg/IOP/CodecFactoryHelper.java
@@ -0,0 +1,152 @@
+/* CodecFactoryHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link CodecFactory}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class CodecFactoryHelper
+{
+ /**
+ * The cached {@link CodecFactory} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link CodecFactory}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "CodecFactory");
+ return typeCode;
+ }
+
+ /**
+ * Insert the CodecFactory into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the CodecFactory to insert.
+ */
+ public static void insert(Any any, CodecFactory that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the CodecFactory from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain CodecFactory.
+ */
+ public static CodecFactory extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the CodecFactory repository id.
+ *
+ * @return "IDL:omg.org/IOP/CodecFactory:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/CodecFactory:1.0";
+ }
+
+ /**
+ * Cast the passed object into the CodecFactory. As the CodecFactory
+ * is a local object, this is not different from the java type cast.
+ *
+ * @throws BAD_PARAM if the passed object is not a CodecFactory.
+ */
+ public static CodecFactory narrow(org.omg.CORBA.Object obj)
+ {
+ try
+ {
+ return (CodecFactory) obj;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_PARAM bad = new BAD_PARAM("CodecFactory expected");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * This should read the CodecFactory from the CDR intput stream,
+ * but this is not possible as CodecFactory is a local object.
+ *
+ * @specnote Suns implementation (1.4) throws this exception either.
+ *
+ * @throws {@link MARSHAL}, minor code 0 and incomplete, always.
+ */
+ public static CodecFactory read(InputStream input)
+ {
+ throw new MARSHAL(UNSUPPORTED, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ /**
+ * This should write the CodecFactory from the CDR intput stream,
+ * but this is not possible as CodecFactory is a local object.
+ *
+ * @specnote Suns implementation (1.4) throws this exception either.
+ *
+ * @throws {@link MARSHAL}, minor code 0 and incomplete, always.
+ */
+ public static void write(OutputStream output, CodecFactory value)
+ {
+ throw new MARSHAL(UNSUPPORTED, 0, CompletionStatus.COMPLETED_NO);
+ }
+
+ private static String UNSUPPORTED =
+ "The operation is unsupported for CodecFactory because it is a local object";
+} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/uncObjectOutputStream.java b/org/omg/IOP/CodecFactoryOperations.java
index 3aa8582bb..a2b87d557 100644
--- a/gnu/CORBA/CDR/uncObjectOutputStream.java
+++ b/org/omg/IOP/CodecFactoryOperations.java
@@ -1,4 +1,4 @@
-/* uncObjectOutputStream.java --
+/* CodecFactoryOperations.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -36,38 +36,28 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.CORBA.CDR;
+package org.omg.IOP;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
+import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;
/**
- * The Uncloseable Object Output Stream is used in cases when
- * it is necessary to write the data and leave the stream opened.
+ * Defines the operations, applicable to
+ * the CodecFactory.
*
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class uncObjectOutputStream
- extends ObjectOutputStream
+public interface CodecFactoryOperations
{
/**
- * Delegate call to super class constructor.
- */
- public uncObjectOutputStream(OutputStream out)
- throws IOException
- {
- super(out);
- }
-
- /**
- * Do not close, just flush.
+ * Create Codec for the given encoding.
+ *
+ * @param for_encoding the encoding, for that the codec must be created.
+ *
+ * @return the appropriate Codec.
*
- * @throws IOException if the flush() throws it.
+ * @throws UnknownEncoding if there are not Codec that would support the
+ * required encoding.
*/
- public void close()
- throws IOException
- {
- flush();
- }
+ Codec create_codec(Encoding for_encoding)
+ throws UnknownEncoding;
} \ No newline at end of file
diff --git a/org/omg/IOP/CodecOperations.java b/org/omg/IOP/CodecOperations.java
new file mode 100644
index 000000000..3dfae1207
--- /dev/null
+++ b/org/omg/IOP/CodecOperations.java
@@ -0,0 +1,126 @@
+/* CodecOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.TypeCode;
+import org.omg.IOP.CodecPackage.FormatMismatch;
+import org.omg.IOP.CodecPackage.InvalidTypeForEncoding;
+import org.omg.IOP.CodecPackage.TypeMismatch;
+
+/**
+ * Defines the operations, applicable to
+ * the Codec.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CodecOperations
+{
+ /**
+ * Encode the value, stored inside the given {@link Any}, into array of
+ * bytes. The returned byte array contains the data structure typecode,
+ * followed by the data structure itself.
+ *
+ * @param that the {@link Any}, containing the data structure, required to
+ * encode.
+ *
+ * @return the array of bytes, containing the encoded data structure.
+ *
+ * @throws InvalidTypeForEncoding if the data structure is not supported
+ * by this {@link Codec} (wide char and wide string are not supported
+ * by ENCODING_CDR_ENCAPS v 1.0).
+ *
+ * @see decode(byte[])
+ */
+ byte[] encode(Any that)
+ throws InvalidTypeForEncoding;
+
+ /**
+ * Decode the given array of bytes and return the decoded value, inserted
+ * into {@link Any}. This methods expects that the byte array contains
+ * the CDR-encoded data structure {@link TypeCode}, followed by the data
+ * structure itself.
+ *
+ * @param them an array of bytes to decode.
+ * @return the {@link Any}, containing the decoded structure. The structure
+ * can be extracted from the Any with the appropriate helper.
+ *
+ * @throws FormatMismatch on the invalid structure of the byte array.
+ *
+ * @see encode(Any)
+ */
+ Any decode(byte[] them)
+ throws FormatMismatch;
+
+ /**
+ * Encode the value (without the typecode), stored in the passed {@link Any},
+ * into the given byte array.
+ *
+ * @param that_value the {@link Any}, holding the value to encode.
+ * @return the array, containing the encoded value alone (no preceeding
+ * typecode).
+ *
+ * @see decode_value(byte[], TypeCode)
+ */
+ byte[] encode_value(Any that_value)
+ throws InvalidTypeForEncoding;
+
+ /**
+ * Decode the given array of bytes, supposing that they contain the
+ * given data structure, and return the decoded value.
+ *
+ * @param them the array of bytes to decode. Should contain the data type,
+ * matching the structure, defined in the <code>type</code> parameter.
+ * Does not contain the typecode itself.
+ *
+ * @param type the typecode of the data structure, stored in the byte
+ * array.
+ *
+ * @return the {@link Any}, containing the decoded structure. The
+ * structure can be extracted from the Any with the appropriate helper.
+ *
+ * @throws FormatMismatch on the invalid structure of the byte array.
+ * @throws TypeMismatch if discovered that the the byte array defines a
+ * different structure.
+ *
+ * @see encode_value(Any)
+ */
+ Any decode_value(byte[] them, TypeCode type)
+ throws FormatMismatch, TypeMismatch;
+} \ No newline at end of file
diff --git a/org/omg/IOP/ComponentIdHelper.java b/org/omg/IOP/ComponentIdHelper.java
new file mode 100644
index 000000000..64fbdfd74
--- /dev/null
+++ b/org/omg/IOP/ComponentIdHelper.java
@@ -0,0 +1,122 @@
+/* ComponentIdHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for th Component id. A Component Id is an integer
+* constant and needs no helper, but the one is included to
+* to facilitate the automated code handling.
+*
+* @specnote In this implementation, this class is not in use. Its "logical"
+* place is the read/write methods of the TaggedComponentHelper, to handle the
+* first member (int) of the record of the Tagged Component.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ComponentIdHelper
+{
+ /**
+ * Create the ComponentId typecode (alias of CORBA ulong, named "ComponentId".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0", "ComponentId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_ulong(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_ulong();
+ }
+
+ /**
+ * Get the int repository id.
+ *
+ * @return "IDL:omg.org/IOP/ComponentId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ComponentId:1.0";
+ }
+
+ /**
+ * Read the ComponentId from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_ulong();
+ }
+
+ /**
+ * Write the ComponentId to the CDR output stream (as int).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_ulong(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/ENCODING_CDR_ENCAPS.java b/org/omg/IOP/ENCODING_CDR_ENCAPS.java
new file mode 100644
index 000000000..49cfe5d4c
--- /dev/null
+++ b/org/omg/IOP/ENCODING_CDR_ENCAPS.java
@@ -0,0 +1,58 @@
+/* ENCODING_CDR_ENCAPS.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+ /**
+ * <p>
+ * Holds an integer identifier of the ENCODING_CDR_ENCAPS encoding.
+ * This is the only encoding, required by OMG specification.
+ * </p><p>
+ * Apart the encoding format integer identifier, the encoding record
+ * contains the GIOP version number.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ENCODING_CDR_ENCAPS
+{
+ /**
+ * Specifies the ENCODING_CDR_ENCAPS encoding, value 0.
+ */
+ short value = 0;
+}
diff --git a/org/omg/IOP/Encoding.java b/org/omg/IOP/Encoding.java
new file mode 100644
index 000000000..5b36f646f
--- /dev/null
+++ b/org/omg/IOP/Encoding.java
@@ -0,0 +1,98 @@
+/* Encoding.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Defines the encoding format of the {@link Codec}, including the major
+ * and minor version numbers. The only currently supported encodings are
+ * ENCODING_CDR_ENCAPS versions 1.1 - 1.2. Vendors can implement additional
+ * encodings.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class Encoding
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1489257079856841992L;
+
+ /**
+ * The format of encoding. For instance, {@link ENCODING_CDR_ENCAPS#value}.
+ */
+ public short format;
+
+ /**
+ * The major version number of this encoding format.
+ */
+ public byte major_version;
+
+ /**
+ * The minor version number of this encoding format.
+ */
+ public byte minor_version;
+
+ /**
+ * Create the unitialised instance.
+ */
+ public Encoding()
+ {
+ }
+
+ /**
+ * Create the instance, initialising field to the passed values.
+ *
+ * @param _format the format of encoding, like
+ * {@link ENCODING_CDR_ENCAPS#value}.
+ *
+ * @param _major_version the major format version.
+ * @param _minor_version the minor format version.
+ */
+ public Encoding(short _format, byte _major_version, byte _minor_version)
+ {
+ format = _format;
+ major_version = _major_version;
+ minor_version = _minor_version;
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/IOR.java b/org/omg/IOP/IOR.java
new file mode 100644
index 000000000..7ff6dc1eb
--- /dev/null
+++ b/org/omg/IOP/IOR.java
@@ -0,0 +1,112 @@
+/* IOR.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * The object IOR contains sufficient information for finding local or
+ * remote CORBA object. It also contains additional data like the object
+ * native and supported char sets, URLs to download the required additional
+ * java classes and so on. IOR can define multiple alternative addresses
+ * for the same object or indicate that the object is equal to null.
+ * </p><p>
+ * The IOR is a standard structure, transferred when sending an object with
+ * {@link org.omg.CORBA.portable.OutputStream#write_Object} and receiving with
+ * {@link org.omg.CORBA.portable.InputStream#read_Object}. The stringified
+ * object references, managed by {@link org.omg.CORBA.ORB#string_to_object}
+ * and {@link org.omg.CORBA.ORB#object_to_string} are also IORs, where the
+ * initially binary data are encoded as strings using hexadecimal notation.
+ * </p><p>
+ * The IOR is represented as the object repository id, followed
+ * by the sequence of the abstract profiles, each having the integer type
+ * identifier and the followed array of binary data. The empty sequence of
+ * profiles represents a null object, written, for instance, in response
+ * to the call of write_Object(null).
+ *
+ * @specnote GNU Classpath has its own implementation of IOR machinery at
+ * gnu.CORBA.IOR. The reason is that IORs are required from 1.2, but only
+ * in 1.4 the associated classes appear in the public API.
+ */
+public class IOR
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 1901439890645554948L;
+
+ /**
+ * The profiles, associated with this IOR reference. The possible
+ * profiles are listed in {@link TaggedProfile} description.
+ */
+ public TaggedProfile[] profiles;
+
+ /**
+ * The object repository Id.
+ */
+ public String type_id;
+
+ /**
+ * Create an unitialised instance of IOR profile.
+ *
+ * @specnote The profile will be intialised to the IOR, representing
+ * a null object.
+ */
+ public IOR()
+ {
+ type_id = "";
+ profiles = new TaggedProfile[ 0 ];
+ }
+
+ /**
+ * Create the IOR, initialised with the passed data.
+ *
+ * @param _type_id the repository id for this IOR object.
+ * @param _profiles the array of profiles for this IOR.
+ */
+ public IOR(String _type_id, TaggedProfile[] _profiles)
+ {
+ type_id = _type_id;
+ profiles = _profiles;
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/IORHelper.java b/org/omg/IOP/IORHelper.java
new file mode 100644
index 000000000..5945bb75a
--- /dev/null
+++ b/org/omg/IOP/IORHelper.java
@@ -0,0 +1,163 @@
+/* IORHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the structure {@link IOR}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class IORHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the IOR typecode (structure,
+ * named "IOR").
+ * The typecode states that the structure contains the
+ * following fields: type_id, profiles.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode field;
+
+ field = orb.get_primitive_tc(TCKind.tk_string);
+ members [ 0 ] = new StructMember("type_id", field, null);
+
+ field = orb.create_sequence_tc(0, TaggedProfileHelper.type());
+ members [ 1 ] = new StructMember("profiles", field, null);
+ typeCode = orb.create_struct_tc(id(), "IOR", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the IOR into the given Any.
+ * This method uses the IORHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the IOR to insert.
+ */
+ public static void insert(Any any, IOR that)
+ {
+ any.insert_Streamable(new IORHolder(that));
+ }
+
+ /**
+ * Extract the IOR from given Any.
+ * This method uses the IORHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain IOR.
+ */
+ public static IOR extract(Any any)
+ {
+ try
+ {
+ return ((IORHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("IOR expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the IOR repository id.
+ *
+ * @return "IDL:omg.org/IOP/IOR:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/IOR:1.0";
+ }
+
+ /**
+ * Read the structure from the CDR intput stream. Expects repository
+ * it, then number of the tagged profiles and then the tagged profiles.
+ * Does not expect the endian indicator, present in the beginning of the
+ * stringified IOR references.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static IOR read(InputStream input)
+ {
+ IOR value = new IOR();
+ value.type_id = input.read_string();
+ value.profiles = new TaggedProfile[ input.read_long() ];
+ for (int i0 = 0; i0 < value.profiles.length; i0++)
+ value.profiles [ i0 ] = TaggedProfileHelper.read(input);
+ return value;
+ }
+
+ /**
+ * Write the structure to the CDR output stream. Writes
+ * Expects repository it, then number of the tagged profiles and then
+ * the tagged profiles. Will not write the endian indicator, present
+ * in the beginning of the stringified IOR references.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, IOR value)
+ {
+ output.write_string(value.type_id);
+ output.write_long(value.profiles.length);
+ for (int i0 = 0; i0 < value.profiles.length; i0++)
+ TaggedProfileHelper.write(output, value.profiles [ i0 ]);
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/IORHolder.java b/org/omg/IOP/IORHolder.java
new file mode 100644
index 000000000..cdf0d74d5
--- /dev/null
+++ b/org/omg/IOP/IORHolder.java
@@ -0,0 +1,103 @@
+/* IORHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the {@link IOR}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class IORHolder
+ implements Streamable
+{
+ /**
+ * The stored IOR value.
+ */
+ public IOR value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public IORHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public IORHolder(IOR initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = IORHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ IORHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the IOR.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return IORHelper.type();
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/MultipleComponentProfileHelper.java b/org/omg/IOP/MultipleComponentProfileHelper.java
new file mode 100644
index 000000000..bc26068c9
--- /dev/null
+++ b/org/omg/IOP/MultipleComponentProfileHelper.java
@@ -0,0 +1,144 @@
+/* MultipleComponentProfileHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Any;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.BAD_OPERATION;
+
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.InputStream;
+
+ /**
+ * A helper operations for the array of {@link TaggedComponent}
+ * ({@link MultipleComponentProfile}).
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class MultipleComponentProfileHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ typeCode = orb.create_sequence_tc(0, TaggedComponentHelper.type());
+ }
+ return typeCode;
+ }
+ /**
+ * Insert the MultipleComponentProfile into the given Any.
+ * This method uses the MultipleComponentProfileHolder.
+ *
+ * @param any the Any to insert into.
+ * @param those the TaggedComponent[] to insert.
+ */
+ public static void insert(Any any, TaggedComponent[] those)
+ {
+ any.insert_Streamable(new MultipleComponentProfileHolder(those));
+ }
+
+ /**
+ * Extract the MultipleComponentProfile from given Any.
+ * This method uses the MultipleComponentProfileHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain MultipleComponentProfile.
+ */
+ public static TaggedComponent[] extract(Any any)
+ {
+ try
+ {
+ return ((MultipleComponentProfileHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("MultipleComponentProfile expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the MultipleComponentProfile repository id.
+ *
+ * @return "IDL:omg.org/IOP/MultipleComponentProfile:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/MultipleComponentProfile:1.0";
+ }
+
+ /**
+ * Read the sequence from the CDR intput stream.
+ * Expects the array size (as CORBA long), followed by
+ * the array members (if any).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static TaggedComponent[] read(InputStream input)
+ {
+ TaggedComponent[] value;
+ value = new TaggedComponent[ input.read_long() ];
+ for (int i0 = 0; i0 < value.length; i0++)
+ value[i0] = TaggedComponentHelper.read(input);
+ return value;
+ }
+
+ /**
+ * Write the structure to the CDR output stream.
+ * Writes the array size (as CORBA long), followed by
+ * the array members (if any).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value an array to write.
+ */
+ public static void write(OutputStream output, TaggedComponent[] value)
+ {
+ output.write_long(value.length);
+ for (int i0 = 0; i0 < value.length; i0++)
+ TaggedComponentHelper.write(output, value[i0]);
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/MultipleComponentProfileHolder.java b/org/omg/IOP/MultipleComponentProfileHolder.java
new file mode 100644
index 000000000..ee9652282
--- /dev/null
+++ b/org/omg/IOP/MultipleComponentProfileHolder.java
@@ -0,0 +1,105 @@
+/* MultipleComponentProfileHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+
+/**
+ * A holder for the sequence of {@link TaggedComponent}
+ * ({@link MultipleComponentProfile}).
+ *
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class MultipleComponentProfileHolder
+ implements Streamable
+{
+ /**
+ * The stored array of <code>TaggedComponent</code>.
+ */
+ public TaggedComponent[] value;
+
+ /**
+ * Create the unitialised instance, leaving the value array
+ * with default <code>null</code> value.
+ */
+ public MultipleComponentProfileHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the array that will be assigned to
+ * the <code>value</code> array.
+ */
+ public MultipleComponentProfileHolder(TaggedComponent[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Read the {@link value} array from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = MultipleComponentProfileHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ MultipleComponentProfileHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the TaggedComponent.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return MultipleComponentProfileHelper.type();
+ }
+}
diff --git a/org/omg/IOP/ProfileIdHelper.java b/org/omg/IOP/ProfileIdHelper.java
new file mode 100644
index 000000000..2e3c8f08d
--- /dev/null
+++ b/org/omg/IOP/ProfileIdHelper.java
@@ -0,0 +1,123 @@
+/* ProfileIdHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for th Profile id. A Profile Id is an integer
+* constant and needs no helper, but the one is included to
+* to facilitate the automated code handling.
+*
+* @specnote In this implementation, this class is not in use. Its "logical"
+* place is the read/write methods of the TaggedProfileHelper, to handle the
+* first member (int) of the record of the tagged profile.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ProfileIdHelper
+{
+ /**
+ * Create the ProfileId typecode (alias of CORBA ulong, named "ProfileId".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_ulong(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ * This method uses the ProfileContextHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_ulong();
+ }
+
+ /**
+ * Get the int repository id.
+ *
+ * @return "IDL:omg.org/IOP/ProfileId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ProfileId:1.0";
+ }
+
+ /**
+ * Read the ProfileId from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_ulong();
+ }
+
+ /**
+ * Write the ProfileId to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_ulong(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/ServiceContext.java b/org/omg/IOP/ServiceContext.java
new file mode 100644
index 000000000..0dcd7781e
--- /dev/null
+++ b/org/omg/IOP/ServiceContext.java
@@ -0,0 +1,95 @@
+/* ServiceContext.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * The ServiceContext structure contains the service data, being passed in the
+ * CORBA message. For instance, then passing the wide characters, it is
+ * mandatory to include the service context, defining the used encoding.
+ * The contexts are recognised by they integer indentifier.
+ * In this class, the content of the context is represented as an abstract
+ * array of bytes.
+ *
+ * @see ServiceContextHolder
+ * @see ServiceContextHelper
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ServiceContext
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2232391417465261379L;
+
+ /**
+ * The context id (for instance, 0x1 for code sets context).
+ * At the moment of writing, the OMG defines 16 standard values and
+ * provides rules to register the vendor specific context ids.
+ * The range 0-4095 is reserved for the future standard OMG contexts.
+ */
+ public int context_id;
+
+ /**
+ * The context_data.
+ */
+ public byte[] context_data;
+
+ /**
+ * Create the unitialised instance, assigning to
+ * the all fields java default values.
+ */
+ public ServiceContext()
+ {
+ }
+
+ /**
+ * Create the instance, initialising the fields to the given values.
+ */
+ public ServiceContext(int a_context_id, byte[] a_context_data)
+ {
+ this.context_id = a_context_id;
+ this.context_data = a_context_data;
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/ServiceContextHelper.java b/org/omg/IOP/ServiceContextHelper.java
new file mode 100644
index 000000000..a8224a64c
--- /dev/null
+++ b/org/omg/IOP/ServiceContextHelper.java
@@ -0,0 +1,163 @@
+/* ServiceContextHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the structure {@link ServiceContext}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServiceContextHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the ServiceContext typecode (structure,
+ * named "ServiceContext").
+ * The typecode states that the structure contains the
+ * following fields: context_id, context_data.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode field;
+
+ field =
+ orb.create_alias_tc("IDL:omg.org/IOP/ServiceId:1.0", "ServiceId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ members [ 0 ] = new StructMember("context_id", field, null);
+
+ field =
+ orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
+ members [ 1 ] = new StructMember("context_data", field, null);
+ typeCode = orb.create_struct_tc(id(), "ServiceContext", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the ServiceContext into the given Any.
+ * This method uses the ServiceContextHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServiceContext to insert.
+ */
+ public static void insert(Any any, ServiceContext that)
+ {
+ any.insert_Streamable(new ServiceContextHolder(that));
+ }
+
+ /**
+ * Extract the ServiceContext from given Any.
+ * This method uses the ServiceContextHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServiceContext.
+ */
+ public static ServiceContext extract(Any any)
+ {
+ try
+ {
+ return ((ServiceContextHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ServiceContext expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ServiceContext repository id.
+ *
+ * @return "IDL:omg.org/IOP/ServiceContext:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ServiceContext:1.0";
+ }
+
+ /**
+ * Read the context from the CDR intput stream (first id, then
+ * data as a flexible length byte sequence).
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ServiceContext read(InputStream input)
+ {
+ ServiceContext value = new ServiceContext();
+ value.context_id = input.read_long();
+ value.context_data = new byte[ input.read_long() ];
+ for (int i0 = 0; i0 < value.context_data.length; i0++)
+ value.context_data [ i0 ] = input.read_octet();
+ return value;
+ }
+
+ /**
+ * Write the context to the CDR output stream (first id, then
+ * data as a flexible length byte sequence).
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ServiceContext value)
+ {
+ output.write_long(value.context_id);
+ output.write_long(value.context_data.length);
+ for (int i0 = 0; i0 < value.context_data.length; i0++)
+ output.write_octet(value.context_data [ i0 ]);
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/ServiceContextHolder.java b/org/omg/IOP/ServiceContextHolder.java
new file mode 100644
index 000000000..28dcb3ea5
--- /dev/null
+++ b/org/omg/IOP/ServiceContextHolder.java
@@ -0,0 +1,103 @@
+/* ServiceContextHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the structure {@link ServiceContext}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ServiceContextHolder
+ implements Streamable
+{
+ /**
+ * The stored ServiceContext value.
+ */
+ public ServiceContext value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public ServiceContextHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public ServiceContextHolder(ServiceContext initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = ServiceContextHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ ServiceContextHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the ServiceContext.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return ServiceContextHelper.type();
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/ServiceContextListHelper.java b/org/omg/IOP/ServiceContextListHelper.java
new file mode 100644
index 000000000..11bbe253f
--- /dev/null
+++ b/org/omg/IOP/ServiceContextListHelper.java
@@ -0,0 +1,142 @@
+/* ServiceContextListHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link ServiceContext[]}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServiceContextListHelper
+{
+ /**
+ * The cached {@link ServiceContext[]} typecode, computed once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Get the type code of the {@link ServiceContext[]}.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ typeCode = ORB.init().create_interface_tc(id(), "ServiceContextList");
+ return typeCode;
+ }
+
+ /**
+ * Insert the ServiceContext[] into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServiceContext[] to insert.
+ */
+ public static void insert(Any any, ServiceContext[] that)
+ {
+ any.insert_Streamable(new ServiceContextListHolder(that));
+ }
+
+ /**
+ * Extract the ServiceContext[] from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServiceContext[].
+ */
+ public static ServiceContext[] extract(Any any)
+ {
+ try
+ {
+ ServiceContextListHolder holder =
+ (ServiceContextListHolder) any.extract_Streamable();
+ return holder.value;
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_OPERATION("ServiceContext[] expected.");
+ }
+ }
+
+ /**
+ * Get the ServiceContext[] repository id.
+ *
+ * @return "IDL:omg.org/IOP/ServiceContextList:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ServiceContextList:1.0";
+ }
+
+ /**
+ * Read the ServiceContext[] from the CDR intput stream as a flexible lenth
+ * sequence.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ServiceContext[] read(InputStream input)
+ {
+ ServiceContext[] value = new ServiceContext[ input.read_long() ];
+ for (int i = 0; i < value.length; i++)
+ {
+ value [ i ] = ServiceContextHelper.read(input);
+ }
+ return value;
+ }
+
+ /**
+ * Write the ServiceContext[] to the CDR output stream as a flexible length
+ * sequence.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ServiceContext[] value)
+ {
+ output.write_long(value.length);
+ for (int i = 0; i < value.length; i++)
+ {
+ ServiceContextHelper.write(output, value [ i ]);
+ }
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/ServiceContextListHolder.java b/org/omg/IOP/ServiceContextListHolder.java
new file mode 100644
index 000000000..2a186101d
--- /dev/null
+++ b/org/omg/IOP/ServiceContextListHolder.java
@@ -0,0 +1,103 @@
+/* ServiceContextListHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the sequence of the {@link ServiceContext}s.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ServiceContextListHolder
+ implements Streamable
+{
+ /**
+ * The stored ServiceContext[] value.
+ */
+ public ServiceContext[] value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public ServiceContextListHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public ServiceContextListHolder(ServiceContext[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = ServiceContextListHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ ServiceContextListHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the ServiceContext[].
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return ServiceContextListHelper.type();
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/ServiceIdHelper.java b/org/omg/IOP/ServiceIdHelper.java
new file mode 100644
index 000000000..fac0746a8
--- /dev/null
+++ b/org/omg/IOP/ServiceIdHelper.java
@@ -0,0 +1,123 @@
+/* ServiceIdHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for a context service id. A service Id is an integer
+* constant and needs no helper, but the one is included to
+* to facilitate the automated code handling.
+*
+* @specnote In this implementation, this class is not in use. Its "logical"
+* place is the read/write methods of the ServiceContextHelper, to handle the
+* first member (int) of the context record.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServiceIdHelper
+{
+ /**
+ * Create the ServiceId typecode (alias of CORBA ulong, named "ServiceId".
+ */
+ public static TypeCode type()
+ {
+ ORB orb = ORB.init();
+ return orb.create_alias_tc("IDL:omg.org/IOP/ServiceId:1.0", "ServiceId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ }
+
+ /**
+ * Insert the int into the given Any.
+ */
+ public static void insert(Any any, int that)
+ {
+ any.insert_ulong(that);
+ }
+
+ /**
+ * Extract the int from given Any.
+ * This method uses the ServiceContextHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain int.
+ */
+ public static int extract(Any any)
+ {
+ return any.extract_ulong();
+ }
+
+ /**
+ * Get the int repository id.
+ *
+ * @return "IDL:omg.org/IOP/ServiceId:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/ServiceId:1.0";
+ }
+
+ /**
+ * Read the ServiceId from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static int read(InputStream input)
+ {
+ return input.read_ulong();
+ }
+
+ /**
+ * Write the ServiceId to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, int value)
+ {
+ output.write_ulong(value);
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java b/org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java
new file mode 100644
index 000000000..13cb1c689
--- /dev/null
+++ b/org/omg/IOP/TAG_ALTERNATE_IIOP_ADDRESS.java
@@ -0,0 +1,59 @@
+/* TAG_ALTERNATE_IIOP_ADDRESS.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+ /**
+ * Holds an integer constant of the TAG_ALTERNATE_IIOP_ADDRESS Component that
+ * may occur zero or more times in the Internet of Multiple components profile.
+ * The tag contains the possible alternative address (host and port) of
+ * the object being defined by IOR profile.
+ * This tag is supported since GIOP 1.2.
+ *
+ * @see TAG_INTERNET_IOP
+ * @see TAG_MULTIPLE_COMPONENTS
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_ALTERNATE_IIOP_ADDRESS
+{
+ /**
+ * Specifies the TAG_ALTERNATE_IIOP_ADDRESS value, 3.
+ */
+ int value = 3;
+}
diff --git a/org/omg/IOP/TAG_CODE_SETS.java b/org/omg/IOP/TAG_CODE_SETS.java
new file mode 100644
index 000000000..cc7752483
--- /dev/null
+++ b/org/omg/IOP/TAG_CODE_SETS.java
@@ -0,0 +1,69 @@
+/* TAG_CODE_SETS.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+ /**
+ * <p>
+ * Holds the integer identifier of the code sets profile. The code sets
+ * profile provides information about the native and supported encodings
+ * for the "narrow" (usually 8 bit) and "wide" (usually 16 bit) characters.
+ * In Gnu Classpath implementation the class, responsible for providing
+ * this information is {@link gnu.CORBA.CharSets_OSF}.
+ * </p>
+ * <p>
+ * If this profile is missing, it is assumed, that the "narrow" characters
+ * are encoded in ISO 8859-1. However there is no default encoding for the
+ * "wide" characters, and, if this profile is missing, the INV_OBJREF
+ * minor code 1 is thrown.
+ * </p>
+ * <p>
+ * The "narrow" characters are used in char and string.
+ * The "wide" characters are used in wchar and wstring and are not
+ * supported by GIOP 1.0.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_CODE_SETS
+{
+ /**
+ * Specifies the TAG_CODE_SETS value, 1.
+ */
+ int value = 1;
+}
diff --git a/org/omg/IOP/TAG_INTERNET_IOP.java b/org/omg/IOP/TAG_INTERNET_IOP.java
new file mode 100644
index 000000000..59eed9d9f
--- /dev/null
+++ b/org/omg/IOP/TAG_INTERNET_IOP.java
@@ -0,0 +1,55 @@
+/* TAG_INTERNET_IOP.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+ /**
+ * Holds the integer identifier of the internet profile. The internet
+ * profile contains (in the given order) a supported GIOP
+ * version, an address of the remote host, a port of the remote host
+ * and an object key as the byte array.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_INTERNET_IOP
+{
+ /**
+ * Specifies the TAG_INTERNET_IOP value, 0.
+ */
+ int value = 0;
+}
diff --git a/org/omg/IOP/TAG_JAVA_CODEBASE.java b/org/omg/IOP/TAG_JAVA_CODEBASE.java
new file mode 100644
index 000000000..df5a171fa
--- /dev/null
+++ b/org/omg/IOP/TAG_JAVA_CODEBASE.java
@@ -0,0 +1,59 @@
+/* TAG_JAVA_CODEBASE.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+ /**
+ * <p>
+ * Holds an integer identifier of the TAG_JAVA_CODEBASE profile. This profile
+ * provides a space separated list of URLs, from where the required
+ * stubs and ties can be downloaded.
+ * </p><p>
+ * The this IOR profile component is used to provide the code source for
+ * stubs and ties. The code source for values and value helpers is
+ * transmitted when transferring the value itself.
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_JAVA_CODEBASE
+{
+ /**
+ * Specifies the TAG_JAVA_CODEBASE value, 25.
+ */
+ int value = 25;
+}
diff --git a/org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java b/org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java
new file mode 100644
index 000000000..5cb3cc007
--- /dev/null
+++ b/org/omg/IOP/TAG_MULTIPLE_COMPONENTS.java
@@ -0,0 +1,52 @@
+/* TAG_MULTIPLE_COMPONENTS.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+ /**
+ * Holds the integer identifier of the multiple components profile.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_MULTIPLE_COMPONENTS
+{
+ /**
+ * Specifies the TAG_MULTIPLE_COMPONENTS value, 1.
+ */
+ int value = 1;
+}
diff --git a/org/omg/IOP/TAG_ORB_TYPE.java b/org/omg/IOP/TAG_ORB_TYPE.java
new file mode 100644
index 000000000..2fe7714f3
--- /dev/null
+++ b/org/omg/IOP/TAG_ORB_TYPE.java
@@ -0,0 +1,67 @@
+/* TAG_ORB_TYPE.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+/**
+ * <p>
+ * Holds an integer constant of the TAG_ORB_TYPE Component that defines
+ * the kind or CORBA implementation of ORB the reference is comming from.
+ * This information may be useful to work around problems with that
+ * particular ORB, or exploit shared efficiencies. This tag contains
+ * a single unsigned long value; these values are managed by OMG group.
+ * </p><p>
+ * Anyone may register any ORB types by submitting a one-paragraph
+ * description of the ORB type to the OMG, and will receive a new ORB
+ * type ID in return. A list of all ORB type descriptions should be
+ * available on the OMG web server.
+ * </p><p>
+ * TODO Register the GNU Classpath kind of ORB. Not registered at the moment.
+ * <p>
+ * @see TAG_INTERNET_IOP
+ * @see TAG_MULTIPLE_COMPONENTS
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_ORB_TYPE
+{
+ /**
+ * Specifies the TAG_ORB_TYPE value, 0.
+ */
+ int value = 0;
+}
diff --git a/org/omg/IOP/TAG_POLICIES.java b/org/omg/IOP/TAG_POLICIES.java
new file mode 100644
index 000000000..65ccff88c
--- /dev/null
+++ b/org/omg/IOP/TAG_POLICIES.java
@@ -0,0 +1,54 @@
+/* TAG_POLICIES.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+ /**
+ * An integer identifier for the TAG_POLICIES component. This component
+ * contains the sequence of QoS (Quality of Service) policies exported
+ * with the object reference by an object adapter.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TAG_POLICIES
+{
+ /**
+ * Specifies the TAG_POLICIES value, 2.
+ */
+ int value = 2;
+}
diff --git a/org/omg/IOP/TaggedComponent.java b/org/omg/IOP/TaggedComponent.java
new file mode 100644
index 000000000..b8aa17f2d
--- /dev/null
+++ b/org/omg/IOP/TaggedComponent.java
@@ -0,0 +1,93 @@
+/* TaggedComponent.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* The tagged component in a part of the {@link TaggedProfile}.
+* The examples of the possible components inside the tag are
+* {@link TAG_CODE_SETS}, {@link TAG_ALTERNATE_IIOP_ADDRESS},
+* {@link TAG_JAVA_CODEBASE}, {@link TAG_ORB_TYPE} and {@link TAG_POLICIES}.
+* The complete list (over 20 possible components) can be found
+* in OMG specification. Some of these components occur only once
+* (in the same TaggedProfile), others can be repeated.
+*
+* @see TaggedComponentHolder
+* @see TaggedComponentHelper
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class TaggedComponent
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2084695346022761692L;
+
+ /**
+ * The integer tag identifier, for instance, TAG_CODE_SETS.value.
+ */
+ public int tag;
+
+ /**
+ * The tag component data.
+ */
+ public byte[] component_data;
+
+ /**
+ * Create the unitialised instance, assigning to
+ * the all fields java default values.
+ */
+ public TaggedComponent()
+ {
+ }
+
+ /**
+ * Create the instance, initialising the fields to the given values.
+ */
+ public TaggedComponent(int a_tag, byte[] a_component_data)
+ {
+ this.tag = a_tag;
+ this.component_data = a_component_data;
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/TaggedComponentHelper.java b/org/omg/IOP/TaggedComponentHelper.java
new file mode 100644
index 000000000..f43216542
--- /dev/null
+++ b/org/omg/IOP/TaggedComponentHelper.java
@@ -0,0 +1,167 @@
+/* TaggedComponentHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the {@link TaggedComponent}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class TaggedComponentHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the TaggedComponent typecode (structure,
+ * named "TaggedComponent").
+ * The typecode states that the structure contains the
+ * following fields: tag, component_data.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode field;
+
+ field =
+ orb.create_alias_tc("IDL:omg.org/IOP/ComponentId:1.0", "ComponentId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ members [ 0 ] = new StructMember("tag", field, null);
+
+ field =
+ orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
+ members [ 1 ] = new StructMember("component_data", field, null);
+ typeCode = orb.create_struct_tc(id(), "TaggedComponent", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the TaggedComponent into the given Any.
+ * This method uses the TaggedComponentHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the TaggedComponent to insert.
+ */
+ public static void insert(Any any, TaggedComponent that)
+ {
+ any.insert_Streamable(new TaggedComponentHolder(that));
+ }
+
+ /**
+ * Extract the TaggedComponent from given Any.
+ * This method uses the TaggedComponentHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain TaggedComponent.
+ */
+ public static TaggedComponent extract(Any any)
+ {
+ try
+ {
+ return ((TaggedComponentHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("TaggedComponent expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the TaggedComponent repository id.
+ *
+ * @return "IDL:omg.org/IOP/TaggedComponent:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/TaggedComponent:1.0";
+ }
+
+ /**
+ * Read the structure from the CDR intput stream. Expects the integer
+ * identifier of the tag, then the size of the tag data
+ * and then the specified number of bytes, representing the data
+ * of the tag.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static TaggedComponent read(InputStream input)
+ {
+ TaggedComponent value = new TaggedComponent();
+ value.tag = input.read_long();
+ value.component_data = new byte[ input.read_long() ];
+ for (int i0 = 0; i0 < value.component_data.length; i0++)
+ value.component_data [ i0 ] = input.read_octet();
+ return value;
+ }
+
+ /**
+ * Write the structure to the CDR output stream.
+ * Writes the integer identifier of the tag, then the size of the tag data
+ * and then the specified number of bytes, representing the data
+ * of the tag.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, TaggedComponent value)
+ {
+ output.write_long(value.tag);
+ output.write_long(value.component_data.length);
+ for (int i0 = 0; i0 < value.component_data.length; i0++)
+ output.write_octet(value.component_data [ i0 ]);
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/TaggedComponentHolder.java b/org/omg/IOP/TaggedComponentHolder.java
new file mode 100644
index 000000000..28df24f11
--- /dev/null
+++ b/org/omg/IOP/TaggedComponentHolder.java
@@ -0,0 +1,103 @@
+/* TaggedComponentHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+ /**
+ * A holder for the structure {@link TaggedComponent}.
+ *
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class TaggedComponentHolder
+ implements Streamable
+{
+ /**
+ * The stored TaggedComponent value.
+ */
+ public TaggedComponent value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public TaggedComponentHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public TaggedComponentHolder(TaggedComponent initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = TaggedComponentHelper .read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ TaggedComponentHelper .write(output, value);
+ }
+
+ /**
+ * Get the typecode of the TaggedComponent.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return TaggedComponentHelper. type();
+ }
+}
diff --git a/org/omg/IOP/TaggedProfile.java b/org/omg/IOP/TaggedProfile.java
new file mode 100644
index 000000000..66494fdb4
--- /dev/null
+++ b/org/omg/IOP/TaggedProfile.java
@@ -0,0 +1,110 @@
+/* TaggedProfile.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* The TaggedProfile if part of the {@link IOR}, defining a single specific
+* aspect of the object related information. The content of profile depends
+* on this information. It is represented here just as an array of
+* bytes. The OMG currently defines three types of the tagged profile:
+* <ul>
+* <li>The Internet profile, identified by {@link TAG_INTERNET_IOP},
+* supports the Internet Inter-ORB Protocol.
+* </li>
+* <li>The Multiple Components profile, identified by
+* {@link TAG_MULTIPLE_COMPONENTS}, may be used to carry various IOR
+* tagged components.
+* <li>
+* </li>
+* <li>The SCCP IOP profile (described in OMG CORBA/IN Interworking
+* specification).</li>
+* </ul>
+*
+* The tagged profile may have its internal tagged components. The examples
+* of the possible components inside the tag are {@link TAG_CODE_SETS},
+* {@link TAG_ALTERNATE_IIOP_ADDRESS}, {@link TAG_JAVA_CODEBASE},
+* {@link TAG_ORB_TYPE} and {@link TAG_POLICIES}. The complete list can only
+* be found in OMG specification. Some of them occur only once
+* (in the same TaggedProfile), others can be repeated.
+*
+* @see TaggedProfileHolder
+* @see TaggedProfileHelper
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class TaggedProfile
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -461232684387903343L;
+
+ /**
+ * The integer tag identifier, typically one of TAG_INTERNET_IOP.value or
+ * TAG_MULTIPLE_COMPONENTS.value.
+ */
+ public int tag;
+
+ /**
+ * The profile_data, represented here in the form of the array of bytes.
+ */
+ public byte[] profile_data;
+
+ /**
+ * Create the unitialised instance, assigning to
+ * the all fields java default values.
+ */
+ public TaggedProfile()
+ {
+ }
+
+ /**
+ * Create the instance, initialising the fields to the given values.
+ */
+ public TaggedProfile(int a_tag, byte[] a_profile_data)
+ {
+ tag = a_tag;
+ profile_data = a_profile_data;
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/TaggedProfileHelper.java b/org/omg/IOP/TaggedProfileHelper.java
new file mode 100644
index 000000000..0433e10cf
--- /dev/null
+++ b/org/omg/IOP/TaggedProfileHelper.java
@@ -0,0 +1,161 @@
+/* TaggedProfileHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* A helper operations for the structure {@link TaggedProfile}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class TaggedProfileHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Create the TaggedProfile typecode (structure,
+ * named "TaggedProfile").
+ * The typecode states that the structure contains the
+ * following fields: tag, profile_data.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 2 ];
+
+ TypeCode field;
+
+ field =
+ orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId",
+ orb.get_primitive_tc(TCKind.tk_ulong)
+ );
+ members [ 0 ] = new StructMember("tag", field, null);
+
+ field =
+ orb.create_sequence_tc(0, orb.get_primitive_tc(TCKind.tk_octet));
+ members [ 1 ] = new StructMember("profile_data", field, null);
+ typeCode = orb.create_struct_tc(id(), "TaggedProfile", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Insert the TaggedProfile into the given Any.
+ * This method uses the TaggedProfileHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the TaggedProfile to insert.
+ */
+ public static void insert(Any any, TaggedProfile that)
+ {
+ any.insert_Streamable(new TaggedProfileHolder(that));
+ }
+
+ /**
+ * Extract the TaggedProfile from given Any.
+ * This method uses the TaggedProfileHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain TaggedProfile.
+ */
+ public static TaggedProfile extract(Any any)
+ {
+ try
+ {
+ return ((TaggedProfileHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("TaggedProfile expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the TaggedProfile repository id.
+ *
+ * @return "IDL:omg.org/IOP/TaggedProfile:1.0", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/IOP/TaggedProfile:1.0";
+ }
+
+ /**
+ * Read the structure from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static TaggedProfile read(InputStream input)
+ {
+ TaggedProfile value = new TaggedProfile();
+ value.tag = input.read_long();
+ value.profile_data = new byte[ input.read_long() ];
+ for (int i0 = 0; i0 < value.profile_data.length; i0++)
+ value.profile_data [ i0 ] = input.read_octet();
+ return value;
+ }
+
+ /**
+ * Write the structure to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, TaggedProfile value)
+ {
+ output.write_long(value.tag);
+ output.write_long(value.profile_data.length);
+ for (int i0 = 0; i0 < value.profile_data.length; i0++)
+ output.write_octet(value.profile_data [ i0 ]);
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/TaggedProfileHolder.java b/org/omg/IOP/TaggedProfileHolder.java
new file mode 100644
index 000000000..7edb1d46b
--- /dev/null
+++ b/org/omg/IOP/TaggedProfileHolder.java
@@ -0,0 +1,103 @@
+/* TaggedProfileHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+* A holder for the structure {@link TaggedProfile}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class TaggedProfileHolder
+ implements Streamable
+{
+ /**
+ * The stored TaggedProfile value.
+ */
+ public TaggedProfile value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public TaggedProfileHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public TaggedProfileHolder(TaggedProfile initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = TaggedProfileHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ TaggedProfileHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the TaggedProfile.
+ */
+ public org.omg.CORBA.TypeCode _type()
+ {
+ return TaggedProfileHelper.type();
+ }
+} \ No newline at end of file
diff --git a/org/omg/IOP/TransactionService.java b/org/omg/IOP/TransactionService.java
new file mode 100644
index 000000000..2d987316c
--- /dev/null
+++ b/org/omg/IOP/TransactionService.java
@@ -0,0 +1,56 @@
+/* TransactionService.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.IOP;
+
+
+/**
+* Holds the integer identifier of the TransactionService context.
+* The content of that data structure is defined by OMG as
+* CosTransactions::PropogationContext in the Object Transaction
+* Service specification (formal/00-06-28).
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface TransactionService
+{
+ /**
+ * Specifies the TransactionService value, 0.
+ */
+ int value = 0;
+} \ No newline at end of file
diff --git a/org/omg/Messaging/SYNC_WITH_TRANSPORT.java b/org/omg/Messaging/SYNC_WITH_TRANSPORT.java
index 6a4c6150e..0c31480b3 100644
--- a/org/omg/Messaging/SYNC_WITH_TRANSPORT.java
+++ b/org/omg/Messaging/SYNC_WITH_TRANSPORT.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/Messaging/SyncScopeHelper.java b/org/omg/Messaging/SyncScopeHelper.java
index 2916d07ed..7d8b412fe 100644
--- a/org/omg/Messaging/SyncScopeHelper.java
+++ b/org/omg/Messaging/SyncScopeHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -65,7 +65,7 @@ public class SyncScopeHelper
/**
* Delegates call to {@link Any.extract_short()}.
*/
- static short extract(Any a)
+ public static short extract(Any a)
{
return a.extract_short();
}
@@ -75,7 +75,7 @@ public class SyncScopeHelper
*
* @return "IDL:omg.org/Messaging/SyncScope:1.0", always.
*/
- static String id()
+ public static String id()
{
return "IDL:omg.org/Messaging/SyncScope:1.0";
}
@@ -83,7 +83,7 @@ public class SyncScopeHelper
/**
* Delegates call to {@link Any.insert_short(short)}.
*/
- static void insert(Any a, short that)
+ public static void insert(Any a, short that)
{
a.insert_short(that);
}
@@ -91,7 +91,7 @@ public class SyncScopeHelper
/**
* Delegates call to {@link InputStream.read_short()}.
*/
- static short read(InputStream istream)
+ public static short read(InputStream istream)
{
return istream.read_short();
}
@@ -102,7 +102,7 @@ public class SyncScopeHelper
*
* @return a typecode of synchronization scope.
*/
- static TypeCode type()
+ public static TypeCode type()
{
recordTypeCode r = new recordTypeCode(TCKind.tk_alias);
r.setName("SyncScope");
@@ -114,7 +114,7 @@ public class SyncScopeHelper
/**
* Delegates call to {@link OutputStream.write_short()}.
*/
- static void write(OutputStream ostream, short value)
+ public static void write(OutputStream ostream, short value)
{
ostream.write_short(value);
}
diff --git a/org/omg/Messaging/package.html b/org/omg/Messaging/package.html
index 423b9511c..925f68469 100644
--- a/org/omg/Messaging/package.html
+++ b/org/omg/Messaging/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/org/omg/PortableInterceptor/LOCATION_FORWARD.java b/org/omg/PortableInterceptor/LOCATION_FORWARD.java
new file mode 100644
index 000000000..2a84125db
--- /dev/null
+++ b/org/omg/PortableInterceptor/LOCATION_FORWARD.java
@@ -0,0 +1,53 @@
+/* LOCATION_FORWARD.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+ /**
+ * A reply status flag, indicating, that the object has
+ * moved (temporary or permanently) to another location.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LOCATION_FORWARD
+{
+ /**
+ * Specifies the LOCATION_FORWARD value, 3.
+ */
+ short value = 3;
+}
diff --git a/org/omg/PortableInterceptor/SUCCESSFUL.java b/org/omg/PortableInterceptor/SUCCESSFUL.java
new file mode 100644
index 000000000..15cc32fbd
--- /dev/null
+++ b/org/omg/PortableInterceptor/SUCCESSFUL.java
@@ -0,0 +1,53 @@
+/* SUCCESSFUL.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+/**
+ * A reply status flag, indicating, that the remote method
+ * has been called and returned without exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface SUCCESSFUL
+{
+ /**
+ * Specifies the SUCCESSFUL value, 0.
+ */
+ short value = 0;
+}
diff --git a/org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java b/org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java
new file mode 100644
index 000000000..a62ade9b1
--- /dev/null
+++ b/org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java
@@ -0,0 +1,54 @@
+/* SYSTEM_EXCEPTION.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+/**
+ * A reply status flag, indicating, that the
+ * {@link org.omg.CORBA.SystemException}
+ * has been thrown while calling or from inside the remote method.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface SYSTEM_EXCEPTION
+{
+ /**
+ * Specifies the SYSTEM_EXCEPTION value, 1.
+ */
+ short value = 1;
+}
diff --git a/org/omg/PortableInterceptor/TRANSPORT_RETRY.java b/org/omg/PortableInterceptor/TRANSPORT_RETRY.java
new file mode 100644
index 000000000..adc60da19
--- /dev/null
+++ b/org/omg/PortableInterceptor/TRANSPORT_RETRY.java
@@ -0,0 +1,54 @@
+/* TRANSPORT_RETRY.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+ /**
+ * A reply status, indicating the necessity of the transport retry.
+ * This may happen, for example, if the GIOP message status flag
+ * is equal to NEEDS_ADDRESSING_MODE.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface TRANSPORT_RETRY
+{
+ /**
+ * Specifies the TRANSPORT_RETRY value, 4.
+ */
+ short value = 4;
+}
diff --git a/org/omg/PortableInterceptor/USER_EXCEPTION.java b/org/omg/PortableInterceptor/USER_EXCEPTION.java
new file mode 100644
index 000000000..e55793814
--- /dev/null
+++ b/org/omg/PortableInterceptor/USER_EXCEPTION.java
@@ -0,0 +1,54 @@
+/* USER_EXCEPTION.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableInterceptor;
+
+/**
+ * A reply status flag, indicating, that the
+ * {@link org.omg.CORBA.UserException}
+ * has been thrown from inside the remote method.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface USER_EXCEPTION
+{
+ /**
+ * Specifies the USER_EXCEPTION value, 2.
+ */
+ short value = 2;
+}
diff --git a/org/omg/PortableServer/AdapterActivator.java b/org/omg/PortableServer/AdapterActivator.java
new file mode 100644
index 000000000..9898c437a
--- /dev/null
+++ b/org/omg/PortableServer/AdapterActivator.java
@@ -0,0 +1,62 @@
+/* AdapterActivator.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Adapter activators are associated with POAs and supply the
+ * the ability to create child POAs on demand. The new POA can be created
+ * <ul>
+ * <li>As a side-effect of receiving a request that names the child POA
+ * (or one of its children).</li>
+ * <li>When calling
+ * {@link POAOperations}.find_POA(name, true) if the parameter
+ * <code>name</code> refers a non existing POA.
+ * </li></ul>
+ * An AdapterActivator is always a local object.
+ *
+ * @see AdapterActivatorOperations#unknown_adapter
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface AdapterActivator
+ extends AdapterActivatorOperations, IDLEntity, org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/AdapterActivatorOperations.java b/org/omg/PortableServer/AdapterActivatorOperations.java
new file mode 100644
index 000000000..dcf7edd04
--- /dev/null
+++ b/org/omg/PortableServer/AdapterActivatorOperations.java
@@ -0,0 +1,66 @@
+/* AdapterActivatorOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+
+/**
+ * Defines the operations, applicable to the AdapterActivator.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface AdapterActivatorOperations
+{
+ /**
+ * This method is invoked when the ORB receives a request for an object
+ * reference that identifies a non-existing target POA, to create it.
+ * The ORB invokes this operation once for each POA that must be created
+ * in order for the target POA to exist. The process remebers creating a
+ * nested folder structure, starting from the ancestor POA closest to the
+ * root POA. The operation is invoked on the adapter activator of
+ * POA that is the parent of the POA that needs to be created.
+ *
+ * @param parent the parent POA, for that the child POA must be created.
+ * @param child_name the name of the child POA that must be created.
+ *
+ * @return true if the operation has successfully created the needed POA,
+ * false that POA cannot be created. In this case, the client will receive
+ * the remote exception ({@link OBJECT_NOT_EXIST}, minor code 2).
+ */
+ boolean unknown_adapter(POA parent, String child_name);
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/Current.java b/org/omg/PortableServer/Current.java
new file mode 100644
index 000000000..842086746
--- /dev/null
+++ b/org/omg/PortableServer/Current.java
@@ -0,0 +1,63 @@
+/* Current.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>Provides the Id of the object currently being served and POA
+ * to that this object is connected. Both Id and POA can be
+ * simpler obtained from the servant by {@link Servant#_object_id() }
+ * and {@link Servant#_poa()} that use POA Current indirectly.
+ * The operations on Current for obtaining
+ * these data are defined in {@link CurrentOperations}.
+ * </p><p>
+ * As long as the ORB reference is still available, the current information
+ * is available via {@link Current} that is returned by
+ * ORB.resolve_initial_references("POACurrent"). To support this call,
+ * the ORB maintains the thread to invocation data map for all calls that
+ * are currently being processed.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface Current
+ extends CurrentOperations, org.omg.CORBA.Current, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/CurrentHelper.java b/org/omg/PortableServer/CurrentHelper.java
new file mode 100644
index 000000000..94fb40641
--- /dev/null
+++ b/org/omg/PortableServer/CurrentHelper.java
@@ -0,0 +1,142 @@
+/* CurrentHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the
+* CORBA object {@link Current}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class CurrentHelper
+{
+ /**
+ * Get the type code of the POA Current.
+ *
+ * @return a type code of the object with POA Current id, named "Current".
+ */
+ public static TypeCode type()
+ {
+ return ORB.init().create_interface_tc(id(), "Current");
+ }
+
+ /**
+ * Insert the POA Current into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the POA Current to insert.
+ */
+ public static void insert(Any any, Current that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the POA Current from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain a POA Current.
+ */
+ public static Current extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the POA Current repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/Current:2.3", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/Current:2.3";
+ }
+
+ /**
+ * Cast the passed object into the POA Current.
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ * @throws BAD_PARAM if the passed object is not a Current.
+ */
+ public static Current narrow(org.omg.CORBA.Object obj)
+ {
+ try
+ {
+ return (Current) obj;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_PARAM bad = new BAD_PARAM("Not a POA Current");
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Not supported for compatibility reasons.
+ *
+ * @specnote Not supported by Sun at least till jdk 1.4 inclusive.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public static Current read(InputStream input)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Not supported for compatibility reasons.
+ *
+ * @specnote Not supported by Sun at least till jdk 1.4 inclusive.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public static void write(OutputStream output, Current value)
+ {
+ throw new NO_IMPLEMENT();
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/CurrentOperations.java b/org/omg/PortableServer/CurrentOperations.java
new file mode 100644
index 000000000..b2f23f200
--- /dev/null
+++ b/org/omg/PortableServer/CurrentOperations.java
@@ -0,0 +1,81 @@
+/* CurrentOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.PortableServer.CurrentPackage.NoContext;
+
+/**
+ * Provides the Id of the object currently being served and POA
+ * to that this object is connected. Both Id and POA can be much
+ * simpler obtained from the servant by {@link Servant#_object_id() }
+ * and {@link Servant#_poa()} that use the CurrentOperations indirectly.
+ *
+ * As long as the ORB reference is still available, the current information
+ * is available via {@link Current} that is returned by
+ * ORB.resolve_initial_references("POACurrent"). To support this call,
+ * the ORB maintains the thread to invocation data map for all calls that
+ * are currently being processed.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface CurrentOperations
+ extends org.omg.CORBA.CurrentOperations
+{
+ /**
+ * Returns the Id of the object currently being served. The returned
+ * value is also correct if the calling code is running is several
+ * paralled threads.
+ *
+ * @return the Id of the object that is currently being served by this
+ * thread.
+ */
+ byte[] get_object_id()
+ throws NoContext;
+
+ /**
+ * Returns POA to that the object currently being served is connected.
+ * The returned value is also correct if the calling code is running is several
+ * paralled threads.
+ *
+ * @return the Id of the object that is currently being served by this
+ * thread.
+ */
+ POA get_POA()
+ throws NoContext;
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/DynamicImplementation.java b/org/omg/PortableServer/DynamicImplementation.java
new file mode 100644
index 000000000..6a333e18e
--- /dev/null
+++ b/org/omg/PortableServer/DynamicImplementation.java
@@ -0,0 +1,58 @@
+/* DynamicImplementation.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.ServerRequest;
+
+/**
+ * This class is used for servants that support calling via server request.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class DynamicImplementation
+ extends Servant
+{
+ /**
+ * Handle the invocation via passed request.
+ *
+ * @param request the data structure, used both to pass parameters
+ * and return results of the invocation.
+ */
+ public abstract void invoke(ServerRequest request);
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ForwardRequest.java b/org/omg/PortableServer/ForwardRequest.java
new file mode 100644
index 000000000..6aae9d7db
--- /dev/null
+++ b/org/omg/PortableServer/ForwardRequest.java
@@ -0,0 +1,108 @@
+/* ForwardRequest.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * This exception is raised by {@link ServantManager} to indicate that the
+ * invocation target has moved to another known location. In this case,
+ * the client will receive a redirection (LOCATION_FORWARD) message and should
+ * resend the request to the new target. The exception contains the object
+ * reference, indicating the new location.
+ * </p><p>
+ * The exception can be thrown both by servant locators and servant activators.
+ * If the exception is raised anywhere else than in the ServantManager
+ * methods, it is handled as an ordinary user excepton.
+ * </p>
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ForwardRequest
+ extends UserException
+ implements IDLEntity, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -4159318367582473975L;
+
+ /**
+ * The object reference, indicating the new location of the invocation target.
+ */
+ public org.omg.CORBA.Object forward_reference;
+
+ /**
+ * Create ForwardRequest with no explaining message and stating the
+ * new location is <code>null</code>.
+ */
+ public ForwardRequest()
+ {
+ }
+
+ /**
+ * Create the ForwardRequest with explaining message and
+ * initialising the object reference to the given value.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ * @param a_forward_reference a value for forward_reference.
+ */
+ public ForwardRequest(String why, org.omg.CORBA.Object a_forward_reference)
+ {
+ super(why);
+ this.forward_reference = a_forward_reference;
+ }
+
+ /**
+ * Create the ForwardRequest without explaining
+ * message and initialising the object reference to the given value.
+ *
+ * @param a_forward_reference a value for forward_reference.
+ */
+ public ForwardRequest(org.omg.CORBA.Object a_forward_reference)
+ {
+ this.forward_reference = a_forward_reference;
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ForwardRequestHelper.java b/org/omg/PortableServer/ForwardRequestHelper.java
new file mode 100644
index 000000000..00a142780
--- /dev/null
+++ b/org/omg/PortableServer/ForwardRequestHelper.java
@@ -0,0 +1,159 @@
+/* ForwardRequestHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import gnu.CORBA.Poa.ForwardRequestHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the exception {@link ForwardRequest}.
+ *
+ * @specnote The helper must be here and not in POA subpackage as it must
+ * be discovered by the {@link ObjectCreator} when reading this remote
+ * exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ForwardRequestHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the ForwardRequest from given Any.
+ * This method uses the ForwardRequestHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
+ */
+ public static ForwardRequest extract(Any any)
+ {
+ try
+ {
+ return ((ForwardRequestHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ForwardRequest repository id.
+ *
+ * @return "ForwardRequest", always.
+ */
+ public static String id()
+ {
+ return "ForwardRequest";
+ }
+
+ /**
+ * Insert the ForwardRequest into the given Any.
+ * This method uses the ForwardRequestHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the ForwardRequest to insert.
+ */
+ public static void insert(Any any, ForwardRequest that)
+ {
+ any.insert_Streamable(new ForwardRequestHolder(that));
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ForwardRequest read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ForwardRequest value = new ForwardRequest();
+
+ value.forward_reference = input.read_Object();
+ return value;
+ }
+
+ /**
+ * Create the ForwardRequest typecode (structure,
+ * named "ForwardRequest").
+ * The typecode states that the structure contains the
+ * following fields: forward_reference.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 1 ];
+
+ TypeCode field;
+
+ field = ObjectHelper.type();
+ members [ 0 ] = new StructMember("forward_reference", field, null);
+ typeCode = orb.create_exception_tc(id(), "ForwardRequest", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ForwardRequest value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ output.write_Object(value.forward_reference);
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java b/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java
new file mode 100644
index 000000000..a283ce6bb
--- /dev/null
+++ b/org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* ID_ASSIGNMENT_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+
+/**
+* Holds an integer {@link IdAssignmentPolicy } identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface ID_ASSIGNMENT_POLICY_ID
+{
+ /**
+ * Specifies the ID_ASSIGNMENT_POLICY_ID value, 19.
+ */
+ int value = 19;
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java b/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java
new file mode 100644
index 000000000..8518831d6
--- /dev/null
+++ b/org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* ID_UNIQUENESS_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+
+/**
+* Holds an integer {@link IdUniquenessPolicy} identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface ID_UNIQUENESS_POLICY_ID
+{
+ /**
+ * Specifies the ID_UNIQUENESS_POLICY_ID value, 18.
+ */
+ int value = 18;
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java b/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java
new file mode 100644
index 000000000..c46e79881
--- /dev/null
+++ b/org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java
@@ -0,0 +1,53 @@
+/* IMPLICIT_ACTIVATION_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+
+/**
+* Holds an integer {@link ImplicitActivationPolicy} identifier.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public interface IMPLICIT_ACTIVATION_POLICY_ID
+{
+ /**
+ * Specifies the IMPLICIT_ACTIVATION_POLICY_ID value, 20.
+ */
+ int value = 20;
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/IdAssignmentPolicy.java b/org/omg/PortableServer/IdAssignmentPolicy.java
new file mode 100644
index 000000000..cde9e11af
--- /dev/null
+++ b/org/omg/PortableServer/IdAssignmentPolicy.java
@@ -0,0 +1,58 @@
+/* IdAssignmentPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specifies the Object Id assignment policy.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link IdAssignmentPolicyOperations}.
+ *
+ * @see IdAssignmentPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IdAssignmentPolicy
+ extends Policy, IdAssignmentPolicyOperations, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/IdAssignmentPolicyOperations.java b/org/omg/PortableServer/IdAssignmentPolicyOperations.java
new file mode 100644
index 000000000..993a7804a
--- /dev/null
+++ b/org/omg/PortableServer/IdAssignmentPolicyOperations.java
@@ -0,0 +1,55 @@
+/* IdAssignmentPolicyOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the IdAssignmentPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IdAssignmentPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ IdAssignmentPolicyValue value();
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/IdAssignmentPolicyValue.java b/org/omg/PortableServer/IdAssignmentPolicyValue.java
new file mode 100644
index 000000000..2dda0ef2b
--- /dev/null
+++ b/org/omg/PortableServer/IdAssignmentPolicyValue.java
@@ -0,0 +1,153 @@
+/* IdAssignmentPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the Object Id assignment policy.
+* <ul>
+* <li>USER_ID Objects created with that POA obtain they Object Ids from the
+* application.
+* </li>
+* <li>SYSTEM_ID Objects created with that POA obtain they Object Ids from POA.
+* If the POA also has the PERSISTENT policy, these Object Ids must be
+* unique across all instantiations of the same POA.
+* </li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class IdAssignmentPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2024380631469554382L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (USER_ID).
+ */
+ public static final int _USER_ID = 0;
+
+ /**
+ * An instance of IdAssignmentPolicyValue, initialized to USER_ID.
+ */
+ public static final IdAssignmentPolicyValue USER_ID =
+ new IdAssignmentPolicyValue(_USER_ID);
+
+ /**
+ * The possible value of this enumeration (SYSTEM_ID),.
+ */
+ public static final int _SYSTEM_ID = 1;
+
+ /**
+ * An instance of IdAssignmentPolicyValue, initialized to SYSTEM_ID,
+ * indicating, that the objects created with that POA obtain they
+ * Object Ids from POA.
+ */
+ public static final IdAssignmentPolicyValue SYSTEM_ID =
+ new IdAssignmentPolicyValue(_SYSTEM_ID);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final IdAssignmentPolicyValue[] enume =
+ new IdAssignmentPolicyValue[] { USER_ID, SYSTEM_ID };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "USER_ID", "SYSTEM_ID" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected IdAssignmentPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the IdAssignmentPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _USER_ID, _SYSTEM_ID.
+ * @return one of USER_ID, SYSTEM_ID.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static IdAssignmentPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _USER_ID or _SYSTEM_ID.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/IdUniquenessPolicy.java b/org/omg/PortableServer/IdUniquenessPolicy.java
new file mode 100644
index 000000000..f78e87e0d
--- /dev/null
+++ b/org/omg/PortableServer/IdUniquenessPolicy.java
@@ -0,0 +1,57 @@
+/* IdUniquenessPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specfies the Id uniqueness policy.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link IdUniquenessPolicyOperations}.
+ *
+ * @see IdUniquenessPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IdUniquenessPolicy
+ extends Policy, IdUniquenessPolicyOperations, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/IdUniquenessPolicyOperations.java b/org/omg/PortableServer/IdUniquenessPolicyOperations.java
new file mode 100644
index 000000000..3019396b5
--- /dev/null
+++ b/org/omg/PortableServer/IdUniquenessPolicyOperations.java
@@ -0,0 +1,55 @@
+/* IdUniquenessPolicyOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the IdUniquenessPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface IdUniquenessPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ IdUniquenessPolicyValue value();
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/IdUniquenessPolicyValue.java b/org/omg/PortableServer/IdUniquenessPolicyValue.java
new file mode 100644
index 000000000..d0992d9db
--- /dev/null
+++ b/org/omg/PortableServer/IdUniquenessPolicyValue.java
@@ -0,0 +1,153 @@
+/* IdUniquenessPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the Object Id uniqueness policy.
+*
+* This enumeration can obtain the following values:
+* <ul>
+* <li>UNIQUE_ID a servant activated with that POA supports exactly one Object Id.
+* </li>
+* <li>MULTIPLE_ID a servant activated with that POA supports
+* multiple Object Ids.
+* </li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class IdUniquenessPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 2698951826884611346L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (UNIQUE_ID).
+ */
+ public static final int _UNIQUE_ID = 0;
+
+ /**
+ * Indicates that a servant activated with that POA, supports one and only
+ * one OBject Id.
+ */
+ public static final IdUniquenessPolicyValue UNIQUE_ID =
+ new IdUniquenessPolicyValue(_UNIQUE_ID);
+
+ /**
+ * The possible value of this enumeration (MULTIPLE_ID).
+ */
+ public static final int _MULTIPLE_ID = 1;
+
+ /**
+ * Indicates that a servant activated with that POA is able to support the
+ * multiple Object Ids.
+ */
+ public static final IdUniquenessPolicyValue MULTIPLE_ID =
+ new IdUniquenessPolicyValue(_MULTIPLE_ID);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final IdUniquenessPolicyValue[] enume =
+ new IdUniquenessPolicyValue[] { UNIQUE_ID, MULTIPLE_ID };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "UNIQUE_ID", "MULTIPLE_ID" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected IdUniquenessPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the IdUniquenessPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _UNIQUE_ID, _MULTIPLE_ID.
+ * @return one of UNIQUE_ID, MULTIPLE_ID.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static IdUniquenessPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _UNIQUE_ID or _MULTIPLE_ID.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ImplicitActivationPolicy.java b/org/omg/PortableServer/ImplicitActivationPolicy.java
new file mode 100644
index 000000000..c3859d203
--- /dev/null
+++ b/org/omg/PortableServer/ImplicitActivationPolicy.java
@@ -0,0 +1,57 @@
+/* ImplicitActivationPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specifies the implicit activation policy.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link ImplicitActivationPolicyOperations}.
+ *
+ * @see ImplicitActivationPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ImplicitActivationPolicy
+ extends Policy, ImplicitActivationPolicyOperations, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ImplicitActivationPolicyOperations.java b/org/omg/PortableServer/ImplicitActivationPolicyOperations.java
new file mode 100644
index 000000000..d855ec82e
--- /dev/null
+++ b/org/omg/PortableServer/ImplicitActivationPolicyOperations.java
@@ -0,0 +1,55 @@
+/* ImplicitActivationPolicyOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the ImplicitActivationPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ImplicitActivationPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ ImplicitActivationPolicyValue value();
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ImplicitActivationPolicyValue.java b/org/omg/PortableServer/ImplicitActivationPolicyValue.java
new file mode 100644
index 000000000..8d2913bf6
--- /dev/null
+++ b/org/omg/PortableServer/ImplicitActivationPolicyValue.java
@@ -0,0 +1,153 @@
+/* ImplicitActivationPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the implicit activation policy.
+*
+* This enumeration can obtain the following values:
+* <ul>
+* <li>IMPLICIT_ACTIVATION The POA supports implicit activation of servants.
+* ({@link IdAssignmentPolicyValue#SYSTEM_ID} and
+* {@link ServantRetentionPolicyValue#RETAIN} policies required).</li>
+* <li>NO_IMPLICIT_ACTIVATION The POA does not support implicit activation.</li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ImplicitActivationPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 3826572456602949295L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (IMPLICIT_ACTIVATION).
+ */
+ public static final int _IMPLICIT_ACTIVATION = 0;
+
+ /**
+ * An instance of ImplicitActivationPolicyValue, initialized to IMPLICIT_ACTIVATION.
+ */
+ public static final ImplicitActivationPolicyValue IMPLICIT_ACTIVATION =
+ new ImplicitActivationPolicyValue(_IMPLICIT_ACTIVATION);
+
+ /**
+ * The possible value of this enumeration (NO_IMPLICIT_ACTIVATION).
+ */
+ public static final int _NO_IMPLICIT_ACTIVATION = 1;
+
+ /**
+ * An instance of ImplicitActivationPolicyValue, initialized to NO_IMPLICIT_ACTIVATION.
+ */
+ public static final ImplicitActivationPolicyValue NO_IMPLICIT_ACTIVATION =
+ new ImplicitActivationPolicyValue(_NO_IMPLICIT_ACTIVATION);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final ImplicitActivationPolicyValue[] enume =
+ new ImplicitActivationPolicyValue[]
+ {
+ IMPLICIT_ACTIVATION, NO_IMPLICIT_ACTIVATION
+ };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "IMPLICIT_ACTIVATION", "NO_IMPLICIT_ACTIVATION" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected ImplicitActivationPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the ImplicitActivationPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _IMPLICIT_ACTIVATION, _NO_IMPLICIT_ACTIVATION.
+ * @return one of IMPLICIT_ACTIVATION, NO_IMPLICIT_ACTIVATION.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static ImplicitActivationPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _IMPLICIT_ACTIVATION or _NO_IMPLICIT_ACTIVATION.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/LIFESPAN_POLICY_ID.java b/org/omg/PortableServer/LIFESPAN_POLICY_ID.java
new file mode 100644
index 000000000..87b93af02
--- /dev/null
+++ b/org/omg/PortableServer/LIFESPAN_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* LIFESPAN_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+ /**
+ * Holds an integer {@link LifespanPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LIFESPAN_POLICY_ID
+{
+ /**
+ * Specifies the LIFESPAN_POLICY_ID value, 17.
+ */
+ int value = 17;
+}
diff --git a/org/omg/PortableServer/LifespanPolicy.java b/org/omg/PortableServer/LifespanPolicy.java
new file mode 100644
index 000000000..2e77bbe6f
--- /dev/null
+++ b/org/omg/PortableServer/LifespanPolicy.java
@@ -0,0 +1,58 @@
+/* LifespanPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specifies the object life span policy, if they can outlive the POA
+ * with that they were first created.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link LifespanPolicyOperations}.
+ *
+ * @see LifespanPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LifespanPolicy
+ extends Policy, LifespanPolicyOperations, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/LifespanPolicyOperations.java b/org/omg/PortableServer/LifespanPolicyOperations.java
new file mode 100644
index 000000000..20eda700e
--- /dev/null
+++ b/org/omg/PortableServer/LifespanPolicyOperations.java
@@ -0,0 +1,55 @@
+/* LifespanPolicyOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the LifespanPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface LifespanPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ LifespanPolicyValue value();
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/LifespanPolicyValue.java b/org/omg/PortableServer/LifespanPolicyValue.java
new file mode 100644
index 000000000..1e046c4e9
--- /dev/null
+++ b/org/omg/PortableServer/LifespanPolicyValue.java
@@ -0,0 +1,150 @@
+/* LifespanPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the object life span policy.
+*
+* This enumeration can obtain the following values:
+* <ul>
+* <li>TRANSIENT The objects implemented in the POA never outlive
+* the POA instance in which they are first created.</li>
+* <li>PERSISTENT The mentioned objects can outlive the process in
+* which they are first created.</li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class LifespanPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 6604562925399671611L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (TRANSIENT).
+ */
+ public static final int _TRANSIENT = 0;
+
+ /**
+ * An instance of LifespanPolicyValue, initialized to TRANSIENT.
+ */
+ public static final LifespanPolicyValue TRANSIENT =
+ new LifespanPolicyValue(_TRANSIENT);
+
+ /**
+ * The possible value of this enumeration (PERSISTENT).
+ */
+ public static final int _PERSISTENT = 1;
+
+ /**
+ * An instance of LifespanPolicyValue, initialized to PERSISTENT.
+ */
+ public static final LifespanPolicyValue PERSISTENT =
+ new LifespanPolicyValue(_PERSISTENT);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final LifespanPolicyValue[] enume =
+ new LifespanPolicyValue[] { TRANSIENT, PERSISTENT };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "TRANSIENT", "PERSISTENT" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected LifespanPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the LifespanPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _TRANSIENT, _PERSISTENT.
+ * @return one of TRANSIENT, PERSISTENT.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static LifespanPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _TRANSIENT or _PERSISTENT.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/POA.java b/org/omg/PortableServer/POA.java
new file mode 100644
index 000000000..863a12bf8
--- /dev/null
+++ b/org/omg/PortableServer/POA.java
@@ -0,0 +1,66 @@
+/* POA.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>
+ * The Portable Object Adapter (POA) provides more control on the request
+ * processing than it is possible when connecting objects directly to the
+ * ORB. For details, see the general description of the
+ * <code>org.omg.PortableServer</code> package.
+ * </p><p>
+ * The operations, supported by POA are defined
+ * separately in {@link POAOperations}. In the simpliest case, the servant
+ * implementation is connected to POA by
+ * {@link POAOperations#servant_to_reference}, the returned object being a
+ * target of remote and local invocations, despite the numerous other
+ * strategies are possible.
+ * </p>
+ *
+ * @see org.omg.CORBA.ORB.resolve_initial_references
+ * @see POAOperations.servant_to_reference
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface POA
+ extends POAOperations, IDLEntity, org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/POAHelper.java b/org/omg/PortableServer/POAHelper.java
new file mode 100644
index 000000000..2928d9f07
--- /dev/null
+++ b/org/omg/PortableServer/POAHelper.java
@@ -0,0 +1,147 @@
+/* POAHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Any;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+ * The helper operations for the CORBA object {@link POA}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class POAHelper
+{
+ /**
+ * Cast the passed object into the POA. As POA is a local object, the method
+ * just uses java type cast.
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ * @throws BAD_PARAM if the passed object is not a POA.
+ */
+ public static POA narrow(org.omg.CORBA.Object obj)
+ {
+ try
+ {
+ return (POA) obj;
+ }
+ catch (ClassCastException cex)
+ {
+ throw new BAD_PARAM(obj.getClass().getName() + " is not a POA");
+ }
+ }
+
+ /**
+ * Get the type code of the {@link POA}.
+ */
+ public static TypeCode type()
+ {
+ return ORB.init().create_interface_tc(id(), "POA");
+ }
+
+ /**
+ * Insert the POA into the given Any.
+ *
+ * @param any the Any to insert into.
+ *
+ * @param that the POA to insert.
+ */
+ public static void insert(Any any, POA that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the POA from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain POA.
+ */
+ public static POA extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the POA repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/POA:2.3", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/POA:2.3";
+ }
+
+ /**
+ * This should read POA from the CDR input stream, but, following the specs,
+ * it doesnot. The jdk 1.5 API specification defines that POA cannot be
+ * exported.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ *
+ * @specenote Sun throws the same exception.
+ *
+ * @throws MARSHAL, always.
+ */
+ public static POA read(InputStream input)
+ {
+ throw new MARSHAL("Not applicable");
+ }
+
+ /**
+ * This should read POA from the CDR input stream, but, following the specs,
+ * it doesnot. The jdk 1.5 API specification defines that POA cannot be
+ * exported.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ *
+ * @specenote Sun throws the same exception.
+ *
+ * @throws MARSHAL, always.
+ */
+ public static void write(OutputStream output, POA value)
+ {
+ throw new MARSHAL("Not applicable");
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/POAManager.java b/org/omg/PortableServer/POAManager.java
new file mode 100644
index 000000000..6d93eb31e
--- /dev/null
+++ b/org/omg/PortableServer/POAManager.java
@@ -0,0 +1,63 @@
+/* POAManager.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * <p>
+ * A POA manager is associated with one or more POAs and provides means
+ * to regulate they activity. Using manage, it is possible to force
+ * requests for those POAs to be queued or discarded or have those POAs
+ * deactivated. The manager can turn POAs to and from holding,
+ * active and discarding states, but the incative state is irreversible.
+ * </p>
+ * <p>
+ * The manager of the ORBs root POA can be obtained by resolving initial
+ * reference "RootPOAManager".
+ * </p>
+ *
+ * @see POAManagerOperations
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface POAManager
+ extends POAManagerOperations, IDLEntity, org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/POAManagerOperations.java b/org/omg/PortableServer/POAManagerOperations.java
new file mode 100644
index 000000000..90206d452
--- /dev/null
+++ b/org/omg/PortableServer/POAManagerOperations.java
@@ -0,0 +1,141 @@
+/* POAManagerOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.PortableServer.POAManagerPackage.AdapterInactive;
+import org.omg.PortableServer.POAManagerPackage.State;
+
+/**
+ * Defines the operations, applicable to the {@link POAManager}.
+ * These operations can turn the associated POAs to and from holding,
+ * active and discarding states, but the incative state is irreversible.
+ * The inactivated POAs can only be recreated after they were destroyed.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface POAManagerOperations
+{
+ /**
+ * Turns the associated POAs into active state, allowing them to receive
+ * and process requests.
+ *
+ * @throws AdapterInactive if the POAs are in the inactive state. If
+ * once inactivated, the POA cannot be activated again.
+ * This method can only be called to leave the holding or discarding state.
+ */
+ void activate()
+ throws AdapterInactive;
+
+ /**
+ * <p>
+ * Turns the asociated POAs into inactive state. The POAs in the incative
+ * state will reject new requests. A cliet, trying to invoke an
+ * object, belonging to the inactivated POA, will receive the remote exception
+ * ({@link org.omg.CORBA.OBJ_ADAPTER}, minor code 0x535503ea, incomplete).
+ * </p><p>
+ * If the POA is once inactivated, it cannot be activated again.
+ * The operation is used when the associated POAs are to be shut down.
+ * </p>
+ * <p>
+ * Some independent implementations may set the minor code of the
+ * OBJ_ADAPTER to 1, as recommended by OMG (formal/04-03-12).
+ * The interoperable systems should expect any of these two values.
+ * </p>
+ *
+ * @param etherealize_objects if true, the servant managers of the
+ * associated POAs, having RETAIN and USE_SERVANT_MANAGER policies,
+ * will receive a call of {@link ServantActivatorOperations#etherealize}.
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+ * <p>
+ *
+ * @specnote The 0x535503ea is a Sun specific minor exception code 1002,
+ * used for interoperability reasons.
+ *
+ * @throws AdapterInactive if the POAs are already in the inactive state.
+ *
+ * @see POAOperations#destroy
+ */
+ void deactivate(boolean etherealize_objects, boolean wait_for_completion)
+ throws AdapterInactive;
+
+ /**
+ * <p>
+ * Turns the associated POAs into discaring state. In this state, the POAs
+ * discard the incoming requests. This mode is used in situations when
+ * the server is flooded with requests. The client receives remote exception
+ * ({@link org.omg.CORBA.TRANSIENT}, minor code 0x535503e9, incomplete).
+ * </p><p>
+ * Some independent implementations may set the minor code of the
+ * TRANSIENT to 1, as recommended by OMG (formal/04-03-12).
+ * The interoperable systems should expect any of these two values.
+ * </p>
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+ *
+ * @specnote The 0x535503e9 is a Sun specific minor exception code 1001,
+ * used for interoperability reasons.
+ *
+ * @throws AdapterInactive if the POAs are in the inactive state.
+ */
+ void discard_requests(boolean wait_for_completion)
+ throws AdapterInactive;
+
+ /**
+ * Get the state of the POA manager.
+ */
+ State get_state();
+
+ /**
+ * Turns the associated POAs into holding state. In this state, the POAs
+ * queue incoming requests but do not process them.
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+
+ * @throws AdapterInactive if the POAs are in the inactive state.
+ */
+ void hold_requests(boolean wait_for_completion)
+ throws AdapterInactive;
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/POAOperations.java b/org/omg/PortableServer/POAOperations.java
new file mode 100644
index 000000000..1c22ceed2
--- /dev/null
+++ b/org/omg/PortableServer/POAOperations.java
@@ -0,0 +1,525 @@
+/* POAOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.PortableServer.POAPackage.AdapterAlreadyExists;
+import org.omg.PortableServer.POAPackage.AdapterNonExistent;
+import org.omg.PortableServer.POAPackage.InvalidPolicy;
+import org.omg.PortableServer.POAPackage.NoServant;
+import org.omg.PortableServer.POAPackage.ObjectAlreadyActive;
+import org.omg.PortableServer.POAPackage.ObjectNotActive;
+import org.omg.PortableServer.POAPackage.ServantAlreadyActive;
+import org.omg.PortableServer.POAPackage.ServantNotActive;
+import org.omg.PortableServer.POAPackage.WrongAdapter;
+import org.omg.PortableServer.POAPackage.WrongPolicy;
+
+/**
+ * Defines the operations, applicable to the POA.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface POAOperations
+{
+ /**
+ * Creates a new POA as a child of the target POA.
+ *
+ * @param child_name the name of the child POA being created.
+ * @param manager the manager that will control the new POA. If this parameter
+ * is null, a new POA manager is created and associated with the new POA.
+ *
+ * @param policies the policies, applicable for the parent POA. Policies
+ * are <i>not</i> inherited from the parent POA. If some policy type
+ * is missing in the array (or the zero size array is passed), the missing
+ * policies obtain the default values from the table, specified
+ * in the {@link POA} documentation header.
+ *
+ * @return an newly created POA. The POA will be intially in the holding
+ * state and must be activated to start processing requests.
+ *
+ * @throws AdapterAlreadyExists if the child with the given child_name
+ * already exists for the current POA.
+ * @throws InvalidPolicy if the policies conflict with each other or are
+ * otherwise inappropriate.
+ *
+ * @see POA for the list of required policies.
+ * @see #the_children()
+ */
+ POA create_POA(String child_name, POAManager manager, Policy[] policies)
+ throws AdapterAlreadyExists, InvalidPolicy;
+
+ /**
+ * Find and optionally activate the child POA with the given name.
+ *
+ * @param poa_name the name of the POA to find.
+ * @param activate_it if the child with the specified name is not found
+ * or inactive and this parameter is true, the target POA activator is
+ * invoked to activate that child. If this succeeds, that child POA
+ * is returned.
+ *
+ * @throws AdapterNonExistent if no active child with the given name
+ * is found and one of the following is true:
+ * a) the target POA has no associated
+ * {@link AdapterActivator}. b) that activator fails to activate the
+ * child POA. c) <code>activate_id</code> = false.
+ */
+ POA find_POA(String poa_name, boolean activate_it)
+ throws AdapterNonExistent;
+
+ /**
+ * Generate the Object Id for the given servant and add the servant to
+ * the Active Object Map using this Id a a key. If the servant
+ * activator is set, its incarnate method will be called. In this case,
+ * the passed servant in this method can be null; in this case, the servant,
+ * returned by {@link ServantLocatorOperations#incarnate} will
+ * be used.
+ *
+ * @param a_servant a servant that would serve the object with the
+ * returned Object Id.
+ *
+ * @return the generated objert Id for the given servant.
+ *
+ * @throws ServantAlreadyActive if this servant is already in the
+ * Active Object Map and the UNIQUE_ID policy applies.
+ *
+ * @throws WrongPolicy if the required policies SYSTEM_ID and RETAIN
+ * do not apply to this POA.
+ */
+ byte[] activate_object(Servant a_servant)
+ throws ServantAlreadyActive, WrongPolicy;
+
+ /**
+ * Add the given servant to the Active Object Map as a servant for the
+ * object with the provided Object Id. If the servant activator is
+ * set, its incarnate method will be called. In this case,
+ * the passed servant in this method can be null; in this case, the servant,
+ * returned by {@link ServantLocatorOperations#incarnate} will
+ * be used.
+ *
+ * @param an_Object_Id an object id for the given object.
+ * @param a_servant a servant that will serve the object with the given
+ * Object Id.
+ *
+ * @throws ObjectAlreadyActive if the given object id is already in the
+ * Active Object Map.
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ * @throws BAD_PARAM if the passed object id is invalid due any reason.
+ */
+ void activate_object_with_id(byte[] an_Object_Id, Servant a_servant)
+ throws ServantAlreadyActive, ObjectAlreadyActive,
+ WrongPolicy;
+
+ /**
+ * <p>Deactivate object with the given id. Client, trying to call
+ * method on the deactivated object will either receive the remote
+ * exception ({@link org.omg.CORBA.OBJECT_NOT_EXIST}, minor 0x535503ec),
+ * incomplete) or the object will be reactivated and serve the request.
+ * The object can be reactivated only if the implicit activation
+ * policy applies and the servant activator is set.</p><p>
+ * The deactivated object will continue to process requests that arrived
+ * before decativation.
+ * If this POA has the associated servant manager, a
+ * {@link ServantActivatorOperations#etherealize} is <i>immediately</i>
+ * invoked on the passed id. The deactivated object can be reactivated
+ * by {@link #activate_object_with_id}.</p>
+ * <p>The deactivation will not release thread, port or memory resources,
+ * taken by that object. This is due requirement to make the
+ * object reactivation possible at any time. To release the resources,
+ * you must destroy the POA.
+ * </p>
+ *
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ */
+ void deactivate_object(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy;
+
+ /**
+ * Create the object reference, encapsulating the given repository Id and
+ * the Object Id, generated by this POA. The returned object will not be
+ * activated by default and may be activated on the first invocation by
+ * the servant manager (if it is set and if policies are applicable).
+ * The returned object can also be narrowed by helper and used locally.
+ * In this case, the servant will be activated on the first local call of
+ * any method. The methods on returned object can also be invoked by
+ * name, using {@link org.omg.CORBA.Request}.
+ *
+ * @param a_repository_id the repository id for the given object. When
+ * narrowing the returned object with some helper, it will be checked for
+ * equality with value, returned by the the helper id().
+ *
+ * @throws WrongPolicy if the required SYSTEM_ID policy does not apply to
+ * this POA.
+ */
+ org.omg.CORBA.Object create_reference(String a_repository_id)
+ throws WrongPolicy;
+
+ /**
+ * <p> Create the object reference, encapsulating the given repository Id and
+ * the given Object Id. The returned object will not be
+ * activated by default and may be activated on the first invocation by
+ * the servant manager (if it is set and if policies are applicable).
+ * </p><p>
+ * The returned object can also be narrowed by helper and used locally.
+ * In this case, the servant will be activated on the first local call of
+ * any method. The methods on returned object can also be invoked by
+ * name, using {@link org.omg.CORBA.Request}.
+ * </p>
+ *
+ * @param an_object_id the object id for the object being created.
+ * If the POA uses the SYSTEM_ID policy, the portable application
+ * must only supply ids, generated by that POA.
+ *
+ * @param a_repository_id the repository id for the given object. When
+ * narrowing the returned object with some helper, it will be checked for
+ * equality with value, returned by the the helper id().
+ */
+ org.omg.CORBA.Object create_reference_with_id(byte[] an_object_id,
+ String a_repository_id
+ );
+
+ /**
+ * Returns a default servant for this POA.
+ *
+ * @return a servant that will be used for requests for
+ * which no servant is found in the Active Object Map.
+ *
+ * @throws NoServant if there is no default servant associated with this POA.
+ * @throws WrongPolicy if the USE_DEFAULT_SERVANT policy is not active.
+ */
+ Servant get_servant()
+ throws NoServant, WrongPolicy;
+
+ /**
+ * Sets the default servant for this POA.
+ *
+ * @param a_servant a servant that will be used for requests for
+ * which no servant is found in the Active Object Map.
+ *
+ * @throws WrongPolicy if the USE_DEFAULT_SERVANT policy is not active.
+ */
+ void set_servant(Servant a_servant)
+ throws WrongPolicy;
+
+ /**
+ * Set a servant manager for this POA.
+ *
+ * @param a servant manager being set. If the RETAIN policy applies, the
+ * manager must implement a {@link ServantActivator}. If the NON_RETAIN
+ * policy applies, the manager must implement a {@link ServantLocator}.
+ *
+ * @throws WrongPolicy if the required USE_SERVANT_MANAGER policy does not
+ * apply to this POA.
+ *
+ * @throws OBJ_ADAPTER minor code 4 if the passed manager does not
+ * implement the required interface ({@link ServantActivator},
+ * {@link ServantLocator}).
+ *
+ * @throws BAD_INV_ORDER minor code 6 if the method is called more than once
+ * on the same POA. The manager can be set only once.
+ */
+ void set_servant_manager(ServantManager a_manager)
+ throws WrongPolicy;
+
+ /**
+ * Get the servant manager, associated with this POA.
+ *
+ * @return the associated servant manager or null if it has
+ * been previously set.
+ *
+ * @throws WrongPolicy if the required USE_SERVANT_MANAGER policy does not
+ * apply to this POA.
+ */
+ ServantManager get_servant_manager()
+ throws WrongPolicy;
+
+ /**
+ * Get the unique Id of the POA in the process in which it is created.
+ * This Id is needed by portable interceptors. The id is unique
+ * for the life span of the POA in the process. For persistent
+ * POAs, if a POA is created in the same path with the same name as
+ * another POA, these POAs are identical have the same id. All transient
+ * POAs are assumed unique.
+ */
+ byte[] id();
+
+ /**
+ * Returns the reference to the active object with the given Id.
+ *
+ * @param the_Object_Id the object id.
+ *
+ * @throws ObjectNotActive if there is no active object with such Id.
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ */
+ org.omg.CORBA.Object id_to_reference(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy;
+
+ /**
+ * Returns the servant that serves the active object with the given Id.
+ *
+ * @param the_Object_Id the object id.
+ *
+ * @throws ObjectNotActive if there is no active object with such Id.
+ * @throws WrongPolicy. This method requires either RETAIN or
+ * USE_DEFAULT_SERVANT policies and reaises the WrongPolicy if none of them
+ * apply to this POA.
+ */
+ Servant id_to_servant(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy;
+
+ /**
+ * Returns the Object Id, encapsulated in the given object reference.
+ *
+ * @param the_Object the object that has been previously created with this
+ * POA. It need not be active.
+ *
+ * @throws WrongAdapter if the passed object has not been previously created
+ * with this POA.
+ * @throws WrongPolicy never (declared for the future extensions only).
+ */
+ byte[] reference_to_id(org.omg.CORBA.Object the_Object)
+ throws WrongAdapter, WrongPolicy;
+
+ /**
+ * Returns the servant that is serving this object.
+ *
+ * @return if the RETAIN policy applies and the object is in the Active
+ * Object Map, the method returns the servant, associated with this object.
+ * Otherwise, if the USE_DEFAULT_SERVANT policy applies, the method returns
+ * the default servant (if one was set).
+ *
+ * @throws ObjectNotActive if none of the conditions above are satisfied.
+ * @throws WrongAdapter if the object reference was not created with this POA.
+ * @throws WrongPolicy. This method requires either RETAIN or
+ * USE_DEFAULT_SERVANT policies and reaises the WrongPolicy if none of them
+ * apply to this POA.
+ */
+ Servant reference_to_servant(org.omg.CORBA.Object the_Object)
+ throws ObjectNotActive, WrongPolicy, WrongAdapter;
+
+ /**
+ * Returns the id of the object, served by the given servant. The id is found
+ * in one of the following ways.
+ * <ul>
+ * <li>If the POA has both the RETAIN and the UNIQUE_ID policy and
+ * the specified servant is active, the method return the Object Id associated
+ * with that servant.
+ * </li><li>
+ * If the POA has both the RETAIN and the IMPLICIT_ACTIVATION policy and
+ * either the POA has the MULTIPLE_ID policy or the specified servant is
+ * inactive, the method activates the servant using a POA-generated Object Id
+ * and the Interface Id associated with the servant, and returns that
+ * Object Id.
+ * </li>
+ * <li>If the POA has the USE_DEFAULT_SERVANT policy, the servant specified
+ * is the default servant, and the method is being invoked in the context o
+ * f executing a request on the default servant, the method returns the
+ * ObjectId associated with the current invocation.
+ * </li>
+ * </ul>
+ * @throws ServantNotActive in all cases, not listed in the list above.
+ * @throws WrongPolicy The method requres USE_DEFAULT_SERVANT policy or
+ * a combination of the RETAIN policy and either the UNIQUE_ID or
+ * IMPLICIT_ACTIVATION policies and throws the WrongPolicy if these conditions
+ * are not satisfied.
+ */
+ byte[] servant_to_id(Servant the_Servant)
+ throws ServantNotActive, WrongPolicy;
+
+ /**
+ * <p>Converts the given servant to the object reference.
+ * The servant will serve all methods, invoked on the returned object.
+ * The returned object reference can be passed to the remote client,
+ * enabling remote invocations.
+ * </p><p>
+ * If the specified servant already serves some active object, that
+ * object is returned. Otherwise,
+ * if the POA has the IMPLICIT_ACTIVATION policy the method activates
+ * the servant, creating an new object with the POA-generated Object Id.
+ * In this case, if the servant activator is set, the
+ * {@link ServantActivatorOperations#incarnate} method will be called.
+ * </p>
+ *
+ * @throws ServantNotActive if the servant is inactive and no
+ * IMPLICIT_ACTIVATION policy applies.
+ * @throws WrongPolicy This method needs the RETAIN policy and either the
+ * UNIQUE_ID or IMPLICIT_ACTIVATION policies.
+ *
+ * @return the object, exposing the given servant in the context of this POA.
+ */
+ org.omg.CORBA.Object servant_to_reference(Servant the_Servant)
+ throws ServantNotActive, WrongPolicy;
+
+ /**
+ * Return the POA manager, associated with this POA.
+ *
+ * @return the associated POA manager (always available).
+ */
+ POAManager the_POAManager();
+
+ /**
+ * Returns the adapter activator, associated with this POA.
+ * The newly created POA has no activator (null would be
+ * returned). The ORB root POA also initially has no activator.
+ *
+ * @return tha adapter activator or null if this POA has no
+ * associated adapter activator.
+ */
+ AdapterActivator the_activator();
+
+ /**
+ * Set the adapter activator for this POA.
+ *
+ * @param the activator being set.
+ */
+ void the_activator(AdapterActivator activator);
+
+ /**
+ * The children of this POA.
+ *
+ * @return the array of all childs for this POA.
+ */
+ POA[] the_children();
+
+ /**
+ * Return the name of this POA.
+ *
+ * @return the name of POA, relative to its parent.
+ */
+ String the_name();
+
+ /**
+ * Return the parent of this POA.
+ *
+ * @return the parent POA or <code>null</code> if this is a root POA.
+ */
+ POA the_parent();
+
+ /**
+ * <p> Destroy this POA and all descendant POAs. The destroyed POAs can be
+ * later re-created via {@link AdapterActivator} or by invoking
+ * {@link #create_POA}.
+ * This differs from {@link PoaManagerOperations#deactivate} that does
+ * not allow recreation of the deactivated POAs. After deactivation,
+ * recreation is only possible if the POAs were later destroyed.
+ * </p><p>
+ * The remote invocation on the target, belonging to the POA that is
+ * currently destroyed return the remote exception ({@link TRANSIENT},
+ * minor code 4).
+ * </p>
+ * @param etherealize_objects if true, and POA has RETAIN policy, and the
+ * servant manager is available, the servant manager method
+ * {@link ServantActivatorOperations#etherealize} is called for each
+ * <i>active</i> object in the Active Object Map. This method should not
+ * try to access POA being destroyed. If <code>destroy</code> is called
+ * multiple times before the destruction completes,
+ * the etherialization should be invoked only once.
+ *
+ * @param wait_for_completion if true, the method waits till the POA being
+ * destroyed completes all current requests and etherialization. If false,
+ * the method returns immediately.
+ */
+ void destroy(boolean etherealize_objects, boolean wait_for_completion);
+
+ /**
+ * Create the IdUniquenessPolicy policy.
+ *
+ * @param value states which one Id uniqueness policy will apply.
+ *
+ * @return the created policy.
+ */
+ IdUniquenessPolicy create_id_uniqueness_policy(IdUniquenessPolicyValue a_value);
+
+ /**
+ * Create the ImplicitActivationPolicy policy.
+ *
+ * @param value states which one activation policy will apply.
+ *
+ * @return the created policy.
+ */
+ ImplicitActivationPolicy create_implicit_activation_policy(ImplicitActivationPolicyValue a_value);
+
+ /**
+ * Create the LifespanPolicy policy.
+ *
+ * @param value states which one object lifespan policy will apply.
+ *
+ * @return the created policy.
+ */
+ LifespanPolicy create_lifespan_policy(LifespanPolicyValue a_value);
+
+ /**
+ * Create the RequestProcessingPolicy policy.
+ *
+ * @param value states which one request processing policy will apply.
+ *
+ * @return the created policy.
+ */
+ RequestProcessingPolicy create_request_processing_policy(RequestProcessingPolicyValue a_value);
+
+ /**
+ * Create the ServantRetentionPolicy policy.
+ *
+ * @param value states which one servant retention policy will apply.
+ *
+ * @return the created policy.
+ */
+ ServantRetentionPolicy create_servant_retention_policy(ServantRetentionPolicyValue a_value);
+
+ /**
+ * Create the ThreadPolicy policy.
+ *
+ * @param value states which one thread policy will apply.
+ *
+ * @return the created policy.
+ */
+ ThreadPolicy create_thread_policy(ThreadPolicyValue a_value);
+
+ /**
+ * Create the ID assignment policy with the given value.
+ *
+ * @param value states which one ID assignment policy will apply.
+ *
+ * @return the created policy.
+ */
+ IdAssignmentPolicy create_id_assignment_policy(IdAssignmentPolicyValue value);
+
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java b/org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java
new file mode 100644
index 000000000..f71f101cd
--- /dev/null
+++ b/org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* REQUEST_PROCESSING_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+ /**
+ * Holds an integer {@link RequestProcessingPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface REQUEST_PROCESSING_POLICY_ID
+{
+ /**
+ * Specifies the REQUEST_PROCESSING_POLICY_ID value, 22.
+ */
+ int value = 22;
+}
diff --git a/org/omg/PortableServer/RequestProcessingPolicy.java b/org/omg/PortableServer/RequestProcessingPolicy.java
new file mode 100644
index 000000000..1b37d9f15
--- /dev/null
+++ b/org/omg/PortableServer/RequestProcessingPolicy.java
@@ -0,0 +1,59 @@
+/* RequestProcessingPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specifies the behaviour in the case when the
+ * requested object is not found in the Active Object Map or that map
+ * is not in use.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link RequestProcessingPolicyOperations}.
+ *
+ * @see RequestProcessingPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface RequestProcessingPolicy
+ extends Policy, RequestProcessingPolicyOperations, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/RequestProcessingPolicyOperations.java b/org/omg/PortableServer/RequestProcessingPolicyOperations.java
new file mode 100644
index 000000000..672ba1846
--- /dev/null
+++ b/org/omg/PortableServer/RequestProcessingPolicyOperations.java
@@ -0,0 +1,55 @@
+/* RequestProcessingPolicyOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the RequestProcessingPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface RequestProcessingPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ RequestProcessingPolicyValue value();
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/RequestProcessingPolicyValue.java b/org/omg/PortableServer/RequestProcessingPolicyValue.java
new file mode 100644
index 000000000..139010c86
--- /dev/null
+++ b/org/omg/PortableServer/RequestProcessingPolicyValue.java
@@ -0,0 +1,176 @@
+/* RequestProcessingPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the behaviour in the case when the
+* requested object is not found in the Active Object Map or that map
+* is not in use. The map is not in use when the
+* {@link ServantRetentionPolicyValue#NON_RETAIN} policy is active.
+* <ul>
+* <li>USE_ACTIVE_OBJECT_MAP_ONLY Raise an {@link org.omg.CORBA.OBJECT_NOT_EXIST}
+* with the minor code 2. {@link ServantRetentionPolicyValue#RETAIN} policy is
+* also required.
+* </li>
+* <li>USE_DEFAULT_SERVANT Dispatch request to the default servant. If no such
+* exists, raise {@link org.omg.CORBA.OBJ_ADAPTER} with minor code 3.
+* {@link IdUniquenessPolicyValue#MULTIPLE_ID} is also required.
+* </li>
+* <li>USE_SERVANT_MANAGER Dispatch request to the servant manager. If no such
+* exists, raise {@link org.omg.CORBA.OBJ_ADAPTER} with the minor code 4.</li>
+* </ul>
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class RequestProcessingPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = 7646563512329907695L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (USE_ACTIVE_OBJECT_MAP_ONLY).
+ */
+ public static final int _USE_ACTIVE_OBJECT_MAP_ONLY = 0;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_ACTIVE_OBJECT_MAP_ONLY.
+ */
+ public static final RequestProcessingPolicyValue USE_ACTIVE_OBJECT_MAP_ONLY =
+ new RequestProcessingPolicyValue(_USE_ACTIVE_OBJECT_MAP_ONLY);
+
+ /**
+ * The possible value of this enumeration (USE_DEFAULT_SERVANT).
+ */
+ public static final int _USE_DEFAULT_SERVANT = 1;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_DEFAULT_SERVANT.
+ */
+ public static final RequestProcessingPolicyValue USE_DEFAULT_SERVANT =
+ new RequestProcessingPolicyValue(_USE_DEFAULT_SERVANT);
+
+ /**
+ * The possible value of this enumeration (USE_SERVANT_MANAGER).
+ */
+ public static final int _USE_SERVANT_MANAGER = 2;
+
+ /**
+ * An instance of RequestProcessingPolicyValue, initialized to USE_SERVANT_MANAGER.
+ */
+ public static final RequestProcessingPolicyValue USE_SERVANT_MANAGER =
+ new RequestProcessingPolicyValue(_USE_SERVANT_MANAGER);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final RequestProcessingPolicyValue[] enume =
+ new RequestProcessingPolicyValue[]
+ {
+ USE_ACTIVE_OBJECT_MAP_ONLY, USE_DEFAULT_SERVANT, USE_SERVANT_MANAGER
+ };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[]
+ {
+ "USE_ACTIVE_OBJECT_MAP_ONLY", "USE_DEFAULT_SERVANT", "USE_SERVANT_MANAGER"
+ };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected RequestProcessingPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the RequestProcessingPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _USE_ACTIVE_OBJECT_MAP_ONLY, _USE_DEFAULT_SERVANT, _USE_SERVANT_MANAGER.
+ * @return one of USE_ACTIVE_OBJECT_MAP_ONLY, USE_DEFAULT_SERVANT, USE_SERVANT_MANAGER.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static RequestProcessingPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return one of _USE_ACTIVE_OBJECT_MAP_ONLY,
+ * _USE_DEFAULT_SERVANT, _USE_SERVANT_MANAGER.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java b/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java
new file mode 100644
index 000000000..89813b921
--- /dev/null
+++ b/org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* SERVANT_RETENTION_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+ /**
+ * Holds an integer {@link ServantRetentionPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface SERVANT_RETENTION_POLICY_ID
+{
+ /**
+ * Specifies the SERVANT_RETENTION_POLICY_ID value, 21.
+ */
+ int value = 21;
+}
diff --git a/org/omg/PortableServer/Servant.java b/org/omg/PortableServer/Servant.java
new file mode 100644
index 000000000..745fc8a7e
--- /dev/null
+++ b/org/omg/PortableServer/Servant.java
@@ -0,0 +1,288 @@
+/* Servant.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+import org.omg.CORBA.ORB;
+import org.omg.PortableServer.POAPackage.ServantNotActive;
+import org.omg.PortableServer.POAPackage.WrongPolicy;
+import org.omg.PortableServer.portable.Delegate;
+import gnu.CORBA.Poa.ORB_1_4;
+import gnu.CORBA.Poa.gnuPOA;
+
+/**
+ * <p>
+ * The servant is responsible for handling the method invocation on the
+ * target object. It can be one servant per object, or the same servant can
+ * support several (possibly all) objects, associated with the given POA.
+ * </p> <p>
+ * Till JDK 1.3 inclusive, a typical IDL to java compiler generates an
+ * implementation base (name pattern _*ImplBase.java) that is derived from the
+ * {@link org.omg.CORBA.portable.ObjectImpl}. Since JDK 1.4 the implementation
+ * base is derived from the Servant, also having a different name pattern
+ * (*POA.java). This suffix may be confusing, as the servant itself is
+ * <i>not</i> POA nor it is derived from it.
+ * </p><p>
+ * In both cases, the implementation base also inherits an interface, containing
+ * definitions of the application specific methods. The application programmer
+ * writes a child of the implementation base, implementing these methods
+ * for the application-specific functionality. The ObjectImpl is connected
+ * directly to the ORB. The Servant is connected to POA that can be obtained
+ * from the ORB.
+ * </p><p>
+ * If the servant is connected to more than one object, the exact object
+ * being currently served can be identified with {@link #_object_id}.
+ * </p><p>
+ * The derivativ of Servant, being directly connected to serve requests,
+ * must inherit either from {@link org.omg.CORBA.portable.InvokeHandler}
+ * or from {@link org.omg.PortableServer.DynamicImplementation}).
+ * </p><p>
+ * The Servant type is a CORBA <code>native</code> type.
+ * </p>
+ *
+ * @see POA.servant_to_reference(Servant)
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class Servant
+{
+ /**
+ * The delegate, where calls to some Servant methods are forwarded.
+ */
+ private Delegate delegate;
+
+ /**
+ * Get the repository ids of all interfaces, supported by the
+ * CORBA object, identified by the passed Id. In the typical code the
+ * passed parameters are ignored, returning an array of repository ids,
+ * supported by the servant implementation.
+ *
+ * @param poa a POA of the given object.
+ * @param object_ID the object Id of the given object.
+ *
+ * @return an array, containing the repository ids.
+ */
+ public abstract String[] _all_interfaces(POA poa, byte[] object_ID);
+
+ /**
+ * Get the delegate, where calls to some Servant methods are forwarded.
+ */
+ public final Delegate _get_delegate()
+ {
+ return delegate;
+ }
+
+ /**
+ * Get the interface repository definition <code>InterfaceDef</code> for this
+ * Object. By default, forwards request to the delegate.
+ *
+ * @specnote The interface repository is officially not implemented up till
+ * JDK 1.5 inclusive. The delegate throws NO_IMPLEMENT, always.
+ */
+ public org.omg.CORBA.Object _get_interface_def()
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Checks if the passed servant is an instance of the given CORBA IDL type.
+ * By default, forwards the requet to the delegate.
+ *
+ * @param a_servant a servant to check.
+ * @param an_id a repository ID, representing an IDL type for that the
+ * servant must be checked.
+ *
+ * @return true if the servant is an instance of the given type, false
+ * otherwise.
+ */
+ public boolean _is_a(String repository_id)
+ {
+ return delegate.is_a(this, repository_id);
+ }
+
+ /**
+ * Determines if the server object for this reference has already
+ * been destroyed. By default, forwards request to the delegate.
+ *
+ * @return true if the object has been destroyed, false otherwise.
+ */
+ public boolean _non_existent()
+ {
+ return delegate.non_existent(this);
+ }
+
+ /**
+ * Returns the ORB that is directly associated with the given servant.
+ * In this implementation, the method is overridden to return
+ */
+ public final ORB _orb()
+ {
+ return delegate.orb(this);
+ }
+
+ /**
+ * Returns the root POA of the ORB instance, associated with this servant.
+ * It is the same POA that would be returned by resolving the initial
+ * reference "RootPOA" for that orb. By default, forwards request to the
+ * delegate.
+ *
+ * @see ORB.resolve_initial_references
+ */
+ public POA _default_POA()
+ {
+ return delegate == null ? null : delegate.default_POA(this);
+ }
+
+ /**
+ * Return the invocation target object identifier as a byte array.
+ * This is typically used when the same servant serves multiple objects,
+ * and the object id can encapsulated the whole description of the
+ * object.
+ *
+ * This method returns correct values even when the same
+ * servant serves several objects in parallel threads. The ORB maintains the
+ * thread to invocation data map for all calls that are currently being
+ * processed.
+ */
+ public final byte[] _object_id()
+ {
+ if (delegate != null)
+ return delegate.object_id(this);
+ else
+ throw new OBJECT_NOT_EXIST();
+ }
+
+ /**
+ * Get POA that is directly associated with the given servant.
+ * By default, forwards request to the delegate.
+ */
+ public final POA _poa()
+ {
+ return delegate.poa(this);
+ }
+
+ /**
+ * Set the delegate for this servant.
+ */
+ public final void _set_delegate(Delegate a_delegate)
+ {
+ delegate = a_delegate;
+ }
+
+ /**
+ * Obtains the CORBA object reference that is a current invocation target for
+ * the given servant. This is important when the same servant serves
+ * multiple objects. If the servant is not yet connected to the passed
+ * orb, the method will try to connect it to that orb on POA, returned
+ * by the method {@link _default_POA}. That method can be overridden to
+ * get poa where the object must be automatically connected when
+ * calling this method.
+ *
+ * @param an_orb the ORB with relate to that the object is requested.
+ */
+ public final org.omg.CORBA.Object _this_object(ORB an_orb)
+ {
+ if (delegate != null)
+ return delegate.this_object(this);
+ else
+ {
+ if (an_orb instanceof ORB_1_4)
+ {
+ ORB_1_4 m_orb = (ORB_1_4) an_orb;
+
+ gnuPOA dp = (gnuPOA) _default_POA();
+ if (dp == null)
+ dp = m_orb.rootPOA;
+
+ try
+ {
+ return dp.servant_to_reference(this);
+ }
+ catch (WrongPolicy unexp)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION();
+ bad.initCause(unexp);
+ throw bad;
+ }
+ catch (ServantNotActive ex)
+ {
+ try
+ {
+ return dp.id_to_reference(dp.activate_object(this));
+ }
+ catch (Exception unexp)
+ {
+ unexp.initCause(ex);
+
+ BAD_OPERATION bad = new BAD_OPERATION();
+ bad.initCause(unexp);
+ throw bad;
+ }
+ }
+ }
+ }
+ throw new OBJECT_NOT_EXIST();
+ }
+
+ /**
+ * Obtains the CORBA object reference that is a current invocation target for
+ * the given servant. This is important when the same servant serves
+ * multiple objects. This method required the servant to be connected
+ * to a single orb, and a delegate set.
+ *
+ * This method returns correct values even when the same
+ * servant serves several objects in parallel threads. The ORB maintains the
+ * thread to invocation data map for all calls that are currently being
+ * processed.
+ */
+ public final org.omg.CORBA.Object _this_object()
+ {
+ if (delegate != null)
+ return _this_object(_orb());
+ else
+ {
+ POA def = _default_POA();
+ if (def instanceof gnuPOA)
+ return _this_object(((gnuPOA) def).orb());
+ }
+ throw new OBJECT_NOT_EXIST();
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantActivator.java b/org/omg/PortableServer/ServantActivator.java
new file mode 100644
index 000000000..244fedf5f
--- /dev/null
+++ b/org/omg/PortableServer/ServantActivator.java
@@ -0,0 +1,59 @@
+/* ServantActivator.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * The POA, that has the RETAIN policy uses servant managers that are
+ * ServantActivators. The operations, that must be supported by these
+ * managers, are defined separately in {@link ServantActivatorOperations}.
+ *
+ * @see ServantLocator
+ * @see ServantRetentionPolicyValue
+ * @see ServantManager
+ * @see POAOperations#set_servant_manager
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantActivator
+ extends ServantManager, ServantActivatorOperations, IDLEntity,
+ org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantActivatorHelper.java b/org/omg/PortableServer/ServantActivatorHelper.java
new file mode 100644
index 000000000..045dd33a9
--- /dev/null
+++ b/org/omg/PortableServer/ServantActivatorHelper.java
@@ -0,0 +1,145 @@
+/* ServantActivatorHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the CORBA object {@link ServantActivator}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServantActivatorHelper
+{
+ /**
+ * Get the type code of the {@link ServantActivator}.
+ */
+ public static TypeCode type()
+ {
+ return ORB.init().create_interface_tc(id(), "ServantActivator");
+ }
+
+ /**
+ * Insert the ServantActivator into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServantActivator to insert.
+ */
+ public static void insert(Any any, ServantActivator that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the ServantActivator from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServantActivator.
+ */
+ public static ServantActivator extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the ServantActivator repository id.
+ *
+ * @return "IDL:omg.org/PortableServer/ServantActivator:2.3", always.
+ */
+ public static String id()
+ {
+ return "IDL:omg.org/PortableServer/ServantActivator:2.3";
+ }
+
+ /**
+ * Casts the passed object into the ServantActivator.
+ *
+ * @param obj the object to cast.
+ * @return casted instance.
+ * @throws BAD_PARAM if the passed object is not a ServantActivator.
+ */
+ public static ServantActivator narrow(org.omg.CORBA.Object obj)
+ {
+ try
+ {
+ return (ServantActivator) obj;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_PARAM bad = new BAD_PARAM();
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * This should read the servant activator, but it cannot be transferred
+ * this way as its operations cannot be remote. The operations cannot
+ * be remote because one of the method parameters, POA, is required to be
+ * always a local object (both by 1.5 API and 3.0.3 OMG).
+ *
+ * @throws MARSHAL, always.
+ *
+ * @specnote Same as Sun.
+ */
+ public static ServantActivator read(InputStream input)
+ {
+ throw new MARSHAL();
+ }
+
+ /**
+ * This should write the servant activator, but it cannot be transferred
+ * this way as its operations cannot be remote. The operations cannot
+ * be remote because one of the method parameters, POA, is required to be
+ * always a local object (both by 1.5 API and 3.0.3 OMG).
+ *
+ * @throws MARSHAL, always.
+ *
+ * @specnote Same as Sun.
+ */
+ public static void write(OutputStream output, ServantActivator value)
+ {
+ throw new MARSHAL();
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantActivatorOperations.java b/org/omg/PortableServer/ServantActivatorOperations.java
new file mode 100644
index 000000000..6437f3563
--- /dev/null
+++ b/org/omg/PortableServer/ServantActivatorOperations.java
@@ -0,0 +1,94 @@
+/* ServantActivatorOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+
+/**
+ * Defines the operations, applicable to the {@link ServantActivator}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantActivatorOperations
+ extends ServantManagerOperations
+{
+ /**
+ * This method is invoked whenever a servant for an object is deactivated,
+ * assuming the POA has the USE_SERVANT_MANAGER and RETAIN policies.
+ *
+ * @param Object_Id the Id of the object being deactivated.
+ *
+ * @param poa the POA in those scope the object was active.
+ *
+ * @param servant the servant, serving the object being deactivated.
+ *
+ * @param cleanup_in_progress if true, this method was called from due
+ * deactivation or destruction operation. False indicates that the method
+ * was called due other reasons.
+ *
+ * @param remaining_activations if true, at the invocation moment the
+ * passed servant is also associated with other objects in the active
+ * object map of the given POA.
+ */
+ void etherealize(byte[] Object_Id, POA poa, Servant servant,
+ boolean cleanup_in_progress, boolean remaining_activations
+ );
+
+ /**
+ * This method is invoked whenever the POA receives a request for an
+ * object that is not currently active, assuming the POA has the
+ * USE_SERVANT_MANAGER and RETAIN policies. The user-supplied servant
+ * manager is responsible for locating or creating an appropriate servant
+ * that corresponds to the ObjectId value. The subsequent requests with
+ * the same ObjectId value will be delivered directly to that servant
+ * without invoking the servant manager.
+ *
+ * @param Object_Id the ObjectId value associated with the incoming request.
+ * @param poa the POA in which the object is being activated.
+ *
+ * @return a servant that will be used to process the incoming request.
+ *
+ * @throws ForwardRequest if the activator decides to forward the request
+ * to another object. The exception contains the object that should
+ * handle this request. This object is usually remote, but can also
+ * be local. The throws exception will forward all subsequent requests
+ * till the new activation.
+ */
+ Servant incarnate(byte[] Object_Id, POA poa)
+ throws ForwardRequest;
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantActivatorPOA.java b/org/omg/PortableServer/ServantActivatorPOA.java
new file mode 100644
index 000000000..5ea0be4b3
--- /dev/null
+++ b/org/omg/PortableServer/ServantActivatorPOA.java
@@ -0,0 +1,173 @@
+/* ServantActivatorPOA.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import gnu.CORBA.Poa.gnuServantObject;
+
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+
+/**
+ * <p>This ServantActivator stub is an optional base for the
+ * servant activators. This stub cannot serve remote invocations, as
+ * methods in {@link ServantActivatorOperations} take POA as one of parameters.
+ * Both JDK 1.5 API and OMG specifies that POA is a local object that must not
+ * be transferred to the remote invocation target.
+ * </p><p>
+ * You do not need to derive your servant activator from this stub,
+ * it is enough to implement the {@link ServantActivator} interface.
+ * But you may choose to do this if you need the functional
+ * {@link #_all_interfaces()} method or want to keep default behavior during
+ * the incarnation or etherialization.
+ * </p>
+ */
+public class ServantActivatorPOA
+ extends Servant
+ implements InvokeHandler, ServantActivatorOperations
+{
+ /**
+ * Used to access the outer class in the nested delegator class.
+ */
+ final ServantActivatorPOA THIS = this;
+
+ /**
+ * This class is used to support _this.
+ */
+ class delegator
+ extends gnuServantObject
+ implements ServantActivator
+ {
+ delegator(Servant s)
+ {
+ super(s, new byte[ 0 ], null, null);
+ }
+
+ public Servant incarnate(byte[] key, POA poa)
+ throws org.omg.PortableServer.ForwardRequest
+ {
+ return THIS.incarnate(key, poa);
+ }
+
+ public void etherealize(byte[] key, POA poa, Servant servant,
+ boolean cleanup, boolean remains
+ )
+ {
+ THIS.etherealize(key, poa, servant, cleanup, remains);
+ }
+ }
+
+ /**
+ * It is your responsibility to handle the incarnation event and
+ * supply the servant.
+ * The default method instructs POA that the servant cannot be
+ * provided by activator. The OBJ_ADAPTER exception will be
+ * thrown by POA, unless the servant is provided as one of the
+ * parameters in the activation method, or the default servant is set.
+ *
+ * @see ServantActivatorOperations#incarnate
+ *
+ * @specnote in GNU Classpath, returning null means that the
+ * activator does not supply the servant. The servant can still be supplied
+ * as one of parameters in some POA activation methods or as a default
+ * servant.
+ *
+ * @throws ForwardRequest
+ */
+ public Servant incarnate(byte[] Object_Id, POA poa)
+ throws ForwardRequest
+ {
+ return null;
+ }
+
+ /**
+ * It is your responsibility to handle the etherialization event.
+ * Override this method if using the class. The default method
+ * does nothing.
+ *
+ * @see ServantActivatorOperations#incarnate
+ */
+ public void etherealize(byte[] Object_Id, POA poa, Servant servant,
+ boolean cleanup, boolean remains
+ )
+ {
+ }
+
+ /**
+ * Our implementation will not call this method. After setting your
+ * manager to POA, it will call incarnate and etherialize directly.
+ */
+ public OutputStream _invoke(String method, InputStream input,
+ ResponseHandler handler
+ )
+ throws SystemException
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Returns an array of interfaces, supported by the servant activator.
+ */
+ public String[] _all_interfaces(POA poa, byte[] Object_Id)
+ {
+ return new _ServantActivatorStub()._ids();
+ }
+
+ /**
+ * Return the complete instance of the servant activator, based on
+ * the current class (ServantActivatorPOA or derived).
+ */
+ public ServantActivator _this()
+ {
+ return new delegator(this);
+ }
+
+ /**
+ * Return the complete instance of the servant activator, based on
+ * the current class (ServantActivatorPOA or derived).
+ */
+ public ServantActivator _this(ORB orb)
+ {
+ return new delegator(this);
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantLocator.java b/org/omg/PortableServer/ServantLocator.java
new file mode 100644
index 000000000..9989fd49b
--- /dev/null
+++ b/org/omg/PortableServer/ServantLocator.java
@@ -0,0 +1,59 @@
+/* ServantLocator.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * When the POA has the NON_RETAIN policy it uses servant managers that are
+ * ServantLoacators. The operations, that must be supported by these managers,
+ * are defined separately in {@link ServantLocatorOperations}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ *
+ * @see ServantActivator
+ * @see ServantRetentionPolicyValue
+ * @see ServantManager
+ * @see POAOperations#set_servant_manager
+ */
+public interface ServantLocator
+ extends ServantManager, ServantLocatorOperations, IDLEntity,
+ org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantLocatorHelper.java b/org/omg/PortableServer/ServantLocatorHelper.java
new file mode 100644
index 000000000..81e175782
--- /dev/null
+++ b/org/omg/PortableServer/ServantLocatorHelper.java
@@ -0,0 +1,145 @@
+/* ServantLocatorHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+
+/**
+* The helper operations for the CORBA object {@link ServantLocator}.
+*
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public abstract class ServantLocatorHelper
+{
+ /**
+ * Get the type code of the {@link ServantLocator}.
+ */
+ public static TypeCode type()
+ {
+ return ORB.init().create_interface_tc(id(), "ServantLocator");
+ }
+
+ /**
+ * Insert the ServantLocator into the given Any.
+ *
+ * @param any the Any to insert into.
+ * @param that the ServantLocator to insert.
+ */
+ public static void insert(Any any, ServantLocator that)
+ {
+ any.insert_Object(that);
+ }
+
+ /**
+ * Extract the ServantLocator from given Any.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ServantLocator.
+ */
+ public static ServantLocator extract(Any any)
+ {
+ return narrow(any.extract_Object());
+ }
+
+ /**
+ * Get the ServantLocator repository id.
+ *
+ * @return "org.omg.PortableServer.ServantLocatorOperations", always.
+ */
+ public static String id()
+ {
+ return "org.omg.PortableServer.ServantLocatorOperations";
+ }
+
+ /**
+ * Cast the passed object into the ServantLocator.
+ *
+ * @param obj the object to narrow.
+ * @return narrowed instance.
+ * @throws BAD_PARAM if the passed object is not a ServantLocator.
+ */
+ public static ServantLocator narrow(org.omg.CORBA.Object obj)
+ {
+ try
+ {
+ return (ServantLocator) obj;
+ }
+ catch (ClassCastException ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION();
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+
+ /**
+ * This should read the servant locator, but it cannot be transferred
+ * this way as its operations cannot be remote. The operations cannot
+ * be remote because one of the method parameters, POA, is required to be
+ * always a local object (both by 1.5 API and 3.0.3 OMG).
+ *
+ * @throws MARSHAL, always.
+ *
+ * @specnote Same as Sun.
+ */
+ public static ServantLocator read(InputStream input)
+ {
+ throw new MARSHAL();
+ }
+
+ /**
+ * This should write the servant activator, but it cannot be transferred
+ * this way as its operations cannot be remote. The operations cannot
+ * be remote because one of the method parameters, POA, is required to be
+ * always a local object (both by 1.5 API and 3.0.3 OMG).
+ *
+ * @throws MARSHAL, always.
+ *
+ * @specnote Same as Sun.
+ */
+ public static void write(OutputStream output, ServantLocator value)
+ {
+ throw new MARSHAL();
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantLocatorOperations.java b/org/omg/PortableServer/ServantLocatorOperations.java
new file mode 100644
index 000000000..6ed214e2f
--- /dev/null
+++ b/org/omg/PortableServer/ServantLocatorOperations.java
@@ -0,0 +1,96 @@
+/* ServantLocatorOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+
+/**
+ * Defines the operations, applicable to the {@link ServantLocator}.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantLocatorOperations
+ extends ServantManagerOperations
+{
+ /**
+ * If the POA has the USE_SERVANT_MANAGER and NON_RETAIN policies, it
+ * invokes this method whenever the object being requested that is not
+ * inactive. This method has access to all details of the received
+ * request and can use them to choose between servaral alternative servants.
+ * It can also forward the request to another server.
+ *
+ * @param Object_Id the id of the object, on which the request was called.
+ * @param poa the POA in those scope the object is active.
+ * @param operation the name of the method or operation being invoked.
+ * @param cookie_holder the holder where the servant manager can store
+ * an arbitrary java.lang.Object. This object will be later passed as a
+ * <code>cookie</code> parameter for {@link postinvoke}, to create tie
+ * between preinvoke and postinvoke. The application should <i>not</i>
+ * suppose that each call of preinvoke is followed by the subsequent
+ * postinvoke for the same invocation; under multi threaded policy these
+ * calls may be intermixed.
+ *
+ * @return a servant that will serve the incoming request.
+ *
+ * @throws ForwardRequest if the locator decides to forward the request
+ * to another object. The exception contains the object that should
+ * handle this request. This object is usually remote, but can also
+ * be local. As <code>preinvoke</code> is called on each method
+ * invocation, the thrown exception will forward only this current request.
+ */
+ Servant preinvoke(byte[] Object_Id, POA poa, String operation,
+ CookieHolder cookie_holder
+ )
+ throws ForwardRequest;
+
+ /**
+ * If the POA has the USE_SERVANT_MANAGER and NON_RETAIN policies, it
+ * invokes this method whenever a servant completes a request.
+ *
+ * @param Object_Id the id of the object, on which the request was called.
+ * @param poa the POA in those scope the object is active.
+ * @param operation the name of the method or operation that was invoked.
+ * @param cookie the object that has been previously set by preinvoke in
+ * the <code>cookie_holder</code> parameter.
+ * @param servant the servant, associated with the object.
+ */
+ void postinvoke(byte[] Object_Id, POA poa, String operation,
+ java.lang.Object cookie, Servant servant
+ );
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantLocatorPOA.java b/org/omg/PortableServer/ServantLocatorPOA.java
new file mode 100644
index 000000000..0a0f99661
--- /dev/null
+++ b/org/omg/PortableServer/ServantLocatorPOA.java
@@ -0,0 +1,180 @@
+/* ServantLocatorPOA.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import gnu.CORBA.Poa.gnuServantObject;
+
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+
+/**
+ * <p>The ServantLocator stub is an optional base for the
+ * servant locators. It cannot serve remote invocations, as
+ * methods in {@link ServantLocatorOperations} take POA as one of parameters.
+ * Both JDK 1.5 API and OMG specifies that POA is a local object that must not
+ * be transferred to the remote invocation target.
+ * </p><p>
+ * You do not need to derive your servant locator from this stub,
+ * it is enough to implement the {@link ServantLocator} interface.
+ * But you may choose to do this if you need its functional
+ * {@link #_ids()} method or want to keep default behavior during per-
+ * or post- invokcations.
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ServantLocatorPOA
+ extends Servant
+ implements ServantLocatorOperations, InvokeHandler
+{
+ /**
+ * Used to access the outer class in the nested classes.
+ */
+ final ServantLocatorPOA THIS = this;
+
+ /**
+ * It is your responsibility to take the preinvoke actions, if any,
+ * and also supply an appropriate servant for the current invocation.
+ *
+ * The default method instructs POA that the servant cannot be
+ * provided by locator. The OBJ_ADAPTER exception will be
+ * thrown by POA, unless it uses the available default servant for all
+ * invocations.
+ *
+ * @specnote in GNU Classpath, returning null means that the
+ * locator does not supply the servant.
+ *
+ * @see ServantLocatorOperations#preinvoke
+ */
+ public Servant preinvoke(byte[] Object_Id, POA poa, String method,
+ CookieHolder cookie_holder
+ )
+ throws org.omg.PortableServer.ForwardRequest
+ {
+ return null;
+ }
+
+ /**
+ * It is your responsibility to take the postinvoke actions, if any,
+ * by overriding this method. The default method does nothing.
+ *
+ * @see ServantLocatorOperations#postinvoke
+ */
+ public void postinvoke(byte[] Object_Id, POA poa, String method,
+ java.lang.Object cookie, Servant servant
+ )
+ {
+ }
+
+ /**
+ * Our implementation will not call this method. After setting your
+ * manager to POA, it will call incarnate and etherialize directly.
+ */
+ public OutputStream _invoke(String method, InputStream input,
+ ResponseHandler handler
+ )
+ throws SystemException
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Returns an array of interfaces, supported by the servant locator.
+ */
+ public String[] _all_interfaces(POA poa, byte[] Object_Id)
+ {
+ return new _ServantLocatorStub()._ids();
+ }
+
+ /**
+ * Return the complete instance of the servant activator, based on
+ * the current class (ServantActivatorPOA or derived).
+ */
+ public ServantLocator _this()
+ {
+ return new delegator(this);
+ }
+
+ /**
+ * Return the complete instance of the servant activator, based on
+ * the current class (ServantActivatorPOA or derived).
+ */
+ public ServantLocator _this(ORB orb)
+ {
+ return new delegator(this);
+ }
+
+ /**
+ * This class is used to support _this.
+ */
+ class delegator
+ extends gnuServantObject
+ implements ServantLocator
+ {
+ delegator(Servant s)
+ {
+ super(s, new byte[ 0 ], null, null);
+ }
+
+ public Servant preinvoke(byte[] Object_Id, POA poa, String method,
+ CookieHolder cookie_holder
+ )
+ throws org.omg.PortableServer.ForwardRequest
+ {
+ return THIS.preinvoke(Object_Id, poa, method, cookie_holder);
+ }
+
+ public void postinvoke(byte[] Object_Id, POA poa, String method,
+ java.lang.Object cookie, Servant servant
+ )
+ {
+ THIS.postinvoke(Object_Id, poa, method, cookie, servant);
+ }
+
+ public String[] _ids()
+ {
+ return THIS._all_interfaces(null, null);
+ }
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantManager.java b/org/omg/PortableServer/ServantManager.java
new file mode 100644
index 000000000..082aea34e
--- /dev/null
+++ b/org/omg/PortableServer/ServantManager.java
@@ -0,0 +1,56 @@
+/* ServantManager.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * A servant manager is associated with POA and provide possibility
+ * to activate objects on demand. A servant manager interface itself
+ * is empty, but it is inherited by other two interfaces,
+ * {@link ServantActivator} and {@link ServantLocator}.
+ *
+ * @see POAOperations#set_servant_manager
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantManager
+ extends ServantManagerOperations, IDLEntity, org.omg.CORBA.Object
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantManagerOperations.java b/org/omg/PortableServer/ServantManagerOperations.java
new file mode 100644
index 000000000..b7c3b753b
--- /dev/null
+++ b/org/omg/PortableServer/ServantManagerOperations.java
@@ -0,0 +1,54 @@
+/* ServantManagerOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+/**
+ * This interface would define the operations, applicable to
+ * the ServantManager. A servant manager interface itself
+ * is empty, but it is inherited by other two interfaces,
+ * {@link ServantActivator} and {@link ServantLocator}.
+ *
+ * @see ServantActivatorOperations
+ * @see ServantLocatorOperations
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantManagerOperations
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantRetentionPolicy.java b/org/omg/PortableServer/ServantRetentionPolicy.java
new file mode 100644
index 000000000..ee47af517
--- /dev/null
+++ b/org/omg/PortableServer/ServantRetentionPolicy.java
@@ -0,0 +1,58 @@
+/* ServantRetentionPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Specifies if the active servants should be retained in the
+ * Active Object Map.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link ServantRetentionPolicyOperations}.
+ *
+ * @see ServantRetentionPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantRetentionPolicy
+ extends Policy, ServantRetentionPolicyOperations, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantRetentionPolicyOperations.java b/org/omg/PortableServer/ServantRetentionPolicyOperations.java
new file mode 100644
index 000000000..2ef0ab554
--- /dev/null
+++ b/org/omg/PortableServer/ServantRetentionPolicyOperations.java
@@ -0,0 +1,55 @@
+/* ServantRetentionPolicyOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the ServantRetentionPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ServantRetentionPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ ServantRetentionPolicyValue value();
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ServantRetentionPolicyValue.java b/org/omg/PortableServer/ServantRetentionPolicyValue.java
new file mode 100644
index 000000000..caf8132e6
--- /dev/null
+++ b/org/omg/PortableServer/ServantRetentionPolicyValue.java
@@ -0,0 +1,150 @@
+/* ServantRetentionPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+* Specifies the servant retention policy.
+*
+* This enumeration can obtain the following values:
+* <ul>
+* <li>RETAIN The POA retains active servants in its Active Object Map.</li>
+* <li>NON_RETAIN The servants are not retained.</li>
+* </ul>
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ServantRetentionPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -7476100336036943822L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (RETAIN).
+ */
+ public static final int _RETAIN = 0;
+
+ /**
+ * An instance of ServantRetentionPolicyValue, indicating that
+ * the POA retains active servants in its Active Object Map.
+ */
+ public static final ServantRetentionPolicyValue RETAIN =
+ new ServantRetentionPolicyValue(_RETAIN);
+
+ /**
+ * The possible value of this enumeration (NON_RETAIN).
+ */
+ public static final int _NON_RETAIN = 1;
+
+ /**
+ * An instance of ServantRetentionPolicyValue, indicating that
+ * the POA does not use the Active Object Map.
+ */
+ public static final ServantRetentionPolicyValue NON_RETAIN =
+ new ServantRetentionPolicyValue(_NON_RETAIN);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final ServantRetentionPolicyValue[] enume =
+ new ServantRetentionPolicyValue[] { RETAIN, NON_RETAIN };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "RETAIN", "NON_RETAIN" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected ServantRetentionPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the ServantRetentionPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _RETAIN, _NON_RETAIN.
+ * @return one of RETAIN, NON_RETAIN.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static ServantRetentionPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the policy value.
+ * @return _RETAIN or _NON_RETAIN.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/THREAD_POLICY_ID.java b/org/omg/PortableServer/THREAD_POLICY_ID.java
new file mode 100644
index 000000000..ef0427dde
--- /dev/null
+++ b/org/omg/PortableServer/THREAD_POLICY_ID.java
@@ -0,0 +1,52 @@
+/* THREAD_POLICY_ID.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+ /**
+ * Holds an integer {@link ThreadPolicy} identifier.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface THREAD_POLICY_ID
+{
+ /**
+ * Specifies the THREAD_POLICY_ID value, 16.
+ */
+ int value = 16;
+}
diff --git a/org/omg/PortableServer/ThreadPolicy.java b/org/omg/PortableServer/ThreadPolicy.java
new file mode 100644
index 000000000..b16ac1737
--- /dev/null
+++ b/org/omg/PortableServer/ThreadPolicy.java
@@ -0,0 +1,57 @@
+/* ThreadPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.portable.IDLEntity;
+
+/**
+ * Defines the POA thread policy.
+ *
+ * The policy can return its current value, as defined.
+ * in {@link ThreadPolicyOperations}.
+ *
+ * @see ThreadPolicyValue for the possible values of this policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ThreadPolicy
+ extends Policy, ThreadPolicyOperations, IDLEntity
+{
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ThreadPolicyOperations.java b/org/omg/PortableServer/ThreadPolicyOperations.java
new file mode 100644
index 000000000..b36628816
--- /dev/null
+++ b/org/omg/PortableServer/ThreadPolicyOperations.java
@@ -0,0 +1,55 @@
+/* ThreadPolicyOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.PolicyOperations;
+
+/**
+ * Defines the operations, applicable to the ThreadPolicy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface ThreadPolicyOperations
+ extends PolicyOperations
+{
+ /**
+ * Return the value of this policy type, stated by the current instance.
+ */
+ ThreadPolicyValue value();
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/ThreadPolicyValue.java b/org/omg/PortableServer/ThreadPolicyValue.java
new file mode 100644
index 000000000..c7d4d6367
--- /dev/null
+++ b/org/omg/PortableServer/ThreadPolicyValue.java
@@ -0,0 +1,163 @@
+/* ThreadPolicyValue.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Defines the possible values for the POA thread policy.
+ *
+ * This enumeration can obtain the following values:
+ * <ul>
+ * <li>ORB_CTRL_MODEL Each object in POA has a separate serving thread
+ * and a separate server socket, listening on the objects individual
+ * port. Additionally, when the request is accepted, it is also
+ * served in a separate thread, so several requests to the same
+ * object can be processed in parallel. The servant can always get
+ * the Id and POA of the object it is currently serving by
+ * invoking {@link Servant#_object_id()} and {@link Servant#_poa}.
+ * These two methods use thread to data map and must work correctly
+ * even then the servant code is executed in several parallel threads.
+ * </li>
+ * <li>SINGLE_THREAD_MODEL All objects in POA share the same server
+ * socket and are served in the same thread. This model is applicable
+ * when the number of objects is greater than the number of threads
+ * and (or) ports, supported by the system.</li>
+ * </ul>
+ * OMG also defines a MAIN_THREAD_MODEL, currently not supported by
+ * the java API.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ThreadPolicyValue
+ implements Serializable, IDLEntity
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -8874988828297141512L;
+
+ /**
+ * The value field for the current instance.
+ */
+ private final int _value;
+
+ /**
+ * The possible value of this enumeration (ORB_CTRL_MODEL).
+ */
+ public static final int _ORB_CTRL_MODEL = 0;
+
+ /**
+ * An instance of ThreadPolicyValue, initialized to ORB_CTRL_MODEL.
+ */
+ public static final ThreadPolicyValue ORB_CTRL_MODEL =
+ new ThreadPolicyValue(_ORB_CTRL_MODEL);
+
+ /**
+ * The possible value of this enumeration (SINGLE_THREAD_MODEL).
+ */
+ public static final int _SINGLE_THREAD_MODEL = 1;
+
+ /**
+ * An instance of ThreadPolicyValue, initialized to SINGLE_THREAD_MODEL.
+ */
+ public static final ThreadPolicyValue SINGLE_THREAD_MODEL =
+ new ThreadPolicyValue(_SINGLE_THREAD_MODEL);
+
+ /**
+ * The private array that maps integer codes to the enumeration
+ * values.
+ */
+ private static final ThreadPolicyValue[] enume =
+ new ThreadPolicyValue[] { ORB_CTRL_MODEL, SINGLE_THREAD_MODEL };
+
+ /**
+ * The private array of state names.
+ */
+ private static final String[] state_names =
+ new String[] { "ORB_CTRL_MODEL", "SINGLE_THREAD_MODEL" };
+
+ /**
+ * Normally, no new instances are required, so the constructor is protected.
+ */
+ protected ThreadPolicyValue(int a_value)
+ {
+ _value = a_value;
+ }
+
+ /**
+ * Returns the ThreadPolicyValue, matching the given integer constant.
+ *
+ * @param code one of _ORB_CTRL_MODEL, _SINGLE_THREAD_MODEL.
+ * @return one of ORB_CTRL_MODEL, SINGLE_THREAD_MODEL.
+ * @throws BAD_PARAM if the parameter is not one of the valid values.
+ */
+ public static ThreadPolicyValue from_int(int code)
+ {
+ try
+ {
+ return enume [ code ];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ throw new BAD_OPERATION("Invalid enumeration code " + code);
+ }
+ }
+
+ /**
+ * Returns a short string representation.
+ * @return the name of the current enumeration value.
+ */
+ public String toString()
+ {
+ return state_names [ _value ];
+ }
+
+ /**
+ * Returns the integer code of the enumeration value.
+ * @return one of ORB_CTRL_MODEL, SINGLE_THREAD_MODEL.
+ */
+ public int value()
+ {
+ return _value;
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/_ServantActivatorStub.java b/org/omg/PortableServer/_ServantActivatorStub.java
new file mode 100644
index 000000000..a37a97d50
--- /dev/null
+++ b/org/omg/PortableServer/_ServantActivatorStub.java
@@ -0,0 +1,131 @@
+/* _ServantActivatorStub.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+
+import java.io.Serializable;
+
+/**
+ * <p>This ServantActivator stub is an optional base for the
+ * servant activators. This stub cannot accept remote invocations, as
+ * methods in {@link ServantActivatorOperations} take POA as one of parameters.
+ * Both JDK 1.5 API and OMG specifies that POA is a local object that must not
+ * be transferred to the remote invocation target.
+ * </p><p>
+ * You do not need to derive your servant activator from this stub,
+ * it is enough to implement the {@link ServantActivator} interface.
+ * But you may choose to do this if you need the functional
+ * {@link #_ids()} method or want to keep default behavior during
+ * the incarnation or etherialization.
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _ServantActivatorStub
+ extends ObjectImpl
+ implements ServantActivator, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -685959979577281419L;
+
+ /**
+ * This the purpose of this field is undocumented up till 1.5 java API
+ * inclusive.
+ */
+ public static final Class _opsClass = ServantActivatorOperations.class;
+
+ /**
+ * Return the array of repository ids for this object.
+ *
+ * @return { "IDL:omg.org/PortableServer/ServantActivator:2.3",
+ * "IDL:omg.org/PortableServer/ServantManager:1.0" }, always.
+ */
+ public String[] _ids()
+ {
+ return new String[]
+ {
+ "IDL:omg.org/PortableServer/ServantActivator:2.3",
+ "IDL:omg.org/PortableServer/ServantManager:1.0"
+ };
+ }
+
+ /**
+ * It is your responsibility to handle the incarnation event and
+ * supply the servant. Override this method if using the class.
+ * The default method instructs POA that the servant cannot be
+ * provided by activator. The OBJ_ADAPTER exception will be
+ * thrown by POA, unless the servant is provided as one of the
+ * parameters in the activation method.
+ *
+ * @see ServantActivatorOperations#incarnate
+ *
+ * @specnote in GNU Classpath, returning null means that the
+ * activator does not supply the servant.
+ *
+ * @throws ForwardRequest
+ */
+ public Servant incarnate(byte[] Object_id, POA poa)
+ throws ForwardRequest
+ {
+ return null;
+ }
+
+ /**
+ * It is your responsibility to handle the etherialization event.
+ * Override this method if using the class. The default method
+ * does nothing.
+ *
+ * @see ServantActivatorOperations#incarnate
+ */
+ public void etherealize(byte[] Object_id, POA poa, Servant servant,
+ boolean cleanup, boolean remaining
+ )
+ {
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/_ServantLocatorStub.java b/org/omg/PortableServer/_ServantLocatorStub.java
new file mode 100644
index 000000000..a2a6ab4bd
--- /dev/null
+++ b/org/omg/PortableServer/_ServantLocatorStub.java
@@ -0,0 +1,132 @@
+/* _ServantLocatorStub.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.PortableServer;
+
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+
+import java.io.Serializable;
+
+/**
+ * <p>The ServantLocator stub is an optional base for the
+ * servant locators. This stub cannot accept remote invocations, as
+ * methods in {@link ServantLocatorOperations} take POA as one of parameters.
+ * Both JDK 1.5 API and OMG specifies that POA is a local object that must not
+ * be transferred to the remote invocation target.
+ * </p><p>
+ * You do not need to derive your servant locator from this stub,
+ * it is enough to implement the {@link ServantLocator} interface.
+ * But you may choose to do this if you need its functional
+ * {@link #_ids()} method or want to keep default behavior during per-
+ * or post- invokcations.
+ * </p>
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class _ServantLocatorStub
+ extends ObjectImpl
+ implements ServantLocator, Serializable
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -2374963516905770111L;
+
+ /**
+ * This the purpose of this field is undocumented up till 1.5 java API
+ * inclusive.
+ */
+ public static final Class _opsClass = ServantLocatorOperations.class;
+
+ /**
+ * The package private string, used as a parameter for
+ * the throws NullPointerExceptions in both servant locator and activator
+ * stubs.
+ */
+ static final String OVERRIDE = "Override this method to get functionality.";
+
+ /**
+ * Return the array of repository ids for this object, stating that it is
+ * both Servant locator and Servant manager.
+ *
+ * @return { "IDL:omg.org/PortableServer/ServantLocator:1.0",
+ * "IDL:omg.org/PortableServer/ServantManager:1.0" }, always.
+ */
+ public String[] _ids()
+ {
+ return new String[]
+ {
+ "IDL:omg.org/PortableServer/ServantLocator:1.0",
+ "IDL:omg.org/PortableServer/ServantManager:1.0"
+ };
+ }
+
+ /**
+ * It is your responsibility to take the preinvoke actions, if any,
+ * and also supply an appropriate servant for the current invocation.
+ *
+ * The default method instructs POA that the servant cannot be
+ * provided by locator. The OBJ_ADAPTER exception will be
+ * thrown by POA, unless it uses the available default servant for all
+ * invocations.
+ *
+ * @specnote in GNU Classpath, returning null means that the
+ * locator does not supply the servant.
+ *
+ * @see ServantLocatorOperations#preinvoke
+ */
+ public Servant preinvoke(byte[] Object_id, POA poa, String method,
+ CookieHolder cookie
+ )
+ throws ForwardRequest
+ {
+ return null;
+ }
+
+ /**
+ * It is your responsibility to take the postinvoke actions, if any,
+ * by overriding this method. The default method does nothing.
+ *
+ * @see ServantLocatorOperations#postinvoke
+ */
+ public void postinvoke(byte[] Object_id, POA poa, String method,
+ Object cookie, Servant servant
+ )
+ {
+ }
+} \ No newline at end of file
diff --git a/org/omg/PortableServer/package.html b/org/omg/PortableServer/package.html
new file mode 100644
index 000000000..e4a74ef1a
--- /dev/null
+++ b/org/omg/PortableServer/package.html
@@ -0,0 +1,231 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in org.omg.PortableServer package
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - The Portable Object Adapter package</title></head>
+<body>
+<p>
+The Portable Object Adapter (POA) provides more control on the request
+processing than it is possible when connecting objects directly to the
+ORB. The POA model defines a tree structure of POAs, the root POA being
+connected directly to the ORB. Any branch of this tree can be temporary or
+permanently inactivated using {@link org.omg.PortableServer.POAManager}.
+The same manager can control several branches in the POA tree. Also,
+any branch in this tree can have different processing options (policies).
+</p><p>
+The newly created POA is in holding state, just queuing requests. To start
+processing requests, it must be turned into the active state by its
+{@link org.omg.PortableServer.POAManagerOperations#activate}.
+</p><p>
+The previously monolite object implementation is now divided into object
+(that implements {@link org.omg.CORBA.Object})
+and servant (that implements either {@link org.omg.CORBA.portable.InvokeHandler}
+or {@link org.omg.PortableServer.DynamicImplementation}).
+Frequently each object has its own servant, but it can also be a single servant
+per multiple objects and also default servant for POA
+(see {@link org.omg.PortableServer.POAOperations#set_servant}). Each object
+has its own Object Id, unique in the scope of the POA, where the object is
+connected. These Ids need not be different for objects belonging
+to different POAs, even if these POAs are connected to the same ORB.
+Under the USER_ID is assignment policy this Id can be a specified by user in
+{@link org.omg.PortableServer.POAOperations#activate_object_with_id},
+encapsulating some meaningful information about the object. The Id of the
+object being currently served can be identified with
+{@link org.omg.PortableServer.Servant#_object_id}. This approach is used in cases
+when it is possible to encapsulate all object-related data into the
+Object Id. Such system only needs one servant, one server socket and one
+socket port per POA that can handle thounsands of objects.
+</p><p>
+Instead of being connected directly to the ORB, objects are now connected
+to one of the ORBs POAs. Since JDK 1.4 the application specific implementation
+base is derived from the {@link org.omg.PortableServer.Servant}, having a
+different name pattern (<code>*POA.java</code> instead of the previous
+<code>_*ImplBase.java</code>). This <code>*POA</code> suffix does <i>not</i>
+mean that these servants implement or are derived from POA. They are different
+classes that can be connected to one of the POAs, by instance, using
+{@link org.omg.PortableServer.POAOperations#servant_to_reference}.
+The implementation base also inherits an *Operations interface, containing
+definitions of the application specific methods. The application programmer
+writes a descendent of the implementation base, implementing these methods
+for the application - specific functionality.
+</p><p>
+The POA objects support the method invocation by name, using
+{@link org.omg.CORBA.Request}. This alternative method works without the
+service-specific classes that may not be available at run time.
+</p><p>
+The objects in POA can also be activated and inactivated independently. It
+is possible to set a listener ({@link org.omg.PortableServer.ServantActivator})
+that would register the object activations ("incarnations") and deactivations
+("etherializations"). The servant need not be specifyed when creating an
+object. Under the IMPLICIT_ACTIVATION
+{@link org.omg.PortableServer.ImplicitActivationPolicy}
+the {@link org.omg.PortableServer.ServantActivator} can provide the servant
+in response to the first (local or remote) call of any method on the
+previously incative object.
+</p><p>
+The root POA is obtained by resolving the initial reference "RootPOA"
+for the orb. In the simpliest case the objects can be connected directly
+to that root POA without creating the POA tree. The policies, used by
+the root POA, are defined by OMG as following:
+<table border="1">
+<tr><th>Policy type</th><th>Accepted policy</th></tr>
+<tr><td>{@link org.omg.PortableServer.IdAssignmentPolicy} </td><td>SYSTEM_ID
+(Ids are created by POA)</td></tr>
+<tr><td>{@link org.omg.PortableServer.IdUniquenessPolicy}</td><td>UNIQUE_ID
+ (single object (and Id) per servant)
+</td></tr>
+<tr><td>{@link org.omg.PortableServer.ImplicitActivationPolicy} </td><td>
+IMPLICIT_ACTIVATION (if inactive, activate)</td></tr>
+<tr><td>{@link org.omg.PortableServer.LifespanPolicy} </td><td>TRANSIENT
+(the POA objects cannot outlive POA)</td></tr>
+<tr><td>{@link org.omg.PortableServer.RequestProcessingPolicy} </td><td>
+USE_ACTIVE_OBJECT_MAP_ONLY (the servant is provided during activation)</td></tr>
+<tr><td>{@link org.omg.PortableServer.ServantRetentionPolicy} </td><td>
+RETAIN (retain servants for subsequent invocations)</td></tr>
+<tr><td>{@link org.omg.PortableServer.ThreadPolicy} </td><td>ORB_CTRL_MODEL
+(single thread per request and single server socket per object)</td></tr>
+</table>
+These values are also default for the child POAs The policies are
+<i>never</i> inherited from the parent POA.
+</p><p>
+This set of policies means that each object will have a separate serving
+thread, separate network socket port and usually a separate servant. It
+is appropriate when the expected number of objects is not too large.
+If the expected number of objects is larger than the supportable number
+of threads and socket ports, the SINGLE_THREAD_MODEL
+{@link org.omg.PortableServer.ThreadPolicy} is
+used. Then all objects in POA with this policy are served in a single
+thread, using the same server socket, connected to a single port. If the
+request processing policy is additionally set to USE_DEFAULT_SERVANT,
+all objects of this POA share the same (default) servant.
+</p><p>
+The operations, supported by POA are defined
+separately in {@link org.omg.PortableServer.POAOperations}.
+</p><p>
+<h3>The typical POA usage scenarios</h3>
+<h4>POA converts servant to the object reference</h4>
+In the simpliest case, the servant implementation is connected to POA by
+{@link org.omg.PortableServer.POAOperations#servant_to_reference}, the
+returned object being a target of remote and local invocations.
+It may be converted into the stringified reference, registered with
+the naming service, used locally or, when serving or invoking local or remote
+method, passed as a parameter or return value having the CORBA Object type.
+The object obtains Id from POA and is activated due default implicit
+activation policy. This scenario is supported by the default policy set
+and is used in the most of the "hello world" examples.
+<h4>Servant provides to the object reference</h4>
+The servant can be connected to an ORB by
+{@link org.omg.PortableServer.Servant#_this_object(org.omg.CORBA.ORB)},
+obtaining the object reference. The overridable
+{@link org.omg.PortableServer.Servant#_default_POA()}
+specifies POA to that the servant will be connected. The default method
+connects to the root poa. IDL compilers frequently generate the
+<code>_this(ORB)</code> metod for servants for getting the object reference
+that is already narrowed to the exact object type.
+<h4>Explicit activation with POA assigned ids</h4>
+The objects are activated by calling the
+{@link org.omg.PortableServer.POAOperations#activate_object} on the
+POA with the object in question. The POA allocates, assigns, and
+returns a unique identity value for the object. This scenario requires the
+SYSTEM_ID {@link org.omg.PortableServer.IdAssignmentPolicy}.
+<h4>Explicit Activation with User-assigned Ids</h4>
+The POA supports an explicit activation operation,
+{@link org.omg.PortableServer.POAOperations#activate_object_with_id},
+that associates a servant with the user-defined Object Id.
+This scenario requires the USER_ID
+{@link org.omg.PortableServer.IdAssignmentPolicy}. The servant manager
+may be or may not be used.
+<h4>References before activation</h4>
+It may be useful to create references for objects before activating them.
+Such reference can be created using
+{@link org.omg.PortableServer.POAOperations#create_reference} or
+{@link org.omg.PortableServer.POAOperations#create_reference_with_id}, both
+methods also requiring to give the object repository id. Such object may
+be later activated either by
+{@link org.omg.PortableServer.POAOperations#activate_object_with_id} or
+automatically, if the IMPLICIT_ACTIVATION policy applies.
+<h4>Multiple Ids per servant</h4>
+If the MULTIPLE_ID policy applies, the servant may be activated many times.
+Under this policy,
+{@link org.omg.PortableServer.POAOperations#servant_to_reference}
+and {@link org.omg.PortableServer.POAOperations#servant_to_id}
+during each call create a new object and object reference for the
+used servant.
+<h4>One servant for all objects</h4>
+If the USE_DEFAULT_SERVANT policy applies, that default servant serves all
+objects, belonging this POA. This approach is used when there is
+very little data associated with each object, so little that the data can be
+encoded in the Object Id. Also, it may be needed when a very large
+number of objects is expected. If the RETAIN applies, it is possible to
+activate an object explicitly setting the servant other than default.
+If NO_RETAIN applies, the default servant will serve all known an
+unknown objects for that POA.
+<h4>Single Servant, Many Objects and Types</h4>
+Combining USER_ID, USE_DEFAULT_SERVANT and RETAIN, it is possible to
+create and serve objects "on the fly". The servant must determine the
+object type (for instance, from the value of the agreed attribute,
+shared by all supported types, or from the Object Id) and be able to
+handle the method, named in request. If the names and parameter lists
+of the object methods are also created "on the fly", the requests
+to such object can still be submitted using {@link org.omg.CORBA.Request}.
+This method is used when the created object represents some
+entity in the complex database.
+<h4>The ServantLocator finds a servant for each call</h4>
+The {@link org.omg.PortableServer.ServantLocator} is used by POAs that
+combinine NON_RETAIN and USE_SERVANT_MANAGER policies. It provides
+a new or reused servant every time the invocation is made. The servant
+locator must provide a servant in response of calling
+{@link org.omg.PortableServer.ServantLocatorOperations#preinvoke}.
+This method has access the the Id of the object being served and
+the name of the method being called. It must return the appropriate
+instance of the servant or throw an exception, forwarding the request
+to another object (usually in another server). After the invocation,
+a {@link org.omg.PortableServer.ServantLocatorOperations#postinvoke}
+is called. It should be not assumed that the call of <code>preinvoke</code>
+will be followed by the call of the <code>postinvoke</code>; in
+multithreaded environment these calls are not serialized in this way. If
+the <code>preinvoke</code> has to tell something this-call-specific to
+the <code>postinvoke</code>, it must use the provided cookie holder.
+The <code>preinvoke/postinoke</code> are also called to provide a servant
+during each local invocation on the objects, belonging to the described POA.
+</p><p>
+All these scenarios must work with the current GNU Classpath release.
+
+@author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+</body>
+</html>
diff --git a/org/omg/SendingContext/RunTime.java b/org/omg/SendingContext/RunTime.java
new file mode 100644
index 000000000..09d3d505b
--- /dev/null
+++ b/org/omg/SendingContext/RunTime.java
@@ -0,0 +1,60 @@
+/* RunTime.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.SendingContext;
+
+import org.omg.CORBA.Object;
+import org.omg.CORBA.portable.IDLEntity;
+
+import java.io.Serializable;
+
+/**
+ * Defines the base class that represents the Sending Context. The sending
+ * context provides access to information about the originator of a
+ * GIOP message. For example, when a value type is sent in a GIOP
+ * Request, the receiver may need to ask the sender about
+ * the CodeBase for the implementation of the value type.
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface RunTime
+ extends IDLEntity, Object, RunTimeOperations, Serializable
+{
+} \ No newline at end of file
diff --git a/org/omg/SendingContext/RunTimeOperations.java b/org/omg/SendingContext/RunTimeOperations.java
new file mode 100644
index 000000000..dabcb74c0
--- /dev/null
+++ b/org/omg/SendingContext/RunTimeOperations.java
@@ -0,0 +1,57 @@
+/* RunTimeOperations.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package org.omg.SendingContext;
+
+
+/**
+ * Defines the operations, applicable for Sending Context. The sending
+ * context provides access to information about the originator of a
+ * GIOP message. For example, when a value type is sent in a GIOP
+ * Request, the receiver may need to ask the sender about
+ * the CodeBase for the implementation of the value type.
+ *
+ * Unfortunately, no public operations are defined up till 1.4 inclusive.
+ *
+ * @since 1.3
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public interface RunTimeOperations
+{
+} \ No newline at end of file
diff --git a/org/omg/SendingContext/package.html b/org/omg/SendingContext/package.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/org/omg/SendingContext/package.html
diff --git a/org/omg/stub/java/rmi/_Remote_Stub.java b/org/omg/stub/java/rmi/_Remote_Stub.java
index 81d327fd8..0d0bac661 100644
--- a/org/omg/stub/java/rmi/_Remote_Stub.java
+++ b/org/omg/stub/java/rmi/_Remote_Stub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,20 +38,32 @@ exception statement from your version. */
package org.omg.stub.java.rmi;
-import org.omg.CORBA_2_3.portable.ObjectImpl;
+import java.io.Serializable;
+
+import java.rmi.Remote;
+
+import javax.rmi.CORBA.Stub;
/**
* Provides a stub for Remote type.
*
* Despite this class has appeared since v 1.3, it is oficially marked
- * as incomplete at least till v 1.4 inclusive. Hence significant alterations
+ * as incomplete at least till v 1.5 inclusive. Hence significant alterations
* are expected in the future.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public final class _Remote_Stub
- extends ObjectImpl
+ extends Stub
+ implements Remote, Serializable
{
+
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1967190271952680697L;
+
+
/**
* Returs the array of repository ids, implemented by this object.
* The method must be overridden to return the meaningful information.
@@ -62,4 +74,5 @@ public final class _Remote_Stub
{
return new String[] { "" };
}
-} \ No newline at end of file
+
+}
diff --git a/org/omg/stub/java/rmi/package.html b/org/omg/stub/java/rmi/package.html
index cf9febd2c..f8ab89a33 100644
--- a/org/omg/stub/java/rmi/package.html
+++ b/org/omg/stub/java/rmi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/resource/gnu/java/awt/peer/gtk/font.properties b/resource/gnu/java/awt/peer/gtk/font.properties
index 29bd0bca1..3687ec334 100644
--- a/resource/gnu/java/awt/peer/gtk/font.properties
+++ b/resource/gnu/java/awt/peer/gtk/font.properties
@@ -15,8 +15,8 @@
#
# You should have received a copy of the GNU General Public License
# along with GNU Classpath; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
#
# Linking this library statically or dynamically with other modules is
# making a combined work based on this library. Thus, the terms and
diff --git a/resource/java/security/classpath.security b/resource/java/security/classpath.security
index cd1223bee..c8e9dac94 100644
--- a/resource/java/security/classpath.security
+++ b/resource/java/security/classpath.security
@@ -15,8 +15,8 @@
#
# You should have received a copy of the GNU General Public License
# along with GNU Classpath; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
#
# Linking this library statically or dynamically with other modules is
# making a combined work based on this library. Thus, the terms and
diff --git a/resource/org/ietf/jgss/MessagesBundle.properties b/resource/org/ietf/jgss/MessagesBundle.properties
index af8247cbf..2d88225ee 100644
--- a/resource/org/ietf/jgss/MessagesBundle.properties
+++ b/resource/org/ietf/jgss/MessagesBundle.properties
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU General Public License
# along with GNU Classpath; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
#
# Linking this library statically or dynamically with other modules is
diff --git a/scripts/checkstyle-header.regex b/scripts/checkstyle-header.regex
index 2a08ba371..15eb29a50 100644
--- a/scripts/checkstyle-header.regex
+++ b/scripts/checkstyle-header.regex
@@ -16,8 +16,8 @@
^$
^You should have received a copy of the GNU General Public License$
^along with GNU Classpath; see the file COPYING. If not, write to the$
-^Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA$
-^02111-1307 USA.$
+^Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA$
+^02110-1301 USA.$
^$
^Linking this library statically or dynamically with other modules is$
^making a combined work based on this library. Thus, the terms and$
diff --git a/scripts/classpath.spec.in b/scripts/classpath.spec.in
index 1b6f86ceb..017922707 100644
--- a/scripts/classpath.spec.in
+++ b/scripts/classpath.spec.in
@@ -1,4 +1,4 @@
-# $Id: classpath.spec.in,v 1.1.2.1 2005-04-03 00:09:11 gnu_andrew Exp $
+# $Id: classpath.spec.in,v 1.1.2.2 2005-08-02 20:12:48 gnu_andrew Exp $
%define version_num @PACKAGE_VERSION@
%define release_num 1
@@ -27,7 +27,7 @@ for the Java programming language.
pushd ${RPM_BUILD_DIR}/classpath-%{version_num}
# Determine if we can build the GTK stuff
GTKPEER='disable'
-if pkg-config --exists 'gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 libart-2.0 gdk-pixbuf-2.0'; then
+if pkg-config --exists 'gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0'; then
GTKPEER='enable'
fi
%configure --with-jikes --enable-jni --${GTKPEER}-gtk-peer
diff --git a/scripts/generate-locale-list.sh b/scripts/generate-locale-list.sh
index 5537f3f33..fb55c1c28 100755
--- a/scripts/generate-locale-list.sh
+++ b/scripts/generate-locale-list.sh
@@ -2,8 +2,6 @@
CLASSPATH_SRCDIR=`dirname $0`/..
-cd $CLASSPATH_SRCDIR/gnu/java/locale
-
echo "/* LocaleData.java --"
echo " Copyright (C) 2004, 2005 Free Software Foundation, Inc."
echo
@@ -21,8 +19,8 @@ echo "General Public License for more details."
echo
echo "You should have received a copy of the GNU General Public License"
echo "along with GNU Classpath; see the file COPYING. If not, write to the"
-echo "Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA"
-echo "02111-1307 USA."
+echo "Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA"
+echo "02110-1301 USA."
echo
echo "Linking this library statically or dynamically with other modules is"
echo "making a combined work based on this library. Thus, the terms and"
diff --git a/scripts/unicode-blocks.pl b/scripts/unicode-blocks.pl
index d9d0b70a0..301cd1dd8 100755
--- a/scripts/unicode-blocks.pl
+++ b/scripts/unicode-blocks.pl
@@ -16,8 +16,8 @@
#
# You should have received a copy of the GNU General Public License
# along with GNU Classpath; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
#
# Linking this library statically or dynamically with other modules is
# making a combined work based on this library. Thus, the terms and
diff --git a/scripts/unicode-muncher.pl b/scripts/unicode-muncher.pl
index a9008df32..b275f36f0 100755
--- a/scripts/unicode-muncher.pl
+++ b/scripts/unicode-muncher.pl
@@ -16,8 +16,8 @@
#
# You should have received a copy of the GNU General Public License
# along with GNU Classpath; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
#
# Linking this library statically or dynamically with other modules is
# making a combined work based on this library. Thus, the terms and
@@ -343,8 +343,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/test/gnu.java.lang.reflect/TypeSignatureTest.java b/test/gnu.java.lang.reflect/TypeSignatureTest.java
index 5aefcd0e9..bd3465d3a 100644
--- a/test/gnu.java.lang.reflect/TypeSignatureTest.java
+++ b/test/gnu.java.lang.reflect/TypeSignatureTest.java
@@ -14,7 +14,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
diff --git a/test/java.io/BufferedByteOutputStreamTest.java b/test/java.io/BufferedByteOutputStreamTest.java
index 2d11579f6..e2785e6b3 100644
--- a/test/java.io/BufferedByteOutputStreamTest.java
+++ b/test/java.io/BufferedByteOutputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/BufferedCharWriterTest.java b/test/java.io/BufferedCharWriterTest.java
index 43e175e4e..2893b4b90 100644
--- a/test/java.io/BufferedCharWriterTest.java
+++ b/test/java.io/BufferedCharWriterTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/BufferedInputStreamTest.java b/test/java.io/BufferedInputStreamTest.java
index c38c179fc..c7d73e352 100644
--- a/test/java.io/BufferedInputStreamTest.java
+++ b/test/java.io/BufferedInputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/BufferedReaderTest.java b/test/java.io/BufferedReaderTest.java
index 3124959e2..d3c1d4fcf 100644
--- a/test/java.io/BufferedReaderTest.java
+++ b/test/java.io/BufferedReaderTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/ByteArrayInputStreamTest.java b/test/java.io/ByteArrayInputStreamTest.java
index 1e70c6af8..1b44985f9 100644
--- a/test/java.io/ByteArrayInputStreamTest.java
+++ b/test/java.io/ByteArrayInputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/CharArrayReaderTest.java b/test/java.io/CharArrayReaderTest.java
index e0cde60fa..8b652b806 100644
--- a/test/java.io/CharArrayReaderTest.java
+++ b/test/java.io/CharArrayReaderTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/DataInputOutputTest.java b/test/java.io/DataInputOutputTest.java
index dcb6e9aec..dd03fb0cd 100644
--- a/test/java.io/DataInputOutputTest.java
+++ b/test/java.io/DataInputOutputTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/FileInputStreamTest.java b/test/java.io/FileInputStreamTest.java
index 1eb92f0ff..e42b93e06 100644
--- a/test/java.io/FileInputStreamTest.java
+++ b/test/java.io/FileInputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/FileOutputStreamTest.java b/test/java.io/FileOutputStreamTest.java
index 27578cc6c..1917f4e3b 100644
--- a/test/java.io/FileOutputStreamTest.java
+++ b/test/java.io/FileOutputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/FileReaderTest.java b/test/java.io/FileReaderTest.java
index 58b290e0e..e22cec53e 100644
--- a/test/java.io/FileReaderTest.java
+++ b/test/java.io/FileReaderTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/FileTest.java b/test/java.io/FileTest.java
index a555c5938..838b99e11 100644
--- a/test/java.io/FileTest.java
+++ b/test/java.io/FileTest.java
@@ -15,7 +15,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/FileWriterTest.java b/test/java.io/FileWriterTest.java
index 3f898099b..3602c045c 100644
--- a/test/java.io/FileWriterTest.java
+++ b/test/java.io/FileWriterTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/LineNumberInputStreamTest.java b/test/java.io/LineNumberInputStreamTest.java
index 26edebd41..fbc726f9e 100644
--- a/test/java.io/LineNumberInputStreamTest.java
+++ b/test/java.io/LineNumberInputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/LineNumberReaderTest.java b/test/java.io/LineNumberReaderTest.java
index 5eb2b1479..1a20b70f5 100644
--- a/test/java.io/LineNumberReaderTest.java
+++ b/test/java.io/LineNumberReaderTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/ObjectInputStreamTest.java b/test/java.io/ObjectInputStreamTest.java
index 9001fae45..af236ddf1 100644
--- a/test/java.io/ObjectInputStreamTest.java
+++ b/test/java.io/ObjectInputStreamTest.java
@@ -14,7 +14,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.FileInputStream;
diff --git a/test/java.io/ObjectOutputStreamTest.java b/test/java.io/ObjectOutputStreamTest.java
index 8bcef125c..62f60dce1 100644
--- a/test/java.io/ObjectOutputStreamTest.java
+++ b/test/java.io/ObjectOutputStreamTest.java
@@ -14,7 +14,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.ByteArrayOutputStream;
diff --git a/test/java.io/ObjectStreamClassTest.java b/test/java.io/ObjectStreamClassTest.java
index f43f2d9f9..7002bf7f0 100644
--- a/test/java.io/ObjectStreamClassTest.java
+++ b/test/java.io/ObjectStreamClassTest.java
@@ -14,7 +14,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.Externalizable;
diff --git a/test/java.io/PipedReaderWriterTest.java b/test/java.io/PipedReaderWriterTest.java
index 48d876237..827598e58 100644
--- a/test/java.io/PipedReaderWriterTest.java
+++ b/test/java.io/PipedReaderWriterTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/PipedStreamTest.java b/test/java.io/PipedStreamTest.java
index 796b35846..d30bfa3e6 100644
--- a/test/java.io/PipedStreamTest.java
+++ b/test/java.io/PipedStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/PrintStreamTest.java b/test/java.io/PrintStreamTest.java
index 11496a65f..bd4dde54d 100644
--- a/test/java.io/PrintStreamTest.java
+++ b/test/java.io/PrintStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/PrintWriterTest.java b/test/java.io/PrintWriterTest.java
index 8568e019f..d466f447a 100644
--- a/test/java.io/PrintWriterTest.java
+++ b/test/java.io/PrintWriterTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/PushbackInputStreamTest.java b/test/java.io/PushbackInputStreamTest.java
index ca2061453..9d67623fe 100644
--- a/test/java.io/PushbackInputStreamTest.java
+++ b/test/java.io/PushbackInputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/PushbackReaderTest.java b/test/java.io/PushbackReaderTest.java
index e651cd8e4..337830623 100644
--- a/test/java.io/PushbackReaderTest.java
+++ b/test/java.io/PushbackReaderTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/RandomAccessFileTest.java b/test/java.io/RandomAccessFileTest.java
index 12da66497..8ee53b735 100644
--- a/test/java.io/RandomAccessFileTest.java
+++ b/test/java.io/RandomAccessFileTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/SequenceInputStreamTest.java b/test/java.io/SequenceInputStreamTest.java
index 0ca5fd988..7b2c91644 100644
--- a/test/java.io/SequenceInputStreamTest.java
+++ b/test/java.io/SequenceInputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/StreamTokenizerTest.java b/test/java.io/StreamTokenizerTest.java
index be739842c..e2d023f54 100644
--- a/test/java.io/StreamTokenizerTest.java
+++ b/test/java.io/StreamTokenizerTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/StringBufferInputStreamTest.java b/test/java.io/StringBufferInputStreamTest.java
index 289f9d1b5..adafac6e5 100644
--- a/test/java.io/StringBufferInputStreamTest.java
+++ b/test/java.io/StringBufferInputStreamTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/StringWriterTest.java b/test/java.io/StringWriterTest.java
index f6f11ad99..543360689 100644
--- a/test/java.io/StringWriterTest.java
+++ b/test/java.io/StringWriterTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/test/java.io/Test.java b/test/java.io/Test.java
index 4c8f8ee90..154884ecd 100644
--- a/test/java.io/Test.java
+++ b/test/java.io/Test.java
@@ -14,7 +14,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
public class Test
diff --git a/test/java.io/UTF8EncodingTest.java b/test/java.io/UTF8EncodingTest.java
index 62634ebf7..0c8d975b2 100644
--- a/test/java.io/UTF8EncodingTest.java
+++ b/test/java.io/UTF8EncodingTest.java
@@ -16,7 +16,7 @@
/*
/* You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the Free Software Foundation
-/* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA
+/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/*************************************************************************/
import java.io.*;
diff --git a/testsuite/javax.swing.text.html.parser/AllParserTests.java b/testsuite/javax.swing.text.html.parser/AllParserTests.java
index 8e9413a6d..d4fca263f 100644
--- a/testsuite/javax.swing.text.html.parser/AllParserTests.java
+++ b/testsuite/javax.swing.text.html.parser/AllParserTests.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/HTML_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/HTML_Test.java
index 7a0220c05..60247fd15 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/HTML_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/HTML_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/AttributeList_test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/AttributeList_test.java
index 02d174dba..31662778e 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/AttributeList_test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/AttributeList_test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/DTD_test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/DTD_test.java
index d539fff75..b204a024d 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/DTD_test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/DTD_test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Element_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Element_Test.java
index 355d9384e..039be4ab7 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Element_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Element_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Entity_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Entity_Test.java
index ff1dc118d..b9fd21c46 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Entity_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Entity_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_parsing.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_parsing.java
index 6f81c23ee..307238565 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_parsing.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_parsing.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_randomTable.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_randomTable.java
index ee3db8951..d7a52b51b 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_randomTable.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/HTML_randomTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserEntityResolverTest.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserEntityResolverTest.java
index 1ce8a1afd..414aadcc3 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserEntityResolverTest.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserEntityResolverTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserTest.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserTest.java
index 6b9146383..af12cbbdb 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserTest.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/ParserTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Parser_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Parser_Test.java
index b15185760..c3ba38a3c 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Parser_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Parser_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TagElement_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TagElement_Test.java
index dcf2edd42..12c07cf7a 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TagElement_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TagElement_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TestCase.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TestCase.java
index c0ce61413..84c160367 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TestCase.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/TestCase.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Text.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Text.java
index e7d08bd14..9fe592a1c 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Text.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Text.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Token_locations.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Token_locations.java
index a13b4b481..8cbcaad57 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Token_locations.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/Token_locations.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Buffer_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Buffer_Test.java
index ed21b5676..49d86c673 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Buffer_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Buffer_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Constants_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Constants_Test.java
index 5c422a121..4f463d152 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Constants_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/Constants_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/ReaderTokenizer_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/ReaderTokenizer_Test.java
index 60ff030e4..ebfda42a9 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/ReaderTokenizer_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/low/ReaderTokenizer_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/parameterDefaulter_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/parameterDefaulter_Test.java
index ad6667f9a..866a7fc7b 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/parameterDefaulter_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/parameterDefaulter_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/supplementaryNotifications.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/supplementaryNotifications.java
index 9cccfe91d..d17298fac 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/supplementaryNotifications.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/supplementaryNotifications.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/textPreProcessor_Test.java b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/textPreProcessor_Test.java
index cf13b7f06..9149c54f3 100644
--- a/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/textPreProcessor_Test.java
+++ b/testsuite/javax.swing.text.html.parser/test/gnu/javax/swing/text/html/parser/textPreProcessor_Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/testsuite/scheme/test.scm b/testsuite/scheme/test.scm
index a85bed490..74b4b21e7 100644
--- a/testsuite/scheme/test.scm
+++ b/testsuite/scheme/test.scm
@@ -18,7 +18,7 @@
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
-; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
; USA.
diff --git a/vm/reference/gnu/classpath/VMStackWalker.java b/vm/reference/gnu/classpath/VMStackWalker.java
index 7b673bcc8..28e4ce364 100644
--- a/vm/reference/gnu/classpath/VMStackWalker.java
+++ b/vm/reference/gnu/classpath/VMStackWalker.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/gnu/classpath/VMSystemProperties.java b/vm/reference/gnu/classpath/VMSystemProperties.java
index f0bda733a..e7cb91fde 100644
--- a/vm/reference/gnu/classpath/VMSystemProperties.java
+++ b/vm/reference/gnu/classpath/VMSystemProperties.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/gnu/java/nio/VMPipe.java b/vm/reference/gnu/java/nio/VMPipe.java
index 15693e52e..11dd2aa7b 100644
--- a/vm/reference/gnu/java/nio/VMPipe.java
+++ b/vm/reference/gnu/java/nio/VMPipe.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/gnu/java/nio/VMSelector.java b/vm/reference/gnu/java/nio/VMSelector.java
index 7d0606a77..488132d24 100644
--- a/vm/reference/gnu/java/nio/VMSelector.java
+++ b/vm/reference/gnu/java/nio/VMSelector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/io/VMFile.java b/vm/reference/java/io/VMFile.java
index 6b59da4d3..2931044c8 100644
--- a/vm/reference/java/io/VMFile.java
+++ b/vm/reference/java/io/VMFile.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/io/VMObjectInputStream.java b/vm/reference/java/io/VMObjectInputStream.java
index 5c0a400ef..7cd97192e 100644
--- a/vm/reference/java/io/VMObjectInputStream.java
+++ b/vm/reference/java/io/VMObjectInputStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/io/VMObjectStreamClass.java b/vm/reference/java/io/VMObjectStreamClass.java
index 1e22e433e..2aee7a9e6 100644
--- a/vm/reference/java/io/VMObjectStreamClass.java
+++ b/vm/reference/java/io/VMObjectStreamClass.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMClass.java b/vm/reference/java/lang/VMClass.java
index 6c82dfdb5..e3f31d3be 100644
--- a/vm/reference/java/lang/VMClass.java
+++ b/vm/reference/java/lang/VMClass.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMClassLoader.java b/vm/reference/java/lang/VMClassLoader.java
index fbfae9a6f..69f812ca5 100644
--- a/vm/reference/java/lang/VMClassLoader.java
+++ b/vm/reference/java/lang/VMClassLoader.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -282,4 +282,19 @@ final class VMClassLoader
{
return ClassLoader.defaultGetSystemClassLoader();
}
+
+ /**
+ * Set this field to true if the VM wants to keep its own cache.
+ * Note that this field is not final, to allow VMs to have a
+ * different setting without having to recompile ClassLoader.java.
+ */
+ static boolean USE_VM_CACHE = false;
+
+ /**
+ * If the VM wants to keep its own cache, this method can be replaced.
+ */
+ static Class findLoadedClass(ClassLoader cl, String name)
+ {
+ return (Class) cl.loadedClasses.get(name);
+ }
}
diff --git a/vm/reference/java/lang/VMCompiler.java b/vm/reference/java/lang/VMCompiler.java
index 64ae650ec..fe7400756 100644
--- a/vm/reference/java/lang/VMCompiler.java
+++ b/vm/reference/java/lang/VMCompiler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMDouble.java b/vm/reference/java/lang/VMDouble.java
index 0b7a35a5c..8a991c9ad 100644
--- a/vm/reference/java/lang/VMDouble.java
+++ b/vm/reference/java/lang/VMDouble.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMFloat.java b/vm/reference/java/lang/VMFloat.java
index 59301c16d..2e7f439a4 100644
--- a/vm/reference/java/lang/VMFloat.java
+++ b/vm/reference/java/lang/VMFloat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMObject.java b/vm/reference/java/lang/VMObject.java
index 9e33c4250..1d1ec40b5 100644
--- a/vm/reference/java/lang/VMObject.java
+++ b/vm/reference/java/lang/VMObject.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMProcess.java b/vm/reference/java/lang/VMProcess.java
index 10033000e..072a026af 100644
--- a/vm/reference/java/lang/VMProcess.java
+++ b/vm/reference/java/lang/VMProcess.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMRuntime.java b/vm/reference/java/lang/VMRuntime.java
index 596111543..b685b3512 100644
--- a/vm/reference/java/lang/VMRuntime.java
+++ b/vm/reference/java/lang/VMRuntime.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMString.java b/vm/reference/java/lang/VMString.java
index aa4b02bd9..7e65eed98 100644
--- a/vm/reference/java/lang/VMString.java
+++ b/vm/reference/java/lang/VMString.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMSystem.java b/vm/reference/java/lang/VMSystem.java
index 34539ead7..d91f4f897 100644
--- a/vm/reference/java/lang/VMSystem.java
+++ b/vm/reference/java/lang/VMSystem.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMThread.java b/vm/reference/java/lang/VMThread.java
index dccf8bb84..4f886cc77 100644
--- a/vm/reference/java/lang/VMThread.java
+++ b/vm/reference/java/lang/VMThread.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/VMThrowable.java b/vm/reference/java/lang/VMThrowable.java
index 2a1a6fb88..19a204e88 100644
--- a/vm/reference/java/lang/VMThrowable.java
+++ b/vm/reference/java/lang/VMThrowable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/reflect/Constructor.java b/vm/reference/java/lang/reflect/Constructor.java
index 0692f92f9..a5a61fc5b 100644
--- a/vm/reference/java/lang/reflect/Constructor.java
+++ b/vm/reference/java/lang/reflect/Constructor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/reflect/Field.java b/vm/reference/java/lang/reflect/Field.java
index f82fc4a58..eb680ac6f 100644
--- a/vm/reference/java/lang/reflect/Field.java
+++ b/vm/reference/java/lang/reflect/Field.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/reflect/Method.java b/vm/reference/java/lang/reflect/Method.java
index d6aea0b6d..2ece524b6 100644
--- a/vm/reference/java/lang/reflect/Method.java
+++ b/vm/reference/java/lang/reflect/Method.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/lang/reflect/VMProxy.java b/vm/reference/java/lang/reflect/VMProxy.java
new file mode 100644
index 000000000..d3a2f17b7
--- /dev/null
+++ b/vm/reference/java/lang/reflect/VMProxy.java
@@ -0,0 +1,136 @@
+/* VMProxy.java -- VM interface for proxy class
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang.reflect;
+
+final class VMProxy
+{
+ /**
+ * Set to true if the VM provides a native method to implement
+ * Proxy.getProxyClass completely, including argument verification.
+ * If this is true, HAVE_NATIVE_GET_PROXY_DATA and
+ * HAVE_NATIVE_GENERATE_PROXY_CLASS should be false.
+ * @see java.lang.reflect.Proxy
+ */
+ static boolean HAVE_NATIVE_GET_PROXY_CLASS = false;
+
+ /**
+ * Set to true if the VM provides a native method to implement
+ * the first part of Proxy.getProxyClass: generation of the array
+ * of methods to convert, and verification of the arguments.
+ * If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
+ * @see java.lang.reflect.Proxy
+ */
+ static boolean HAVE_NATIVE_GET_PROXY_DATA = false;
+
+ /**
+ * Set to true if the VM provides a native method to implement
+ * the second part of Proxy.getProxyClass: conversion of an array of
+ * methods into an actual proxy class.
+ * If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
+ * @see java.lang.reflect.Proxy
+ */
+ static boolean HAVE_NATIVE_GENERATE_PROXY_CLASS = false;
+
+ /**
+ * Optional native method to replace (and speed up) the pure Java
+ * implementation of getProxyClass. Only needed if
+ * VMProxy.HAVE_NATIVE_GET_PROXY_CLASS is true, this does the
+ * work of both getProxyData and generateProxyClass with no
+ * intermediate form in Java. The native code may safely assume that
+ * this class must be created, and does not already exist.
+ *
+ * @param loader the class loader to define the proxy class in; null
+ * implies the bootstrap class loader
+ * @param interfaces the interfaces the class will extend
+ * @return the generated proxy class
+ * @throws IllegalArgumentException if the constraints for getProxyClass
+ * were violated, except for problems with null
+ * @throws NullPointerException if `interfaces' is null or contains
+ * a null entry, or if handler is null
+ * @see Configuration#HAVE_NATIVE_GET_PROXY_CLASS
+ * @see #getProxyClass(ClassLoader, Class[])
+ * @see #getProxyData(ClassLoader, Class[])
+ * @see #generateProxyClass(ProxyData)
+ */
+ static native Class getProxyClass(ClassLoader loader, Class[] interfaces);
+
+ /**
+ * Optional native method to replace (and speed up) the pure Java
+ * implementation of getProxyData. Only needed if
+ * Configuration.HAVE_NATIVE_GET_PROXY_DATA is true. The native code
+ * may safely assume that a new ProxyData object must be created which
+ * does not duplicate any existing ones.
+ *
+ * @param loader the class loader to define the proxy class in; null
+ * implies the bootstrap class loader
+ * @param interfaces the interfaces the class will extend
+ * @return all data that is required to make this proxy class
+ * @throws IllegalArgumentException if the constraints for getProxyClass
+ * were violated, except for problems with null
+ * @throws NullPointerException if `interfaces' is null or contains
+ * a null entry, or if handler is null
+ * @see Configuration.HAVE_NATIVE_GET_PROXY_DATA
+ * @see #getProxyClass(ClassLoader, Class[])
+ * @see #getProxyClass(ClassLoader, Class[])
+ * @see ProxyType#getProxyData()
+ */
+ static native Proxy.ProxyData getProxyData(ClassLoader loader,
+ Class[] interfaces);
+
+ /**
+ * Optional native method to replace (and speed up) the pure Java
+ * implementation of generateProxyClass. Only needed if
+ * Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS is true. The native
+ * code may safely assume that a new Class must be created, and that
+ * the ProxyData object does not describe any existing class.
+ *
+ * @param loader the class loader to define the proxy class in; null
+ * implies the bootstrap class loader
+ * @param data the struct of information to convert to a Class. This
+ * has already been verified for all problems except exceeding
+ * VM limitations
+ * @return the newly generated class
+ * @throws IllegalArgumentException if VM limitations are exceeded
+ * @see #getProxyClass(ClassLoader, Class[])
+ * @see #getProxyClass(ClassLoader, Class[])
+ * @see ProxyData#generateProxyClass(ClassLoader)
+ */
+ static native Class generateProxyClass(ClassLoader loader,
+ Proxy.ProxyData data);
+}
diff --git a/vm/reference/java/net/VMInetAddress.java b/vm/reference/java/net/VMInetAddress.java
index e24a8b743..1253ded73 100644
--- a/vm/reference/java/net/VMInetAddress.java
+++ b/vm/reference/java/net/VMInetAddress.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/net/VMNetworkInterface.java b/vm/reference/java/net/VMNetworkInterface.java
index 3aaca3872..af71ce294 100644
--- a/vm/reference/java/net/VMNetworkInterface.java
+++ b/vm/reference/java/net/VMNetworkInterface.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/nio/VMDirectByteBuffer.java b/vm/reference/java/nio/VMDirectByteBuffer.java
index 1fe8a8cdd..480e6d10b 100644
--- a/vm/reference/java/nio/VMDirectByteBuffer.java
+++ b/vm/reference/java/nio/VMDirectByteBuffer.java
@@ -1,4 +1,4 @@
-/* VMDirectByteBuffer.java --
+/* VMDirectByteBuffer.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,12 +55,13 @@ final class VMDirectByteBuffer
}
private static native void init();
-
+
static native RawData allocate (int capacity);
static native void free(RawData address);
static native byte get(RawData address, int index);
static native void get(RawData address, int index, byte[] dst, int offset, int length);
static native void put(RawData address, int index, byte value);
+ static native void put(RawData address, int index, byte[] src, int offset, int length);
static native RawData adjustAddress(RawData address, int offset);
static native void shiftDown(RawData address, int dst_offset, int src_offset, int count);
}
diff --git a/vm/reference/java/nio/channels/VMChannels.java b/vm/reference/java/nio/channels/VMChannels.java
index 04f278f1d..e58d7fbf9 100644
--- a/vm/reference/java/nio/channels/VMChannels.java
+++ b/vm/reference/java/nio/channels/VMChannels.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/security/VMAccessController.java b/vm/reference/java/security/VMAccessController.java
index 80798117d..7058a5e34 100644
--- a/vm/reference/java/security/VMAccessController.java
+++ b/vm/reference/java/security/VMAccessController.java
@@ -13,8 +13,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/vm/reference/java/util/VMTimeZone.java b/vm/reference/java/util/VMTimeZone.java
index 77c055b2a..86b625843 100644
--- a/vm/reference/java/util/VMTimeZone.java
+++ b/vm/reference/java/util/VMTimeZone.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and